From c7fec9299a0eddf4ada0b1d0e8f7f021268031bc Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Fri, 18 Mar 2016 21:10:20 -0500 Subject: [PATCH] Make spawner nerfed mobs float AI toggleable closes GH-57 --- .../Allow-nerfed-mobs-to-jump.patch | 16 +++++++++++++++- .../Player-Exhaustion-Multipliers.patch | 4 ++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch b/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch index 8c5aa6582..5f07bf721 100644 --- a/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch +++ b/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch @@ -4,6 +4,20 @@ Date: Tue, 1 Mar 2016 13:24:16 -0600 Subject: [PATCH] Allow nerfed mobs to jump +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -0,0 +0,0 @@ public class PaperWorldConfig { + fishingMaxTicks = getInt("fishing-time-range.MaximumTicks", 900); + log("Fishing time ranges are between " + fishingMinTicks +" and " + fishingMaxTicks + " ticks"); + } ++ ++ public boolean nerfedMobsShouldJump; ++ private void nerfedMobsShouldJump() { ++ nerfedMobsShouldJump = getBoolean("spawner-nerfed-mobs-should-jump", false); ++ } + } diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java @@ -37,7 +51,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public PathfinderGoalFloat(EntityInsentient entityinsentient) { this.a = entityinsentient; -+ entityinsentient.goalFloat = this; // Paper ++ if (entityinsentient.getWorld().paperConfig.nerfedMobsShouldJump) entityinsentient.goalFloat = this; // Paper this.a(4); ((Navigation) entityinsentient.getNavigation()).c(true); } diff --git a/Spigot-Server-Patches/Player-Exhaustion-Multipliers.patch b/Spigot-Server-Patches/Player-Exhaustion-Multipliers.patch index 43a9de6ba..26c702b5a 100644 --- a/Spigot-Server-Patches/Player-Exhaustion-Multipliers.patch +++ b/Spigot-Server-Patches/Player-Exhaustion-Multipliers.patch @@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { - fishingMaxTicks = getInt("fishing-time-range.MaximumTicks", 900); - log("Fishing time ranges are between " + fishingMinTicks +" and " + fishingMaxTicks + " ticks"); + private void nerfedMobsShouldJump() { + nerfedMobsShouldJump = getBoolean("spawner-nerfed-mobs-should-jump", false); } + + public float blockBreakExhaustion;