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

@@ -5,7 +5,7 @@ Subject: [PATCH] Vehicle Event Cancellation Changes
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index fa9319aff..a3e9ee052 100644
index 89e42c0a46..86b783e73b 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