Paper/Spigot-Server-Patches/0378-Ignore-Dimension-NBT-field-in-Entity-data.patch
Aikar b62dfa0bf9
Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
39ce5d3a SPIGOT-4399: ItemMeta.equals broken with AttributeModifiers

CraftBukkit Changes:
1cf8b5dc SPIGOT-4400: Populators running on existing chunks
116cb9a1 SPIGOT-4399: Add attribute modifier equality test
5ee1c18a SPIGOT-4398: Set ASM7_EXPERIMENTAL flag
2018-09-28 19:31:59 -04:00

41 Zeilen
2.1 KiB
Diff

From d5fbc8011efa46a6a01adffe0d2d308e785b0e14 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 27 Sep 2018 00:08:31 -0400
Subject: [PATCH] Ignore Dimension NBT field in Entity data
Minecraft is trying to set Dimension Objects based on a Dimension ID
Dimension ID's for custom worlds are dynamically allocate dand not guaranteed
consistent.
This removes checking the NBT data, as the Entity will always have its
DimensionManager set to the world it is being placed into.
This fixes corrupt entities breaking chunk saving in custom worlds.
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index cd601f29a3..0c18405a8d 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1583,7 +1583,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
nbttagcompound.setShort("Fire", (short) this.fireTicks);
nbttagcompound.setShort("Air", (short) this.getAirTicks());
nbttagcompound.setBoolean("OnGround", this.onGround);
- nbttagcompound.setInt("Dimension", this.dimension.getDimensionID());
+ //nbttagcompound.setInt("Dimension", this.dimension.getDimensionID()); // Paper - always controlled by world
nbttagcompound.setBoolean("Invulnerable", this.invulnerable);
nbttagcompound.setInt("PortalCooldown", this.portalCooldown);
nbttagcompound.a("UUID", this.getUniqueID());
@@ -1720,7 +1720,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
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")); // Paper - always controlled by world
}
this.invulnerable = nbttagcompound.getBoolean("Invulnerable");
--
2.19.0