From ebec73b5a952f9b75465c6165d314f00c199eb94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Fa=C3=9Fbender?= Date: Sun, 30 Nov 2014 19:02:56 +0100 Subject: Another attempt of fixing OOB Horses. Just remove them from the world instead of setting it dead. --- nms-patches/EntityHorse.patch | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/nms-patches/EntityHorse.patch b/nms-patches/EntityHorse.patch index d6d606e1..c5901a7a 100644 --- a/nms-patches/EntityHorse.patch +++ b/nms-patches/EntityHorse.patch @@ -1,5 +1,5 @@ ---- ../work/decompile-8eb82bde//net/minecraft/server/EntityHorse.java Sun Nov 30 00:00:30 2014 -+++ src/main/java/net/minecraft/server/EntityHorse.java Sun Nov 30 00:00:14 2014 +--- ../work/decompile-8eb82bde//net/minecraft/server/EntityHorse.java Sun Nov 30 18:01:41 2014 ++++ src/main/java/net/minecraft/server/EntityHorse.java Sun Nov 30 18:00:23 2014 @@ -4,6 +4,8 @@ import java.util.Iterator; import java.util.List; @@ -85,13 +85,14 @@ } if (!this.cw() && this.passenger == null && this.random.nextInt(300) == 0 && this.world.getType(new BlockPosition(MathHelper.floor(this.locX), MathHelper.floor(this.locY) - 1, MathHelper.floor(this.locZ))).getBlock() == Blocks.GRASS) { -@@ -730,6 +746,13 @@ +@@ -730,6 +746,14 @@ } public void s_() { + // CraftBukkit start - Remove out of bounds horses, fixes an vanilla bug + if ( this.locY < -600 ) { -+ die(); ++ world.removeEntity(this); ++ MinecraftServer.getLogger().warn("Removed oob horse. Prevented a crash for Horse @ " + this.locX + ", " + this.locY + ", " + this.locZ); + return; + } + // CraftBukkit end @@ -99,7 +100,7 @@ super.s_(); if (this.world.isStatic && this.datawatcher.a()) { this.datawatcher.e(); -@@ -949,6 +972,7 @@ +@@ -949,6 +973,7 @@ nbttagcompound.setInt("Temper", this.getTemper()); nbttagcompound.setBoolean("Tame", this.isTame()); nbttagcompound.setString("OwnerUUID", this.getOwnerUUID()); @@ -107,7 +108,7 @@ if (this.hasChest()) { NBTTagList nbttaglist = new NBTTagList(); -@@ -1001,6 +1025,12 @@ +@@ -1001,6 +1026,12 @@ this.setOwnerUUID(s); } @@ -120,7 +121,7 @@ AttributeInstance attributeinstance = this.getAttributeMap().a("Speed"); if (attributeinstance != null) { -@@ -1166,18 +1196,25 @@ +@@ -1166,18 +1197,25 @@ public void v(int i) { if (this.cE()) { -- cgit v1.2.3