summaryrefslogtreecommitdiffstats
path: root/src/main/java/net
diff options
context:
space:
mode:
authorfeildmaster <admin@feildmaster.com>2013-09-10 19:35:43 -0500
committerfeildmaster <admin@feildmaster.com>2013-09-10 19:42:08 -0500
commit8ae8957d15668b29a95efdccac60fb989f23461d (patch)
tree372a529b510e940461096cdd896e549d313ab9fc /src/main/java/net
parentc62375f95e5dfd7941365fceb68368221e18c466 (diff)
downloadcraftbukkit-8ae8957d15668b29a95efdccac60fb989f23461d.tar
craftbukkit-8ae8957d15668b29a95efdccac60fb989f23461d.tar.gz
craftbukkit-8ae8957d15668b29a95efdccac60fb989f23461d.tar.lz
craftbukkit-8ae8957d15668b29a95efdccac60fb989f23461d.tar.xz
craftbukkit-8ae8957d15668b29a95efdccac60fb989f23461d.zip
Properly set persistence flag for bred animals. Fixes BUKKIT-4751
Diffstat (limited to 'src/main/java/net')
-rw-r--r--src/main/java/net/minecraft/server/PathfinderGoalBreed.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
index 57f7f218..169af7f8 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();