13
0
geforkt von Mirrors/Paper

[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.
Dieser Commit ist enthalten in:
t00thpick1 2013-12-20 17:14:36 -05:00 committet von feildmaster
Ursprung 9bc3b7df24
Commit 3c209a9884

Datei anzeigen

@ -881,7 +881,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
} }
public void e(float f, float f1) { 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.lastYaw = this.yaw = this.passenger.yaw;
this.pitch = this.passenger.pitch * 0.5F; this.pitch = this.passenger.pitch * 0.5F;
this.b(this.yaw, this.pitch); this.b(this.yaw, this.pitch);