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

21 lines
1.5 KiB
Diff
Raw Normal View History

2020-06-25 16:09:55 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
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/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
2021-05-16 01:42:36 +02:00
index 828f238e8f3b1a98310532e07c72161582c91c5b..bd9cd050c72792c3d5a2094991b21e3a998b2cd9 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2522,7 +2522,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
2020-06-25 16:09:55 +02:00
}
public String toString() {
- return String.format(Locale.ROOT, "%s['%s'/%d, l='%s', x=%.2f, y=%.2f, z=%.2f]", this.getClass().getSimpleName(), this.getDisplayName().getString(), this.id, this.world == null ? "~NULL~" : this.world.toString(), this.locX(), this.locY(), this.locZ());
+ 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().getString(), Integer.valueOf(this.id), this.uniqueID.toString(), this.world == null ? "~NULL~" : this.world.toString(), Double.valueOf(this.locX()), Double.valueOf(this.locY()), Double.valueOf(this.locZ()), chunkX, chunkZ, this.ticksLived, this.valid, this.dead}); // Paper - add more information
2020-06-25 16:09:55 +02:00
}
public boolean isInvulnerable(DamageSource damagesource) {