remove entity properly

This commit is contained in:
wea_ondara 2020-08-03 17:35:53 +02:00
parent 9b95343601
commit 1097ac7889

View File

@ -155,9 +155,10 @@ public class ExtentEntityCopy implements EntityFunction {
uuid = new UUID(tag.getLong("PersistentIDMSB"), tag.getLong("PersistentIDLSB")); uuid = new UUID(tag.getLong("PersistentIDMSB"), tag.getLong("PersistentIDLSB"));
} }
if (uuid != null) { if (uuid != null) {
Extent src = source != null ? source : entity.getExtent(); if (source != null) {
if (src != null) { source.removeEntity(entity.getLocation().getBlockX(), entity.getLocation().getBlockY(), entity.getLocation().getBlockZ(), uuid);
src.removeEntity(entity.getLocation().getBlockX(), entity.getLocation().getBlockY(), entity.getLocation().getBlockZ(), uuid); } else {
entity.remove();
} }
} }
} }