Upstream Paper

This commit is contained in:
Sotr
2018-07-20 02:10:32 +08:00
parent f93abbf076
commit 280db63b42
4 changed files with 15 additions and 6 deletions

View File

@@ -2352,7 +2352,7 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper
}
public String toString() {
return String.format("%s[\'%s\'/%d, l=\'%s\', x=%.2f, y=%.2f, z=%.2f]", new Object[] { this.getClass().getSimpleName(), this.getName(), Integer.valueOf(this.id), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ)});
return String.format("%s[\'%s\'/%d, uuid=\'%s\', l=\'%s\', x=%.2f, y=%.2f, z=%.2f]", new Object[] { this.getClass().getSimpleName(), this.getName(), Integer.valueOf(this.id), this.uniqueID.toString(), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ)}); // Paper - add UUID
}
public boolean isInvulnerable(DamageSource damagesource) {

View File

@@ -1180,7 +1180,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
private boolean j(Entity entity) {
if (entity.dead) {
// WorldServer.a.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.a(entity)); // CraftBukkit
WorldServer.a.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.a(entity)); // CraftBukkit // Paper
return false;
} else {
UUID uuid = entity.getUniqueID();
@@ -1192,7 +1192,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
this.f.remove(entity1);
} else {
if (!(entity instanceof EntityHuman)) {
// WorldServer.a.warn("Keeping entity {} that already exists with UUID {}", EntityTypes.a(entity1), uuid.toString()); // CraftBukkit
WorldServer.a.error("Keeping entity {} that already exists with UUID {} - " + entity1, EntityTypes.a(entity1), uuid.toString()); // CraftBukkit // Paper
WorldServer.a.error("Deleting duplicate entity {}", entity); // Paper
return false;
}