Configurable feature seeds (#6531)
Co-authored-by: Thonk 30448663+ExcessiveAmountsOfZombies@users.noreply.github.com Also includes an option to auto-generate random seeds for all features and add them to the config.
This commit is contained in:
parent
05cb10c56f
commit
7bd7b18811
82 changed files with 265 additions and 162 deletions
|
@ -489,10 +489,10 @@ index 0000000000000000000000000000000000000000..a632a796a3e5f2b361a521d70581b83a
|
|||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..b31109d2dadd29e8852468c19265066b773d2be0
|
||||
index 0000000000000000000000000000000000000000..0f80a0d930bff8c19440ee33a4c8d56d17495b5f
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +1,68 @@
|
||||
@@ -0,0 +1,73 @@
|
||||
+package com.destroystokyo.paper;
|
||||
+
|
||||
+import java.util.List;
|
||||
|
@ -546,6 +546,11 @@ index 0000000000000000000000000000000000000000..b31109d2dadd29e8852468c19265066b
|
|||
+ return config.getInt("world-settings." + worldName + "." + path, config.getInt("world-settings.default." + path));
|
||||
+ }
|
||||
+
|
||||
+ private long getLong(String path, long def) {
|
||||
+ config.addDefault("world-settings.default." + path, def);
|
||||
+ return config.getLong("world-settings." + worldName + "." + path, config.getLong("world-settings.default." + path));
|
||||
+ }
|
||||
+
|
||||
+ private float getFloat(String path, float def) {
|
||||
+ // TODO: Figure out why getFloat() always returns the default value.
|
||||
+ return (float) getDouble(path, (double) def);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue