clear current chunk and entity slice on chunk unload
ideally this should of never mattered, as it will only be hit if you teleport out of an unloaded chunk... But apparently some people are triggering this. See #1223
This commit is contained in:
@@ -9,7 +9,7 @@ This should hopefully avoid duplicate entities ever being created
|
||||
if the entity was to end up in 2 different chunk slices
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index eaee492010..1787607622 100644
|
||||
index 27b73acdee..be3ac2d940 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -0,0 +0,0 @@ public class Chunk {
|
||||
@@ -60,8 +60,16 @@ index eaee492010..1787607622 100644
|
||||
this.markDirty();
|
||||
entity.setCurrentChunk(null);
|
||||
entityCounts.decrement(entity.getMinecraftKeyString());
|
||||
@@ -0,0 +0,0 @@ public class Chunk {
|
||||
}
|
||||
// Spigot End
|
||||
entity.setCurrentChunk(null); // Paper
|
||||
+ entity.entitySlice = null; // Paper
|
||||
|
||||
// Do not pass along players, as doing so can get them stuck outside of time.
|
||||
// (which for example disables inventory icon updates and prevents block breaking)
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index fdabb1e369..89f9bd347b 100644
|
||||
index eb8904a728..1e64d5fcd6 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper
|
||||
|
||||
Reference in New Issue
Block a user