9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-04 15:41:40 +00:00

Drop useless fix

getProfiler method is removed from PathNavigationRegion since 1.21.3 snapshot 24w37a
This commit is contained in:
Dreeam
2025-10-07 01:59:42 -04:00
parent 264c07bc24
commit bc3fce4949
176 changed files with 28 additions and 51 deletions

View File

@@ -1,35 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: hayanesuru <hayanesuru@outlook.jp>
Date: Sat, 30 Aug 2025 20:30:37 +0900
Subject: [PATCH] optimize tickEffects
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index 8baa17d2eadfa83b1fcb36fcd1408e917b883989..1799cdc0b6c1e585e7e1eeab3828ea0252ae2097 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -950,6 +950,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
protected void tickEffects() {
if (this.level() instanceof ServerLevel serverLevel) {
+ if (!this.activeEffects.isEmpty()) { // Leaf - optimize tickEffects
Iterator<Holder<MobEffect>> iterator = this.activeEffects.keySet().iterator();
this.isTickingEffects = true; // CraftBukkit
@@ -975,6 +976,8 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
// CraftBukkit start
this.isTickingEffects = false;
+ } // Leaf - optimize tickEffects
+ if (!effectsToProcess.isEmpty()) { // Leaf - optimize tickEffects
for (ProcessableEffect effect : this.effectsToProcess) {
if (effect.effect != null) {
this.addEffect(effect.effect, effect.cause);
@@ -983,6 +986,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
}
}
this.effectsToProcess.clear();
+ } // Leaf - optimize tickEffects
// CraftBukkit end
if (this.effectsDirty) {
this.updateInvisibilityStatus();