diff options
author | t00thpick1 <t00thpick1dirko@gmail.com> | 2013-12-20 17:14:36 -0500 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2013-12-20 23:37:57 -0600 |
commit | 3c209a9884389184134c6c3bb31d5ab8c8842831 (patch) | |
tree | 42a9454835b15efeb4d3d0b79a7c1aad1ed837f7 | |
parent | 9bc3b7df2448ed2d3601e113a673e70599a24152 (diff) | |
download | craftbukkit-3c209a9884389184134c6c3bb31d5ab8c8842831.tar craftbukkit-3c209a9884389184134c6c3bb31d5ab8c8842831.tar.gz craftbukkit-3c209a9884389184134c6c3bb31d5ab8c8842831.tar.lz craftbukkit-3c209a9884389184134c6c3bb31d5ab8c8842831.tar.xz craftbukkit-3c209a9884389184134c6c3bb31d5ab8c8842831.zip |
[Bleeding] Fix crash involving horse passengers. Fixes BUKKIT-5212
Setting a horse's passenger to a non-living entity will cause a
server crash when the horse ticks, we need to check that it is
a living entity before casting, and skip otherwise.
-rw-r--r-- | src/main/java/net/minecraft/server/EntityHorse.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java index 24772375..d9f2f3ec 100644 --- a/src/main/java/net/minecraft/server/EntityHorse.java +++ b/src/main/java/net/minecraft/server/EntityHorse.java @@ -881,7 +881,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { } public void e(float f, float f1) { - if (this.passenger != null && this.cs()) { + if (this.passenger != null && this.passenger instanceof EntityLiving && this.cs()) { // CraftBukkit - Check type of passenger this.lastYaw = this.yaw = this.passenger.yaw; this.pitch = this.passenger.pitch * 0.5F; this.b(this.yaw, this.pitch); |