From 4a4d2996414f70dd04ba15c6929da7a92064a239 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 10:29:37 -0400 Subject: [PATCH] Add more information to Entity.toString() --- ...332-add-more-information-to-Entity.toString.patch} | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) rename Spigot-Server-Patches/{0332-add-uuid-to-Entity.toString.patch => 0332-add-more-information-to-Entity.toString.patch} (56%) diff --git a/Spigot-Server-Patches/0332-add-uuid-to-Entity.toString.patch b/Spigot-Server-Patches/0332-add-more-information-to-Entity.toString.patch similarity index 56% rename from Spigot-Server-Patches/0332-add-uuid-to-Entity.toString.patch rename to Spigot-Server-Patches/0332-add-more-information-to-Entity.toString.patch index bddd131a9..ed65c069c 100644 --- a/Spigot-Server-Patches/0332-add-uuid-to-Entity.toString.patch +++ b/Spigot-Server-Patches/0332-add-more-information-to-Entity.toString.patch @@ -1,19 +1,20 @@ -From 9b99af87d227e67cfc13b271b7b1b9d6dc37e45c Mon Sep 17 00:00:00 2001 +From 9737d708c393e0fabf927551a3a2eb5c7e27ac22 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 19 Jul 2018 01:13:28 -0400 -Subject: [PATCH] add uuid to Entity.toString() +Subject: [PATCH] add more information to Entity.toString() +UUID, ticks lived, valid, dead diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index d03e7c24f..fe1ccba8d 100644 +index 80ecdb282..f6b755863 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2348,7 +2348,7 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper +@@ -2361,7 +2361,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 ++ return String.format("%s[\'%s\'/%d, uuid=\'%s\', l=\'%s\', x=%.2f, y=%.2f, z=%.2f, tl=%d, v=%b, d=%b]", 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), this.ticksLived, this.valid, this.dead}); // Paper - add more information } public boolean isInvulnerable(DamageSource damagesource) {