summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityHorse.patch
diff options
context:
space:
mode:
authorFabian Faßbender <fabian.fassbender42@googlemail.com>2014-11-30 19:02:56 +0100
committerFabian Faßbender <fabian.fassbender42@googlemail.com>2014-11-30 19:02:56 +0100
commitebec73b5a952f9b75465c6165d314f00c199eb94 (patch)
treeb93a2b86e3d19de8daf3d1fc3cd492b6031e2922 /nms-patches/EntityHorse.patch
parentcab7c772dff3ac4472228399049ebc8dd2d73a86 (diff)
downloadcraftbukkit-ebec73b5a952f9b75465c6165d314f00c199eb94.tar
craftbukkit-ebec73b5a952f9b75465c6165d314f00c199eb94.tar.gz
craftbukkit-ebec73b5a952f9b75465c6165d314f00c199eb94.tar.lz
craftbukkit-ebec73b5a952f9b75465c6165d314f00c199eb94.tar.xz
craftbukkit-ebec73b5a952f9b75465c6165d314f00c199eb94.zip
Another attempt of fixing OOB Horses. Just remove them from the world instead of setting it dead.
Diffstat (limited to 'nms-patches/EntityHorse.patch')
-rw-r--r--nms-patches/EntityHorse.patch15
1 files 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()) {