Add 5 second tps average in /tps

This commit is contained in:
William Blake Galbreath
2025-01-05 19:34:25 -08:00
committed by granny
parent 3e4de1e628
commit 22dfecfaf5
8 changed files with 90 additions and 117 deletions

View File

@@ -18,10 +18,10 @@ index fe4ae6bcdcbb55c47e9f9a4d63ead4c39e6d63cf..bf368ba3eecb6131dd23c1fcabf61f43
public boolean isLocalPlayer() {
return true;
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 8a9515a9bbe56aaa6665f144648a0c2d2775d118..f182a2d497242bbe043102cfd873e08bcbb7d759 100644
index da4b7400d6148ff5e412076bdccab295aaa72bad..b5011af774484b6ed35ee83b4a562ddd4425c22f 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1716,6 +1716,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1721,6 +1721,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
serverLevel.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - Add EntityMoveEvent
serverLevel.updateLagCompensationTick(); // Paper - lag compensation
net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = serverLevel.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers
@@ -177,7 +177,7 @@ index efee812785240c1ab1fd47514cfb236a3548f9cf..666455fff2b391b637cf1c07091e8810
protected ParticleOptions getInkParticle() {
return ParticleTypes.GLOW_SQUID_INK;
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index affdbc8b60ad9ec34e1065dcbe00fd449979177b..b8f38aefd15fda2ff4326c0ea1a06af4189edc60 100644
index f1f894db42ea71c21ac5d76223bc7208fb82dff3..5b27adec57614b6563f8ebb520035736708c195e 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -250,9 +250,9 @@ public abstract class LivingEntity extends Entity implements Attackable {