9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-19 15:09:25 +00:00

Improved fix of MC-298464 (#524)

* Improved fix of MC-298464

* Remove configurable & cleanup

* [ci skip] Fix patch order
This commit is contained in:
Creeam
2025-10-13 12:29:05 +08:00
committed by GitHub
parent 667f15c124
commit 3994984604
24 changed files with 55 additions and 70 deletions

View File

@@ -423,7 +423,7 @@ index eaaa66c4d86d4ebda0acf8f1dbe8ecb55aa28285..3a6c894178829cec8daa08ea9f0294f7
continue; continue;
} }
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 06294e4036991a803deefc20e35160c5ff76a81b..8f93d8887d1e0ee8d27d0ead8e733cf7fa5d719d 100644 index 30bb5b9d021d01dea272313763b0748856ce28a6..1b8f9cc3de9778e556a0017b320bfba983750f0f 100644
--- a/net/minecraft/server/level/ServerLevel.java --- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java
@@ -180,7 +180,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @@ -180,7 +180,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -858,7 +858,7 @@ index f9e7532f86122a379692561a639a209a126e8bba..fab317d6c9a1c914f19bae11846cb576
if (isLocatorBarEnabledFor(player)) { if (isLocatorBarEnabledFor(player)) {
if (!connection.isBroken()) { if (!connection.isBroken()) {
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index c18f6f3f8307ae1d221a38cd1dc2191cdc4e767a..1bb78f90f9bfc58f39f21605d1e4e45680fdd41b 100644 index 67556752551e1d30519e2533543de9b04342420b..45bc4aa35fda48c816e08ec8bacfb11a5c792b27 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -3476,15 +3476,40 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -3476,15 +3476,40 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

View File

@@ -27,7 +27,7 @@ index b81de5b278c43a404d0f6b96cf134b401f137ab3..3531e37b784b4d61660c66cd92bc6098
CrashReport crashReport = CrashReport.forThrowable(levelTickingException, "Exception ticking world"); CrashReport crashReport = CrashReport.forThrowable(levelTickingException, "Exception ticking world");
serverLevel.fillReportDetails(crashReport); serverLevel.fillReportDetails(crashReport);
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index bfb4ea9d597b5f480ca0b7c095edf5090b84211c..2352406b0284ddcfb755618837f641b059437a19 100644 index 1b8f9cc3de9778e556a0017b320bfba983750f0f..2f213917594b846616d2933b3669c70a5ce26196 100644
--- a/net/minecraft/server/level/ServerLevel.java --- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java
@@ -571,6 +571,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @@ -571,6 +571,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe

View File

@@ -9,7 +9,7 @@ Leaf: ~48ms (-36%)
This should help drastically on the farms that use actively changing fluids. This should help drastically on the farms that use actively changing fluids.
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 2352406b0284ddcfb755618837f641b059437a19..284e2332ca6c0af178169f2ab9acae3c7e9d0561 100644 index 2f213917594b846616d2933b3669c70a5ce26196..cd1fdd297601efde282899715903ef9ca542d376 100644
--- a/net/minecraft/server/level/ServerLevel.java --- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java
@@ -1444,6 +1444,10 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @@ -1444,6 +1444,10 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Micro optimizations for random tick
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 284e2332ca6c0af178169f2ab9acae3c7e9d0561..8a6c049c5bf39925d45778b3e297394193cb3e17 100644 index cd1fdd297601efde282899715903ef9ca542d376..59f6fe6fbac2da1ae2485cb7a50ca59f9389cb43 100644
--- a/net/minecraft/server/level/ServerLevel.java --- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java
@@ -1042,7 +1042,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @@ -1042,7 +1042,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe

View File

@@ -186,7 +186,7 @@ index 3a6c894178829cec8daa08ea9f0294f7f39a8efe..2721b999dcfcf1cd5a0919221f2d94da
} }
} }
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 8a6c049c5bf39925d45778b3e297394193cb3e17..8c8aee9762a08de19e88f0f557ce8ccaaefaa523 100644 index 59f6fe6fbac2da1ae2485cb7a50ca59f9389cb43..2b132c1430b8195a24269c8e5ca7e57457f174c5 100644
--- a/net/minecraft/server/level/ServerLevel.java --- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java
@@ -1092,6 +1092,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @@ -1092,6 +1092,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe

View File

@@ -24,7 +24,7 @@ index 2721b999dcfcf1cd5a0919221f2d94da4c93a6e7..2a1a6a0306b781e9ae5c0e3261cb740f
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies); this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
} }
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 8c8aee9762a08de19e88f0f557ce8ccaaefaa523..65b35ab2348e139727296ed27ce59c1b7eb2d5c7 100644 index 2b132c1430b8195a24269c8e5ca7e57457f174c5..bb67edb1a429b46efc9de320f672c86462f35caf 100644
--- a/net/minecraft/server/level/ServerLevel.java --- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java
@@ -1093,6 +1093,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @@ -1093,6 +1093,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe

View File

@@ -117,7 +117,7 @@ index 2a1a6a0306b781e9ae5c0e3261cb740f37be4a8c..7e84b94a4602801e8cc713b28d0d9305
if (!org.dreeam.leaf.config.modules.async.AsyncMobSpawning.enabled || _pufferfish_spawnCountsReady.get()) { if (!org.dreeam.leaf.config.modules.async.AsyncMobSpawning.enabled || _pufferfish_spawnCountsReady.get()) {
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 65b35ab2348e139727296ed27ce59c1b7eb2d5c7..602ef3e2697fedba634a44b71895158e01e0a680 100644 index bb67edb1a429b46efc9de320f672c86462f35caf..062d0abf366c98803b92bd2169c945346845c45d 100644
--- a/net/minecraft/server/level/ServerLevel.java --- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java
@@ -1496,13 +1496,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @@ -1496,13 +1496,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe

View File

@@ -0,0 +1,21 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: hayanesuru <hayanesuru@outlook.jp>
Date: Sun, 13 Jul 2025 19:40:10 +0900
Subject: [PATCH] Fix MC-298464
Related MC issue: https://bugs.mojang.com/browse/MC/issues/MC-298464
Co-authored-by: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com>
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index a267b5bcf03b1186465adf56d49d5ea2423652f7..04b9b2d744242e76cc390c2c31e01310419ed356 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -750,6 +750,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
super.remove(reason, eventCause); // CraftBukkit
this.brain.clearMemories();
+ this.combatTracker.resetCombatState(); // Leaf - Fix MC-298464
}
@Override

View File

@@ -1,18 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: hayanesuru <hayanesuru@outlook.jp>
Date: Sun, 13 Jul 2025 19:40:10 +0900
Subject: [PATCH] fix MC-298464
diff --git a/net/minecraft/world/damagesource/CombatTracker.java b/net/minecraft/world/damagesource/CombatTracker.java
index aa6213ca382e4901363317df1e30332c5166f271..03b7397b303c883b14fbac7759ff296c4e55d778 100644
--- a/net/minecraft/world/damagesource/CombatTracker.java
+++ b/net/minecraft/world/damagesource/CombatTracker.java
@@ -47,6 +47,7 @@ public class CombatTracker {
public void recordDamageAndCheckCombatState(final CombatEntry combatEntry) {
final DamageSource source = combatEntry.source();
// Paper end - Combat tracker API
+ if (org.dreeam.leaf.config.modules.fixes.MC298464.enabled) { this.entries.clear(); } // Leaf - Fix MC-298464
this.entries.add(combatEntry);
this.lastDamageTime = this.mob.tickCount;
this.takingDamage = true;

View File

@@ -241,7 +241,7 @@ index 90814ad07a2686c5a274860395f5aca29cc3bf13..94c7ae9535a235abb8fddf0ca6578dfa
+ } + }
} }
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index a267b5bcf03b1186465adf56d49d5ea2423652f7..967befdff322d68f4107cc835427ae0fa9c6f721 100644 index 04b9b2d744242e76cc390c2c31e01310419ed356..dc21247dbf62a192c622fe35ba8255c2c4af5062 100644
--- a/net/minecraft/world/entity/LivingEntity.java --- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java
@@ -431,7 +431,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin @@ -431,7 +431,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
@@ -253,7 +253,7 @@ index a267b5bcf03b1186465adf56d49d5ea2423652f7..967befdff322d68f4107cc835427ae0f
EnchantmentHelper.tickEffects(serverLevel, this); EnchantmentHelper.tickEffects(serverLevel, this);
} }
@@ -3460,6 +3460,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin @@ -3461,6 +3461,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
public void detectEquipmentUpdates() { public void detectEquipmentUpdates() {
Map<EquipmentSlot, ItemStack> map = this.collectEquipmentChanges(); Map<EquipmentSlot, ItemStack> map = this.collectEquipmentChanges();
if (map != null) { if (map != null) {
@@ -261,7 +261,7 @@ index a267b5bcf03b1186465adf56d49d5ea2423652f7..967befdff322d68f4107cc835427ae0f
this.handleHandSwap(map); this.handleHandSwap(map);
if (!map.isEmpty()) { if (!map.isEmpty()) {
this.handleEquipmentChanges(map); this.handleEquipmentChanges(map);
@@ -3469,6 +3470,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin @@ -3470,6 +3471,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
@Nullable @Nullable
private Map<EquipmentSlot, ItemStack> collectEquipmentChanges() { private Map<EquipmentSlot, ItemStack> collectEquipmentChanges() {

View File

@@ -18,10 +18,10 @@ index 86a694b94045b47f6e98c480645f75738b8a052c..bb9554463a6983ab98323f4dd665c7c1
// Purpur end - Configurable entity base attributes // Purpur end - Configurable entity base attributes
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index 967befdff322d68f4107cc835427ae0fa9c6f721..897e193766591a6a8bf10e10495a7054fa461f08 100644 index dc21247dbf62a192c622fe35ba8255c2c4af5062..904de921ac626bf2f6a82069b02620e899f19d0a 100644
--- a/net/minecraft/world/entity/LivingEntity.java --- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java
@@ -2856,6 +2856,16 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin @@ -2857,6 +2857,16 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
return this.getAttributes().getBaseValue(attribute); return this.getAttributes().getBaseValue(attribute);
} }

View File

@@ -117,7 +117,7 @@ index 0000000000000000000000000000000000000000..5f5cdfc538ba9aa6666c019df6706015
+ } + }
+} +}
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 602ef3e2697fedba634a44b71895158e01e0a680..00cb26ce6653eae8eb04bb2bac1f02128532506a 100644 index 062d0abf366c98803b92bd2169c945346845c45d..ba956cd407e71407fcd5babc671880d6f62e62e2 100644
--- a/net/minecraft/server/level/ServerLevel.java --- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java
@@ -936,6 +936,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @@ -936,6 +936,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe

View File

@@ -70,7 +70,7 @@ index 5f5cdfc538ba9aa6666c019df6706015234d7bae..2dfec8f6d0fe833e5f06cf2165ae14bf
} }
} }
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 00cb26ce6653eae8eb04bb2bac1f02128532506a..7ffddaa634ca3e256aa81e697d147ad48b5f747c 100644 index ba956cd407e71407fcd5babc671880d6f62e62e2..aa919f4aeb79e00afd455cc73de2825c63a6afc7 100644
--- a/net/minecraft/server/level/ServerLevel.java --- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java
@@ -936,7 +936,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @@ -936,7 +936,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe

View File

@@ -19,10 +19,10 @@ index b4a7281de8e016d059b417dee9aaedc02253a97f..5fbf5e01872834ce4a22fb8bfe25cc1d
return this.inBlockState; return this.inBlockState;
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index 897e193766591a6a8bf10e10495a7054fa461f08..a6adabfd1ca18b5f815bdb73ce6a650d543c3af4 100644 index 904de921ac626bf2f6a82069b02620e899f19d0a..b35ef147ee813778721816e89b95b7a43e6c310e 100644
--- a/net/minecraft/world/entity/LivingEntity.java --- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java
@@ -2220,10 +2220,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin @@ -2221,10 +2221,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
public boolean onClimbableCached() { public boolean onClimbableCached() {
if (!this.blockPosition().equals(this.lastClimbingPosition)) { if (!this.blockPosition().equals(this.lastClimbingPosition)) {
// Gale start - don't load chunks to activate climbing entities // Gale start - don't load chunks to activate climbing entities
@@ -36,7 +36,7 @@ index 897e193766591a6a8bf10e10495a7054fa461f08..a6adabfd1ca18b5f815bdb73ce6a650d
this.lastClimbingPosition = this.blockPosition(); this.lastClimbingPosition = this.blockPosition();
} else { } else {
this.cachedOnClimbable = false; this.cachedOnClimbable = false;
@@ -2238,35 +2238,39 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin @@ -2239,35 +2239,39 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
public boolean onClimbable() { public boolean onClimbable() {
// Gale start - don't load chunks to activate climbing entities // Gale start - don't load chunks to activate climbing entities

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] cache eye block position
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index bf655ab3737346a92d54787e909948ec8aacdada..3473128a063b42e7d9d255036d9c690979e1b061 100644 index 0b7bb37a29c3a5534db6f2bd781f7ef3bcc378cd..fb31d17226619a87dd88017dc0b6915b8d1ceecd 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -553,18 +553,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -553,18 +553,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -113,7 +113,7 @@ index bf655ab3737346a92d54787e909948ec8aacdada..3473128a063b42e7d9d255036d9c6909
boolean flag = dimensions.width() <= 4.0F && dimensions.height() <= 4.0F; boolean flag = dimensions.width() <= 4.0F && dimensions.height() <= 4.0F;
if (!this.level.isClientSide if (!this.level.isClientSide
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index a6adabfd1ca18b5f815bdb73ce6a650d543c3af4..fdf46c4ca61591d3b78c67f6d23a6da119469a46 100644 index b35ef147ee813778721816e89b95b7a43e6c310e..4277c798ceee0ca329d332f8d1354dde312f0c29 100644
--- a/net/minecraft/world/entity/LivingEntity.java --- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java
@@ -464,7 +464,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin @@ -464,7 +464,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin

View File

@@ -42,10 +42,10 @@ index fb31d17226619a87dd88017dc0b6915b8d1ceecd..cab664f5ae052002ae7258b33495b741
} }
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index fdf46c4ca61591d3b78c67f6d23a6da119469a46..486496d25a5ada1eec658f58fbc674ce0cbfba60 100644 index 4277c798ceee0ca329d332f8d1354dde312f0c29..efbad651cd6fa1ea73265761f8e91f84c07316d5 100644
--- a/net/minecraft/world/entity/LivingEntity.java --- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java
@@ -3090,7 +3090,11 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin @@ -3091,7 +3091,11 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
} }
public void travel(Vec3 travelVector) { public void travel(Vec3 travelVector) {

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] optimize checkInsideBlocks
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 5a9a3690e9535eeb9b97e0ae9f4671f02c2a4535..1e16ff0f8f6179f9e58bad1cdab718ac923ca427 100644 index cab664f5ae052002ae7258b33495b74164ea0b09..0c9e9acf9c7fa0f7939d624b68690589ec33ad72 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -1723,72 +1723,57 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1723,72 +1723,57 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Replace entity fluid height map
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 3edeaab7b882351c564a791dd3f5e40b322763b5..df913bb859bbec721571daf45d0fef75c4adcec2 100644 index 0c9e9acf9c7fa0f7939d624b68690589ec33ad72..e4aac8b9b178c2780e9ba0e1232927fdd63f0f22 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -286,7 +286,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -286,7 +286,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] cache collision list
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 7ffddaa634ca3e256aa81e697d147ad48b5f747c..0ed24644e07c409a3624614d3bab1797b44f7ae2 100644 index aa919f4aeb79e00afd455cc73de2825c63a6afc7..6ee710e78b6c169ea4bb0c92787bb2631e4f68cf 100644
--- a/net/minecraft/server/level/ServerLevel.java --- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java
@@ -1095,6 +1095,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @@ -1095,6 +1095,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -18,7 +18,7 @@ index 7ffddaa634ca3e256aa81e697d147ad48b5f747c..0ed24644e07c409a3624614d3bab1797
final net.minecraft.world.level.levelgen.BitRandomSource simpleRandom = this.simpleRandom; // Paper - optimise random ticking // Leaf - Faster random generator - upcasting final net.minecraft.world.level.levelgen.BitRandomSource simpleRandom = this.simpleRandom; // Paper - optimise random ticking // Leaf - Faster random generator - upcasting
ChunkPos pos = chunk.getPos(); ChunkPos pos = chunk.getPos();
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index a968561684acd5c66770747d46634cfb037a18c4..377774b5a0c3f76f8c52966de7cd7ab9c5965e90 100644 index e4aac8b9b178c2780e9ba0e1232927fdd63f0f22..2e1804ea6ee00585edfbd0d531cfde013f766b4c 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -1552,8 +1552,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1552,8 +1552,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

View File

@@ -6,7 +6,7 @@ Subject: [PATCH] fast bit radix sort
Co-authored-by: Taiyou06 <kaandindar21@gmail.com> Co-authored-by: Taiyou06 <kaandindar21@gmail.com>
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 0ed24644e07c409a3624614d3bab1797b44f7ae2..c3f49ed4a09517e6a03decece32a91def865a778 100644 index 6ee710e78b6c169ea4bb0c92787bb2631e4f68cf..19a040133023c5fa7898c4e941b06948072accce 100644
--- a/net/minecraft/server/level/ServerLevel.java --- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java
@@ -1096,6 +1096,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @@ -1096,6 +1096,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] optimize tickEffects
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index 179722eb09e3c48220ec7d7a25332a000faf710c..f2717e7c173463659dffdd223b9b2e0c9cf5c636 100644 index efbad651cd6fa1ea73265761f8e91f84c07316d5..dc5cbabe8909cedf79e915a6129bfe414d69d106 100644
--- a/net/minecraft/world/entity/LivingEntity.java --- a/net/minecraft/world/entity/LivingEntity.java
+++ b/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 @@ -951,6 +951,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
protected void tickEffects() { protected void tickEffects() {
if (this.level() instanceof ServerLevel serverLevel) { if (this.level() instanceof ServerLevel serverLevel) {
@@ -16,7 +16,7 @@ index 179722eb09e3c48220ec7d7a25332a000faf710c..f2717e7c173463659dffdd223b9b2e0c
Iterator<Holder<MobEffect>> iterator = this.activeEffects.keySet().iterator(); Iterator<Holder<MobEffect>> iterator = this.activeEffects.keySet().iterator();
this.isTickingEffects = true; // CraftBukkit this.isTickingEffects = true; // CraftBukkit
@@ -975,6 +976,8 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin @@ -976,6 +977,8 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
// CraftBukkit start // CraftBukkit start
this.isTickingEffects = false; this.isTickingEffects = false;
@@ -25,7 +25,7 @@ index 179722eb09e3c48220ec7d7a25332a000faf710c..f2717e7c173463659dffdd223b9b2e0c
for (ProcessableEffect effect : this.effectsToProcess) { for (ProcessableEffect effect : this.effectsToProcess) {
if (effect.effect != null) { if (effect.effect != null) {
this.addEffect(effect.effect, effect.cause); this.addEffect(effect.effect, effect.cause);
@@ -983,6 +986,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin @@ -984,6 +987,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
} }
} }
this.effectsToProcess.clear(); this.effectsToProcess.clear();

View File

@@ -35,7 +35,7 @@ index 45093451fb25ae3bb1e57d2e53c49a1ae666e31e..c228135032b5f74fd1ec96a2cf52aa3e
} }
} }
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index c3f49ed4a09517e6a03decece32a91def865a778..697553ad6625ac8ab74e79f727a95fd0d628a87a 100644 index 19a040133023c5fa7898c4e941b06948072accce..96e476ff9133627c9253def2c5a2ff376ac7b131 100644
--- a/net/minecraft/server/level/ServerLevel.java --- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java
@@ -1179,7 +1179,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @@ -1179,7 +1179,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Only update frozen ticks if changed
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index b50815f2c67ce8407f31d18af269a110fbb0b3d7..c0ad6c5b6b10534099e3fd5f7e0c18b3e2d2c26e 100644 index dc5cbabe8909cedf79e915a6129bfe414d69d106..67c70e8d1e44c8b9ee010f89c527fff2c5cff1f6 100644
--- a/net/minecraft/world/entity/LivingEntity.java --- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java
@@ -3708,7 +3708,13 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin @@ -3709,7 +3709,13 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
if (this.level() instanceof ServerLevel serverLevel) { if (this.level() instanceof ServerLevel serverLevel) {
if ((!this.isInPowderSnow || !this.canFreeze()) && !this.freezeLocked) { // Paper - Freeze Tick Lock API if ((!this.isInPowderSnow || !this.canFreeze()) && !this.freezeLocked) { // Paper - Freeze Tick Lock API

View File

@@ -1,18 +0,0 @@
package org.dreeam.leaf.config.modules.fixes;
import org.dreeam.leaf.config.ConfigModules;
import org.dreeam.leaf.config.EnumConfigCategory;
public class MC298464 extends ConfigModules {
public String getBasePath() {
return EnumConfigCategory.FIXES.getBaseKeyName();
}
public static boolean enabled = false;
@Override
public void onLoaded() {
enabled = config.getBoolean(getBasePath() + ".fix-mc298464", enabled);
}
}