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:
Aikar
2018-07-26 23:57:31 -04:00
parent 119ae29b37
commit 3c8a4cb1bb
21 changed files with 85 additions and 75 deletions

View File

@@ -6,7 +6,7 @@ Subject: [PATCH] add more information to Entity.toString()
UUID, ticks lived, valid, dead
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 80ecdb282..99dac412f 100644
index 71da8e1e7d..28713f045d 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper