remove entity properly

Dieser Commit ist enthalten in:
wea_ondara 2020-08-03 17:35:53 +02:00
Ursprung 9b95343601
Commit 1097ac7889

Datei anzeigen

@ -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();
} }
} }
} }