3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 04:50:05 +01:00

Merge pull request #15 in SPIGOT/craftbukkit from ~GENAZT/craftbukkit:bugfix/oob-horses to master

* commit 'ebec73b5a952f9b75465c6165d314f00c199eb94':
  Another attempt of fixing OOB Horses. Just remove them from the world instead of setting it dead.
Dieser Commit ist enthalten in:
Thinkofdeath 2014-11-30 21:23:01 +02:00
Commit cd65011eac

Datei anzeigen

@ -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()) {