Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 04:50:05 +01:00
8175ec916f
Should fix #1280 Citizens hijacks entity map, and im guessing under the right conditions the result might actually be null during entity creation Pre the cache patch, the id is looked up on save, so it was fine. Now, if its null and the save ID is requested, we will try to look it up again and cache it if found.
24 Zeilen
1.5 KiB
Diff
24 Zeilen
1.5 KiB
Diff
From 1f2212fa5986435d4cd3bb3f4cd62821d7246d66 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/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
index 71da8e1e7d..28713f045d 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -2366,7 +2366,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, cx=%d, cd=%d, 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), getChunkX(), getChunkZ(), this.ticksLived, this.valid, this.dead}); // Paper - add more information
|
|
}
|
|
|
|
public boolean isInvulnerable(DamageSource damagesource) {
|
|
--
|
|
2.18.0
|
|
|