2019-01-17 03:02:56 +01:00
|
|
|
From 2189dac4ba9b3e11215c35546733756f9a635818 Mon Sep 17 00:00:00 2001
|
2018-09-27 06:11:50 +02:00
|
|
|
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-01-15 22:12:19 +01:00
|
|
|
index b572e535ac..66947e3071 100644
|
2018-09-27 06:11:50 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
2019-01-15 22:12:19 +01:00
|
|
|
@@ -1735,7 +1735,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
2018-09-27 06:11:50 +02:00
|
|
|
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-01-01 04:15:55 +01:00
|
|
|
2.20.1
|
2018-09-27 06:11:50 +02:00
|
|
|
|