Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
d454bbd5e1
This patch replaces the vanilla collision code for both block and entity collisions with faster implementations by JellySquid, used originally in her Lithium mod. Optimizes Full Block voxel collisions, and removes streams from Entity collisions Original code by JellySquid, licensed under GNU Lesser General Public License v3.0 you can find the original code on https://github.com/jellysquid3/lithium-fabric/tree/1.15.x/fabric (Yarn mappings) Ported by Co-authored-by: Zoutelande <54509836+Zoutelande@users.noreply.github.com> Touched up by Aikar to keep previous paper optimizations
21 Zeilen
1.5 KiB
Diff
21 Zeilen
1.5 KiB
Diff
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/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
index 7c6bf0b91cdf59f6dcf155ee8abfbab61938cc8b..fe730cd301e6bae46320355ee8cb67d406a72a9f 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -2505,7 +2505,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
}
|
|
|
|
public String toString() {
|
|
- return String.format(Locale.ROOT, "%s['%s'/%d, l='%s', x=%.2f, y=%.2f, z=%.2f]", this.getClass().getSimpleName(), this.getDisplayName().getText(), this.id, this.world == null ? "~NULL~" : this.world.getWorldData().getName(), 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().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
|
|
}
|
|
|
|
public boolean isInvulnerable(DamageSource damagesource) {
|