testserver/Spigot-Server-Patches/0362-Ignore-Dimension-NBT-f...

32 lines
1.4 KiB
Diff
Raw Normal View History

2019-05-05 11:12:32 +00:00
From 33dac55b42040a29364c8c5662d3faa1173995b6 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
2019-05-05 11:12:32 +00:00
index c9aa5ae16..464e1d2d9 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
2019-05-05 11:12:32 +00:00
@@ -1623,7 +1623,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");
--
2019-05-05 08:33:44 +00:00
2.20.1