mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-17 10:24:23 +01:00
Fix crash resolving an entity reference
This commit is contained in:
parent
e543dab3eb
commit
ee84df1bc1
1 changed files with 1 additions and 1 deletions
|
@ -116,7 +116,7 @@ public class EntityReference<T extends Entity> implements NbtSerialisable, Track
|
|||
@Nullable
|
||||
public T get(World world) {
|
||||
T t = directReference.get();
|
||||
if (t == null) {
|
||||
if (t == null && reference != null) {
|
||||
directReference = new WeakReference<>(t = reference.resolve(world).orElse(null));
|
||||
}
|
||||
return t;
|
||||
|
|
Loading…
Reference in a new issue