From 8ae8957d15668b29a95efdccac60fb989f23461d Mon Sep 17 00:00:00 2001 From: feildmaster Date: Tue, 10 Sep 2013 19:35:43 -0500 Subject: [PATCH] Properly set persistence flag for bred animals. Fixes BUKKIT-4751 --- src/main/java/net/minecraft/server/PathfinderGoalBreed.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java index 57f7f21854..169af7f875 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java @@ -69,6 +69,11 @@ public class PathfinderGoalBreed extends PathfinderGoal { EntityAgeable entityageable = this.d.createChild(this.e); if (entityageable != null) { + // CraftBukkit start - set persistence for tame animals + if (entityageable instanceof EntityTameableAnimal && ((EntityTameableAnimal) entityageable).isTamed()) { + entityageable.persistent = true; + } + // CraftBukkit end this.d.setAge(6000); this.e.setAge(6000); this.d.bZ();