From 9fd1b06aa83a22cc6d0b19776ecb8babcbacdfaf Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Tue, 31 Oct 2017 15:13:55 +0000 Subject: [PATCH] allow nerfed mobs to jump again Entity AI tasks are initialized earlier in recent versions of MC, this means that the fromMobSpawner has not been set at the point where AI tasks are initilazed and so the goalFloat will never be populated. To rectify this, we can rely on the entity tick checking if the mob is from a spawner each tick, and just initialize the field should the paper option be enabled. This saves us from having to modify the call chain in order to pass the fact that it was created by a mobSpawner earlier. --- Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch b/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch index eded0a364..6faf92bd6 100644 --- a/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch +++ b/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch @@ -56,14 +56,14 @@ index 3c48d9463..7b02b253c 100644 } // Spigot End diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java -index b3b303b3b..fc8be86fd 100644 +index b3b303b3b..fc6c3bf71 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java @@ -0,0 +0,0 @@ public class PathfinderGoalFloat extends PathfinderGoal { public PathfinderGoalFloat(EntityInsentient entityinsentient) { this.a = entityinsentient; -+ if (entityinsentient.fromMobSpawner && entityinsentient.getWorld().paperConfig.nerfedMobsShouldJump) entityinsentient.goalFloat = this; // Paper ++ if (entityinsentient.getWorld().paperConfig.nerfedMobsShouldJump) entityinsentient.goalFloat = this; // Paper this.a(4); if (entityinsentient.getNavigation() instanceof Navigation) { ((Navigation) entityinsentient.getNavigation()).c(true);