Use entity.dead instead of entity.die()

Fixes #3096
This commit is contained in:
Aikar
2020-04-04 21:09:27 -04:00
parent 89718e929a
commit 9bd9caa6ae
5 changed files with 14 additions and 9 deletions

View File

@@ -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 68cde33565..1d47e47370 100644
index 68cde33565..3267e87259 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 implements IChunkAccess {
@@ -52,6 +52,7 @@ index 68cde33565..1d47e47370 100644
if (entity.currentChunk != null && entity.currentChunk.get() == this) entity.setCurrentChunk(null);
+ if (entitySlices[i] == entity.entitySlice) {
+ entity.entitySlice = null;
+ entity.inChunk = false;
+ }
if (!this.entitySlices[i].remove(entity)) {
return;