geforkt von Mirrors/Paper
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:
Commit
cd65011eac
@ -1,5 +1,5 @@
|
|||||||
--- ../work/decompile-8eb82bde//net/minecraft/server/EntityHorse.java Sun Nov 30 00:00:30 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 00:00:14 2014
|
+++ src/main/java/net/minecraft/server/EntityHorse.java Sun Nov 30 18:00:23 2014
|
||||||
@@ -4,6 +4,8 @@
|
@@ -4,6 +4,8 @@
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
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) {
|
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_() {
|
public void s_() {
|
||||||
+ // CraftBukkit start - Remove out of bounds horses, fixes an vanilla bug
|
+ // CraftBukkit start - Remove out of bounds horses, fixes an vanilla bug
|
||||||
+ if ( this.locY < -600 ) {
|
+ 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;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
@ -99,7 +100,7 @@
|
|||||||
super.s_();
|
super.s_();
|
||||||
if (this.world.isStatic && this.datawatcher.a()) {
|
if (this.world.isStatic && this.datawatcher.a()) {
|
||||||
this.datawatcher.e();
|
this.datawatcher.e();
|
||||||
@@ -949,6 +972,7 @@
|
@@ -949,6 +973,7 @@
|
||||||
nbttagcompound.setInt("Temper", this.getTemper());
|
nbttagcompound.setInt("Temper", this.getTemper());
|
||||||
nbttagcompound.setBoolean("Tame", this.isTame());
|
nbttagcompound.setBoolean("Tame", this.isTame());
|
||||||
nbttagcompound.setString("OwnerUUID", this.getOwnerUUID());
|
nbttagcompound.setString("OwnerUUID", this.getOwnerUUID());
|
||||||
@ -107,7 +108,7 @@
|
|||||||
if (this.hasChest()) {
|
if (this.hasChest()) {
|
||||||
NBTTagList nbttaglist = new NBTTagList();
|
NBTTagList nbttaglist = new NBTTagList();
|
||||||
|
|
||||||
@@ -1001,6 +1025,12 @@
|
@@ -1001,6 +1026,12 @@
|
||||||
this.setOwnerUUID(s);
|
this.setOwnerUUID(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,7 +121,7 @@
|
|||||||
AttributeInstance attributeinstance = this.getAttributeMap().a("Speed");
|
AttributeInstance attributeinstance = this.getAttributeMap().a("Speed");
|
||||||
|
|
||||||
if (attributeinstance != null) {
|
if (attributeinstance != null) {
|
||||||
@@ -1166,18 +1196,25 @@
|
@@ -1166,18 +1197,25 @@
|
||||||
|
|
||||||
public void v(int i) {
|
public void v(int i) {
|
||||||
if (this.cE()) {
|
if (this.cE()) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren