Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
SPIGOT-5054: Prevent issue with invalid hanging entities
Dieser Commit ist enthalten in:
Ursprung
0309d17dcc
Commit
b1c5fd6817
@ -173,3 +173,21 @@
|
|||||||
this.die();
|
this.die();
|
||||||
this.a((Entity) null);
|
this.a((Entity) null);
|
||||||
}
|
}
|
||||||
|
@@ -168,7 +228,7 @@
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void b(NBTTagCompound nbttagcompound) {
|
||||||
|
- nbttagcompound.setByte("Facing", (byte) this.direction.get2DRotationValue());
|
||||||
|
+ if (this.direction != null) nbttagcompound.setByte("Facing", (byte) this.direction.get2DRotationValue()); // CraftBukkit
|
||||||
|
BlockPosition blockposition = this.getBlockPosition();
|
||||||
|
|
||||||
|
nbttagcompound.setInt("TileX", blockposition.getX());
|
||||||
|
@@ -179,7 +239,7 @@
|
||||||
|
@Override
|
||||||
|
public void a(NBTTagCompound nbttagcompound) {
|
||||||
|
this.blockPosition = new BlockPosition(nbttagcompound.getInt("TileX"), nbttagcompound.getInt("TileY"), nbttagcompound.getInt("TileZ"));
|
||||||
|
- this.setDirection(EnumDirection.fromType2(nbttagcompound.getByte("Facing")));
|
||||||
|
+ if (nbttagcompound.hasKeyOfType("Facing", 99)) this.setDirection(EnumDirection.fromType2(nbttagcompound.getByte("Facing"))); // CraftBukkit
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract int getHangingWidth();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren