geforkt von Mirrors/Paper
bump the default maxMobSpawns default to 250, and add support for unlimited
Use -1 to represent vanilla/unlimited. Updated PaperWorldConfig to also update the individual worlds limit if it was set to the new default value. Should hopefully help #235
Dieser Commit ist enthalten in:
Ursprung
478f246490
Commit
4bead5b898
@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
maxMobSpawnAttempts = getInt("max-mob-spawn-attempts", 50);
|
||||
log( "Max Mob Spawn Attempts: " + maxMobSpawnAttempts);
|
||||
}
|
||||
}
|
||||
}
|
||||
+
|
||||
+ public boolean frostedIceEnabled = true;
|
||||
|
@ -20,8 +20,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ public int maxMobSpawnAttempts;
|
||||
+ private void maxMobSpawnAttempts() {
|
||||
+ maxMobSpawnAttempts = getInt("max-mob-spawn-attempts", 50);
|
||||
+ maxMobSpawnAttempts = getInt("max-mob-spawn-attempts", 250);
|
||||
+ log( "Max Mob Spawn Attempts: " + maxMobSpawnAttempts);
|
||||
+ if (maxMobSpawnAttempts < 0) {
|
||||
+ maxMobSpawnAttempts = Integer.MAX_VALUE;
|
||||
+ } else {
|
||||
+ if (maxMobSpawnAttempts < 250 && PaperConfig.version < 10) {
|
||||
+ set("max-mob-spawn-attempts", 250);
|
||||
+ maxMobSpawnAttempts = 250;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
|
@ -66,8 +66,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ commands = new HashMap<String, Command>();
|
||||
+
|
||||
+ version = getInt("config-version", 9);
|
||||
+ set("config-version", 9);
|
||||
+ version = getInt("config-version", 10);
|
||||
+ set("config-version", 10);
|
||||
+ readConfig(PaperConfig.class, null);
|
||||
+ }
|
||||
+
|
||||
@ -217,6 +217,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ private void set(String path, Object val) {
|
||||
+ config.set("world-settings.default." + path, val);
|
||||
+ if (config.get("world-settings." + worldName + "." + path) != null) {
|
||||
+ config.set("world-settings." + worldName + "." + path, val);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private boolean getBoolean(String path, boolean def) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren