3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 19:10:09 +01:00

Remove left over debug from entity slices

Dieser Commit ist enthalten in:
Aikar 2019-03-02 18:52:16 -05:00
Ursprung 7e3169e3de
Commit 21ee8800f8
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 401ADFC9891FAAFE

Datei anzeigen

@ -1,4 +1,4 @@
From abf1bf94c272bcaf8daf2d6e5252e54a426bf936 Mon Sep 17 00:00:00 2001
From c694fb42c86f64e9cda92745dd020ac0121d470a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
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<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;