diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2012-12-07 21:18:51 -0600 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-12-07 21:18:51 -0600 |
commit | 9973e7cdec6e8417d99cc75d116b46ce0d6b0c53 (patch) | |
tree | 8cfbfb8fbe25a67ee7ff3eeb978146476498002d /src/main/java | |
parent | 846a22304ca741ed8a39e1d881ab1b09f842b2d6 (diff) | |
download | craftbukkit-9973e7cdec6e8417d99cc75d116b46ce0d6b0c53.tar craftbukkit-9973e7cdec6e8417d99cc75d116b46ce0d6b0c53.tar.gz craftbukkit-9973e7cdec6e8417d99cc75d116b46ce0d6b0c53.tar.lz craftbukkit-9973e7cdec6e8417d99cc75d116b46ce0d6b0c53.tar.xz craftbukkit-9973e7cdec6e8417d99cc75d116b46ce0d6b0c53.zip |
Update entity state correctly when marked as persistent. Fixes BUKKIT-3123
When a mob is marked with the persistent flag (animal or anything with
setRemoveWhenFarAway(false)) the entire block of code for checking if they
should be despawned is skipped. However, one part of this code updates the
mob state if a player is close enough to them. It turns out this state is
used by the AI system to decide if the mob should move around randomly or
not. To stop mobs from being frozen in place we now update this state if
the persistent flag is set as well.
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityLiving.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java index ba9721c4..c36c25b2 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -1413,7 +1413,11 @@ public abstract class EntityLiving extends Entity { this.bA = 0; } } + // CraftBukkit start + } else { + this.bA = 0; } + // CraftBukkit end } protected void bl() { |