Paper/Spigot-Server-Patches/0296-add-more-information-to-Entity.toString.patch

24 lines
1.5 KiB
Diff
Raw Normal View History

From 871e7ad9a8470149c08aa94e53d521ae16ec7aa2 Mon Sep 17 00:00:00 2001
2018-07-22 04:43:00 +08:00
From: Aikar <aikar@aikar.co>
Date: Thu, 19 Jul 2018 01:13:28 -0400
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 20c2bf16be..835d329f91 100644
2018-07-22 04:43:00 +08:00
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
2018-07-31 09:19:41 +08:00
@@ -2495,7 +2495,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
2018-07-22 04:43:00 +08:00
}
public String toString() {
- return String.format(Locale.ROOT, "%s[\'%s\'/%d, l=\'%s\', x=%.2f, y=%.2f, z=%.2f]", new Object[] { this.getClass().getSimpleName(), this.getDisplayName().getText(), Integer.valueOf(this.id), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ)});
2018-07-24 12:48:07 +08:00
+ return String.format(Locale.ROOT, "%s[\'%s\'/%d, uuid=\'%s\', l=\'%s\', x=%.2f, y=%.2f, z=%.2f, cx=%d, cz=%d, tl=%d, v=%b, d=%b]", new Object[] { this.getClass().getSimpleName(), this.getDisplayName().getText(), 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), getChunkX(), getChunkZ(), this.ticksLived, this.valid, this.dead}); // Paper - add more information
2018-07-22 04:43:00 +08:00
}
public boolean isInvulnerable(DamageSource damagesource) {
--
2.18.0
2018-07-22 04:43:00 +08:00