From 46d3787b667dc0884f70c6aa6053400cf46a0fa1 Mon Sep 17 00:00:00 2001 From: MC_XiaoHei Date: Tue, 23 Jul 2024 06:22:13 +0000 Subject: [PATCH] Remove some optimization, disable all optimization by default, rename Optimization to Performance --- ...004-Lumina-server-config-and-command.patch | 67 +--- .../0012-Petal-Reduce-sensor-work.patch | 4 +- ...0016-Pufferfish-Optimize-suffocation.patch | 4 +- ...heck-for-spooky-season-once-an-hour.patch} | 0 ...ce-entity-fluid-lookups-if-no-fluids.patch | 192 ----------- ...patch => 0021-Pufferfish-Entity-TTL.patch} | 2 +- ...ish-Reduce-projectile-chunk-loading.patch} | 6 +- ...le-goal-selector-during-inactive-ti.patch} | 10 +- ...fferfish-Dynamic-Activation-of-Brain.patch | 324 ------------------ ...ufferfish-Reduce-entity-allocations.patch} | 0 ...ve-container-checking-with-a-bitset.patch} | 0 ...hunks-to-activate-climbing-entities.patch} | 8 +- ...=> 0027-Gale-Optimize-sun-burn-tick.patch} | 8 +- ...k-frozen-ticks-before-landing-block.patch} | 2 +- ...ale-Variable-entity-wake-up-duration.patch | 56 --- ...29-Gale-Use-platform-math-functions.patch} | 0 ...kip-entity-move-if-movement-is-zero.patch} | 6 +- ...ld-generation-chunk-and-block-acces.patch} | 0 ...0032-Gale-Optimize-noise-generation.patch} | 0 ...033-Gale-Faster-chunk-serialization.patch} | 0 ...a-and-Optional-allocation-in-Entity.patch} | 0 ...ttle-tracker-map-with-optimized-col.patch} | 0 ...parkly-Paper-Optimize-canSee-checks.patch} | 0 ...7-Purpur-use-alternative-keep-alive.patch} | 6 +- ...x-MC-2025.patch => 0038-Fix-MC-2025.patch} | 6 +- ...erify-signature-only-in-online-mode.patch} | 0 26 files changed, 43 insertions(+), 658 deletions(-) rename patches/server/{0021-Pufferfish-Only-check-for-spooky-season-once-an-hour.patch => 0020-Pufferfish-Only-check-for-spooky-season-once-an-hour.patch} (100%) delete mode 100644 patches/server/0020-Pufferfish-Reduce-entity-fluid-lookups-if-no-fluids.patch rename patches/server/{0022-Pufferfish-Entity-TTL.patch => 0021-Pufferfish-Entity-TTL.patch} (94%) rename patches/server/{0023-Pufferfish-Reduce-projectile-chunk-loading.patch => 0022-Pufferfish-Reduce-projectile-chunk-loading.patch} (86%) rename patches/server/{0025-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch => 0023-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch} (56%) delete mode 100644 patches/server/0024-Pufferfish-Dynamic-Activation-of-Brain.patch rename patches/server/{0026-Pufferfish-Reduce-entity-allocations.patch => 0024-Pufferfish-Reduce-entity-allocations.patch} (100%) rename patches/server/{0027-Pufferfish-Improve-container-checking-with-a-bitset.patch => 0025-Pufferfish-Improve-container-checking-with-a-bitset.patch} (100%) rename patches/server/{0029-Gale-Don-t-load-chunks-to-activate-climbing-entities.patch => 0026-Gale-Don-t-load-chunks-to-activate-climbing-entities.patch} (90%) rename patches/server/{0030-Gale-Optimize-sun-burn-tick.patch => 0027-Gale-Optimize-sun-burn-tick.patch} (92%) rename patches/server/{0031-Gale-Check-frozen-ticks-before-landing-block.patch => 0028-Gale-Check-frozen-ticks-before-landing-block.patch} (93%) delete mode 100644 patches/server/0028-Gale-Variable-entity-wake-up-duration.patch rename patches/server/{0032-Gale-Use-platform-math-functions.patch => 0029-Gale-Use-platform-math-functions.patch} (100%) rename patches/server/{0033-Gale-Skip-entity-move-if-movement-is-zero.patch => 0030-Gale-Skip-entity-move-if-movement-is-zero.patch} (89%) rename patches/server/{0034-Gale-Optimize-world-generation-chunk-and-block-acces.patch => 0031-Gale-Optimize-world-generation-chunk-and-block-acces.patch} (100%) rename patches/server/{0035-Gale-Optimize-noise-generation.patch => 0032-Gale-Optimize-noise-generation.patch} (100%) rename patches/server/{0036-Gale-Faster-chunk-serialization.patch => 0033-Gale-Faster-chunk-serialization.patch} (100%) rename patches/server/{0037-Gale-Reduce-lambda-and-Optional-allocation-in-Entity.patch => 0034-Gale-Reduce-lambda-and-Optional-allocation-in-Entity.patch} (100%) rename patches/server/{0038-Gale-Replace-throttle-tracker-map-with-optimized-col.patch => 0035-Gale-Replace-throttle-tracker-map-with-optimized-col.patch} (100%) rename patches/server/{0039-Sparkly-Paper-Optimize-canSee-checks.patch => 0036-Sparkly-Paper-Optimize-canSee-checks.patch} (100%) rename patches/server/{0040-Purpur-use-alternative-keep-alive.patch => 0037-Purpur-use-alternative-keep-alive.patch} (95%) rename patches/server/{0041-Fix-MC-2025.patch => 0038-Fix-MC-2025.patch} (90%) rename patches/server/{0042-Verify-signature-only-in-online-mode.patch => 0039-Verify-signature-only-in-online-mode.patch} (100%) diff --git a/patches/server/0004-Lumina-server-config-and-command.patch b/patches/server/0004-Lumina-server-config-and-command.patch index b388650..630e322 100644 --- a/patches/server/0004-Lumina-server-config-and-command.patch +++ b/patches/server/0004-Lumina-server-config-and-command.patch @@ -66,7 +66,7 @@ index 8302e4bedc03795c4cda526466fa4dc279b2dd21..17351285d16956d22eca0d5dce336699 public EntitySelector(int count, boolean includesNonPlayers, boolean localWorldOnly, Predicate basePredicate, MinMaxBounds.Doubles distance, Function positionOffset, @Nullable AABB box, BiConsumer> sorter, boolean senderOnly, @Nullable String playerName, @Nullable UUID uuid, @Nullable EntityType type, boolean usesAt) { this.maxResults = count; diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index d95c73f589e831f65088d30c4af4d04cbf7e7fd9..dfd750db2df80e84754535b8502a7b0b7c05548c 100644 +index f01863e33b7407c14e8bcd2a44e63bed01afe838..a37c35fd271ac815bd67a40ceaca95ff895ffd9e 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -222,6 +222,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -280,7 +280,7 @@ index 0000000000000000000000000000000000000000..3879e94473e6e8499a53d9c89fb6fab7 \ No newline at end of file diff --git a/src/main/java/org/leavesmc/lumina/config/ConfigModule.java b/src/main/java/org/leavesmc/lumina/config/ConfigModule.java new file mode 100644 -index 0000000000000000000000000000000000000000..fc3bd7f1ad1f1303ad7f6ff284e23828bf5ff18e +index 0000000000000000000000000000000000000000..a4700c541d425a25d0e26e8ef82dcf47b45647c3 --- /dev/null +++ b/src/main/java/org/leavesmc/lumina/config/ConfigModule.java @@ -0,0 +1,16 @@ @@ -289,7 +289,7 @@ index 0000000000000000000000000000000000000000..fc3bd7f1ad1f1303ad7f6ff284e23828 +import org.leavesmc.lumina.config.modules.Fix; +import org.leavesmc.lumina.config.modules.Gameplay; +import org.leavesmc.lumina.config.modules.Misc; -+import org.leavesmc.lumina.config.modules.Optimization; ++import org.leavesmc.lumina.config.modules.Performance; +import org.spongepowered.configurate.objectmapping.ConfigSerializable; + +@ConfigSerializable @@ -297,7 +297,7 @@ index 0000000000000000000000000000000000000000..fc3bd7f1ad1f1303ad7f6ff284e23828 + public String configVersion = "1"; + public Fix fix = new Fix(); + public Gameplay gameplay = new Gameplay(); -+ public Optimization optimization = new Optimization(); ++ public Performance performance = new Performance(); + public Misc misc = new Misc(); +} \ No newline at end of file @@ -469,10 +469,10 @@ index 0000000000000000000000000000000000000000..b4eba642ebdcb1dadab0b1085ac94b4c +} diff --git a/src/main/java/org/leavesmc/lumina/config/modules/Misc.java b/src/main/java/org/leavesmc/lumina/config/modules/Misc.java new file mode 100644 -index 0000000000000000000000000000000000000000..52ae05a79cb3da8f424b24d20834dc72190510b4 +index 0000000000000000000000000000000000000000..4576d68a7a2be5782e527262c20ff24edc9e1b71 --- /dev/null +++ b/src/main/java/org/leavesmc/lumina/config/modules/Misc.java -@@ -0,0 +1,19 @@ +@@ -0,0 +1,20 @@ +package org.leavesmc.lumina.config.modules; + +import org.leavesmc.lumina.config.modules.misc.RegionFormatConfig; @@ -487,34 +487,30 @@ index 0000000000000000000000000000000000000000..52ae05a79cb3da8f424b24d20834dc72 + public String serverModName = "Lumina"; + public boolean fakeVanilla = false; + public boolean checkUsername = true; ++ public boolean useAlternativeKeepAlive = true; + public boolean saveConfigAfterSet = true; + public boolean verifyPublicKeyOnlyInOnlineMode = false; + public WatchdogConfig watchdog = new WatchdogConfig(); + public RegionFormatConfig regionFormat = new RegionFormatConfig(); +} -diff --git a/src/main/java/org/leavesmc/lumina/config/modules/Optimization.java b/src/main/java/org/leavesmc/lumina/config/modules/Optimization.java +diff --git a/src/main/java/org/leavesmc/lumina/config/modules/Performance.java b/src/main/java/org/leavesmc/lumina/config/modules/Performance.java new file mode 100644 -index 0000000000000000000000000000000000000000..e31c590d256d8ee0c847c657846e5cadc2f17574 +index 0000000000000000000000000000000000000000..ce1b53b29e5a1b515ecbd7f99804d79518a67bc3 --- /dev/null -+++ b/src/main/java/org/leavesmc/lumina/config/modules/Optimization.java -@@ -0,0 +1,18 @@ ++++ b/src/main/java/org/leavesmc/lumina/config/modules/Performance.java +@@ -0,0 +1,13 @@ +package org.leavesmc.lumina.config.modules; + +import org.leavesmc.lumina.config.modules.optimization.*; +import org.spongepowered.configurate.objectmapping.ConfigSerializable; + +@ConfigSerializable -+public class Optimization { -+ public AsyncPathProcessingConfig asyncPathProcessing = new AsyncPathProcessingConfig(); -+ public EntityDABConfig entityDab = new EntityDABConfig(); ++public class Performance { + public PetalReduceSensorWorkConfig petalReduceSensorWork = new PetalReduceSensorWorkConfig(); + public ProjectileChunkReduceConfig projectileChunkReduce = new ProjectileChunkReduceConfig(); + public boolean entityGoalSelectorInactiveTick = false; -+ public double entityWakeUpDurationRatioStandardDeviation = 0.2; + public boolean allowLoadChunksToActiveClimbingEntities = false; -+ public boolean useAlternativeKeepAlive = true; + public boolean optimizeSuffocation = false; -+ public boolean reduceEntityFluidLookups = true; +} diff --git a/src/main/java/org/leavesmc/lumina/config/modules/fix/FoliaEntityMovingFixConfig.java b/src/main/java/org/leavesmc/lumina/config/modules/fix/FoliaEntityMovingFixConfig.java new file mode 100644 @@ -627,45 +623,6 @@ index 0000000000000000000000000000000000000000..12a85414d4eb8f7740c227f5a5fb8514 + } + } +} -diff --git a/src/main/java/org/leavesmc/lumina/config/modules/optimization/EntityDABConfig.java b/src/main/java/org/leavesmc/lumina/config/modules/optimization/EntityDABConfig.java -new file mode 100644 -index 0000000000000000000000000000000000000000..9b29297052562c1464b5d93a0b03a144efadf5ef ---- /dev/null -+++ b/src/main/java/org/leavesmc/lumina/config/modules/optimization/EntityDABConfig.java -@@ -0,0 +1,33 @@ -+package org.leavesmc.lumina.config.modules.optimization; -+ -+import net.minecraft.core.registries.BuiltInRegistries; -+import net.minecraft.server.MinecraftServer; -+import net.minecraft.world.entity.EntityType; -+import org.spongepowered.configurate.objectmapping.ConfigSerializable; -+import org.spongepowered.configurate.objectmapping.meta.PostProcess; -+ -+import java.util.Collections; -+import java.util.List; -+ -+@ConfigSerializable -+public class EntityDABConfig { -+ public boolean dearEnabled = false; -+ public int startDistance = 12; -+ public int startDistanceSquared; -+ public int maximumActivationPrio = 20; -+ public int activationDistanceMod; -+ public List blackedEntities = Collections.emptyList(); -+ -+ @PostProcess -+ public void onLoaded() { -+ for (EntityType entityType : BuiltInRegistries.ENTITY_TYPE) { -+ entityType.dabEnabled = true; // reset all, before setting the ones to true -+ } -+ -+ blackedEntities.forEach(name -> EntityType.byString(name).ifPresentOrElse(entityType -> { -+ entityType.dabEnabled = false; -+ }, () -> MinecraftServer.LOGGER.warn("Unknown entity \"" + name + "\""))); -+ -+ // config.setComment("optimizations.dab", "Optimizes entity brains when\n" + "they're far away from the player"); -+ } -+} diff --git a/src/main/java/org/leavesmc/lumina/config/modules/optimization/LoadChunksToActiveClimbingEntitiesConfig.java b/src/main/java/org/leavesmc/lumina/config/modules/optimization/LoadChunksToActiveClimbingEntitiesConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..b72e9c1fe5c7fb9abc9a3230b7339fb73c84e25c diff --git a/patches/server/0012-Petal-Reduce-sensor-work.patch b/patches/server/0012-Petal-Reduce-sensor-work.patch index 7719b26..0b7b09b 100644 --- a/patches/server/0012-Petal-Reduce-sensor-work.patch +++ b/patches/server/0012-Petal-Reduce-sensor-work.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Petal Reduce sensor work diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index bb5de770b6659379a68c077ff1cfc8d95d149c5c..611926cc99cf275d7aa596f3b7e86fd6abc18f59 100644 +index bb5de770b6659379a68c077ff1cfc8d95d149c5c..9e418d614df14719c1d7826fdf7827492ab05c66 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java @@ -983,12 +983,12 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti @@ -17,7 +17,7 @@ index bb5de770b6659379a68c077ff1cfc8d95d149c5c..611926cc99cf275d7aa596f3b7e86fd6 gameprofilerfiller.push("sensing"); - this.sensing.tick(); -+ if (i % org.leavesmc.lumina.config.LuminaConfig.configModule.optimization.petalReduceSensorWork.delayTicks == 0 || !org.leavesmc.lumina.config.LuminaConfig.configModule.optimization.petalReduceSensorWork.enabled) this.sensing.tick(); // Luminol - Petal - Reduce sensor work ++ if (i % org.leavesmc.lumina.config.LuminaConfig.configModule.performance.petalReduceSensorWork.delayTicks == 0 || !org.leavesmc.lumina.config.LuminaConfig.configModule.performance.petalReduceSensorWork.enabled) this.sensing.tick(); // Luminol - Petal - Reduce sensor work gameprofilerfiller.pop(); - int i = this.tickCount + this.getId(); diff --git a/patches/server/0016-Pufferfish-Optimize-suffocation.patch b/patches/server/0016-Pufferfish-Optimize-suffocation.patch index a07658c..b37fa23 100644 --- a/patches/server/0016-Pufferfish-Optimize-suffocation.patch +++ b/patches/server/0016-Pufferfish-Optimize-suffocation.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Pufferfish Optimize suffocation diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index dc290b2bc486fb5cf2bb216e5a8436a5b588fa8d..3215adeea327584dc637276c2b1a8a336241163a 100644 +index dc290b2bc486fb5cf2bb216e5a8436a5b588fa8d..f0c7654e6a28620b37ca28420dc1c79a3bd31e51 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -441,7 +441,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -30,7 +30,7 @@ index dc290b2bc486fb5cf2bb216e5a8436a5b588fa8d..3215adeea327584dc637276c2b1a8a33 + } + + public boolean shouldCheckForSuffocation() { -+ return !org.leavesmc.lumina.config.LuminaConfig.configModule.optimization.optimizeSuffocation || (tickCount % 10 == 0 && couldPossiblyBeHurt(1.0F)); ++ return !org.leavesmc.lumina.config.LuminaConfig.configModule.performance.optimizeSuffocation || (tickCount % 10 == 0 && couldPossiblyBeHurt(1.0F)); + } + // Pufferfish end + diff --git a/patches/server/0021-Pufferfish-Only-check-for-spooky-season-once-an-hour.patch b/patches/server/0020-Pufferfish-Only-check-for-spooky-season-once-an-hour.patch similarity index 100% rename from patches/server/0021-Pufferfish-Only-check-for-spooky-season-once-an-hour.patch rename to patches/server/0020-Pufferfish-Only-check-for-spooky-season-once-an-hour.patch diff --git a/patches/server/0020-Pufferfish-Reduce-entity-fluid-lookups-if-no-fluids.patch b/patches/server/0020-Pufferfish-Reduce-entity-fluid-lookups-if-no-fluids.patch deleted file mode 100644 index 8b7a368..0000000 --- a/patches/server/0020-Pufferfish-Reduce-entity-fluid-lookups-if-no-fluids.patch +++ /dev/null @@ -1,192 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: MrHua269 -Date: Sun, 16 Jun 2024 10:56:41 +0000 -Subject: [PATCH] Pufferfish Reduce entity fluid lookups if no fluids - - -diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index da89ac9b2adea7b0b872b65b8b677487d2d0357b..39c4de380bb60b47ae3c255df02439f84d8eef71 100644 ---- a/src/main/java/net/minecraft/world/entity/Entity.java -+++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -5324,6 +5324,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - if (this.touchingUnloadedChunk()) { - return false; - } else { -+ //Luminol start - Configurable pufferfish optimization: Reduce entity fluid lookups if no fluids -+ if (org.leavesmc.lumina.config.LuminaConfig.configModule.optimization.reduceEntityFluidLookups){ -+ return this.updateFluidHeightAndDoFluidPushingPufferfish$half(tag, speed); -+ } -+ //Luminol end - AABB axisalignedbb = this.getBoundingBox().deflate(0.001D); - int i = Mth.floor(axisalignedbb.minX); - int j = Mth.ceil(axisalignedbb.maxX); -@@ -5397,6 +5402,133 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - } - } - -+ //Luminol start - Configurable pufferfish optimization: Reduce entity fluid lookups if no fluids -+ private boolean updateFluidHeightAndDoFluidPushingPufferfish$half(TagKey tag, double speed) { -+ AABB axisalignedbb = this.getBoundingBox().deflate(0.001D); -+ // Pufferfish start - rename -+ int minBlockX = Mth.floor(axisalignedbb.minX); -+ int maxBlockX = Mth.ceil(axisalignedbb.maxX); -+ int minBlockY = Mth.floor(axisalignedbb.minY); -+ int maxBlockY = Mth.ceil(axisalignedbb.maxY); -+ int minBlockZ = Mth.floor(axisalignedbb.minZ); -+ int maxBlockZ = Mth.ceil(axisalignedbb.maxZ); -+ // Pufferfish end -+ double d1 = 0.0D; -+ boolean flag = this.isPushedByFluid(); -+ boolean flag1 = false; -+ Vec3 vec3d = Vec3.ZERO; -+ int k1 = 0; -+ BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos(); -+ -+ // Pufferfish start - based off CollisionUtil.getCollisionsForBlocksOrWorldBorder -+ final int minSection = io.papermc.paper.util.WorldUtil.getMinSection(this.level()); -+ final int maxSection = io.papermc.paper.util.WorldUtil.getMaxSection(this.level()); -+ final int minBlock = minSection << 4; -+ final int maxBlock = (maxSection << 4) | 15; -+ -+ // special cases: -+ if (minBlockY > maxBlock || maxBlockY < minBlock) { -+ // no point in checking -+ return false; -+ } -+ -+ int minYIterate = Math.max(minBlock, minBlockY); -+ int maxYIterate = Math.min(maxBlock, maxBlockY); -+ -+ int minChunkX = minBlockX >> 4; -+ int maxChunkX = maxBlockX >> 4; -+ -+ int minChunkZ = minBlockZ >> 4; -+ int maxChunkZ = maxBlockZ >> 4; -+ -+ for (int currChunkZ = minChunkZ; currChunkZ <= maxChunkZ; ++currChunkZ) { -+ int minZ = currChunkZ == minChunkZ ? minBlockZ & 15 : 0; // coordinate in chunk -+ int maxZ = currChunkZ == maxChunkZ ? maxBlockZ & 15 : 16; // coordinate in chunk -+ -+ for (int currChunkX = minChunkX; currChunkX <= maxChunkX; ++currChunkX) { -+ int minX = currChunkX == minChunkX ? minBlockX & 15 : 0; // coordinate in chunk -+ int maxX = currChunkX == maxChunkX ? maxBlockX & 15 : 16; // coordinate in chunk -+ -+ net.minecraft.world.level.chunk.ChunkAccess chunk = this.level().getChunkIfLoadedImmediately(currChunkX, currChunkZ); -+ if (chunk == null) { -+ return false; // if we're touching an unloaded chunk then it's false -+ } -+ -+ net.minecraft.world.level.chunk.LevelChunkSection[] sections = chunk.getSections(); -+ -+ for (int currY = minYIterate; currY < maxYIterate; ++currY) { -+ net.minecraft.world.level.chunk.LevelChunkSection section = sections[(currY >> 4) - minSection]; -+ -+ if (section == null || section.hasOnlyAir() || section.fluidStateCount == 0) { // if no fluids, nothing in this section -+ // empty -+ // skip to next section -+ currY = (currY & ~(15)) + 15; // increment by 15: iterator loop increments by the extra one -+ continue; -+ } -+ -+ net.minecraft.world.level.chunk.PalettedContainer blocks = section.states; -+ -+ for (int currZ = minZ; currZ < maxZ; ++currZ) { -+ for (int currX = minX; currX < maxX; ++currX) { -+ FluidState fluid = blocks.get(currX & 15, currY & 15, currZ & 15).getFluidState(); -+ -+ if (fluid.is(tag)) { -+ blockposition_mutableblockposition.set((currChunkX << 4) + currX, currY, (currChunkZ << 4) + currZ); -+ double d2 = (double) ((float) currY + fluid.getHeight(this.level(), blockposition_mutableblockposition)); -+ -+ if (d2 >= axisalignedbb.minY) { -+ flag1 = true; -+ d1 = Math.max(d2 - axisalignedbb.minY, d1); -+ if (flag) { -+ Vec3 vec3d1 = fluid.getFlow(this.level(), blockposition_mutableblockposition); -+ -+ if (d1 < 0.4D) { -+ vec3d1 = vec3d1.scale(d1); -+ } -+ -+ vec3d = vec3d.add(vec3d1); -+ ++k1; -+ } -+ // CraftBukkit start - store last lava contact location -+ if (tag == FluidTags.LAVA) { -+ this.lastLavaContact = blockposition_mutableblockposition.immutable(); -+ } -+ // CraftBukkit end -+ } -+ } -+ } -+ } -+ } -+ } -+ } -+ // Pufferfish end -+ -+ if (vec3d.length() > 0.0D) { -+ if (k1 > 0) { -+ vec3d = vec3d.scale(1.0D / (double) k1); -+ } -+ -+ if (!(this instanceof Player)) { -+ vec3d = vec3d.normalize(); -+ } -+ -+ Vec3 vec3d2 = this.getDeltaMovement(); -+ -+ vec3d = vec3d.scale(speed * 1.0D); -+ double d3 = 0.003D; -+ -+ if (Math.abs(vec3d2.x) < 0.003D && Math.abs(vec3d2.z) < 0.003D && vec3d.length() < 0.0045000000000000005D) { -+ vec3d = vec3d.normalize().scale(0.0045000000000000005D); -+ } -+ -+ this.setDeltaMovement(this.getDeltaMovement().add(vec3d)); -+ } -+ -+ this.fluidHeight.put(tag, d1); -+ return flag1; -+ } -+ //Luminol end -+ - public boolean touchingUnloadedChunk() { - AABB axisalignedbb = this.getBoundingBox().inflate(1.0D); - int i = Mth.floor(axisalignedbb.minX); -diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -index a2a5aef769ee8bb638a5a9f3da9812fa4a85dda5..7288261b8924d08e93abecb664e2273c624a325b 100644 ---- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -@@ -25,6 +25,7 @@ public class LevelChunkSection { - public final PalettedContainer states; - // CraftBukkit start - read/write - private PalettedContainer> biomes; -+ public short fluidStateCount; // Pufferfish - public final com.destroystokyo.paper.util.maplist.IBlockDataList tickingList = new com.destroystokyo.paper.util.maplist.IBlockDataList(); // Paper - // Paper start - optimise collisions - private int specialCollidingBlocks; -@@ -102,6 +103,7 @@ public class LevelChunkSection { - - if (!fluid.isEmpty()) { - --this.tickingFluidCount; -+ --this.fluidStateCount; // Pufferfish - } - - if (!state.isAir()) { -@@ -116,6 +118,7 @@ public class LevelChunkSection { - - if (!fluid1.isEmpty()) { - ++this.tickingFluidCount; -+ ++this.fluidStateCount; // Pufferfish - } - - this.updateBlockCallback(x, y, z, iblockdata1, state); // Paper - optimise collisions -@@ -162,6 +165,7 @@ public class LevelChunkSection { - if (fluid.isRandomlyTicking()) { - this.tickingFluidCount = (short) (this.tickingFluidCount + 1); - } -+ this.fluidStateCount++; // Pufferfish - } - - // Paper start - optimise collisions diff --git a/patches/server/0022-Pufferfish-Entity-TTL.patch b/patches/server/0021-Pufferfish-Entity-TTL.patch similarity index 94% rename from patches/server/0022-Pufferfish-Entity-TTL.patch rename to patches/server/0021-Pufferfish-Entity-TTL.patch index 5445edb..904c75d 100644 --- a/patches/server/0022-Pufferfish-Entity-TTL.patch +++ b/patches/server/0021-Pufferfish-Entity-TTL.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Pufferfish Entity TTL diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 39c4de380bb60b47ae3c255df02439f84d8eef71..30f5c8102e1af06fef206ded825baccd185a9dab 100644 +index da89ac9b2adea7b0b872b65b8b677487d2d0357b..73547f66b777d405aec5234a97dcc3a12fe485f3 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -855,6 +855,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/patches/server/0023-Pufferfish-Reduce-projectile-chunk-loading.patch b/patches/server/0022-Pufferfish-Reduce-projectile-chunk-loading.patch similarity index 86% rename from patches/server/0023-Pufferfish-Reduce-projectile-chunk-loading.patch rename to patches/server/0022-Pufferfish-Reduce-projectile-chunk-loading.patch index b6a8b5b..aaa0eaf 100644 --- a/patches/server/0023-Pufferfish-Reduce-projectile-chunk-loading.patch +++ b/patches/server/0022-Pufferfish-Reduce-projectile-chunk-loading.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Pufferfish Reduce projectile chunk loading diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index a8d2f7a9d0bcb6db0b38ac30b098d59951053b47..2f5e0443adb49a7c61c8bdba6c0e85991dcdf5e1 100644 +index a8d2f7a9d0bcb6db0b38ac30b098d59951053b47..84353fcfb0aab5e856de7573ddbeee2adf48b1ce 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java @@ -46,6 +46,36 @@ public abstract class Projectile extends Entity implements TraceableEntity { @@ -29,8 +29,8 @@ index a8d2f7a9d0bcb6db0b38ac30b098d59951053b47..2f5e0443adb49a7c61c8bdba6c0e8599 + if (previousX != newX || previousZ != newZ) { + boolean isLoaded = ((net.minecraft.server.level.ServerChunkCache) this.level().getChunkSource()).getChunkAtIfLoadedMainThread(newX, newZ) != null; + if (!isLoaded) { -+ if (Projectile.loadedThisTick > org.leavesmc.lumina.config.LuminaConfig.configModule.optimization.projectileChunkReduce.maxProjectileLoadsPerTick) { -+ if (++this.loadedLifetime > org.leavesmc.lumina.config.LuminaConfig.configModule.optimization.projectileChunkReduce.maxProjectileLoadsPerProjectile) { ++ if (Projectile.loadedThisTick > org.leavesmc.lumina.config.LuminaConfig.configModule.performance.projectileChunkReduce.maxProjectileLoadsPerTick) { ++ if (++this.loadedLifetime > org.leavesmc.lumina.config.LuminaConfig.configModule.performance.projectileChunkReduce.maxProjectileLoadsPerProjectile) { + this.discard(); + } + return; diff --git a/patches/server/0025-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch b/patches/server/0023-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch similarity index 56% rename from patches/server/0025-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch rename to patches/server/0023-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch index 6ad1385..02489f9 100644 --- a/patches/server/0025-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch +++ b/patches/server/0023-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Pufferfish Throttle goal selector during inactive ticking diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 0bf8acb70ff7608f1af90470c52711aa8e6cc2d0..e9501e51258ba98ca861b902ea1b997f831088d5 100644 +index 9e418d614df14719c1d7826fdf7827492ab05c66..136aaca7798ce4ffe902bb349887530e8f5ad981 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java @@ -245,11 +245,13 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti @@ -17,9 +17,9 @@ index 0bf8acb70ff7608f1af90470c52711aa8e6cc2d0..e9501e51258ba98ca861b902ea1b997f @Override public void inactiveTick() { super.inactiveTick(); -- if (this.goalSelector.inactiveTick(this.activatedPriority, true)) { // Pufferfish - pass activated priroity -+ boolean isThrottled = org.leavesmc.lumina.config.LuminaConfig.configModule.optimization.entityGoalSelectorInactiveTick && _pufferfish_inactiveTickDisableCounter++ % 20 != 0; // Pufferfish - throttle inactive goal selector ticking -+ if (this.goalSelector.inactiveTick(this.activatedPriority, true) && !isThrottled) { // Pufferfish - pass activated priroity // Pufferfish - throttle inactive goal selector ticking +- if (this.goalSelector.inactiveTick()) { ++ boolean isThrottled = org.leavesmc.lumina.config.LuminaConfig.configModule.performance.entityGoalSelectorInactiveTick && _pufferfish_inactiveTickDisableCounter++ % 20 != 0; // Pufferfish - throttle inactive goal selector ticking ++ if (this.goalSelector.inactiveTick() && !isThrottled) { // Pufferfish - pass activated priroity // Pufferfish - throttle inactive goal selector ticking this.goalSelector.tick(); } - if (this.targetSelector.inactiveTick(this.activatedPriority, true)) { // Pufferfish - pass activated priority + if (this.targetSelector.inactiveTick()) { diff --git a/patches/server/0024-Pufferfish-Dynamic-Activation-of-Brain.patch b/patches/server/0024-Pufferfish-Dynamic-Activation-of-Brain.patch deleted file mode 100644 index 7e4999e..0000000 --- a/patches/server/0024-Pufferfish-Dynamic-Activation-of-Brain.patch +++ /dev/null @@ -1,324 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: MrHua269 -Date: Wed, 7 Feb 2024 05:56:56 +0000 -Subject: [PATCH] Pufferfish Dynamic Activation of Brain - - -diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 0b11aa29ac8cb4f65ace8b63ef1fd5a214139f3d..6c4b9a6ff7d1bbe670329bb635f9895764c6e48a 100644 ---- a/src/main/java/net/minecraft/server/level/ServerLevel.java -+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -983,6 +983,7 @@ public class ServerLevel extends Level implements WorldGenLevel { - org.spigotmc.ActivationRange.activateEntities(this); // Spigot - profiler.startTimer(ca.spottedleaf.leafprofiler.LProfilerRegistry.ENTITY_TICK); try { // Folia - profiler - regionizedWorldData.forEachTickingEntity((entity) -> { // Folia - regionised ticking -+ entity.activatedPriorityReset = false; // Pufferfish - DAB - if (!entity.isRemoved()) { - if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed - entity.discard(); -diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 30f5c8102e1af06fef206ded825baccd185a9dab..3fce42fd3450296f155e068bc377d57ae3f98ba4 100644 ---- a/src/main/java/net/minecraft/world/entity/Entity.java -+++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -482,6 +482,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - - // Folia - region ticking - // Paper end - optimise entity tracking -+ //Pufferfish start -+ public boolean activatedPriorityReset = false; // DAB -+ public int activatedPriority = org.leavesmc.lumina.config.LuminaConfig.configModule.optimization.entityDab.maximumActivationPrio; // golf score -+ // Pufferfish end -+ - public float getBukkitYaw() { - return this.yRot; - } -diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index b75b58c9f9bb31c4bf37d7a4fb2551ace6277fcb..0fc436fc44d7b333ba00437abe16cc1d101e24ec 100644 ---- a/src/main/java/net/minecraft/world/entity/EntityType.java -+++ b/src/main/java/net/minecraft/world/entity/EntityType.java -@@ -316,6 +316,7 @@ public class EntityType implements FeatureElement, EntityTypeT - private final boolean canSpawnFarFromPlayer; - private final int clientTrackingRange; - private final int updateInterval; -+ public boolean dabEnabled = false; // Pufferfish - @Nullable - private String descriptionId; - @Nullable -diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 611926cc99cf275d7aa596f3b7e86fd6abc18f59..0bf8acb70ff7608f1af90470c52711aa8e6cc2d0 100644 ---- a/src/main/java/net/minecraft/world/entity/Mob.java -+++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -249,10 +249,10 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti - @Override - public void inactiveTick() { - super.inactiveTick(); -- if (this.goalSelector.inactiveTick()) { -+ if (this.goalSelector.inactiveTick(this.activatedPriority, true)) { // Pufferfish - pass activated priroity - this.goalSelector.tick(); - } -- if (this.targetSelector.inactiveTick()) { -+ if (this.targetSelector.inactiveTick(this.activatedPriority, true)) { // Pufferfish - pass activated priority - this.targetSelector.tick(); - } - } -@@ -992,16 +992,20 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti - - if (i % 2 != 0 && this.tickCount > 1) { - gameprofilerfiller.push("targetSelector"); -+ if (this.targetSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking - this.targetSelector.tickRunningGoals(false); - gameprofilerfiller.pop(); - gameprofilerfiller.push("goalSelector"); -+ if (this.goalSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking - this.goalSelector.tickRunningGoals(false); - gameprofilerfiller.pop(); - } else { - gameprofilerfiller.push("targetSelector"); -+ if (this.targetSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking - this.targetSelector.tick(); - gameprofilerfiller.pop(); - gameprofilerfiller.push("goalSelector"); -+ if (this.goalSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking - this.goalSelector.tick(); - gameprofilerfiller.pop(); - } -diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java -index 74d4f653d5c7f1923c59019effd78337402f7025..a2f05585ea7086381300055125361cb40c5c61d1 100644 ---- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java -+++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java -@@ -43,9 +43,13 @@ public class GoalSelector { - } - - // Paper start -- public boolean inactiveTick() { -+ public boolean inactiveTick(int tickRate, boolean inactive) { // Pufferfish start -+ if (inactive && !org.leavesmc.lumina.config.LuminaConfig.configModule.optimization.entityDab.dearEnabled) tickRate = 4; // reset to Paper's -+ tickRate = Math.min(tickRate, 3); - this.curRate++; -- return this.curRate % 3 == 0; // TODO newGoalRate was already unused in 1.20.4, check if this is correct -+ //return this.curRate % 3 == 0; // TODO newGoalRate was already unused in 1.20.4, check if this is correct -+ return this.curRate % tickRate == 0; // Luminol - Waiting Paper -+ // Pufferfish end - } - public boolean hasTasks() { - for (WrappedGoal task : this.availableGoals) { -diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java -index 991e3274091c4e25eebc6debd44653e5b566eedb..789d3469ce4983868e4b880b6053bd2d8c33a10a 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java -+++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java -@@ -215,9 +215,11 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS - return 0.4F; - } - -+ private int behaviorTick = 0; // Pufferfish - @Override - protected void customServerAiStep() { - this.level().getProfiler().push("allayBrain"); -+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish - this.getBrain().tick((ServerLevel) this.level(), this); - this.level().getProfiler().pop(); - this.level().getProfiler().push("allayActivityUpdate"); -diff --git a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java -index a8cc6ddbf45370fe632e5c5fb7ceef3d299e62a4..98766696556b520cf565ccadc8dba207832b4ae3 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java -+++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java -@@ -268,9 +268,11 @@ public class Axolotl extends Animal implements LerpingModel, VariantHolder> { - .ifPresent(this::setVariant); - } - -+ private int behaviorTick = 0; // Pufferfish - @Override - protected void customServerAiStep() { - this.level().getProfiler().push("frogBrain"); -+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish - this.getBrain().tick((ServerLevel)this.level(), this); - this.level().getProfiler().pop(); - this.level().getProfiler().push("frogActivityUpdate"); -diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java -index 290d41136f5ec7671bc4990dfe50da0a770c124d..0d34e9e0f7ce35c3c28a9216cf3cdd5eddfe90f6 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java -+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java -@@ -83,9 +83,11 @@ public class Tadpole extends AbstractFish { - return SoundEvents.TADPOLE_FLOP; - } - -+ private int behaviorTick = 0; // Pufferfish - @Override - protected void customServerAiStep() { - this.level().getProfiler().push("tadpoleBrain"); -+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish - this.getBrain().tick((ServerLevel) this.level(), this); - this.level().getProfiler().pop(); - this.level().getProfiler().push("tadpoleActivityUpdate"); -diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java -index 376bcbc189008464f4d518c1e07643431ba96306..07bdea8a7d6706839a758afe0242202c7e841416 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java -+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java -@@ -190,9 +190,11 @@ public class Goat extends Animal { - return (Brain) super.getBrain(); // CraftBukkit - decompile error - } - -+ private int behaviorTick = 0; // Pufferfish - @Override - protected void customServerAiStep() { - this.level().getProfiler().push("goatBrain"); -+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish - this.getBrain().tick((ServerLevel) this.level(), this); - this.level().getProfiler().pop(); - this.level().getProfiler().push("goatActivityUpdate"); -diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java -index c583d883118ded5e1884c757427dc5e73c10dd27..6f8a22c51ba5e2713dcdfc61c61b35123f9bf326 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java -+++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java -@@ -153,9 +153,11 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { - return (Brain)super.getBrain(); - } - -+ private int behaviorTick; // Pufferfish - @Override - protected void customServerAiStep() { - this.level().getProfiler().push("hoglinBrain"); -+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish - this.getBrain().tick((ServerLevel)this.level(), this); - this.level().getProfiler().pop(); - HoglinAi.updateActivity(this); -diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java -index a8ab486c7e11ec137da48174af6f1030dfd48056..5878a6ecadc2b9f7ac9f70622a8c85e2940e139a 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java -+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java -@@ -294,9 +294,11 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento - return !this.cannotHunt; - } - -+ private int behaviorTick; // Pufferfish - @Override - protected void customServerAiStep() { - this.level().getProfiler().push("piglinBrain"); -+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish - this.getBrain().tick((ServerLevel) this.level(), this); - this.level().getProfiler().pop(); - PiglinAi.updateActivity(this); -diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java -index ddd60be52dce5773c80934be5aa5705db239e3dd..9cf56f2ada025aae0710099bcc3b5c62fd7bbb9e 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java -+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java -@@ -271,11 +271,13 @@ public class Warden extends Monster implements VibrationSystem { - - } - -+ private int behaviorTick = 0; // Pufferfish - @Override - protected void customServerAiStep() { - ServerLevel worldserver = (ServerLevel) this.level(); - - worldserver.getProfiler().push("wardenBrain"); -+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish - this.getBrain().tick(worldserver, this); - this.level().getProfiler().pop(); - super.customServerAiStep(); -diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java -index 6339967b154af1ca9632c7b8b315d612f4b80ea2..c4b7fd6c9d0f26361295a70d63f6fc080063d129 100644 ---- a/src/main/java/net/minecraft/world/entity/npc/Villager.java -+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java -@@ -143,6 +143,8 @@ public class Villager extends AbstractVillager implements ReputationEventHandler - return holder.is(PoiTypes.MEETING); - }); - -+ public long nextGolemPanic = -1; // Pufferfish -+ - public Villager(EntityType entityType, Level world) { - this(entityType, world, VillagerType.PLAINS); - } -@@ -246,6 +248,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler - } - // Spigot End - -+ private int behaviorTick = 0; // Pufferfish - @Override - @Deprecated // Paper - protected void customServerAiStep() { -@@ -255,7 +258,11 @@ public class Villager extends AbstractVillager implements ReputationEventHandler - protected void customServerAiStep(final boolean inactive) { - // Paper end - this.level().getProfiler().push("villagerBrain"); -- if (!inactive) this.getBrain().tick((ServerLevel) this.level(), this); // Paper -+ // Pufferfish start -+ if (!inactive && this.behaviorTick++ % this.activatedPriority == 0) { -+ this.getBrain().tick((ServerLevel) this.level(), this); // Paper -+ } -+ // Pufferfish end - this.level().getProfiler().pop(); - if (this.assignProfessionWhenSpawned) { - this.assignProfessionWhenSpawned = false; -diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 5dffcce9ab20c2ef9864b254d780eab403caa437..1d124d0a653ecb03998f6c354b27e21eff8f0a44 100644 ---- a/src/main/java/org/spigotmc/ActivationRange.java -+++ b/src/main/java/org/spigotmc/ActivationRange.java -@@ -37,6 +37,10 @@ import net.minecraft.world.entity.raid.Raider; - import net.minecraft.world.entity.schedule.Activity; - import net.minecraft.world.level.Level; - import net.minecraft.world.phys.AABB; -+// Pufferfish start -+import net.minecraft.world.phys.Vec3; -+import java.util.List; -+// Pufferfish end - - public class ActivationRange - { -@@ -230,6 +234,25 @@ public class ActivationRange - } - // Paper end - Configurable marker ticking - ActivationRange.activateEntity(entity, bbByType); // Folia - threaded regions -+ -+ // Pufferfish start -+ if (org.leavesmc.lumina.config.LuminaConfig.configModule.optimization.entityDab.dearEnabled && entity.getType().dabEnabled) { -+ if (!entity.activatedPriorityReset) { -+ entity.activatedPriorityReset = true; -+ entity.activatedPriority = org.leavesmc.lumina.config.LuminaConfig.configModule.optimization.entityDab.maximumActivationPrio; -+ } -+ Vec3 playerVec = player.position(); -+ Vec3 entityVec = entity.position(); -+ double diffX = playerVec.x - entityVec.x, diffY = playerVec.y - entityVec.y, diffZ = playerVec.z - entityVec.z; -+ int squaredDistance = (int) (diffX * diffX + diffY * diffY + diffZ * diffZ); -+ entity.activatedPriority = squaredDistance > org.leavesmc.lumina.config.LuminaConfig.configModule.optimization.entityDab.startDistanceSquared ? -+ Math.max(1, Math.min(squaredDistance >> org.leavesmc.lumina.config.LuminaConfig.configModule.optimization.entityDab.activationDistanceMod, entity.activatedPriority)) : -+ 1; -+ } else { -+ entity.activatedPriority = 1; -+ } -+ // Pufferfish end -+ - } - // Paper end - } -@@ -245,12 +268,12 @@ public class ActivationRange - if ( io.papermc.paper.threadedregions.RegionizedServer.getCurrentTick() > entity.activatedTick ) // Folia - threaded regions - { - if ( entity.defaultActivationState ) -- { -+ { // Pufferfish - diff on change - entity.activatedTick = io.papermc.paper.threadedregions.RegionizedServer.getCurrentTick(); // Folia - threaded regions - return; - } - if ( bbByType[entity.activationType.ordinal()].intersects( entity.getBoundingBox() ) ) // Folia - threaded regions -- { -+ { // Pufferfish - diff on change - entity.activatedTick = io.papermc.paper.threadedregions.RegionizedServer.getCurrentTick(); // Folia - threaded regions - } - } diff --git a/patches/server/0026-Pufferfish-Reduce-entity-allocations.patch b/patches/server/0024-Pufferfish-Reduce-entity-allocations.patch similarity index 100% rename from patches/server/0026-Pufferfish-Reduce-entity-allocations.patch rename to patches/server/0024-Pufferfish-Reduce-entity-allocations.patch diff --git a/patches/server/0027-Pufferfish-Improve-container-checking-with-a-bitset.patch b/patches/server/0025-Pufferfish-Improve-container-checking-with-a-bitset.patch similarity index 100% rename from patches/server/0027-Pufferfish-Improve-container-checking-with-a-bitset.patch rename to patches/server/0025-Pufferfish-Improve-container-checking-with-a-bitset.patch diff --git a/patches/server/0029-Gale-Don-t-load-chunks-to-activate-climbing-entities.patch b/patches/server/0026-Gale-Don-t-load-chunks-to-activate-climbing-entities.patch similarity index 90% rename from patches/server/0029-Gale-Don-t-load-chunks-to-activate-climbing-entities.patch rename to patches/server/0026-Gale-Don-t-load-chunks-to-activate-climbing-entities.patch index 6e82f2d..2a50fd5 100644 --- a/patches/server/0029-Gale-Don-t-load-chunks-to-activate-climbing-entities.patch +++ b/patches/server/0026-Gale-Don-t-load-chunks-to-activate-climbing-entities.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Gale Don't load chunks to activate climbing entities diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 3fce42fd3450296f155e068bc377d57ae3f98ba4..3df427b1bc4d0f477a14c5d063dda09cb5a9edc2 100644 +index 73547f66b777d405aec5234a97dcc3a12fe485f3..53f50067fd3131b16a89b3d0dbb2d1acbb949f5c 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -5599,6 +5599,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -5462,6 +5462,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return this.inBlockState; } @@ -26,7 +26,7 @@ index 3fce42fd3450296f155e068bc377d57ae3f98ba4..3df427b1bc4d0f477a14c5d063dda09c return this.chunkPosition; } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 3215adeea327584dc637276c2b1a8a336241163a..9fd86198da6834a5789e241730fc760296ba4aca 100644 +index f0c7654e6a28620b37ca28420dc1c79a3bd31e51..b67d315e33e9a649147e4417c0c38f78aa700b26 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -2072,19 +2072,43 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -36,7 +36,7 @@ index 3215adeea327584dc637276c2b1a8a336241163a..9fd86198da6834a5789e241730fc7602 - this.cachedOnClimable = this.onClimbable(); - this.lastClimbingPosition = this.blockPosition(); + // Gale start - don't load chunks to activate climbing entities -+ Boolean onClimbableIfLoaded = this.onClimbable(org.leavesmc.lumina.config.LuminaConfig.configModule.optimization.allowLoadChunksToActiveClimbingEntities); ++ Boolean onClimbableIfLoaded = this.onClimbable(org.leavesmc.lumina.config.LuminaConfig.configModule.performance.allowLoadChunksToActiveClimbingEntities); + if (onClimbableIfLoaded != null) { + this.cachedOnClimable = onClimbableIfLoaded; + this.lastClimbingPosition = this.blockPosition(); diff --git a/patches/server/0030-Gale-Optimize-sun-burn-tick.patch b/patches/server/0027-Gale-Optimize-sun-burn-tick.patch similarity index 92% rename from patches/server/0030-Gale-Optimize-sun-burn-tick.patch rename to patches/server/0027-Gale-Optimize-sun-burn-tick.patch index bcf41b5..a58f27d 100644 --- a/patches/server/0030-Gale-Optimize-sun-burn-tick.patch +++ b/patches/server/0027-Gale-Optimize-sun-burn-tick.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Gale Optimize sun burn tick diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 3df427b1bc4d0f477a14c5d063dda09cb5a9edc2..0dc6a17c5748afe56da9bcaeec5a77bc41b3fd11 100644 +index 53f50067fd3131b16a89b3d0dbb2d1acbb949f5c..8970a6c09951304e71ba717f190ca7d574fa7ecc 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -310,7 +310,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -17,7 +17,7 @@ index 3df427b1bc4d0f477a14c5d063dda09cb5a9edc2..0dc6a17c5748afe56da9bcaeec5a77bc public BlockPos blockPosition; // Pufferfish - private->public private ChunkPos chunkPosition; private Vec3 deltaMovement; -@@ -2120,9 +2120,17 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2115,9 +2115,17 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess /** @deprecated */ @Deprecated public float getLightLevelDependentMagicValue() { @@ -37,10 +37,10 @@ index 3df427b1bc4d0f477a14c5d063dda09cb5a9edc2..0dc6a17c5748afe56da9bcaeec5a77bc this.absMoveTo(x, y, z); this.setYRot(yaw % 360.0F); diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index e9501e51258ba98ca861b902ea1b997f831088d5..b372fab3567609c446d0310652c559846688fff0 100644 +index 136aaca7798ce4ffe902bb349887530e8f5ad981..a5e4735c99afa5c225a0bc4629b37ce1784a9818 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -1869,13 +1869,29 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti +@@ -1865,13 +1865,29 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti return flag; } diff --git a/patches/server/0031-Gale-Check-frozen-ticks-before-landing-block.patch b/patches/server/0028-Gale-Check-frozen-ticks-before-landing-block.patch similarity index 93% rename from patches/server/0031-Gale-Check-frozen-ticks-before-landing-block.patch rename to patches/server/0028-Gale-Check-frozen-ticks-before-landing-block.patch index ffa3c35..bfb18e6 100644 --- a/patches/server/0031-Gale-Check-frozen-ticks-before-landing-block.patch +++ b/patches/server/0028-Gale-Check-frozen-ticks-before-landing-block.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Gale Check frozen ticks before landing block diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 9fd86198da6834a5789e241730fc760296ba4aca..b5a84fa06c2bbb3de5c6eae925962276b57e92e4 100644 +index b67d315e33e9a649147e4417c0c38f78aa700b26..4bac808c54d8c840af98e4d35b8503f721f96374 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -608,11 +608,10 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0028-Gale-Variable-entity-wake-up-duration.patch b/patches/server/0028-Gale-Variable-entity-wake-up-duration.patch deleted file mode 100644 index 2a0d062..0000000 --- a/patches/server/0028-Gale-Variable-entity-wake-up-duration.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: MrHua269 -Date: Wed, 7 Feb 2024 06:00:22 +0000 -Subject: [PATCH] Gale Variable entity wake-up duration - - -diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 1d124d0a653ecb03998f6c354b27e21eff8f0a44..50a07dbfe3896679af6226ec0f54b777b090083e 100644 ---- a/src/main/java/org/spigotmc/ActivationRange.java -+++ b/src/main/java/org/spigotmc/ActivationRange.java -@@ -74,28 +74,41 @@ public class ActivationRange - if (entity.activationType == ActivationType.VILLAGER) { - if (inactiveFor > config.wakeUpInactiveVillagersEvery && worldData.wakeupInactiveRemainingVillagers > 0) { // Folia - threaded regions - worldData.wakeupInactiveRemainingVillagers--; // Folia - threaded regions -- return config.wakeUpInactiveVillagersFor; -+ return getWakeUpDurationWithVariance(entity, config.wakeUpInactiveVillagersFor); // Gale - variable entity wake-up duration - } - } else if (entity.activationType == ActivationType.ANIMAL) { - if (inactiveFor > config.wakeUpInactiveAnimalsEvery && worldData.wakeupInactiveRemainingAnimals > 0) { // Folia - threaded regions - worldData.wakeupInactiveRemainingAnimals--; // Folia - threaded regions -- return config.wakeUpInactiveAnimalsFor; -+ return getWakeUpDurationWithVariance(entity, config.wakeUpInactiveAnimalsFor); // Gale - variable entity wake-up duration - } - } else if (entity.activationType == ActivationType.FLYING_MONSTER) { - if (inactiveFor > config.wakeUpInactiveFlyingEvery && worldData.wakeupInactiveRemainingFlying > 0) { // Folia - threaded regions - worldData.wakeupInactiveRemainingFlying--; // Folia - threaded regions -- return config.wakeUpInactiveFlyingFor; -+ return getWakeUpDurationWithVariance(entity, config.wakeUpInactiveFlyingFor); // Gale - variable entity wake-up duration - } - } else if (entity.activationType == ActivationType.MONSTER || entity.activationType == ActivationType.RAIDER) { - if (inactiveFor > config.wakeUpInactiveMonstersEvery && worldData.wakeupInactiveRemainingMonsters > 0) { // Folia - threaded regions - worldData.wakeupInactiveRemainingMonsters--; // Folia - threaded regions -- return config.wakeUpInactiveMonstersFor; -+ return getWakeUpDurationWithVariance(entity, config.wakeUpInactiveMonstersFor); // Gale - variable entity wake-up duration - } - } - return -1; - } - // Paper end - -+ // Gale start - variable entity wake-up duration -+ private static final java.util.concurrent.ThreadLocalRandom wakeUpDurationRandom = java.util.concurrent.ThreadLocalRandom.current(); -+ -+ private static int getWakeUpDurationWithVariance(Entity entity, int wakeUpDuration) { -+ double deviation = org.leavesmc.lumina.config.LuminaConfig.configModule.optimization.entityWakeUpDurationRatioStandardDeviation; -+ if (deviation <= 0) { -+ return wakeUpDuration; -+ } -+ return (int) Math.min(Integer.MAX_VALUE, Math.max(1, Math.round(wakeUpDuration * wakeUpDurationRandom.nextGaussian(1, deviation)))); -+ } -+ // Gale end - variable entity wake-up duration -+ -+ - // Folia - threaded regions - replaced by local variable - - /** diff --git a/patches/server/0032-Gale-Use-platform-math-functions.patch b/patches/server/0029-Gale-Use-platform-math-functions.patch similarity index 100% rename from patches/server/0032-Gale-Use-platform-math-functions.patch rename to patches/server/0029-Gale-Use-platform-math-functions.patch diff --git a/patches/server/0033-Gale-Skip-entity-move-if-movement-is-zero.patch b/patches/server/0030-Gale-Skip-entity-move-if-movement-is-zero.patch similarity index 89% rename from patches/server/0033-Gale-Skip-entity-move-if-movement-is-zero.patch rename to patches/server/0030-Gale-Skip-entity-move-if-movement-is-zero.patch index 02ed9a3..81452b2 100644 --- a/patches/server/0033-Gale-Skip-entity-move-if-movement-is-zero.patch +++ b/patches/server/0030-Gale-Skip-entity-move-if-movement-is-zero.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Gale Skip entity move if movement is zero diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 0dc6a17c5748afe56da9bcaeec5a77bc41b3fd11..08bfdb8963cea6b06848921cd96f7ad80a8eca83 100644 +index 8970a6c09951304e71ba717f190ca7d574fa7ecc..7d0ce022ad816a0f3796ba22b31b962a5d83f8c9 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -319,6 +319,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -16,7 +16,7 @@ index 0dc6a17c5748afe56da9bcaeec5a77bc41b3fd11..08bfdb8963cea6b06848921cd96f7ad8 public boolean onGround; public boolean horizontalCollision; public boolean verticalCollision; -@@ -1143,6 +1144,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1138,6 +1139,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess //Luminol end public void move(MoverType movementType, Vec3 movement) { @@ -28,7 +28,7 @@ index 0dc6a17c5748afe56da9bcaeec5a77bc41b3fd11..08bfdb8963cea6b06848921cd96f7ad8 final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity // Paper start - detailed watchdog information io.papermc.paper.util.TickThread.ensureTickThread("Cannot move an entity off-main"); -@@ -5010,6 +5016,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -5005,6 +5011,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public final void setBoundingBox(AABB boundingBox) { diff --git a/patches/server/0034-Gale-Optimize-world-generation-chunk-and-block-acces.patch b/patches/server/0031-Gale-Optimize-world-generation-chunk-and-block-acces.patch similarity index 100% rename from patches/server/0034-Gale-Optimize-world-generation-chunk-and-block-acces.patch rename to patches/server/0031-Gale-Optimize-world-generation-chunk-and-block-acces.patch diff --git a/patches/server/0035-Gale-Optimize-noise-generation.patch b/patches/server/0032-Gale-Optimize-noise-generation.patch similarity index 100% rename from patches/server/0035-Gale-Optimize-noise-generation.patch rename to patches/server/0032-Gale-Optimize-noise-generation.patch diff --git a/patches/server/0036-Gale-Faster-chunk-serialization.patch b/patches/server/0033-Gale-Faster-chunk-serialization.patch similarity index 100% rename from patches/server/0036-Gale-Faster-chunk-serialization.patch rename to patches/server/0033-Gale-Faster-chunk-serialization.patch diff --git a/patches/server/0037-Gale-Reduce-lambda-and-Optional-allocation-in-Entity.patch b/patches/server/0034-Gale-Reduce-lambda-and-Optional-allocation-in-Entity.patch similarity index 100% rename from patches/server/0037-Gale-Reduce-lambda-and-Optional-allocation-in-Entity.patch rename to patches/server/0034-Gale-Reduce-lambda-and-Optional-allocation-in-Entity.patch diff --git a/patches/server/0038-Gale-Replace-throttle-tracker-map-with-optimized-col.patch b/patches/server/0035-Gale-Replace-throttle-tracker-map-with-optimized-col.patch similarity index 100% rename from patches/server/0038-Gale-Replace-throttle-tracker-map-with-optimized-col.patch rename to patches/server/0035-Gale-Replace-throttle-tracker-map-with-optimized-col.patch diff --git a/patches/server/0039-Sparkly-Paper-Optimize-canSee-checks.patch b/patches/server/0036-Sparkly-Paper-Optimize-canSee-checks.patch similarity index 100% rename from patches/server/0039-Sparkly-Paper-Optimize-canSee-checks.patch rename to patches/server/0036-Sparkly-Paper-Optimize-canSee-checks.patch diff --git a/patches/server/0040-Purpur-use-alternative-keep-alive.patch b/patches/server/0037-Purpur-use-alternative-keep-alive.patch similarity index 95% rename from patches/server/0040-Purpur-use-alternative-keep-alive.patch rename to patches/server/0037-Purpur-use-alternative-keep-alive.patch index b0e8500..ef11bd6 100644 --- a/patches/server/0040-Purpur-use-alternative-keep-alive.patch +++ b/patches/server/0037-Purpur-use-alternative-keep-alive.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Purpur use alternative keep alive diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index f907dbb55369395058091dd75ae435d2025d94dd..7cdd2f213e881ed16f1201ec17f318bdbb9d9822 100644 +index f907dbb55369395058091dd75ae435d2025d94dd..8573142d1ef89f1fdd1ceddbb7018e426257f5d8 100644 --- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java @@ -73,6 +73,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack @@ -21,7 +21,7 @@ index f907dbb55369395058091dd75ae435d2025d94dd..7cdd2f213e881ed16f1201ec17f318bd @Override public void handleKeepAlive(ServerboundKeepAlivePacket packet) { + // Purpur start -+ if (org.leavesmc.lumina.config.LuminaConfig.configModule.optimization.useAlternativeKeepAlive) { ++ if (org.leavesmc.lumina.config.LuminaConfig.configModule.misc.useAlternativeKeepAlive) { + if (this.keepAlivePending && !keepAlives.isEmpty() && keepAlives.contains(packet.getId())) { + int ping = (int) (Util.getMillis() - packet.getId()); + this.latency = (this.latency * 3 + ping) / 4; @@ -38,7 +38,7 @@ index f907dbb55369395058091dd75ae435d2025d94dd..7cdd2f213e881ed16f1201ec17f318bd long elapsedTime = currentTime - this.keepAliveTime; + // Purpur start -+ if (org.leavesmc.lumina.config.LuminaConfig.configModule.optimization.useAlternativeKeepAlive) { ++ if (org.leavesmc.lumina.config.LuminaConfig.configModule.misc.useAlternativeKeepAlive) { + if (elapsedTime >= 1000L) { // 1 second + if (this.keepAlivePending && !this.processedDisconnect && keepAlives.size() * 1000L >= KEEPALIVE_LIMIT) { + LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getScoreboardName()); diff --git a/patches/server/0041-Fix-MC-2025.patch b/patches/server/0038-Fix-MC-2025.patch similarity index 90% rename from patches/server/0041-Fix-MC-2025.patch rename to patches/server/0038-Fix-MC-2025.patch index 4612dbe..503771c 100644 --- a/patches/server/0041-Fix-MC-2025.patch +++ b/patches/server/0038-Fix-MC-2025.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix-MC-2025 diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 08bfdb8963cea6b06848921cd96f7ad80a8eca83..05d450c7eb1dea429449e93a55632fd9dc6ab93b 100644 +index 7d0ce022ad816a0f3796ba22b31b962a5d83f8c9..ad62edaf597e1a5107edc99b4a7baaa138656a2e 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2607,6 +2607,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2602,6 +2602,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess nbttagcompound.putBoolean("Paper.FreezeLock", true); } // Paper end @@ -25,7 +25,7 @@ index 08bfdb8963cea6b06848921cd96f7ad80a8eca83..05d450c7eb1dea429449e93a55632fd9 return nbttagcompound; } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT"); -@@ -2684,6 +2694,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2679,6 +2689,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.reapplyPosition(); } diff --git a/patches/server/0042-Verify-signature-only-in-online-mode.patch b/patches/server/0039-Verify-signature-only-in-online-mode.patch similarity index 100% rename from patches/server/0042-Verify-signature-only-in-online-mode.patch rename to patches/server/0039-Verify-signature-only-in-online-mode.patch