diff --git a/patches/server/Mob-Pathfinding-API.patch b/patches/server/Mob-Pathfinding-API.patch index fa70f48b51..9a2e03b8e1 100644 --- a/patches/server/Mob-Pathfinding-API.patch +++ b/patches/server/Mob-Pathfinding-API.patch @@ -27,7 +27,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + +public class PaperPathfinder implements com.destroystokyo.paper.entity.Pathfinder { + -+ private final net.minecraft.world.entity.Mob entity; ++ private net.minecraft.world.entity.Mob entity; + + public PaperPathfinder(net.minecraft.world.entity.Mob entity) { + this.entity = entity; @@ -38,6 +38,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return entity.getBukkitMob(); + } + ++ public void setHandle(net.minecraft.world.entity.Mob entity) { ++ this.entity = entity; ++ } ++ + @Override + public void stopPathfinding() { + entity.getNavigation().stop(); @@ -178,3 +182,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override public void setTarget(LivingEntity target) { Preconditions.checkState(!this.getHandle().generation, "Cannot set target during world generation"); +@@ -0,0 +0,0 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob { + return (net.minecraft.world.entity.Mob) entity; + } + ++ // Paper start ++ @Override ++ public void setHandle(net.minecraft.world.entity.Entity entity) { ++ super.setHandle(entity); ++ paperPathfinder.setHandle(getHandle()); ++ } ++ // Paper end ++ + @Override + public String toString() { + return "CraftMob";