Relookup Entity Save ID if was null during precache
Should fix #1280 Citizens hijacks entity map, and im guessing under the right conditions the result might actually be null during entity creation Pre the cache patch, the id is looked up on save, so it was fine. Now, if its null and the save ID is requested, we will try to look it up again and cache it if found.
This commit is contained in:
@@ -14,7 +14,7 @@ Specially with servers using smaller mob spawn ranges than view distance, as wel
|
||||
This patch returns mob counting to use all loaded chunks, and 17x17 division.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index da7b59434..1157bc7eb 100644
|
||||
index e9a44098d9..6c86d3b6bc 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 {
|
||||
@@ -25,10 +25,10 @@ index da7b59434..1157bc7eb 100644
|
||||
// Paper start
|
||||
+ if (!this.entitySlices[i].remove(entity)) { return; }
|
||||
entity.setCurrentChunk(null);
|
||||
entityCounts.decrement(entity.entityKeyString);
|
||||
entityCounts.decrement(entity.getMinecraftKeyString());
|
||||
if (entity instanceof EntityItem) {
|
||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
index 45a83ae99..ed22607d9 100644
|
||||
index 45a83ae995..ed22607d91 100644
|
||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
@@ -0,0 +0,0 @@ public final class SpawnerCreature {
|
||||
|
||||
Reference in New Issue
Block a user