From 3d1926e6e020dc29c26ca3d8db32afce04fee6b5 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Mon, 21 Dec 2020 01:08:44 -0600 Subject: [PATCH] More base attribute stuff --- ...-Configurable-entity-base-attributes.patch | 915 +++++++++++++++--- .../server/0161-Phantom-flames-on-swoop.patch | 12 +- ...s-to-open-even-with-a-solid-block-on.patch | 2 +- .../0164-Striders-give-saddle-back.patch | 14 +- 4 files changed, 769 insertions(+), 174 deletions(-) diff --git a/patches/server/0160-Configurable-entity-base-attributes.patch b/patches/server/0160-Configurable-entity-base-attributes.patch index e7990904e..3b25f05ef 100644 --- a/patches/server/0160-Configurable-entity-base-attributes.patch +++ b/patches/server/0160-Configurable-entity-base-attributes.patch @@ -379,79 +379,171 @@ index a1578aade4a535144b5e40277c902f2e9ab9e940..2fa388776e68f6f0d4d985a451a0a2b0 @Override diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java -index b19995f962180a44ff388d58a26cc5782d0826e4..0225f57f9d99c53f47a1a086415f9235803c9c9e 100644 +index b19995f962180a44ff388d58a26cc5782d0826e4..839c862a3936ee298ed80b3ed0179ba8b171a60d 100644 --- a/src/main/java/net/minecraft/server/EntityHorse.java +++ b/src/main/java/net/minecraft/server/EntityHorse.java -@@ -22,6 +22,14 @@ public class EntityHorse extends EntityHorseAbstract { +@@ -22,13 +22,30 @@ public class EntityHorse extends EntityHorseAbstract { int getPurpurBreedTime() { return this.world.purpurConfig.horseBreedingTicks; } + + @Override -+ public void initAttributes(World world) { -+ if (world != null) { -+ this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(generateMaxHealth(world.purpurConfig.horseMaxHealthMin, world.purpurConfig.horseMaxHealthMax)); -+ setHealth(getMaxHealth()); -+ } ++ public float generateMaxHealth() { ++ return (float) generateMaxHealth(world.purpurConfig.horseMaxHealthMin, world.purpurConfig.horseMaxHealthMax); ++ } ++ ++ @Override ++ public double generateJumpStrength() { ++ return generateJumpStrength(world.purpurConfig.horseJumpStrengthMin, world.purpurConfig.horseJumpStrengthMax); ++ } ++ ++ @Override ++ public double generateMovementSpeed() { ++ return generateMovementSpeed(world.purpurConfig.horseMovementSpeedMin, world.purpurConfig.horseMovementSpeedMax); + } // Purpur end @Override -diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java -index bb3ebf70f460c459defda833d6f40026321ad638..049f73b509974d9c7528e1126db325dca83c54b3 100644 ---- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java -+++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java -@@ -863,6 +863,16 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven - + protected void eK() { +- this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue((double) this.fp()); +- this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(this.fr()); +- this.getAttributeInstance(GenericAttributes.JUMP_STRENGTH).setValue(this.fq()); ++ // Purpur start ++ this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(this.generateMaxHealth()); ++ this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(this.generateMovementSpeed()); ++ this.getAttributeInstance(GenericAttributes.JUMP_STRENGTH).setValue(this.generateJumpStrength()); ++ // Purpur end } -+ // Purpur start + @Override +diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java +index bb3ebf70f460c459defda833d6f40026321ad638..260b816e0d3c93afeaf8160306fdef0c3c6e12fd 100644 +--- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java ++++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java +@@ -55,6 +55,30 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven + public boolean isRidableInWater() { + return false; + } ++ ++ @Override ++ public void initAttributes(World world) { ++ setHealth(getMaxHealth()); ++ } ++ + protected double generateMaxHealth(double min, double max) { ++ if (min == max) return min; + int diff = MathHelper.floor(max - min); + double base = max - diff; + int first = MathHelper.floor((double) diff / 2); + int rest = diff - first; + return base + random.nextInt(first + 1) + random.nextInt(rest + 1); + } -+ // Purpur end + - protected float fp() { ++ protected double generateJumpStrength(double min, double max) { ++ if (min == max) return min; ++ return min + (max - min) * this.random.nextDouble(); ++ } ++ ++ protected double generateMovementSpeed(double min, double max) { ++ if (min == max) return min; ++ return min + (max - min) * this.random.nextDouble(); ++ } + // Purpur end + + @Override +@@ -806,6 +830,8 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven + double d2 = this.c(GenericAttributes.MOVEMENT_SPEED) + entityageable.c(GenericAttributes.MOVEMENT_SPEED) + this.fr(); + + entityhorseabstract.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(d2 / 3.0D); ++ ++ entityhorseabstract.setHealth(entityhorseabstract.getMaxHealth()); // Purpur + } + + @Override +@@ -863,15 +889,15 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven + + } + +- protected float fp() { ++ protected float fp() { return generateMaxHealth(); } public float generateMaxHealth() { // Purpur - OBFHELPER return 15.0F + (float) this.random.nextInt(8) + (float) this.random.nextInt(9); } + +- protected double fq() { ++ protected double fq() { return generateJumpStrength(); } public double generateJumpStrength() { // Purpur - OBFHELPER + return 0.4000000059604645D + this.random.nextDouble() * 0.2D + this.random.nextDouble() * 0.2D + this.random.nextDouble() * 0.2D; + } + +- protected double fr() { ++ protected double fr() { return generateMovementSpeed(); } public double generateMovementSpeed() { // Purpur - OBFHELPER + return (0.44999998807907104D + this.random.nextDouble() * 0.3D + this.random.nextDouble() * 0.3D + this.random.nextDouble() * 0.3D) * 0.25D; + } + +diff --git a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java +index 3bcebb89c9f9a5243d1d215a47d7d5e64d2529b2..f59c7c7ebc1233319dca0686db06fd5421954b63 100644 +--- a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java ++++ b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java +@@ -11,7 +11,11 @@ public abstract class EntityHorseChestedAbstract extends EntityHorseAbstract { + + @Override + protected void eK() { +- this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue((double) this.fp()); ++ // Purpur start ++ this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(this.generateMaxHealth()); ++ this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(this.generateMovementSpeed()); ++ this.getAttributeInstance(GenericAttributes.JUMP_STRENGTH).setValue(this.generateJumpStrength()); ++ // Purpur end + } + + @Override diff --git a/src/main/java/net/minecraft/server/EntityHorseDonkey.java b/src/main/java/net/minecraft/server/EntityHorseDonkey.java -index f6421bb45c5e6adf39fdc085efe2b2f500b76c0c..44a9cc76d999341373c38e551ee2d58bb5a12458 100644 +index f6421bb45c5e6adf39fdc085efe2b2f500b76c0c..3394c8dab2b2a91dd301c8a9bd71f0cef1a0c9df 100644 --- a/src/main/java/net/minecraft/server/EntityHorseDonkey.java +++ b/src/main/java/net/minecraft/server/EntityHorseDonkey.java -@@ -18,6 +18,14 @@ public class EntityHorseDonkey extends EntityHorseChestedAbstract { +@@ -18,6 +18,21 @@ public class EntityHorseDonkey extends EntityHorseChestedAbstract { int getPurpurBreedTime() { return this.world.purpurConfig.donkeyBreedingTicks; } + + @Override -+ public void initAttributes(World world) { -+ if (world != null) { -+ this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(generateMaxHealth(world.purpurConfig.donkeyMaxHealthMin, world.purpurConfig.donkeyMaxHealthMax)); -+ setHealth(getMaxHealth()); -+ } ++ public float generateMaxHealth() { ++ return (float) generateMaxHealth(world.purpurConfig.donkeyMaxHealthMin, world.purpurConfig.donkeyMaxHealthMax); ++ } ++ ++ @Override ++ public double generateJumpStrength() { ++ return generateJumpStrength(world.purpurConfig.donkeyJumpStrengthMin, world.purpurConfig.donkeyJumpStrengthMax); ++ } ++ ++ @Override ++ public double generateMovementSpeed() { ++ return generateMovementSpeed(world.purpurConfig.donkeyMovementSpeedMin, world.purpurConfig.donkeyMovementSpeedMax); + } // Purpur end @Override diff --git a/src/main/java/net/minecraft/server/EntityHorseMule.java b/src/main/java/net/minecraft/server/EntityHorseMule.java -index 30cbc505d2b0f4d3247edfd271de8daab023eb2a..d57ed7a9691b953abba5f6db934ce11bdc4a6ff9 100644 +index 30cbc505d2b0f4d3247edfd271de8daab023eb2a..56476d1b5aa5049b865cd4d0704ec7df83dc91c9 100644 --- a/src/main/java/net/minecraft/server/EntityHorseMule.java +++ b/src/main/java/net/minecraft/server/EntityHorseMule.java -@@ -18,7 +18,16 @@ public class EntityHorseMule extends EntityHorseChestedAbstract { +@@ -18,7 +18,23 @@ public class EntityHorseMule extends EntityHorseChestedAbstract { int getPurpurBreedTime() { return this.world.purpurConfig.muleBreedingTicks; } + + @Override -+ public void initAttributes(World world) { -+ if (world != null) { -+ this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(generateMaxHealth(world.purpurConfig.muleMaxHealthMin, world.purpurConfig.muleMaxHealthMax)); -+ setHealth(getMaxHealth()); -+ } ++ public float generateMaxHealth() { ++ return (float) generateMaxHealth(world.purpurConfig.muleMaxHealthMin, world.purpurConfig.muleMaxHealthMax); ++ } ++ ++ @Override ++ public double generateJumpStrength() { ++ return generateJumpStrength(world.purpurConfig.muleJumpStrengthMin, world.purpurConfig.muleJumpStrengthMax); ++ } ++ ++ @Override ++ public double generateMovementSpeed() { ++ return generateMovementSpeed(world.purpurConfig.muleMovementSpeedMin, world.purpurConfig.muleMovementSpeedMax); + } // Purpur end + @@ -459,43 +551,83 @@ index 30cbc505d2b0f4d3247edfd271de8daab023eb2a..d57ed7a9691b953abba5f6db934ce11b protected SoundEffect getSoundAmbient() { super.getSoundAmbient(); diff --git a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java -index 408db52cacbdfbca8af0a6a8e913b0128a3f5a76..b4d01a17a34e371231efbaa64732d060ccdd6409 100644 +index 408db52cacbdfbca8af0a6a8e913b0128a3f5a76..68116289a0d89df1b0aec5aa7b0fde5f5657fd1b 100644 --- a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java +++ b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java -@@ -27,6 +27,14 @@ public class EntityHorseSkeleton extends EntityHorseAbstract { +@@ -27,6 +27,21 @@ public class EntityHorseSkeleton extends EntityHorseAbstract { int getPurpurBreedTime() { return 6000; } + + @Override -+ public void initAttributes(World world) { -+ if (world != null) { -+ this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(world.purpurConfig.skeletonHorseMaxHealth); -+ setHealth(getMaxHealth()); -+ } ++ public float generateMaxHealth() { ++ return (float) generateMaxHealth(world.purpurConfig.skeletonHorseMaxHealthMin, world.purpurConfig.skeletonHorseMaxHealthMax); ++ } ++ ++ @Override ++ public double generateJumpStrength() { ++ return generateJumpStrength(world.purpurConfig.skeletonHorseJumpStrengthMin, world.purpurConfig.skeletonHorseJumpStrengthMax); ++ } ++ ++ @Override ++ public double generateMovementSpeed() { ++ return generateMovementSpeed(world.purpurConfig.skeletonHorseMovementSpeedMin, world.purpurConfig.skeletonHorseMovementSpeedMax); + } // Purpur end public static AttributeProvider.Builder eL() { +@@ -35,7 +50,11 @@ public class EntityHorseSkeleton extends EntityHorseAbstract { + + @Override + protected void eK() { +- this.getAttributeInstance(GenericAttributes.JUMP_STRENGTH).setValue(this.fq()); ++ // Purpur start ++ this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(this.generateMaxHealth()); ++ this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(this.generateMovementSpeed()); ++ this.getAttributeInstance(GenericAttributes.JUMP_STRENGTH).setValue(this.generateJumpStrength()); ++ // Purpur end + } + + @Override diff --git a/src/main/java/net/minecraft/server/EntityHorseZombie.java b/src/main/java/net/minecraft/server/EntityHorseZombie.java -index 2121a6c979ba2ea7cb596ca6081750d2f8c7df9f..5a89a37e78c174d54c0dabe242252bcf3fd76d5f 100644 +index 2121a6c979ba2ea7cb596ca6081750d2f8c7df9f..565e499331564d921c6be56a824750b1bf013a48 100644 --- a/src/main/java/net/minecraft/server/EntityHorseZombie.java +++ b/src/main/java/net/minecraft/server/EntityHorseZombie.java -@@ -23,6 +23,14 @@ public class EntityHorseZombie extends EntityHorseAbstract { +@@ -23,6 +23,21 @@ public class EntityHorseZombie extends EntityHorseAbstract { int getPurpurBreedTime() { return 6000; } + + @Override -+ public void initAttributes(World world) { -+ if (world != null) { -+ this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(world.purpurConfig.zombieHorseMaxHealth); -+ setHealth(getMaxHealth()); -+ } ++ public float generateMaxHealth() { ++ return (float) generateMaxHealth(world.purpurConfig.zombieHorseMaxHealthMin, world.purpurConfig.zombieHorseMaxHealthMax); ++ } ++ ++ @Override ++ public double generateJumpStrength() { ++ return generateJumpStrength(world.purpurConfig.zombieHorseJumpStrengthMin, world.purpurConfig.zombieHorseJumpStrengthMax); ++ } ++ ++ @Override ++ public double generateMovementSpeed() { ++ return generateMovementSpeed(world.purpurConfig.zombieHorseMovementSpeedMin, world.purpurConfig.zombieHorseMovementSpeedMax); + } // Purpur end public static AttributeProvider.Builder eL() { +@@ -31,7 +46,11 @@ public class EntityHorseZombie extends EntityHorseAbstract { + + @Override + protected void eK() { +- this.getAttributeInstance(GenericAttributes.JUMP_STRENGTH).setValue(this.fq()); ++ // Purpur start ++ this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(this.generateMaxHealth()); ++ this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(this.generateMovementSpeed()); ++ this.getAttributeInstance(GenericAttributes.JUMP_STRENGTH).setValue(this.generateJumpStrength()); ++ // Purpur end + } + + @Override diff --git a/src/main/java/net/minecraft/server/EntityIronGolem.java b/src/main/java/net/minecraft/server/EntityIronGolem.java index 9ee03b233b71d1b4b85a9a5e1f0ea9feb55dfe43..de4a4f4d6a025de5461fcaa68a455d3d47352370 100644 --- a/src/main/java/net/minecraft/server/EntityIronGolem.java @@ -516,39 +648,53 @@ index 9ee03b233b71d1b4b85a9a5e1f0ea9feb55dfe43..de4a4f4d6a025de5461fcaa68a455d3d @Override diff --git a/src/main/java/net/minecraft/server/EntityLlama.java b/src/main/java/net/minecraft/server/EntityLlama.java -index 3bc6e6df9e0107debe5b15f5f7aad97ad336f304..1f85da762f90486685359acf97c7c9627c317ef4 100644 +index 3bc6e6df9e0107debe5b15f5f7aad97ad336f304..1405fa71aeeef915fef3737cd8af9b1dbe229aaf 100644 --- a/src/main/java/net/minecraft/server/EntityLlama.java +++ b/src/main/java/net/minecraft/server/EntityLlama.java -@@ -62,6 +62,14 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn +@@ -62,6 +62,21 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn int getPurpurBreedTime() { return this.world.purpurConfig.llamaBreedingTicks; } + + @Override -+ public void initAttributes(World world) { -+ if (world != null) { -+ this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(generateMaxHealth(world.purpurConfig.llamaMaxHealthMin, world.purpurConfig.llamaMaxHealthMax)); -+ setHealth(getMaxHealth()); -+ } ++ public float generateMaxHealth() { ++ return (float) generateMaxHealth(world.purpurConfig.llamaMaxHealthMin, world.purpurConfig.llamaMaxHealthMax); ++ } ++ ++ @Override ++ public double generateJumpStrength() { ++ return generateJumpStrength(world.purpurConfig.llamaJumpStrengthMin, world.purpurConfig.llamaJumpStrengthMax); ++ } ++ ++ @Override ++ public double generateMovementSpeed() { ++ return generateMovementSpeed(world.purpurConfig.llamaMovementSpeedMin, world.purpurConfig.llamaMovementSpeedMax); + } // Purpur end public void setStrength(int i) { diff --git a/src/main/java/net/minecraft/server/EntityLlamaTrader.java b/src/main/java/net/minecraft/server/EntityLlamaTrader.java -index b6aae5cdee1f8bb842ab8e06c47fb497576b464f..592c3cbcf8e19ea556d014e15cf5b3c0b8ce49a5 100644 +index b6aae5cdee1f8bb842ab8e06c47fb497576b464f..9d94b2d1acc3e4dbc87bf441c8a886f1977bd66b 100644 --- a/src/main/java/net/minecraft/server/EntityLlamaTrader.java +++ b/src/main/java/net/minecraft/server/EntityLlamaTrader.java -@@ -26,6 +26,14 @@ public class EntityLlamaTrader extends EntityLlama { +@@ -26,6 +26,21 @@ public class EntityLlamaTrader extends EntityLlama { public boolean hasSaddle() { return super.hasSaddle() || isTamed(); } + + @Override -+ public void initAttributes(World world) { -+ if (world != null) { -+ this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(generateMaxHealth(world.purpurConfig.llamaTraderMaxHealthMin, world.purpurConfig.llamaTraderMaxHealthMax)); -+ setHealth(getMaxHealth()); -+ } ++ public float generateMaxHealth() { ++ return (float) generateMaxHealth(world.purpurConfig.llamaTraderMaxHealthMin, world.purpurConfig.llamaTraderMaxHealthMax); ++ } ++ ++ @Override ++ public double generateJumpStrength() { ++ return generateJumpStrength(world.purpurConfig.llamaTraderJumpStrengthMin, world.purpurConfig.llamaTraderJumpStrengthMax); ++ } ++ ++ @Override ++ public double generateMovementSpeed() { ++ return generateMovementSpeed(world.purpurConfig.llamaTraderMovementSpeedMin, world.purpurConfig.llamaTraderMovementSpeedMax); + } // Purpur end @@ -1354,10 +1500,10 @@ index 0c47477b416980d2e932321730525bf5a8feda4f..d6352539a5639db84f5654ba808f74ba @Override diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea8ca5986d 100644 +index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..0db403f19e0131a8a49d28bc7bd3534b2b76c3b7 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -@@ -473,30 +473,36 @@ public class PurpurWorldConfig { +@@ -473,30 +473,51 @@ public class PurpurWorldConfig { public boolean batRidable = false; public boolean batRidableInWater = false; public double batMaxY = 256D; @@ -1366,7 +1512,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea batRidable = getBoolean("mobs.bat.ridable", batRidable); batRidableInWater = getBoolean("mobs.bat.ridable-in-water", batRidableInWater); batMaxY = getDouble("mobs.bat.ridable-max-y", batMaxY); -+ batMaxHealth = getDouble("mobs.bat.attributes.max-health", batMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.bat.attributes.max-health", batMaxHealth); ++ set("mobs.bat.attributes.max-health", null); ++ set("mobs.bat.attributes.max_health", oldValue); ++ } ++ batMaxHealth = getDouble("mobs.bat.attributes.max_health", batMaxHealth); } public boolean beeRidable = false; @@ -1379,7 +1530,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea beeRidableInWater = getBoolean("mobs.bee.ridable-in-water", beeRidableInWater); beeMaxY = getDouble("mobs.bee.ridable-max-y", beeMaxY); beeBreedingTicks = getInt("mobs.bee.breeding-delay-ticks", beeBreedingTicks); -+ beeMaxHealth = getDouble("mobs.bee.attributes.max-health", beeMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.bee.attributes.max-health", beeMaxHealth); ++ set("mobs.bee.attributes.max-health", null); ++ set("mobs.bee.attributes.max_health", oldValue); ++ } ++ beeMaxHealth = getDouble("mobs.bee.attributes.max_health", beeMaxHealth); } public boolean blazeRidable = false; @@ -1390,11 +1546,16 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea blazeRidable = getBoolean("mobs.blaze.ridable", blazeRidable); blazeRidableInWater = getBoolean("mobs.blaze.ridable-in-water", blazeRidableInWater); blazeMaxY = getDouble("mobs.blaze.ridable-max-y", blazeMaxY); -+ blazeMaxHealth = getDouble("mobs.blaze.attributes.max-health", blazeMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.blaze.attributes.max-health", blazeMaxHealth); ++ set("mobs.blaze.attributes.max-health", null); ++ set("mobs.blaze.attributes.max_health", oldValue); ++ } ++ blazeMaxHealth = getDouble("mobs.blaze.attributes.max_health", blazeMaxHealth); } public boolean catRidable = false; -@@ -505,6 +511,7 @@ public class PurpurWorldConfig { +@@ -505,6 +526,7 @@ public class PurpurWorldConfig { public int catSpawnSwampHutScanRange = 16; public int catSpawnVillageScanRange = 48; public int catBreedingTicks = 6000; @@ -1402,11 +1563,16 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void catSettings() { catRidable = getBoolean("mobs.cat.ridable", catRidable); catRidableInWater = getBoolean("mobs.cat.ridable-in-water", catRidableInWater); -@@ -512,51 +519,62 @@ public class PurpurWorldConfig { +@@ -512,51 +534,92 @@ public class PurpurWorldConfig { catSpawnSwampHutScanRange = getInt("mobs.cat.scan-range-for-other-cats.swamp-hut", catSpawnSwampHutScanRange); catSpawnVillageScanRange = getInt("mobs.cat.scan-range-for-other-cats.village", catSpawnVillageScanRange); catBreedingTicks = getInt("mobs.cat.breeding-delay-ticks", catBreedingTicks); -+ catMaxHealth = getDouble("mobs.cat.attributes.max-health", catMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.cat.attributes.max-health", catMaxHealth); ++ set("mobs.cat.attributes.max-health", null); ++ set("mobs.cat.attributes.max_health", oldValue); ++ } ++ catMaxHealth = getDouble("mobs.cat.attributes.max_health", catMaxHealth); } public boolean caveSpiderRidable = false; @@ -1415,7 +1581,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void caveSpiderSettings() { caveSpiderRidable = getBoolean("mobs.cave_spider.ridable", caveSpiderRidable); caveSpiderRidableInWater = getBoolean("mobs.cave_spider.ridable-in-water", caveSpiderRidableInWater); -+ caveSpiderMaxHealth = getDouble("mobs.cave_spider.attributes.max-health", caveSpiderMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.cave_spider.attributes.max-health", caveSpiderMaxHealth); ++ set("mobs.cave_spider.attributes.max-health", null); ++ set("mobs.cave_spider.attributes.max_health", oldValue); ++ } ++ caveSpiderMaxHealth = getDouble("mobs.cave_spider.attributes.max_health", caveSpiderMaxHealth); } public boolean chickenRidable = false; @@ -1428,14 +1599,24 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea chickenRidableInWater = getBoolean("mobs.chicken.ridable-in-water", chickenRidableInWater); chickenRetaliate = getBoolean("mobs.chicken.retaliate", chickenRetaliate); chickenBreedingTicks = getInt("mobs.chicken.breeding-delay-ticks", chickenBreedingTicks); -+ chickenMaxHealth = getDouble("mobs.chicken.attributes.max-health", chickenMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.chicken.attributes.max-health", chickenMaxHealth); ++ set("mobs.chicken.attributes.max-health", null); ++ set("mobs.chicken.attributes.max_health", oldValue); ++ } ++ chickenMaxHealth = getDouble("mobs.chicken.attributes.max_health", chickenMaxHealth); } public boolean codRidable = false; + public double codMaxHealth = 3.0D; private void codSettings() { codRidable = getBoolean("mobs.cod.ridable", codRidable); -+ codMaxHealth = getDouble("mobs.cod.attributes.max-health", codMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.cod.attributes.max-health", codMaxHealth); ++ set("mobs.cod.attributes.max-health", null); ++ set("mobs.cod.attributes.max_health", oldValue); ++ } ++ codMaxHealth = getDouble("mobs.cod.attributes.max_health", codMaxHealth); } public boolean cowRidable = false; @@ -1448,7 +1629,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea cowRidableInWater = getBoolean("mobs.cow.ridable-in-water", cowRidableInWater); cowFeedMushrooms = getInt("mobs.cow.feed-mushrooms-for-mooshroom", cowFeedMushrooms); cowBreedingTicks = getInt("mobs.cow.breeding-delay-ticks", cowBreedingTicks); -+ cowMaxHealth = getDouble("mobs.cow.attributes.max-health", cowMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.cow.attributes.max-health", cowMaxHealth); ++ set("mobs.cow.attributes.max-health", null); ++ set("mobs.cow.attributes.max_health", oldValue); ++ } ++ cowMaxHealth = getDouble("mobs.cow.attributes.max_health", cowMaxHealth); } public boolean creeperRidable = false; @@ -1461,11 +1647,16 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea creeperRidableInWater = getBoolean("mobs.creeper.ridable-in-water", creeperRidableInWater); creeperAllowGriefing = getBoolean("mobs.creeper.allow-griefing", creeperAllowGriefing); creeperChargedChance = getDouble("mobs.creeper.naturally-charged-chance", creeperChargedChance); -+ creeperMaxHealth = getDouble("mobs.creeper.attributes.max-health", creeperMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.creeper.attributes.max-health", creeperMaxHealth); ++ set("mobs.creeper.attributes.max-health", null); ++ set("mobs.creeper.attributes.max_health", oldValue); ++ } ++ creeperMaxHealth = getDouble("mobs.creeper.attributes.max_health", creeperMaxHealth); } public boolean dolphinRidable = false; -@@ -564,19 +582,25 @@ public class PurpurWorldConfig { +@@ -564,19 +627,45 @@ public class PurpurWorldConfig { public float dolphinSpitSpeed = 1.0F; public float dolphinSpitDamage = 2.0F; public boolean dolphinDisableTreasureSearching = false; @@ -1476,22 +1667,42 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea dolphinSpitSpeed = (float) getDouble("mobs.dolphin.spit.speed", dolphinSpitSpeed); dolphinSpitDamage = (float) getDouble("mobs.dolphin.spit.damage", dolphinSpitDamage); dolphinDisableTreasureSearching = getBoolean("mobs.dolphin.disable-treasure-searching", dolphinDisableTreasureSearching); -+ dolphinMaxHealth = getDouble("mobs.dolphin.attributes.max-health", dolphinMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.dolphin.attributes.max-health", dolphinMaxHealth); ++ set("mobs.dolphin.attributes.max-health", null); ++ set("mobs.dolphin.attributes.max_health", oldValue); ++ } ++ dolphinMaxHealth = getDouble("mobs.dolphin.attributes.max_health", dolphinMaxHealth); } public boolean donkeyRidableInWater = false; public int donkeyBreedingTicks = 6000; + public double donkeyMaxHealthMin = 15.0D; + public double donkeyMaxHealthMax = 30.0D; ++ public double donkeyJumpStrengthMin = 0.5D; ++ public double donkeyJumpStrengthMax = 0.5D; ++ public double donkeyMovementSpeedMin = 0.175D; ++ public double donkeyMovementSpeedMax = 0.175D; private void donkeySettings() { donkeyRidableInWater = getBoolean("mobs.donkey.ridable-in-water", donkeyRidableInWater); donkeyBreedingTicks = getInt("mobs.donkey.breeding-delay-ticks", donkeyBreedingTicks); -+ donkeyMaxHealthMin = getDouble("mobs.donkey.attributes.max-health.min", donkeyMaxHealthMin); -+ donkeyMaxHealthMax = getDouble("mobs.donkey.attributes.max-health.max", donkeyMaxHealthMax); ++ if (PurpurConfig.version < 10) { ++ double oldMin = getDouble("mobs.donkey.attributes.max-health.min", donkeyMaxHealthMin); ++ double oldMax = getDouble("mobs.donkey.attributes.max-health.max", donkeyMaxHealthMax); ++ set("mobs.donkey.attributes.max-health", null); ++ set("mobs.donkey.attributes.max_health.min", oldMin); ++ set("mobs.donkey.attributes.max_health.max", oldMax); ++ } ++ donkeyMaxHealthMin = getDouble("mobs.donkey.attributes.max_health.min", donkeyMaxHealthMin); ++ donkeyMaxHealthMax = getDouble("mobs.donkey.attributes.max_health.max", donkeyMaxHealthMax); ++ donkeyJumpStrengthMin = getDouble("mobs.donkey.attributes.jump_strength.min", donkeyJumpStrengthMin); ++ donkeyJumpStrengthMax = getDouble("mobs.donkey.attributes.jump_strength.max", donkeyJumpStrengthMax); ++ donkeyMovementSpeedMin = getDouble("mobs.donkey.attributes.movement_speed.min", donkeyMovementSpeedMin); ++ donkeyMovementSpeedMax = getDouble("mobs.donkey.attributes.movement_speed.max", donkeyMovementSpeedMax); } public boolean drownedRidable = false; -@@ -584,17 +608,21 @@ public class PurpurWorldConfig { +@@ -584,17 +673,31 @@ public class PurpurWorldConfig { public boolean drownedJockeyOnlyBaby = true; public double drownedJockeyChance = 0.05D; public boolean drownedJockeyTryExistingChickens = true; @@ -1502,18 +1713,28 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea drownedJockeyOnlyBaby = getBoolean("mobs.drowned.jockey.only-babies", drownedJockeyOnlyBaby); drownedJockeyChance = getDouble("mobs.drowned.jockey.chance", drownedJockeyChance); drownedJockeyTryExistingChickens = getBoolean("mobs.drowned.jockey.try-existing-chickens", drownedJockeyTryExistingChickens); -+ drownedMaxHealth = getDouble("mobs.drowned.attributes.max-health", drownedMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.drowned.attributes.max-health", drownedMaxHealth); ++ set("mobs.drowned.attributes.max-health", null); ++ set("mobs.drowned.attributes.max_health", oldValue); ++ } ++ drownedMaxHealth = getDouble("mobs.drowned.attributes.max_health", drownedMaxHealth); } public boolean elderGuardianRidable = false; + public double elderGuardianMaxHealth = 80.0D; private void elderGuardianSettings() { elderGuardianRidable = getBoolean("mobs.elder_guardian.ridable", elderGuardianRidable); -+ elderGuardianMaxHealth = getDouble("mobs.elder_guardian.attributes.max-health", elderGuardianMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.elder_guardian.attributes.max-health", elderGuardianMaxHealth); ++ set("mobs.elder_guardian.attributes.max-health", null); ++ set("mobs.elder_guardian.attributes.max_health", oldValue); ++ } ++ elderGuardianMaxHealth = getDouble("mobs.elder_guardian.attributes.max_health", elderGuardianMaxHealth); } public boolean enderDragonRidable = false; -@@ -602,57 +630,74 @@ public class PurpurWorldConfig { +@@ -602,57 +705,103 @@ public class PurpurWorldConfig { public double enderDragonMaxY = 256D; public boolean enderDragonAlwaysDropsEggBlock = false; public boolean enderDragonAlwaysDropsFullExp = false; @@ -1526,10 +1747,14 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea enderDragonAlwaysDropsFullExp = getBoolean("mobs.ender_dragon.always-drop-full-exp", enderDragonAlwaysDropsFullExp); + if (PurpurConfig.version < 8) { + double oldValue = getDouble("mobs.ender_dragon.max-health", enderDragonMaxHealth); -+ set("mobs.ender_dragon.attributes.max-health", oldValue); + set("mobs.ender_dragon.max-health", null); ++ set("mobs.ender_dragon.attributes.max_health", oldValue); ++ } else if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.ender_dragon.attributes.max-health", enderDragonMaxHealth); ++ set("mobs.ender_dragon.attributes.max-health", null); ++ set("mobs.ender_dragon.attributes.max_health", oldValue); + } -+ enderDragonMaxHealth = getDouble("mobs.ender_dragon.attributes.max-health", enderDragonMaxHealth); ++ enderDragonMaxHealth = getDouble("mobs.ender_dragon.attributes.max_health", enderDragonMaxHealth); } public boolean endermanRidable = false; @@ -1542,7 +1767,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea endermanRidableInWater = getBoolean("mobs.enderman.ridable-in-water", endermanRidableInWater); endermanAllowGriefing = getBoolean("mobs.enderman.allow-griefing", endermanAllowGriefing); endermanDespawnEvenWithBlock = getBoolean("mobs.enderman.can-despawn-with-held-block", endermanDespawnEvenWithBlock); -+ endermanMaxHealth = getDouble("mobs.enderman.attributes.max-health", endermanMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.enderman.attributes.max-health", endermanMaxHealth); ++ set("mobs.enderman.attributes.max-health", null); ++ set("mobs.enderman.attributes.max_health", oldValue); ++ } ++ endermanMaxHealth = getDouble("mobs.enderman.attributes.max_health", endermanMaxHealth); } public boolean endermiteRidable = false; @@ -1551,7 +1781,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void endermiteSettings() { endermiteRidable = getBoolean("mobs.endermite.ridable", endermiteRidable); endermiteRidableInWater = getBoolean("mobs.endermite.ridable-in-water", endermiteRidableInWater); -+ endermiteMaxHealth = getDouble("mobs.endermite.attributes.max-health", endermiteMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.endermite.attributes.max-health", endermiteMaxHealth); ++ set("mobs.endermite.attributes.max-health", null); ++ set("mobs.endermite.attributes.max_health", oldValue); ++ } ++ endermiteMaxHealth = getDouble("mobs.endermite.attributes.max_health", endermiteMaxHealth); } public boolean evokerRidable = false; @@ -1560,7 +1795,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void evokerSettings() { evokerRidable = getBoolean("mobs.evoker.ridable", evokerRidable); evokerRidableInWater = getBoolean("mobs.evoker.ridable-in-water", evokerRidableInWater); -+ evokerMaxHealth = getDouble("mobs.evoker.attributes.max-health", evokerMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.evoker.attributes.max-health", evokerMaxHealth); ++ set("mobs.evoker.attributes.max-health", null); ++ set("mobs.evoker.attributes.max_health", oldValue); ++ } ++ evokerMaxHealth = getDouble("mobs.evoker.attributes.max_health", evokerMaxHealth); } public boolean foxRidable = false; @@ -1573,7 +1813,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea foxRidableInWater = getBoolean("mobs.fox.ridable-in-water", foxRidableInWater); foxTypeChangesWithTulips = getBoolean("mobs.fox.tulips-change-type", foxTypeChangesWithTulips); foxBreedingTicks = getInt("mobs.fox.breeding-delay-ticks", foxBreedingTicks); -+ foxMaxHealth = getDouble("mobs.fox.attributes.max-health", foxMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.fox.attributes.max-health", foxMaxHealth); ++ set("mobs.fox.attributes.max-health", null); ++ set("mobs.fox.attributes.max_health", oldValue); ++ } ++ foxMaxHealth = getDouble("mobs.fox.attributes.max_health", foxMaxHealth); } public boolean ghastRidable = false; @@ -1584,18 +1829,41 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea ghastRidable = getBoolean("mobs.ghast.ridable", ghastRidable); ghastRidableInWater = getBoolean("mobs.ghast.ridable-in-water", ghastRidableInWater); ghastMaxY = getDouble("mobs.ghast.ridable-max-y", ghastMaxY); -+ ghastMaxHealth = getDouble("mobs.ghast.attributes.max-health", ghastMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.ghast.attributes.max-health", ghastMaxHealth); ++ set("mobs.ghast.attributes.max-health", null); ++ set("mobs.ghast.attributes.max_health", oldValue); ++ } ++ ghastMaxHealth = getDouble("mobs.ghast.attributes.max_health", ghastMaxHealth); } public boolean giantRidable = false; -@@ -682,24 +727,32 @@ public class PurpurWorldConfig { +@@ -675,31 +824,68 @@ public class PurpurWorldConfig { + giantHaveHostileAI = getBoolean("mobs.giant.have-hostile-ai", giantHaveHostileAI); + if (PurpurConfig.version < 8) { + double oldValue = getDouble("mobs.giant.max-health", giantMaxHealth); +- set("mobs.giant.attributes.max-health", oldValue); + set("mobs.giant.max-health", null); ++ set("mobs.giant.attributes.max_health", oldValue); ++ } else if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.giant.attributes.max-health", giantMaxHealth); ++ set("mobs.giant.attributes.max-health", null); ++ set("mobs.giant.attributes.max_health", oldValue); + } +- giantMaxHealth = getDouble("mobs.giant.attributes.max-health", giantMaxHealth); ++ giantMaxHealth = getDouble("mobs.giant.attributes.max_health", giantMaxHealth); } public boolean guardianRidable = false; + public double guardianMaxHealth = 30.0D; private void guardianSettings() { guardianRidable = getBoolean("mobs.guardian.ridable", guardianRidable); -+ guardianMaxHealth = getDouble("mobs.guardian.attributes.max-health", guardianMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.guardian.attributes.max-health", guardianMaxHealth); ++ set("mobs.guardian.attributes.max-health", null); ++ set("mobs.guardian.attributes.max_health", oldValue); ++ } ++ guardianMaxHealth = getDouble("mobs.guardian.attributes.max_health", guardianMaxHealth); } public boolean hoglinRidable = false; @@ -1606,22 +1874,42 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea hoglinRidable = getBoolean("mobs.hoglin.ridable", hoglinRidable); hoglinRidableInWater = getBoolean("mobs.hoglin.ridable-in-water", hoglinRidableInWater); hoglinBreedingTicks = getInt("mobs.hoglin.breeding-delay-ticks", hoglinBreedingTicks); -+ hoglinMaxHealth = getDouble("mobs.hoglin.attributes.max-health", hoglinMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.hoglin.attributes.max-health", hoglinMaxHealth); ++ set("mobs.hoglin.attributes.max-health", null); ++ set("mobs.hoglin.attributes.max_health", oldValue); ++ } ++ hoglinMaxHealth = getDouble("mobs.hoglin.attributes.max_health", hoglinMaxHealth); } public boolean horseRidableInWater = false; public int horseBreedingTicks = 6000; + public double horseMaxHealthMin = 15.0D; + public double horseMaxHealthMax = 30.0D; ++ public double horseJumpStrengthMin = 0.4D; ++ public double horseJumpStrengthMax = 1.0D; ++ public double horseMovementSpeedMin = 0.1125D; ++ public double horseMovementSpeedMax = 0.3375D; private void horseSettings() { horseRidableInWater = getBoolean("mobs.horse.ridable-in-water", horseRidableInWater); horseBreedingTicks = getInt("mobs.horse.breeding-delay-ticks", horseBreedingTicks); -+ horseMaxHealthMin = getDouble("mobs.horse.attributes.max-health.min", horseMaxHealthMin); -+ horseMaxHealthMax = getDouble("mobs.horse.attributes.max-health.max", horseMaxHealthMax); ++ if (PurpurConfig.version < 10) { ++ double oldMin = getDouble("mobs.horse.attributes.max-health.min", horseMaxHealthMin); ++ double oldMax = getDouble("mobs.horse.attributes.max-health.max", horseMaxHealthMax); ++ set("mobs.horse.attributes.max-health", null); ++ set("mobs.horse.attributes.max_health.min", oldMin); ++ set("mobs.horse.attributes.max_health.max", oldMax); ++ } ++ horseMaxHealthMin = getDouble("mobs.horse.attributes.max_health.min", horseMaxHealthMin); ++ horseMaxHealthMax = getDouble("mobs.horse.attributes.max_health.max", horseMaxHealthMax); ++ horseJumpStrengthMin = getDouble("mobs.horse.attributes.jump_strength.min", horseJumpStrengthMin); ++ horseJumpStrengthMax = getDouble("mobs.horse.attributes.jump_strength.max", horseJumpStrengthMax); ++ horseMovementSpeedMin = getDouble("mobs.horse.attributes.movement_speed.min", horseMovementSpeedMin); ++ horseMovementSpeedMax = getDouble("mobs.horse.attributes.movement_speed.max", horseMovementSpeedMax); } public boolean huskRidable = false; -@@ -707,12 +760,14 @@ public class PurpurWorldConfig { +@@ -707,12 +893,19 @@ public class PurpurWorldConfig { public boolean huskJockeyOnlyBaby = true; public double huskJockeyChance = 0.05D; public boolean huskJockeyTryExistingChickens = true; @@ -1632,11 +1920,31 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea huskJockeyOnlyBaby = getBoolean("mobs.husk.jockey.only-babies", huskJockeyOnlyBaby); huskJockeyChance = getDouble("mobs.husk.jockey.chance", huskJockeyChance); huskJockeyTryExistingChickens = getBoolean("mobs.husk.jockey.try-existing-chickens", huskJockeyTryExistingChickens); -+ huskMaxHealth = getDouble("mobs.husk.attributes.max-health", huskMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.husk.attributes.max-health", huskMaxHealth); ++ set("mobs.husk.attributes.max-health", null); ++ set("mobs.husk.attributes.max_health", oldValue); ++ } ++ huskMaxHealth = getDouble("mobs.husk.attributes.max_health", huskMaxHealth); } public boolean illusionerRidable = false; -@@ -736,76 +791,100 @@ public class PurpurWorldConfig { +@@ -727,85 +920,188 @@ public class PurpurWorldConfig { + illusionerFollowRange = getDouble("mobs.illusioner.follow-range", illusionerFollowRange); + if (PurpurConfig.version < 8) { + double oldValue = getDouble("mobs.illusioner.max-health", illusionerMaxHealth); +- set("mobs.illusioner.attributes.max-health", oldValue); + set("mobs.illusioner.max-health", null); ++ set("mobs.illusioner.attributes.max_health", oldValue); ++ } else if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.illusioner.attributes.max-health", illusionerMaxHealth); ++ set("mobs.illusioner.attributes.max-health", null); ++ set("mobs.illusioner.attributes.max_health", oldValue); + } +- illusionerMaxHealth = getDouble("mobs.illusioner.attributes.max-health", illusionerMaxHealth); ++ illusionerMaxHealth = getDouble("mobs.illusioner.attributes.max_health", illusionerMaxHealth); + } + public boolean ironGolemRidable = false; public boolean ironGolemRidableInWater = false; public boolean ironGolemCanSwim = false; @@ -1645,7 +1953,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea ironGolemRidable = getBoolean("mobs.iron_golem.ridable", ironGolemRidable); ironGolemRidableInWater = getBoolean("mobs.iron_golem.ridable-in-water", ironGolemRidableInWater); ironGolemCanSwim = getBoolean("mobs.iron_golem.can-swim", ironGolemCanSwim); -+ ironGolemMaxHealth = getDouble("mobs.iron_golem.attributes.max-health", ironGolemMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.iron_golem.attributes.max-health", ironGolemMaxHealth); ++ set("mobs.iron_golem.attributes.max-health", null); ++ set("mobs.iron_golem.attributes.max_health", oldValue); ++ } ++ ironGolemMaxHealth = getDouble("mobs.iron_golem.attributes.max_health", ironGolemMaxHealth); } public boolean llamaRidable = false; @@ -1653,23 +1966,53 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea public int llamaBreedingTicks = 6000; + public double llamaMaxHealthMin = 15.0D; + public double llamaMaxHealthMax = 30.0D; ++ public double llamaJumpStrengthMin = 0.5D; ++ public double llamaJumpStrengthMax = 0.5D; ++ public double llamaMovementSpeedMin = 0.175D; ++ public double llamaMovementSpeedMax = 0.175D; private void llamaSettings() { llamaRidable = getBoolean("mobs.llama.ridable", llamaRidable); llamaRidableInWater = getBoolean("mobs.llama.ridable-in-water", llamaRidableInWater); llamaBreedingTicks = getInt("mobs.llama.breeding-delay-ticks", llamaBreedingTicks); -+ llamaMaxHealthMin = getDouble("mobs.llama.attributes.max-health.min", llamaMaxHealthMin); -+ llamaMaxHealthMax = getDouble("mobs.llama.attributes.max-health.max", llamaMaxHealthMax); ++ if (PurpurConfig.version < 10) { ++ double oldMin = getDouble("mobs.llama.attributes.max-health.min", llamaMaxHealthMin); ++ double oldMax = getDouble("mobs.llama.attributes.max-health.max", llamaMaxHealthMax); ++ set("mobs.llama.attributes.max-health", null); ++ set("mobs.llama.attributes.max_health.min", oldMin); ++ set("mobs.llama.attributes.max_health.max", oldMax); ++ } ++ llamaMaxHealthMin = getDouble("mobs.llama.attributes.max_health.min", llamaMaxHealthMin); ++ llamaMaxHealthMax = getDouble("mobs.llama.attributes.max_health.max", llamaMaxHealthMax); ++ llamaJumpStrengthMin = getDouble("mobs.llama.attributes.jump_strength.min", llamaJumpStrengthMin); ++ llamaJumpStrengthMax = getDouble("mobs.llama.attributes.jump_strength.max", llamaJumpStrengthMax); ++ llamaMovementSpeedMin = getDouble("mobs.llama.attributes.movement_speed.min", llamaMovementSpeedMin); ++ llamaMovementSpeedMax = getDouble("mobs.llama.attributes.movement_speed.max", llamaMovementSpeedMax); } public boolean llamaTraderRidable = false; public boolean llamaTraderRidableInWater = false; + public double llamaTraderMaxHealthMin = 15.0D; + public double llamaTraderMaxHealthMax = 30.0D; ++ public double llamaTraderJumpStrengthMin = 0.5D; ++ public double llamaTraderJumpStrengthMax = 0.5D; ++ public double llamaTraderMovementSpeedMin = 0.175D; ++ public double llamaTraderMovementSpeedMax = 0.175D; private void llamaTraderSettings() { llamaTraderRidable = getBoolean("mobs.trader_llama.ridable", llamaTraderRidable); llamaTraderRidableInWater = getBoolean("mobs.trader_llama.ridable-in-water", llamaTraderRidableInWater); -+ llamaTraderMaxHealthMin = getDouble("mobs.trader_llama.attributes.max-health.min", llamaTraderMaxHealthMin); -+ llamaTraderMaxHealthMax = getDouble("mobs.trader_llama.attributes.max-health.max", llamaTraderMaxHealthMax); ++ if (PurpurConfig.version < 10) { ++ double oldMin = getDouble("mobs.trader_llama.attributes.max-health.min", llamaTraderMaxHealthMin); ++ double oldMax = getDouble("mobs.trader_llama.attributes.max-health.max", llamaTraderMaxHealthMax); ++ set("mobs.trader_llama.attributes.max-health", null); ++ set("mobs.trader_llama.attributes.max_health.min", oldMin); ++ set("mobs.trader_llama.attributes.max_health.max", oldMax); ++ } ++ llamaTraderMaxHealthMin = getDouble("mobs.trader_llama.attributes.max_health.min", llamaTraderMaxHealthMin); ++ llamaTraderMaxHealthMax = getDouble("mobs.trader_llama.attributes.max_health.max", llamaTraderMaxHealthMax); ++ llamaTraderJumpStrengthMin = getDouble("mobs.trader_llama.attributes.jump_strength.min", llamaTraderJumpStrengthMin); ++ llamaTraderJumpStrengthMax = getDouble("mobs.trader_llama.attributes.jump_strength.max", llamaTraderJumpStrengthMax); ++ llamaTraderMovementSpeedMin = getDouble("mobs.trader_llama.attributes.movement_speed.min", llamaTraderMovementSpeedMin); ++ llamaTraderMovementSpeedMax = getDouble("mobs.trader_llama.attributes.movement_speed.max", llamaTraderMovementSpeedMax); } public boolean magmaCubeRidable = false; @@ -1678,7 +2021,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void magmaCubeSettings() { magmaCubeRidable = getBoolean("mobs.magma_cube.ridable", magmaCubeRidable); magmaCubeRidableInWater = getBoolean("mobs.magma_cube.ridable-in-water", magmaCubeRidableInWater); -+ magmaCubeMaxHealth = getString("mobs.magma_cube.attributes.max-health", magmaCubeMaxHealth); ++ if (PurpurConfig.version < 10) { ++ String oldValue = getString("mobs.magma_cube.attributes.max-health", magmaCubeMaxHealth); ++ set("mobs.magma_cube.attributes.max-health", null); ++ set("mobs.magma_cube.attributes.max_health", oldValue); ++ } ++ magmaCubeMaxHealth = getString("mobs.magma_cube.attributes.max_health", magmaCubeMaxHealth); } public boolean mooshroomRidable = false; @@ -1689,18 +2037,38 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea mooshroomRidable = getBoolean("mobs.mooshroom.ridable", mooshroomRidable); mooshroomRidableInWater = getBoolean("mobs.mooshroom.ridable-in-water", mooshroomRidableInWater); mooshroomBreedingTicks = getInt("mobs.mooshroom.breeding-delay-ticks", mooshroomBreedingTicks); -+ mooshroomMaxHealth = getDouble("mobs.mooshroom.attributes.max-health", mooshroomMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.mooshroom.attributes.max-health", mooshroomMaxHealth); ++ set("mobs.mooshroom.attributes.max-health", null); ++ set("mobs.mooshroom.attributes.max_health", oldValue); ++ } ++ mooshroomMaxHealth = getDouble("mobs.mooshroom.attributes.max_health", mooshroomMaxHealth); } public boolean muleRidableInWater = false; public int muleBreedingTicks = 6000; + public double muleMaxHealthMin = 15.0D; + public double muleMaxHealthMax = 30.0D; ++ public double muleJumpStrengthMin = 0.5D; ++ public double muleJumpStrengthMax = 0.5D; ++ public double muleMovementSpeedMin = 0.175D; ++ public double muleMovementSpeedMax = 0.175D; private void muleSettings() { muleRidableInWater = getBoolean("mobs.mule.ridable-in-water", muleRidableInWater); muleBreedingTicks = getInt("mobs.mule.breeding-delay-ticks", muleBreedingTicks); -+ muleMaxHealthMin = getDouble("mobs.mule.attributes.max-health.min", muleMaxHealthMin); -+ muleMaxHealthMax = getDouble("mobs.mule.attributes.max-health.max", muleMaxHealthMax); ++ if (PurpurConfig.version < 10) { ++ double oldMin = getDouble("mobs.mule.attributes.max-health.min", muleMaxHealthMin); ++ double oldMax = getDouble("mobs.mule.attributes.max-health.max", muleMaxHealthMax); ++ set("mobs.mule.attributes.max-health", null); ++ set("mobs.mule.attributes.max_health.min", oldMin); ++ set("mobs.mule.attributes.max_health.max", oldMax); ++ } ++ muleMaxHealthMin = getDouble("mobs.mule.attributes.max_health.min", muleMaxHealthMin); ++ muleMaxHealthMax = getDouble("mobs.mule.attributes.max_health.max", muleMaxHealthMax); ++ muleJumpStrengthMin = getDouble("mobs.mule.attributes.jump_strength.min", muleJumpStrengthMin); ++ muleJumpStrengthMax = getDouble("mobs.mule.attributes.jump_strength.max", muleJumpStrengthMax); ++ muleMovementSpeedMin = getDouble("mobs.mule.attributes.movement_speed.min", muleMovementSpeedMin); ++ muleMovementSpeedMax = getDouble("mobs.mule.attributes.movement_speed.max", muleMovementSpeedMax); } public boolean ocelotRidable = false; @@ -1711,7 +2079,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea ocelotRidable = getBoolean("mobs.ocelot.ridable", ocelotRidable); ocelotRidableInWater = getBoolean("mobs.ocelot.ridable-in-water", ocelotRidableInWater); ocelotBreedingTicks = getInt("mobs.ocelot.breeding-delay-ticks", ocelotBreedingTicks); -+ ocelotMaxHealth = getDouble("mobs.ocelot.attributes.max-health", ocelotMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.ocelot.attributes.max-health", ocelotMaxHealth); ++ set("mobs.ocelot.attributes.max-health", null); ++ set("mobs.ocelot.attributes.max_health", oldValue); ++ } ++ ocelotMaxHealth = getDouble("mobs.ocelot.attributes.max_health", ocelotMaxHealth); } public boolean pandaRidable = false; @@ -1722,7 +2095,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea pandaRidable = getBoolean("mobs.panda.ridable", pandaRidable); pandaRidableInWater = getBoolean("mobs.panda.ridable-in-water", pandaRidableInWater); pandaBreedingTicks = getInt("mobs.panda.breeding-delay-ticks", pandaBreedingTicks); -+ pandaMaxHealth = getDouble("mobs.panda.attributes.max-health", pandaMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.panda.attributes.max-health", pandaMaxHealth); ++ set("mobs.panda.attributes.max-health", null); ++ set("mobs.panda.attributes.max_health", oldValue); ++ } ++ pandaMaxHealth = getDouble("mobs.panda.attributes.max_health", pandaMaxHealth); } public boolean parrotRidable = false; @@ -1733,11 +2111,16 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea parrotRidable = getBoolean("mobs.parrot.ridable", parrotRidable); parrotRidableInWater = getBoolean("mobs.parrot.ridable-in-water", parrotRidableInWater); parrotMaxY = getDouble("mobs.parrot.ridable-max-y", parrotMaxY); -+ parrotMaxHealth = getDouble("mobs.parrot.attributes.max-health", parrotMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.parrot.attributes.max-health", parrotMaxHealth); ++ set("mobs.parrot.attributes.max-health", null); ++ set("mobs.parrot.attributes.max_health", oldValue); ++ } ++ parrotMaxHealth = getDouble("mobs.parrot.attributes.max_health", parrotMaxHealth); } public boolean phantomRidable = false; -@@ -831,6 +910,7 @@ public class PurpurWorldConfig { +@@ -831,6 +1127,7 @@ public class PurpurWorldConfig { public int phantomBurnInLight = 0; public boolean phantomIgnorePlayersWithTorch = false; public boolean phantomBurnInDaylight = true; @@ -1745,11 +2128,16 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void phantomSettings() { phantomRidable = getBoolean("mobs.phantom.ridable", phantomRidable); phantomRidableInWater = getBoolean("mobs.phantom.ridable-in-water", phantomRidableInWater); -@@ -855,38 +935,47 @@ public class PurpurWorldConfig { +@@ -855,38 +1152,72 @@ public class PurpurWorldConfig { phantomBurnInLight = getInt("mobs.phantom.burn-in-light", phantomBurnInLight); phantomBurnInDaylight = getBoolean("mobs.phantom.burn-in-daylight", phantomBurnInDaylight); phantomIgnorePlayersWithTorch = getBoolean("mobs.phantom.ignore-players-with-torch", phantomIgnorePlayersWithTorch); -+ phantomMaxHealth = getDouble("mobs.phantom.attributes.max-health", phantomMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.phantom.attributes.max-health", phantomMaxHealth); ++ set("mobs.phantom.attributes.max-health", null); ++ set("mobs.phantom.attributes.max_health", oldValue); ++ } ++ phantomMaxHealth = getDouble("mobs.phantom.attributes.max_health", phantomMaxHealth); } public boolean pigRidable = false; @@ -1762,7 +2150,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea pigRidableInWater = getBoolean("mobs.pig.ridable-in-water", pigRidableInWater); pigGiveSaddleBack = getBoolean("mobs.pig.give-saddle-back", pigGiveSaddleBack); pigBreedingTicks = getInt("mobs.pig.breeding-delay-ticks", pigBreedingTicks); -+ pigMaxHealth = getDouble("mobs.pig.attributes.max-health", pigMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.pig.attributes.max-health", pigMaxHealth); ++ set("mobs.pig.attributes.max-health", null); ++ set("mobs.pig.attributes.max_health", oldValue); ++ } ++ pigMaxHealth = getDouble("mobs.pig.attributes.max_health", pigMaxHealth); } public boolean piglinRidable = false; @@ -1771,7 +2164,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void piglinSettings() { piglinRidable = getBoolean("mobs.piglin.ridable", piglinRidable); piglinRidableInWater = getBoolean("mobs.piglin.ridable-in-water", piglinRidableInWater); -+ piglinMaxHealth = getDouble("mobs.piglin.attributes.max-health", piglinMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.piglin.attributes.max-health", piglinMaxHealth); ++ set("mobs.piglin.attributes.max-health", null); ++ set("mobs.piglin.attributes.max_health", oldValue); ++ } ++ piglinMaxHealth = getDouble("mobs.piglin.attributes.max_health", piglinMaxHealth); } public boolean piglinBruteRidable = false; @@ -1780,7 +2178,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void piglinBruteSettings() { piglinBruteRidable = getBoolean("mobs.piglin_brute.ridable", piglinBruteRidable); piglinBruteRidableInWater = getBoolean("mobs.piglin_brute.ridable-in-water", piglinBruteRidableInWater); -+ piglinBruteMaxHealth = getDouble("mobs.piglin_brute.attributes.max-health", piglinBruteMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.piglin_brute.attributes.max-health", piglinBruteMaxHealth); ++ set("mobs.piglin_brute.attributes.max-health", null); ++ set("mobs.piglin_brute.attributes.max_health", oldValue); ++ } ++ piglinBruteMaxHealth = getDouble("mobs.piglin_brute.attributes.max_health", piglinBruteMaxHealth); } public boolean pillagerRidable = false; @@ -1789,11 +2192,16 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void pillagerSettings() { pillagerRidable = getBoolean("mobs.pillager.ridable", pillagerRidable); pillagerRidableInWater = getBoolean("mobs.pillager.ridable-in-water", pillagerRidableInWater); -+ pillagerMaxHealth = getDouble("mobs.pillager.attributes.max-health", pillagerMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.pillager.attributes.max-health", pillagerMaxHealth); ++ set("mobs.pillager.attributes.max-health", null); ++ set("mobs.pillager.attributes.max_health", oldValue); ++ } ++ pillagerMaxHealth = getDouble("mobs.pillager.attributes.max_health", pillagerMaxHealth); } public boolean polarBearRidable = false; -@@ -894,6 +983,7 @@ public class PurpurWorldConfig { +@@ -894,6 +1225,7 @@ public class PurpurWorldConfig { public String polarBearBreedableItemString = ""; public Item polarBearBreedableItem = null; public int polarBearBreedingTicks = 6000; @@ -1801,22 +2209,32 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void polarBearSettings() { polarBearRidable = getBoolean("mobs.polar_bear.ridable", polarBearRidable); polarBearRidableInWater = getBoolean("mobs.polar_bear.ridable-in-water", polarBearRidableInWater); -@@ -901,11 +991,14 @@ public class PurpurWorldConfig { +@@ -901,11 +1233,24 @@ public class PurpurWorldConfig { Item item = IRegistry.ITEM.get(new MinecraftKey(polarBearBreedableItemString)); if (item != Items.AIR) polarBearBreedableItem = item; polarBearBreedingTicks = getInt("mobs.polar_bear.breeding-delay-ticks", polarBearBreedingTicks); -+ polarBearMaxHealth = getDouble("mobs.polar_bear.attributes.max-health", polarBearMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.polar_bear.attributes.max-health", polarBearMaxHealth); ++ set("mobs.polar_bear.attributes.max-health", null); ++ set("mobs.polar_bear.attributes.max_health", oldValue); ++ } ++ polarBearMaxHealth = getDouble("mobs.polar_bear.attributes.max_health", polarBearMaxHealth); } public boolean pufferfishRidable = false; + public double pufferfishMaxHealth = 3.0D; private void pufferfishSettings() { pufferfishRidable = getBoolean("mobs.pufferfish.ridable", pufferfishRidable); -+ pufferfishMaxHealth = getDouble("mobs.pufferfish.attributes.max-health", pufferfishMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.pufferfish.attributes.max-health", pufferfishMaxHealth); ++ set("mobs.pufferfish.attributes.max-health", null); ++ set("mobs.pufferfish.attributes.max_health", oldValue); ++ } ++ pufferfishMaxHealth = getDouble("mobs.pufferfish.attributes.max_health", pufferfishMaxHealth); } public boolean rabbitRidable = false; -@@ -913,68 +1006,86 @@ public class PurpurWorldConfig { +@@ -913,68 +1258,142 @@ public class PurpurWorldConfig { public double rabbitNaturalToast = 0.0D; public double rabbitNaturalKiller = 0.0D; public int rabbitBreedingTicks = 6000; @@ -1827,7 +2245,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea rabbitNaturalToast = getDouble("mobs.rabbit.spawn-toast-chance", rabbitNaturalToast); rabbitNaturalKiller = getDouble("mobs.rabbit.spawn-killer-rabbit-chance", rabbitNaturalKiller); rabbitBreedingTicks = getInt("mobs.rabbit.breeding-delay-ticks", rabbitBreedingTicks); -+ rabbitMaxHealth = getDouble("mobs.rabbit.attributes.max-health", rabbitMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.rabbit.attributes.max-health", rabbitMaxHealth); ++ set("mobs.rabbit.attributes.max-health", null); ++ set("mobs.rabbit.attributes.max_health", oldValue); ++ } ++ rabbitMaxHealth = getDouble("mobs.rabbit.attributes.max_health", rabbitMaxHealth); } public boolean ravagerRidable = false; @@ -1836,14 +2259,24 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void ravagerSettings() { ravagerRidable = getBoolean("mobs.ravager.ridable", ravagerRidable); ravagerRidableInWater = getBoolean("mobs.ravager.ridable-in-water", ravagerRidableInWater); -+ ravagerMaxHealth = getDouble("mobs.ravager.attributes.max-health", ravagerMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.ravager.attributes.max-health", ravagerMaxHealth); ++ set("mobs.ravager.attributes.max-health", null); ++ set("mobs.ravager.attributes.max_health", oldValue); ++ } ++ ravagerMaxHealth = getDouble("mobs.ravager.attributes.max_health", ravagerMaxHealth); } public boolean salmonRidable = false; + public double salmonMaxHealth = 3.0D; private void salmonSettings() { salmonRidable = getBoolean("mobs.salmon.ridable", salmonRidable); -+ salmonMaxHealth = getDouble("mobs.salmon.attributes.max-health", salmonMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.salmon.attributes.max-health", salmonMaxHealth); ++ set("mobs.salmon.attributes.max-health", null); ++ set("mobs.salmon.attributes.max_health", oldValue); ++ } ++ salmonMaxHealth = getDouble("mobs.salmon.attributes.max_health", salmonMaxHealth); } public boolean sheepRidable = false; @@ -1854,7 +2287,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea sheepRidable = getBoolean("mobs.sheep.ridable", sheepRidable); sheepRidableInWater = getBoolean("mobs.sheep.ridable-in-water", sheepRidableInWater); sheepBreedingTicks = getInt("mobs.sheep.breeding-delay-ticks", sheepBreedingTicks); -+ sheepMaxHealth = getDouble("mobs.sheep.attributes.max-health", sheepMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.sheep.attributes.max-health", sheepMaxHealth); ++ set("mobs.sheep.attributes.max-health", null); ++ set("mobs.sheep.attributes.max_health", oldValue); ++ } ++ sheepMaxHealth = getDouble("mobs.sheep.attributes.max_health", sheepMaxHealth); } public boolean shulkerRidable = false; @@ -1863,7 +2301,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void shulkerSettings() { shulkerRidable = getBoolean("mobs.shulker.ridable", shulkerRidable); shulkerRidableInWater = getBoolean("mobs.shulker.ridable-in-water", shulkerRidableInWater); -+ shulkerMaxHealth = getDouble("mobs.shulker.attributes.max-health", shulkerMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.shulker.attributes.max-health", shulkerMaxHealth); ++ set("mobs.shulker.attributes.max-health", null); ++ set("mobs.shulker.attributes.max_health", oldValue); ++ } ++ shulkerMaxHealth = getDouble("mobs.shulker.attributes.max_health", shulkerMaxHealth); } public boolean silverfishRidable = false; @@ -1872,7 +2315,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void silverfishSettings() { silverfishRidable = getBoolean("mobs.silverfish.ridable", silverfishRidable); silverfishRidableInWater = getBoolean("mobs.silverfish.ridable-in-water", silverfishRidableInWater); -+ silverfishMaxHealth = getDouble("mobs.silverfish.attributes.max-health", silverfishMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.silverfish.attributes.max-health", silverfishMaxHealth); ++ set("mobs.silverfish.attributes.max-health", null); ++ set("mobs.silverfish.attributes.max_health", oldValue); ++ } ++ silverfishMaxHealth = getDouble("mobs.silverfish.attributes.max_health", silverfishMaxHealth); } public boolean skeletonRidable = false; @@ -1881,16 +2329,37 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void skeletonSettings() { skeletonRidable = getBoolean("mobs.skeleton.ridable", skeletonRidable); skeletonRidableInWater = getBoolean("mobs.skeleton.ridable-in-water", skeletonRidableInWater); -+ skeletonMaxHealth = getDouble("mobs.skeleton.attributes.max-health", skeletonMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.skeleton.attributes.max-health", skeletonMaxHealth); ++ set("mobs.skeleton.attributes.max-health", null); ++ set("mobs.skeleton.attributes.max_health", oldValue); ++ } ++ skeletonMaxHealth = getDouble("mobs.skeleton.attributes.max_health", skeletonMaxHealth); } public boolean skeletonHorseCanSwim = false; public boolean skeletonHorseRidableInWater = true; -+ public double skeletonHorseMaxHealth = 15.0D; ++ public double skeletonHorseMaxHealthMin = 15.0D; ++ public double skeletonHorseMaxHealthMax = 15.0D; ++ public double skeletonHorseJumpStrengthMin = 0.4D; ++ public double skeletonHorseJumpStrengthMax = 1.0D; ++ public double skeletonHorseMovementSpeedMin = 0.2D; ++ public double skeletonHorseMovementSpeedMax = 0.2D; private void skeletonHorseSettings() { skeletonHorseCanSwim = getBoolean("mobs.skeleton_horse.can-swim", skeletonHorseCanSwim); skeletonHorseRidableInWater = getBoolean("mobs.skeleton_horse.ridable-in-water", skeletonHorseRidableInWater); -+ skeletonHorseMaxHealth = getDouble("mobs.skeleton_horse.attributes.max-health", skeletonHorseMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.skeleton_horse.attributes.max-health", skeletonHorseMaxHealthMin); ++ set("mobs.skeleton_horse.attributes.max-health", null); ++ set("mobs.skeleton_horse.attributes.max_health.min", oldValue); ++ set("mobs.skeleton_horse.attributes.max_health.max", oldValue); ++ } ++ skeletonHorseMaxHealthMin = getDouble("mobs.skeleton_horse.attributes.max_health.min", skeletonHorseMaxHealthMin); ++ skeletonHorseMaxHealthMax = getDouble("mobs.skeleton_horse.attributes.max_health.max", skeletonHorseMaxHealthMax); ++ skeletonHorseJumpStrengthMin = getDouble("mobs.skeleton_horse.attributes.jump_strength.min", skeletonHorseJumpStrengthMin); ++ skeletonHorseJumpStrengthMax = getDouble("mobs.skeleton_horse.attributes.jump_strength.max", skeletonHorseJumpStrengthMax); ++ skeletonHorseMovementSpeedMin = getDouble("mobs.skeleton_horse.attributes.movement_speed.min", skeletonHorseMovementSpeedMin); ++ skeletonHorseMovementSpeedMax = getDouble("mobs.skeleton_horse.attributes.movement_speed.max", skeletonHorseMovementSpeedMax); } public boolean slimeRidable = false; @@ -1899,11 +2368,16 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void slimeSettings() { slimeRidable = getBoolean("mobs.slime.ridable", slimeRidable); slimeRidableInWater = getBoolean("mobs.slime.ridable-in-water", slimeRidableInWater); -+ slimeMaxHealth = getString("mobs.slime.attributes.max-health", slimeMaxHealth); ++ if (PurpurConfig.version < 10) { ++ String oldValue = getString("mobs.slime.attributes.max-health", slimeMaxHealth); ++ set("mobs.slime.attributes.max-health", null); ++ set("mobs.slime.attributes.max_health", oldValue); ++ } ++ slimeMaxHealth = getString("mobs.slime.attributes.max_health", slimeMaxHealth); } public boolean snowGolemRidable = false; -@@ -986,6 +1097,7 @@ public class PurpurWorldConfig { +@@ -986,6 +1405,7 @@ public class PurpurWorldConfig { public int snowGolemSnowBallMax = 20; public float snowGolemSnowBallModifier = 10.0F; public double snowGolemAttackDistance = 1.25D; @@ -1911,11 +2385,16 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void snowGolemSettings() { snowGolemRidable = getBoolean("mobs.snow_golem.ridable", snowGolemRidable); snowGolemRidableInWater = getBoolean("mobs.snow_golem.ridable-in-water", snowGolemRidableInWater); -@@ -996,63 +1108,78 @@ public class PurpurWorldConfig { +@@ -996,63 +1416,118 @@ public class PurpurWorldConfig { snowGolemSnowBallMax = getInt("mobs.snow_golem.max-shoot-interval-ticks", snowGolemSnowBallMax); snowGolemSnowBallModifier = (float) getDouble("mobs.snow_golem.snow-ball-modifier", snowGolemSnowBallModifier); snowGolemAttackDistance = getDouble("mobs.snow_golem.attack-distance", snowGolemAttackDistance); -+ snowGolemMaxHealth = getDouble("mobs.snow_golem.attributes.max-health", snowGolemMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.snow_golem.attributes.max-health", snowGolemMaxHealth); ++ set("mobs.snow_golem.attributes.max-health", null); ++ set("mobs.snow_golem.attributes.max_health", oldValue); ++ } ++ snowGolemMaxHealth = getDouble("mobs.snow_golem.attributes.max_health", snowGolemMaxHealth); } public boolean squidRidable = false; @@ -1928,7 +2407,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea squidImmuneToEAR = getBoolean("mobs.squid.immune-to-EAR", squidImmuneToEAR); squidOffsetWaterCheck = getDouble("mobs.squid.water-offset-check", squidOffsetWaterCheck); squidsCanFly = getBoolean("mobs.squid.can-fly", squidsCanFly); -+ squidMaxHealth = getDouble("mobs.squid.attributes.max-health", squidMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.squid.attributes.max-health", squidMaxHealth); ++ set("mobs.squid.attributes.max-health", null); ++ set("mobs.squid.attributes.max_health", oldValue); ++ } ++ squidMaxHealth = getDouble("mobs.squid.attributes.max_health", squidMaxHealth); } public boolean spiderRidable = false; @@ -1937,7 +2421,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void spiderSettings() { spiderRidable = getBoolean("mobs.spider.ridable", spiderRidable); spiderRidableInWater = getBoolean("mobs.spider.ridable-in-water", spiderRidableInWater); -+ spiderMaxHealth = getDouble("mobs.spider.attributes.max-health", spiderMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.spider.attributes.max-health", spiderMaxHealth); ++ set("mobs.spider.attributes.max-health", null); ++ set("mobs.spider.attributes.max_health", oldValue); ++ } ++ spiderMaxHealth = getDouble("mobs.spider.attributes.max_health", spiderMaxHealth); } public boolean strayRidable = false; @@ -1946,7 +2435,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void straySettings() { strayRidable = getBoolean("mobs.stray.ridable", strayRidable); strayRidableInWater = getBoolean("mobs.stray.ridable-in-water", strayRidableInWater); -+ strayMaxHealth = getDouble("mobs.stray.attributes.max-health", strayMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.stray.attributes.max-health", strayMaxHealth); ++ set("mobs.stray.attributes.max-health", null); ++ set("mobs.stray.attributes.max_health", oldValue); ++ } ++ strayMaxHealth = getDouble("mobs.stray.attributes.max_health", strayMaxHealth); } public boolean striderRidable = false; @@ -1957,14 +2451,24 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea striderRidable = getBoolean("mobs.strider.ridable", striderRidable); striderRidableInWater = getBoolean("mobs.strider.ridable-in-water", striderRidableInWater); striderBreedingTicks = getInt("mobs.strider.breeding-delay-ticks", striderBreedingTicks); -+ striderMaxHealth = getDouble("mobs.strider.attributes.max-health", striderMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.strider.attributes.max-health", striderMaxHealth); ++ set("mobs.strider.attributes.max-health", null); ++ set("mobs.strider.attributes.max_health", oldValue); ++ } ++ striderMaxHealth = getDouble("mobs.strider.attributes.max_health", striderMaxHealth); } public boolean tropicalFishRidable = false; + public double tropicalFishMaxHealth = 3.0D; private void tropicalFishSettings() { tropicalFishRidable = getBoolean("mobs.tropical_fish.ridable", tropicalFishRidable); -+ tropicalFishMaxHealth = getDouble("mobs.tropical_fish.attributes.max-health", tropicalFishMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.tropical_fish.attributes.max-health", tropicalFishMaxHealth); ++ set("mobs.tropical_fish.attributes.max-health", null); ++ set("mobs.tropical_fish.attributes.max_health", oldValue); ++ } ++ tropicalFishMaxHealth = getDouble("mobs.tropical_fish.attributes.max_health", tropicalFishMaxHealth); } public boolean turtleRidable = false; @@ -1975,7 +2479,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea turtleRidable = getBoolean("mobs.turtle.ridable", turtleRidable); turtleRidableInWater = getBoolean("mobs.turtle.ridable-in-water", turtleRidableInWater); turtleBreedingTicks = getInt("mobs.turtle.breeding-delay-ticks", turtleBreedingTicks); -+ turtleMaxHealth = getDouble("mobs.turtle.attributes.max-health", turtleMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.turtle.attributes.max-health", turtleMaxHealth); ++ set("mobs.turtle.attributes.max-health", null); ++ set("mobs.turtle.attributes.max_health", oldValue); ++ } ++ turtleMaxHealth = getDouble("mobs.turtle.attributes.max_health", turtleMaxHealth); } public boolean vexRidable = false; @@ -1986,11 +2495,16 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea vexRidable = getBoolean("mobs.vex.ridable", vexRidable); vexRidableInWater = getBoolean("mobs.vex.ridable-in-water", vexRidableInWater); vexMaxY = getDouble("mobs.vex.ridable-max-y", vexMaxY); -+ vexMaxHealth = getDouble("mobs.vex.attributes.max-health", vexMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.vex.attributes.max-health", vexMaxHealth); ++ set("mobs.vex.attributes.max-health", null); ++ set("mobs.vex.attributes.max_health", oldValue); ++ } ++ vexMaxHealth = getDouble("mobs.vex.attributes.max_health", vexMaxHealth); } public boolean villagerRidable = false; -@@ -1069,6 +1196,7 @@ public class PurpurWorldConfig { +@@ -1069,6 +1544,7 @@ public class PurpurWorldConfig { public int villagerLobotomizeCheck = 60; public boolean villagerClericsFarmWarts = false; public boolean villagerClericFarmersThrowWarts = true; @@ -1998,11 +2512,16 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void villagerSettings() { villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable); villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater); -@@ -1089,33 +1217,40 @@ public class PurpurWorldConfig { +@@ -1089,33 +1565,60 @@ public class PurpurWorldConfig { villagerLobotomizeCheck = getInt("mobs.villager.lobotomize.check-interval", villagerLobotomizeCheck); villagerClericsFarmWarts = getBoolean("mobs.villager.clerics-farm-warts", villagerClericsFarmWarts); villagerClericFarmersThrowWarts = getBoolean("mobs.villager.cleric-wart-farmers-throw-warts-at-villagers", villagerClericFarmersThrowWarts); -+ villagerMaxHealth = getDouble("mobs.villager.attributes.max-health", villagerMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.villager.attributes.max-health", villagerMaxHealth); ++ set("mobs.villager.attributes.max-health", null); ++ set("mobs.villager.attributes.max_health", oldValue); ++ } ++ villagerMaxHealth = getDouble("mobs.villager.attributes.max_health", villagerMaxHealth); } public boolean villagerTraderRidable = false; @@ -2015,7 +2534,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea villagerTraderRidableInWater = getBoolean("mobs.wandering_trader.ridable-in-water", villagerTraderRidableInWater); villagerTraderCanBeLeashed = getBoolean("mobs.wandering_trader.can-be-leashed", villagerTraderCanBeLeashed); villagerTraderFollowEmeraldBlock = getBoolean("mobs.wandering_trader.follow-emerald-blocks", villagerTraderFollowEmeraldBlock); -+ villagerTraderMaxHealth = getDouble("mobs.wandering_trader.attributes.max-health", villagerTraderMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.wandering_trader.attributes.max-health", villagerTraderMaxHealth); ++ set("mobs.wandering_trader.attributes.max-health", null); ++ set("mobs.wandering_trader.attributes.max_health", oldValue); ++ } ++ villagerTraderMaxHealth = getDouble("mobs.wandering_trader.attributes.max_health", villagerTraderMaxHealth); } public boolean vindicatorRidable = false; @@ -2026,7 +2550,12 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea vindicatorRidable = getBoolean("mobs.vindicator.ridable", vindicatorRidable); vindicatorRidableInWater = getBoolean("mobs.vindicator.ridable-in-water", vindicatorRidableInWater); vindicatorJohnnySpawnChance = getDouble("mobs.vindicator.johnny.spawn-chance", vindicatorJohnnySpawnChance); -+ vindicatorMaxHealth = getDouble("mobs.vindicator.attributes.max-health", vindicatorMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.vindicator.attributes.max-health", vindicatorMaxHealth); ++ set("mobs.vindicator.attributes.max-health", null); ++ set("mobs.vindicator.attributes.max_health", oldValue); ++ } ++ vindicatorMaxHealth = getDouble("mobs.vindicator.attributes.max_health", vindicatorMaxHealth); } public boolean witchRidable = false; @@ -2035,11 +2564,31 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void witchSettings() { witchRidable = getBoolean("mobs.witch.ridable", witchRidable); witchRidableInWater = getBoolean("mobs.witch.ridable-in-water", witchRidableInWater); -+ witchMaxHealth = getDouble("mobs.witch.attributes.max-health", witchMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.witch.attributes.max-health", witchMaxHealth); ++ set("mobs.witch.attributes.max-health", null); ++ set("mobs.witch.attributes.max_health", oldValue); ++ } ++ witchMaxHealth = getDouble("mobs.witch.attributes.max_health", witchMaxHealth); } public boolean witherRidable = false; -@@ -1141,10 +1276,12 @@ public class PurpurWorldConfig { +@@ -1132,19 +1635,30 @@ public class PurpurWorldConfig { + witherHealthRegenDelay = getInt("mobs.wither.health-regen-delay", witherHealthRegenDelay); + if (PurpurConfig.version < 8) { + double oldValue = getDouble("mobs.wither.max-health", witherMaxHealth); ++ set("mobs.wither.max_health", null); + set("mobs.wither.attributes.max-health", oldValue); +- set("mobs.wither.max-health", null); ++ } else if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.wither.attributes.max-health", witherMaxHealth); ++ set("mobs.wither.attributes.max-health", null); ++ set("mobs.wither.attributes.max_health", oldValue); + } +- witherMaxHealth = getDouble("mobs.wither.attributes.max-health", witherMaxHealth); ++ witherMaxHealth = getDouble("mobs.wither.attributes.max_health", witherMaxHealth); + } + public boolean witherSkeletonRidable = false; public boolean witherSkeletonRidableInWater = false; public boolean witherSkeletonTakesWitherDamage = false; @@ -2048,11 +2597,16 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea witherSkeletonRidable = getBoolean("mobs.wither_skeleton.ridable", witherSkeletonRidable); witherSkeletonRidableInWater = getBoolean("mobs.wither_skeleton.ridable-in-water", witherSkeletonRidableInWater); witherSkeletonTakesWitherDamage = getBoolean("mobs.wither_skeleton.takes-wither-damage", witherSkeletonTakesWitherDamage); -+ witherSkeletonMaxHealth = getDouble("mobs.wither_skeleton.attributes.max-health", witherSkeletonMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.wither_skeleton.attributes.max-health", witherSkeletonMaxHealth); ++ set("mobs.wither_skeleton.attributes.max-health", null); ++ set("mobs.wither_skeleton.attributes.max_health", oldValue); ++ } ++ witherSkeletonMaxHealth = getDouble("mobs.wither_skeleton.attributes.max_health", witherSkeletonMaxHealth); } public boolean wolfRidable = false; -@@ -1153,6 +1290,7 @@ public class PurpurWorldConfig { +@@ -1153,6 +1667,7 @@ public class PurpurWorldConfig { public boolean wolfMilkCuresRabies = true; public double wolfNaturalRabid = 0.0D; public int wolfBreedingTicks = 6000; @@ -2060,11 +2614,16 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void wolfSettings() { wolfRidable = getBoolean("mobs.wolf.ridable", wolfRidable); wolfRidableInWater = getBoolean("mobs.wolf.ridable-in-water", wolfRidableInWater); -@@ -1164,13 +1302,16 @@ public class PurpurWorldConfig { +@@ -1164,13 +1679,26 @@ public class PurpurWorldConfig { wolfMilkCuresRabies = getBoolean("mobs.wolf.milk-cures-rabid-wolves", wolfMilkCuresRabies); wolfNaturalRabid = getDouble("mobs.wolf.spawn-rabid-chance", wolfNaturalRabid); wolfBreedingTicks = getInt("mobs.wolf.breeding-delay-ticks", wolfBreedingTicks); -+ wolfMaxHealth = getDouble("mobs.wolf.attributes.max-health", wolfMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.wolf.attributes.max-health", wolfMaxHealth); ++ set("mobs.wolf.attributes.max-health", null); ++ set("mobs.wolf.attributes.max_health", oldValue); ++ } ++ wolfMaxHealth = getDouble("mobs.wolf.attributes.max_health", wolfMaxHealth); } public boolean zoglinRidable = false; @@ -2073,11 +2632,16 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void zoglinSettings() { zoglinRidable = getBoolean("mobs.zoglin.ridable", zoglinRidable); zoglinRidableInWater = getBoolean("mobs.zoglin.ridable-in-water", zoglinRidableInWater); -+ zoglinMaxHealth = getDouble("mobs.zoglin.attributes.max-health", zoglinMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.zoglin.attributes.max-health", zoglinMaxHealth); ++ set("mobs.zoglin.attributes.max-health", null); ++ set("mobs.zoglin.attributes.max_health", oldValue); ++ } ++ zoglinMaxHealth = getDouble("mobs.zoglin.attributes.max_health", zoglinMaxHealth); } public boolean zombieRidable = false; -@@ -1180,6 +1321,7 @@ public class PurpurWorldConfig { +@@ -1180,6 +1708,7 @@ public class PurpurWorldConfig { public boolean zombieJockeyTryExistingChickens = true; public boolean zombieAggressiveTowardsVillagerWhenLagging = true; public EnumDifficulty zombieBreakDoorMinDifficulty = EnumDifficulty.HARD; @@ -2085,26 +2649,47 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void zombieSettings() { zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable); zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater); -@@ -1192,15 +1334,18 @@ public class PurpurWorldConfig { +@@ -1192,15 +1721,39 @@ public class PurpurWorldConfig { } catch (IllegalArgumentException ignore) { zombieBreakDoorMinDifficulty = EnumDifficulty.HARD; } -+ zombieMaxHealth = getDouble("mobs.zombie.attributes.max-health", zombieMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.zombie.attributes.max-health", zombieMaxHealth); ++ set("mobs.zombie.attributes.max-health", null); ++ set("mobs.zombie.attributes.max_health", oldValue); ++ } ++ zombieMaxHealth = getDouble("mobs.zombie.attributes.max_health", zombieMaxHealth); } public boolean zombieHorseCanSwim = false; public boolean zombieHorseRidableInWater = false; public double zombieHorseSpawnChance = 0.0D; -+ public double zombieHorseMaxHealth = 15.0D; ++ public double zombieHorseMaxHealthMin = 15.0D; ++ public double zombieHorseMaxHealthMax = 15.0D; ++ public double zombieHorseJumpStrengthMin = 0.4D; ++ public double zombieHorseJumpStrengthMax = 1.0D; ++ public double zombieHorseMovementSpeedMin = 0.2D; ++ public double zombieHorseMovementSpeedMax = 0.2D; private void zombieHorseSettings() { zombieHorseCanSwim = getBoolean("mobs.zombie_horse.can-swim", zombieHorseCanSwim); zombieHorseRidableInWater = getBoolean("mobs.zombie_horse.ridable-in-water", zombieHorseRidableInWater); zombieHorseSpawnChance = getDouble("mobs.zombie_horse.spawn-chance", zombieHorseSpawnChance); -+ zombieHorseMaxHealth = getDouble("mobs.zombie_horse.attributes.max-health", zombieHorseMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.zombie_horse.attributes.max-health", zombieHorseMaxHealthMin); ++ set("mobs.zombie_horse.attributes.max-health", null); ++ set("mobs.zombie_horse.attributes.max_health.min", oldValue); ++ set("mobs.zombie_horse.attributes.max_health.max", oldValue); ++ } ++ zombieHorseMaxHealthMin = getDouble("mobs.zombie_horse.attributes.max_health.min", zombieHorseMaxHealthMin); ++ zombieHorseMaxHealthMax = getDouble("mobs.zombie_horse.attributes.max_health.max", zombieHorseMaxHealthMax); ++ zombieHorseJumpStrengthMin = getDouble("mobs.zombie_horse.attributes.jump_strength.min", zombieHorseJumpStrengthMin); ++ zombieHorseJumpStrengthMax = getDouble("mobs.zombie_horse.attributes.jump_strength.max", zombieHorseJumpStrengthMax); ++ zombieHorseMovementSpeedMin = getDouble("mobs.zombie_horse.attributes.movement_speed.min", zombieHorseMovementSpeedMin); ++ zombieHorseMovementSpeedMax = getDouble("mobs.zombie_horse.attributes.movement_speed.max", zombieHorseMovementSpeedMax); } public boolean zombifiedPiglinRidable = false; -@@ -1209,6 +1354,7 @@ public class PurpurWorldConfig { +@@ -1209,6 +1762,7 @@ public class PurpurWorldConfig { public double zombifiedPiglinJockeyChance = 0.05D; public boolean zombifiedPiglinJockeyTryExistingChickens = true; public boolean zombifiedPiglinCountAsPlayerKillWhenAngry = true; @@ -2112,15 +2697,20 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea private void zombifiedPiglinSettings() { zombifiedPiglinRidable = getBoolean("mobs.zombified_piglin.ridable", zombifiedPiglinRidable); zombifiedPiglinRidableInWater = getBoolean("mobs.zombified_piglin.ridable-in-water", zombifiedPiglinRidableInWater); -@@ -1216,6 +1362,7 @@ public class PurpurWorldConfig { +@@ -1216,6 +1770,12 @@ public class PurpurWorldConfig { zombifiedPiglinJockeyChance = getDouble("mobs.zombified_piglin.jockey.chance", zombifiedPiglinJockeyChance); zombifiedPiglinJockeyTryExistingChickens = getBoolean("mobs.zombified_piglin.jockey.try-existing-chickens", zombifiedPiglinJockeyTryExistingChickens); zombifiedPiglinCountAsPlayerKillWhenAngry = getBoolean("mobs.zombified_piglin.count-as-player-kill-when-angry", zombifiedPiglinCountAsPlayerKillWhenAngry); -+ zombifiedPiglinMaxHealth = getDouble("mobs.zombified_piglin.attributes.max-health", zombifiedPiglinMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.zombified_piglin.attributes.max-health", zombifiedPiglinMaxHealth); ++ set("mobs.zombified_piglin.attributes.max-health", null); ++ set("mobs.zombified_piglin.attributes.max_health", oldValue); ++ } ++ zombifiedPiglinMaxHealth = getDouble("mobs.zombified_piglin.attributes.max_health", zombifiedPiglinMaxHealth); } public boolean zombieVillagerRidable = false; -@@ -1223,11 +1370,13 @@ public class PurpurWorldConfig { +@@ -1223,11 +1783,18 @@ public class PurpurWorldConfig { public boolean zombieVillagerJockeyOnlyBaby = true; public double zombieVillagerJockeyChance = 0.05D; public boolean zombieVillagerJockeyTryExistingChickens = true; @@ -2131,6 +2721,11 @@ index 513aa507aaea6fac108dbf1dc3c3d51259b16df6..3384a55fd77386961c1a63cd5e3359ea zombieVillagerJockeyOnlyBaby = getBoolean("mobs.zombie_villager.jockey.only-babies", zombieVillagerJockeyOnlyBaby); zombieVillagerJockeyChance = getDouble("mobs.zombie_villager.jockey.chance", zombieVillagerJockeyChance); zombieVillagerJockeyTryExistingChickens = getBoolean("mobs.zombie_villager.jockey.try-existing-chickens", zombieVillagerJockeyTryExistingChickens); -+ zombieVillagerMaxHealth = getDouble("mobs.zombie_villager.attributes.max-health", zombieVillagerMaxHealth); ++ if (PurpurConfig.version < 10) { ++ double oldValue = getDouble("mobs.zombie_villager.attributes.max-health", zombieVillagerMaxHealth); ++ set("mobs.zombie_villager.attributes.max-health", null); ++ set("mobs.zombie_villager.attributes.max_health", oldValue); ++ } ++ zombieVillagerMaxHealth = getDouble("mobs.zombie_villager.attributes.max_health", zombieVillagerMaxHealth); } } diff --git a/patches/server/0161-Phantom-flames-on-swoop.patch b/patches/server/0161-Phantom-flames-on-swoop.patch index 50113ec23..b0d7da775 100644 --- a/patches/server/0161-Phantom-flames-on-swoop.patch +++ b/patches/server/0161-Phantom-flames-on-swoop.patch @@ -17,10 +17,10 @@ index 889e388cf13ba0a385ee88a3acd0b813c0776dee..d6509eef1dc26beafc752c8518eabfec @Override diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 3384a55fd77386961c1a63cd5e3359ea8ca5986d..7842a904730999484334cd391a0ce623c184a0bb 100644 +index 0db403f19e0131a8a49d28bc7bd3534b2b76c3b7..66aaa47a5221cc025ca142b0cef70b3eb311bf4c 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -@@ -910,6 +910,7 @@ public class PurpurWorldConfig { +@@ -1127,6 +1127,7 @@ public class PurpurWorldConfig { public int phantomBurnInLight = 0; public boolean phantomIgnorePlayersWithTorch = false; public boolean phantomBurnInDaylight = true; @@ -28,11 +28,11 @@ index 3384a55fd77386961c1a63cd5e3359ea8ca5986d..7842a904730999484334cd391a0ce623 public double phantomMaxHealth = 20.0D; private void phantomSettings() { phantomRidable = getBoolean("mobs.phantom.ridable", phantomRidable); -@@ -935,6 +936,7 @@ public class PurpurWorldConfig { +@@ -1152,6 +1153,7 @@ public class PurpurWorldConfig { phantomBurnInLight = getInt("mobs.phantom.burn-in-light", phantomBurnInLight); phantomBurnInDaylight = getBoolean("mobs.phantom.burn-in-daylight", phantomBurnInDaylight); phantomIgnorePlayersWithTorch = getBoolean("mobs.phantom.ignore-players-with-torch", phantomIgnorePlayersWithTorch); + phantomFlamesOnSwoop = getBoolean("mobs.phantom.flames-on-swoop", phantomFlamesOnSwoop); - phantomMaxHealth = getDouble("mobs.phantom.attributes.max-health", phantomMaxHealth); - } - + if (PurpurConfig.version < 10) { + double oldValue = getDouble("mobs.phantom.attributes.max-health", phantomMaxHealth); + set("mobs.phantom.attributes.max-health", null); diff --git a/patches/server/0162-Option-for-chests-to-open-even-with-a-solid-block-on.patch b/patches/server/0162-Option-for-chests-to-open-even-with-a-solid-block-on.patch index 1da437317..5d12526ae 100644 --- a/patches/server/0162-Option-for-chests-to-open-even-with-a-solid-block-on.patch +++ b/patches/server/0162-Option-for-chests-to-open-even-with-a-solid-block-on.patch @@ -17,7 +17,7 @@ index 9e5e6de52efabe9126f6c47acb35fa1dc461ff4f..487b281cf53d3482853d56ee1e90a329 return iblockaccess.getType(blockposition1).isOccluding(iblockaccess, blockposition1); diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 7842a904730999484334cd391a0ce623c184a0bb..ac742813f49496923d40a70dd46aada0b904d89a 100644 +index 66aaa47a5221cc025ca142b0cef70b3eb311bf4c..480e3a30d42bfd0cc0344762361fc3523f148799 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -370,6 +370,11 @@ public class PurpurWorldConfig { diff --git a/patches/server/0164-Striders-give-saddle-back.patch b/patches/server/0164-Striders-give-saddle-back.patch index 6d6ab6a78..a6ab1e640 100644 --- a/patches/server/0164-Striders-give-saddle-back.patch +++ b/patches/server/0164-Striders-give-saddle-back.patch @@ -28,20 +28,20 @@ index 1bb33c4169902cf6eb323f79a5d98a1df5726d96..96485d6f4db6b618413abc23199bdb9c } diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index ac742813f49496923d40a70dd46aada0b904d89a..c875127f0bcc7c40a670419b7a41a75f7721d58c 100644 +index 480e3a30d42bfd0cc0344762361fc3523f148799..57702bdf36efeb19b01fa88a0de62b875e2e2400 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -@@ -1153,11 +1153,13 @@ public class PurpurWorldConfig { +@@ -1480,11 +1480,13 @@ public class PurpurWorldConfig { + public boolean striderRidable = false; public boolean striderRidableInWater = false; public int striderBreedingTicks = 6000; - public double striderMaxHealth = 20.0D; + public boolean striderGiveSaddleBack = false; + public double striderMaxHealth = 20.0D; private void striderSettings() { striderRidable = getBoolean("mobs.strider.ridable", striderRidable); striderRidableInWater = getBoolean("mobs.strider.ridable-in-water", striderRidableInWater); striderBreedingTicks = getInt("mobs.strider.breeding-delay-ticks", striderBreedingTicks); - striderMaxHealth = getDouble("mobs.strider.attributes.max-health", striderMaxHealth); + striderGiveSaddleBack = getBoolean("mobs.strider.give-saddle-back", striderGiveSaddleBack); - } - - public boolean tropicalFishRidable = false; + if (PurpurConfig.version < 10) { + double oldValue = getDouble("mobs.strider.attributes.max-health", striderMaxHealth); + set("mobs.strider.attributes.max-health", null);