mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-12 18:55:51 -07:00
Fixes the whitescreen issue some people were having.
This commit is contained in:
@@ -852,6 +852,18 @@ public abstract class Entity {
|
||||
public void d(NBTTagCompound nbttagcompound) {
|
||||
nbttagcompound.a("Pos", (NBTBase) this.a(new double[] { this.locX, this.locY, this.locZ}));
|
||||
nbttagcompound.a("Motion", (NBTBase) this.a(new double[] { this.motX, this.motY, this.motZ}));
|
||||
|
||||
// CraftBukkit start - checking for NaN pitch/yaw and resetting to zero
|
||||
// TODO: make sure this is the best way to address this.
|
||||
if (Float.isNaN(this.yaw)) {
|
||||
this.yaw = 0;
|
||||
}
|
||||
|
||||
if (Float.isNaN(this.pitch)) {
|
||||
this.pitch = 0;
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
nbttagcompound.a("Rotation", (NBTBase) this.a(new float[] { this.yaw, this.pitch}));
|
||||
nbttagcompound.a("FallDistance", this.fallDistance);
|
||||
nbttagcompound.a("Fire", (short) this.fireTicks);
|
||||
|
Reference in New Issue
Block a user