1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-04-04 13:31:03 +02:00

Remove left over debug from entity slices

This commit is contained in:
Aikar 2019-03-02 18:52:16 -05:00
parent 301af1e293
commit 7af07de57b

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 42b76b2122..1c9e2cb1ce 100644
index 42b76b2122..7dd59ee031 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 {
@ -22,7 +22,7 @@ index 42b76b2122..1c9e2cb1ce 100644
+ List<Entity> entitySlice = this.entitySlices[k];
+ boolean inThis = entitySlice.contains(entity);
+ List<Entity> currentSlice = entity.entitySlice;
+ if ((currentSlice != null && currentSlice.contains(entity)) || inThis) {
+ if (inThis || (currentSlice != null && currentSlice.contains(entity))) {
+ if (currentSlice == entitySlice || inThis) {
+ return;
+ } else {
@ -32,7 +32,7 @@ index 42b76b2122..1c9e2cb1ce 100644
+ } else {
+ removeEntity(entity);
+ }
+ new Throwable().printStackTrace();
+ currentSlice.remove(entity); // Just incase the above did not remove from this target slice
+ }
+ }
+ entity.entitySlice = entitySlice;