diff --git a/patches/server/Add-option-to-make-parrots-stay-on-shoulders-despite.patch b/patches/server/Add-option-to-make-parrots-stay-on-shoulders-despite.patch index f720fb5f0b..893842e56e 100644 --- a/patches/server/Add-option-to-make-parrots-stay-on-shoulders-despite.patch +++ b/patches/server/Add-option-to-make-parrots-stay-on-shoulders-despite.patch @@ -15,7 +15,7 @@ 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 { - maxCollisionsPerEntity = getInt( "max-entity-collisions", this.spigotConfig.getInt("max-entity-collisions", 8) ); + maxCollisionsPerEntity = getInt( "max-entity-collisions", this.spigotConfig.getInt("max-entity-collisions", this.maxCollisionsPerEntity, false) ); log( "Max Entity Collisions: " + maxCollisionsPerEntity ); } + diff --git a/patches/server/Cap-Entity-Collisions.patch b/patches/server/Cap-Entity-Collisions.patch index 97829847e8..740c5ad34e 100644 --- a/patches/server/Cap-Entity-Collisions.patch +++ b/patches/server/Cap-Entity-Collisions.patch @@ -20,9 +20,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } } + -+ public int maxCollisionsPerEntity; ++ public int maxCollisionsPerEntity = 8; + private void maxEntityCollision() { -+ maxCollisionsPerEntity = getInt( "max-entity-collisions", this.spigotConfig.getInt("max-entity-collisions", 8) ); ++ maxCollisionsPerEntity = getInt( "max-entity-collisions", this.spigotConfig.getInt("max-entity-collisions", this.maxCollisionsPerEntity, false) ); + log( "Max Entity Collisions: " + maxCollisionsPerEntity ); + } } diff --git a/patches/server/Paper-config-files.patch b/patches/server/Paper-config-files.patch index 59d90990d4..a59c832faf 100644 --- a/patches/server/Paper-config-files.patch +++ b/patches/server/Paper-config-files.patch @@ -795,3 +795,24 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } }; +diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java ++++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java +@@ -0,0 +0,0 @@ public class SpigotWorldConfig + + public int getInt(String path, int def) + { +- this.config.addDefault( "world-settings.default." + path, def ); +- return this.config.getInt( "world-settings." + this.worldName + "." + path, this.config.getInt( "world-settings.default." + path ) ); ++ // Paper start - get int without setting default ++ return this.getInt(path, def, true); ++ } ++ public int getInt(String path, int def, boolean setDef) ++ { ++ if (setDef) this.config.addDefault( "world-settings.default." + path, def ); ++ return this.config.getInt( "world-settings." + this.worldName + "." + path, this.config.getInt( "world-settings.default." + path, def ) ); ++ // Paper end + } + + public List getList(String path, T def)