geforkt von Mirrors/Paper
SPIGOT-4921: Preserve entity compat with Vanilla
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
962fa8e8a6
Commit
37370c79d4
@ -303,7 +303,7 @@
|
|||||||
nbttagcompound.setString("id", s);
|
nbttagcompound.setString("id", s);
|
||||||
this.save(nbttagcompound);
|
this.save(nbttagcompound);
|
||||||
return true;
|
return true;
|
||||||
@@ -1265,6 +1437,18 @@
|
@@ -1265,15 +1437,33 @@
|
||||||
Vec3D vec3d = this.getMot();
|
Vec3D vec3d = this.getMot();
|
||||||
|
|
||||||
nbttagcompound.set("Motion", this.a(vec3d.x, vec3d.y, vec3d.z));
|
nbttagcompound.set("Motion", this.a(vec3d.x, vec3d.y, vec3d.z));
|
||||||
@ -322,7 +322,10 @@
|
|||||||
nbttagcompound.set("Rotation", this.a(this.yaw, this.pitch));
|
nbttagcompound.set("Rotation", this.a(this.yaw, this.pitch));
|
||||||
nbttagcompound.setFloat("FallDistance", this.fallDistance);
|
nbttagcompound.setFloat("FallDistance", this.fallDistance);
|
||||||
nbttagcompound.setShort("Fire", (short) this.fireTicks);
|
nbttagcompound.setShort("Fire", (short) this.fireTicks);
|
||||||
@@ -1274,6 +1458,12 @@
|
nbttagcompound.setShort("Air", (short) this.getAirTicks());
|
||||||
|
nbttagcompound.setBoolean("OnGround", this.onGround);
|
||||||
|
- nbttagcompound.setInt("Dimension", this.dimension.getDimensionID());
|
||||||
|
+ nbttagcompound.setInt("Dimension", this.dimension.getType().getDimensionID()); // CraftBukkit - preserve Vanilla compat
|
||||||
nbttagcompound.setBoolean("Invulnerable", this.invulnerable);
|
nbttagcompound.setBoolean("Invulnerable", this.invulnerable);
|
||||||
nbttagcompound.setInt("PortalCooldown", this.portalCooldown);
|
nbttagcompound.setInt("PortalCooldown", this.portalCooldown);
|
||||||
nbttagcompound.a("UUID", this.getUniqueID());
|
nbttagcompound.a("UUID", this.getUniqueID());
|
||||||
@ -347,6 +350,15 @@
|
|||||||
return nbttagcompound;
|
return nbttagcompound;
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
|
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
|
||||||
|
@@ -1371,7 +1566,7 @@
|
||||||
|
this.setAirTicks(nbttagcompound.getShort("Air"));
|
||||||
|
this.onGround = nbttagcompound.getBoolean("OnGround");
|
||||||
|
if (nbttagcompound.hasKey("Dimension")) {
|
||||||
|
- this.dimension = DimensionManager.a(nbttagcompound.getInt("Dimension"));
|
||||||
|
+ // this.dimension = DimensionManager.a(nbttagcompound.getInt("Dimension")); // CraftBukkit - redundant
|
||||||
|
}
|
||||||
|
|
||||||
|
this.invulnerable = nbttagcompound.getBoolean("Invulnerable");
|
||||||
@@ -1414,6 +1609,42 @@
|
@@ -1414,6 +1609,42 @@
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalStateException("Entity has invalid position");
|
throw new IllegalStateException("Entity has invalid position");
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren