From 21ee8800f8c75c86ea2b1cb9c637315a40944f7e Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 2 Mar 2019 18:52:16 -0500 Subject: [PATCH] Remove left over debug from entity slices --- .../0302-Add-some-Debug-to-Chunk-Entity-slices.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Spigot-Server-Patches/0302-Add-some-Debug-to-Chunk-Entity-slices.patch b/Spigot-Server-Patches/0302-Add-some-Debug-to-Chunk-Entity-slices.patch index cfc58bee3e..327b2f68d9 100644 --- a/Spigot-Server-Patches/0302-Add-some-Debug-to-Chunk-Entity-slices.patch +++ b/Spigot-Server-Patches/0302-Add-some-Debug-to-Chunk-Entity-slices.patch @@ -1,4 +1,4 @@ -From abf1bf94c272bcaf8daf2d6e5252e54a426bf936 Mon Sep 17 00:00:00 2001 +From c694fb42c86f64e9cda92745dd020ac0121d470a Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 23 Jul 2018 22:44:23 -0400 Subject: [PATCH] Add some Debug to Chunk Entity slices @@ -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 @@ -714,8 +714,27 @@ public class Chunk implements IChunkAccess { @@ -22,7 +22,7 @@ index 42b76b2122..1c9e2cb1ce 100644 + List entitySlice = this.entitySlices[k]; + boolean inThis = entitySlice.contains(entity); + List 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;