From 7110f539c78a7cfe15e4410fdb2ef040120e70e0 Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Tue, 8 Apr 2025 17:15:31 -0400 Subject: [PATCH] Apply all --- .github/workflows/build-1215.yml | 2 +- ...elled-Projectile-Events-still-consum.patch | 26 +++---- ...AndInteract-and-NearestVisibleLiving.patch | 0 ...Remove-streams-on-InsideBrownianWalk.patch | 0 .../0225-Use-BFS-on-getSlopeDistance.patch | 10 +-- ...er-PR-Throttle-failed-spawn-attempts.patch | 67 ++++++++++--------- ...-BlockEntity-ticking-isRemoved-check.patch | 6 +- ...28-Raytrace-AntiXray-SDK-integration.patch | 18 ++--- ...ptimize-addOrUpdateTransientModifier.patch | 4 +- .../0230-Optimize-ContextMap.create.patch | 0 ...-Micro-optimizations-for-random-tick.patch | 6 +- ...on-updateConnectedPlayersWithinRange.patch | 2 +- ...233-Remove-streams-on-PlayerDetector.patch | 0 .../features/0234-Async-Block-Finding.patch | 0 ...Use-direct-iteration-on-Sensing.tick.patch | 0 ...36-Optimise-non-flush-packet-sending.patch | 0 ...hunk-retrieving-in-entity-fluid-push.patch | 6 +- ...er-PR-Throttle-failed-spawn-attempts.patch | 0 .../0050-Async-playerdata-saving.patch | 0 .../leaf/version/LeafVersionFetcher.java | 2 +- 20 files changed, 75 insertions(+), 74 deletions(-) rename leaf-archived-patches/unapplied/server/minecraft-patches/features/0141-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch => leaf-server/minecraft-patches/features/0222-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch (94%) rename leaf-archived-patches/unapplied/server/minecraft-patches/features/0142-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch => leaf-server/minecraft-patches/features/0223-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch (100%) rename leaf-archived-patches/unapplied/server/minecraft-patches/features/0143-Remove-streams-on-InsideBrownianWalk.patch => leaf-server/minecraft-patches/features/0224-Remove-streams-on-InsideBrownianWalk.patch (100%) rename leaf-archived-patches/unapplied/server/minecraft-patches/features/0144-Use-BFS-on-getSlopeDistance.patch => leaf-server/minecraft-patches/features/0225-Use-BFS-on-getSlopeDistance.patch (93%) rename leaf-archived-patches/unapplied/server/minecraft-patches/features/0145-Paper-PR-Throttle-failed-spawn-attempts.patch => leaf-server/minecraft-patches/features/0226-Paper-PR-Throttle-failed-spawn-attempts.patch (87%) rename leaf-archived-patches/unapplied/server/minecraft-patches/features/0146-Improve-BlockEntity-ticking-isRemoved-check.patch => leaf-server/minecraft-patches/features/0227-Improve-BlockEntity-ticking-isRemoved-check.patch (91%) rename leaf-archived-patches/unapplied/server/minecraft-patches/features/0147-Raytrace-AntiXray-SDK-integration.patch => leaf-server/minecraft-patches/features/0228-Raytrace-AntiXray-SDK-integration.patch (78%) rename leaf-archived-patches/unapplied/server/minecraft-patches/features/0148-Optimize-addOrUpdateTransientModifier.patch => leaf-server/minecraft-patches/features/0229-Optimize-addOrUpdateTransientModifier.patch (90%) rename leaf-archived-patches/unapplied/server/minecraft-patches/features/0149-Optimize-ContextMap.create.patch => leaf-server/minecraft-patches/features/0230-Optimize-ContextMap.create.patch (100%) rename leaf-archived-patches/unapplied/server/minecraft-patches/features/0150-Micro-optimizations-for-random-tick.patch => leaf-server/minecraft-patches/features/0231-Micro-optimizations-for-random-tick.patch (95%) rename leaf-archived-patches/unapplied/server/minecraft-patches/features/0151-Remove-streams-on-updateConnectedPlayersWithinRange.patch => leaf-server/minecraft-patches/features/0232-Remove-streams-on-updateConnectedPlayersWithinRange.patch (94%) rename leaf-archived-patches/unapplied/server/minecraft-patches/features/0152-Remove-streams-on-PlayerDetector.patch => leaf-server/minecraft-patches/features/0233-Remove-streams-on-PlayerDetector.patch (100%) rename leaf-archived-patches/unapplied/server/minecraft-patches/features/0153-Async-Block-Finding.patch => leaf-server/minecraft-patches/features/0234-Async-Block-Finding.patch (100%) rename leaf-archived-patches/unapplied/server/minecraft-patches/features/0154-Use-direct-iteration-on-Sensing.tick.patch => leaf-server/minecraft-patches/features/0235-Use-direct-iteration-on-Sensing.tick.patch (100%) rename leaf-archived-patches/unapplied/server/minecraft-patches/features/0155-Optimise-non-flush-packet-sending.patch => leaf-server/minecraft-patches/features/0236-Optimise-non-flush-packet-sending.patch (100%) rename leaf-archived-patches/unapplied/server/minecraft-patches/features/0156-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch => leaf-server/minecraft-patches/features/0237-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch (91%) rename leaf-archived-patches/unapplied/server/paper-patches/features/0050-Paper-PR-Throttle-failed-spawn-attempts.patch => leaf-server/paper-patches/features/0049-Paper-PR-Throttle-failed-spawn-attempts.patch (100%) rename leaf-archived-patches/unapplied/server/paper-patches/features/0051-Async-playerdata-saving.patch => leaf-server/paper-patches/features/0050-Async-playerdata-saving.patch (100%) diff --git a/.github/workflows/build-1215.yml b/.github/workflows/build-1215.yml index 6a13de22..516f61df 100644 --- a/.github/workflows/build-1215.yml +++ b/.github/workflows/build-1215.yml @@ -1,7 +1,7 @@ name: Build Leaf 1.21.5 on: push: - branches: [ "ver/1.21.5" ] # no build until update finished + branches: [ "dev/1.21.5" ] workflow_dispatch: jobs: diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0141-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch b/leaf-server/minecraft-patches/features/0222-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch similarity index 94% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0141-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch rename to leaf-server/minecraft-patches/features/0222-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch index 2154ebe6..8fc2560a 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0141-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch +++ b/leaf-server/minecraft-patches/features/0222-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch @@ -27,19 +27,19 @@ index b3e003694ce0da357e91ab3ce2b1380f9ab0a32a..4d5347a6a2fc8b10d11f89220f537c81 level.playSound( diff --git a/net/minecraft/world/item/CrossbowItem.java b/net/minecraft/world/item/CrossbowItem.java -index 318316d3aa14f1e9e863d435515c182619a81b3e..b13f03ae35e21088c2b4b388e2b12cf3fe3ef8c6 100644 +index ff4294b9bcb6e2bb0f9d51dee6dcc889e45df95c..0a8041741b8367478ec2cb658071fa4f29513040 100644 --- a/net/minecraft/world/item/CrossbowItem.java +++ b/net/minecraft/world/item/CrossbowItem.java -@@ -124,7 +124,7 @@ public class CrossbowItem extends ProjectileWeaponItem { - return CrossbowItem.tryLoadProjectiles(shooter, crossbowStack, true); +@@ -95,7 +95,7 @@ public class CrossbowItem extends ProjectileWeaponItem { } + private static boolean tryLoadProjectiles(LivingEntity shooter, ItemStack crossbowStack, boolean consume) { - List list = draw(crossbowStack, shooter.getProjectile(crossbowStack), shooter, consume); + List list = draw(crossbowStack, shooter.getProjectile(crossbowStack), shooter, consume ? ProjectileDrawingItemConsumption.IMMEDIATELY : ProjectileDrawingItemConsumption.NEVER); // Paper - prevent item consumption for cancelled events // Paper end - Add EntityLoadCrossbowEvent if (!list.isEmpty()) { crossbowStack.set(DataComponents.CHARGED_PROJECTILES, ChargedProjectiles.of(list)); -@@ -158,8 +158,10 @@ public class CrossbowItem extends ProjectileWeaponItem { +@@ -129,8 +129,10 @@ public class CrossbowItem extends ProjectileWeaponItem { } projectile.shoot(projectileShotVector.x(), projectileShotVector.y(), projectileShotVector.z(), velocity, inaccuracy); @@ -52,7 +52,7 @@ index 318316d3aa14f1e9e863d435515c182619a81b3e..b13f03ae35e21088c2b4b388e2b12cf3 } private static Vector3f getProjectileShotVector(LivingEntity shooter, Vec3 distance, float angle) { -@@ -201,9 +203,9 @@ public class CrossbowItem extends ProjectileWeaponItem { +@@ -172,9 +174,9 @@ public class CrossbowItem extends ProjectileWeaponItem { Level level, LivingEntity shooter, InteractionHand hand, ItemStack weapon, float velocity, float inaccuracy, @Nullable LivingEntity target ) { if (level instanceof ServerLevel serverLevel) { @@ -65,7 +65,7 @@ index 318316d3aa14f1e9e863d435515c182619a81b3e..b13f03ae35e21088c2b4b388e2b12cf3 CriteriaTriggers.SHOT_CROSSBOW.trigger(serverPlayer, weapon); serverPlayer.awardStat(Stats.ITEM_USED.get(weapon.getItem())); diff --git a/net/minecraft/world/item/ProjectileWeaponItem.java b/net/minecraft/world/item/ProjectileWeaponItem.java -index f20c38c1ff978d00dc0c9810c050506deed44ebd..e58a40623c3a259c80d0f96686797445f54f3a6f 100644 +index 662e286f40e042823fa7cdd9e27b44e4bfad9cb9..ebaf3422437b6815c8ab1d5f91c7e1de22dcc722 100644 --- a/net/minecraft/world/item/ProjectileWeaponItem.java +++ b/net/minecraft/world/item/ProjectileWeaponItem.java @@ -40,7 +40,20 @@ public abstract class ProjectileWeaponItem extends Item { @@ -132,7 +132,7 @@ index f20c38c1ff978d00dc0c9810c050506deed44ebd..e58a40623c3a259c80d0f96686797445 if (Projectile.spawnProjectile( @@ -81,7 +113,25 @@ public abstract class ProjectileWeaponItem extends Item { if (shooter instanceof net.minecraft.server.level.ServerPlayer serverPlayer) { - serverPlayer.getBukkitEntity().updateInventory(); + serverPlayer.containerMenu.sendAllDataToRemote(); } - return; + // Paper start - prevent item consumption for cancelled events @@ -229,14 +229,14 @@ index f20c38c1ff978d00dc0c9810c050506deed44ebd..e58a40623c3a259c80d0f96686797445 player.getInventory().removeItem(ammo); } diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index 4821ab14c6a7d5738f0fc93523aede5ea904aa84..e0d9d7075b2c10f686c8c144c9869fa574cd19d3 100644 +index 817cc2e4f311a626681d94b748a01ae2e3048445..e47e4d11e7dcd8cb4ab6ef965d8b16e6396d2856 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java -@@ -182,6 +182,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl - private int tileTickPosition; - public final Map explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions +@@ -170,6 +170,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl + public final Map explosionDensityCache = new java.util.HashMap<>(); // Paper - Optimize explosions public java.util.ArrayDeque redstoneUpdateInfos; // Paper - Faster redstone torch rapid clock removal; Move from Map in BlockRedstoneTorch to here + public final net.minecraft.world.level.levelgen.BitRandomSource simpleRandom = org.dreeam.leaf.config.modules.opt.FastRNG.enabled ? new org.dreeam.leaf.util.math.random.FasterRandomSource(net.minecraft.world.level.levelgen.RandomSupport.generateUniqueSeed()) : new ca.spottedleaf.moonrise.common.util.SimpleThreadUnsafeRandom(net.minecraft.world.level.levelgen.RandomSupport.generateUniqueSeed()); // Gale - Pufferfish - move random tick random // Leaf - Faster random generator + public boolean shouldConsumeArrow = true; // Paper - prevent item consumption for cancelled shot events - public final net.minecraft.world.level.levelgen.BitRandomSource simpleRandom = org.dreeam.leaf.config.modules.opt.FastRNG.enabled ? new org.dreeam.leaf.util.math.random.FasterRandomSource(net.minecraft.world.level.levelgen.RandomSupport.generateUniqueSeed()) : new ca.spottedleaf.moonrise.common.util.SimpleThreadUnsafeRandom(net.minecraft.world.level.levelgen.RandomSupport.generateUniqueSeed()); // Gale - Pufferfish - move random tick random // Leaf - Faster random generator - + // Purpur start - Add adjustable breeding cooldown to config + private com.google.common.cache.Cache playerBreedingCooldowns; diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0142-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch b/leaf-server/minecraft-patches/features/0223-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch similarity index 100% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0142-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch rename to leaf-server/minecraft-patches/features/0223-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0143-Remove-streams-on-InsideBrownianWalk.patch b/leaf-server/minecraft-patches/features/0224-Remove-streams-on-InsideBrownianWalk.patch similarity index 100% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0143-Remove-streams-on-InsideBrownianWalk.patch rename to leaf-server/minecraft-patches/features/0224-Remove-streams-on-InsideBrownianWalk.patch diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0144-Use-BFS-on-getSlopeDistance.patch b/leaf-server/minecraft-patches/features/0225-Use-BFS-on-getSlopeDistance.patch similarity index 93% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0144-Use-BFS-on-getSlopeDistance.patch rename to leaf-server/minecraft-patches/features/0225-Use-BFS-on-getSlopeDistance.patch index 5b3603bb..43e58292 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0144-Use-BFS-on-getSlopeDistance.patch +++ b/leaf-server/minecraft-patches/features/0225-Use-BFS-on-getSlopeDistance.patch @@ -9,7 +9,7 @@ Leaf: ~48ms (-36%) This should help drastically on the farms that use actively changing fluids. diff --git a/net/minecraft/world/level/material/FlowingFluid.java b/net/minecraft/world/level/material/FlowingFluid.java -index 4c2c2efd5380ff1fa5ad7553b51babae20f516ae..618a8af8fe30c39bb8c93dcc324f4ae1c48e704e 100644 +index 4625bd55e1cb01dfb9921dcd033f05b4a8f9ad74..8646ccf77f738d7b66efd0a7ecf2519d8a8d6bdf 100644 --- a/net/minecraft/world/level/material/FlowingFluid.java +++ b/net/minecraft/world/level/material/FlowingFluid.java @@ -8,6 +8,8 @@ import it.unimi.dsi.fastutil.shorts.Short2ObjectMap; @@ -21,8 +21,8 @@ index 4c2c2efd5380ff1fa5ad7553b51babae20f516ae..618a8af8fe30c39bb8c93dcc324f4ae1 import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.server.level.ServerLevel; -@@ -341,31 +343,72 @@ public abstract class FlowingFluid extends Fluid { - protected void beforeDestroyingBlock(LevelAccessor level, BlockPos pos, BlockState state, BlockPos source) { beforeDestroyingBlock(level, pos, state); } // Paper - Add BlockBreakBlockEvent +@@ -342,31 +344,72 @@ public abstract class FlowingFluid extends Fluid { + protected abstract void beforeDestroyingBlock(LevelAccessor level, BlockPos pos, BlockState state); - protected int getSlopeDistance(LevelReader level, BlockPos pos, int depth, Direction direction, BlockState state, FlowingFluid.SpreadContext spreadContext) { @@ -53,7 +53,6 @@ index 4c2c2efd5380ff1fa5ad7553b51babae20f516ae..618a8af8fe30c39bb8c93dcc324f4ae1 + BlockPos neighborPos = startPos.relative(dir); + BlockState neighborState = spreadContext.getBlockStateIfLoaded(neighborPos); + if (neighborState == null) continue; -+ + long visitKey = encodeSlopeNode(neighborPos, dir.getOpposite()); + if (visited.add(visitKey)) { + queue.add(new FlowingFluid.SlopeDistanceNode(neighborPos, initialDepth + 1, dir.getOpposite(), neighborState)); @@ -96,7 +95,8 @@ index 4c2c2efd5380ff1fa5ad7553b51babae20f516ae..618a8af8fe30c39bb8c93dcc324f4ae1 + } + + private static long encodeSlopeNode(BlockPos pos, Direction excludedDir) { -+ return ((long) pos.getX() & 0xFFFFFFFFL) << 32 | ((long) pos.getZ() & 0xFFFFFFFFL) << 4 | (excludedDir.ordinal() & 0x0F);} ++ return ((long) pos.getX() & 0xFFFFFFFFL) << 32 | ((long) pos.getZ() & 0xFFFFFFFFL) << 4 | (excludedDir.ordinal() & 0x0F); ++ } + + private static class SlopeDistanceNode { + final BlockPos pos; diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0145-Paper-PR-Throttle-failed-spawn-attempts.patch b/leaf-server/minecraft-patches/features/0226-Paper-PR-Throttle-failed-spawn-attempts.patch similarity index 87% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0145-Paper-PR-Throttle-failed-spawn-attempts.patch rename to leaf-server/minecraft-patches/features/0226-Paper-PR-Throttle-failed-spawn-attempts.patch index 94e2d7b8..98c920e1 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0145-Paper-PR-Throttle-failed-spawn-attempts.patch +++ b/leaf-server/minecraft-patches/features/0226-Paper-PR-Throttle-failed-spawn-attempts.patch @@ -31,13 +31,13 @@ vain. Throttling spawn attempts in suspected spawnproof chunks improves performance without noticeably advantaging or disadvantaging the mob farm. diff --git a/net/minecraft/world/level/NaturalSpawner.java b/net/minecraft/world/level/NaturalSpawner.java -index d3f5242fc66529bf3137da4d505a6cf55e749e43..ce2621a87dec1befb016b3437ceb2d02ed6d0b75 100644 +index 345d4b80bd4383e0fb66d744d87bc8ef4100fd32..a2da4fce50f31d56036d04041c4f80ed90c18b27 100644 --- a/net/minecraft/world/level/NaturalSpawner.java +++ b/net/minecraft/world/level/NaturalSpawner.java -@@ -164,10 +164,21 @@ public final class NaturalSpawner { +@@ -158,10 +158,21 @@ public final class NaturalSpawner { // Copied from getFilteredSpawningCategories int limit = mobCategory.getMaxInstancesPerChunk(); - SpawnCategory spawnCategory = CraftSpawnCategory.toBukkit(mobCategory); + org.bukkit.entity.SpawnCategory spawnCategory = org.bukkit.craftbukkit.util.CraftSpawnCategory.toBukkit(mobCategory); + // Paper start - throttle failed spawn attempts + boolean spawnThisTick = true; + long ticksPerSpawn = level.ticksPerSpawnCategory.getLong(spawnCategory); @@ -47,7 +47,7 @@ index d3f5242fc66529bf3137da4d505a6cf55e749e43..ce2621a87dec1befb016b3437ceb2d02 + ticksPerSpawn = Math.max(ticksPerSpawn, spawningThrottle.throttledTicksPerSpawn.getOrDefault(mobCategory, -1)); + } + // Paper end - throttle failed spawn attempts - if (CraftSpawnCategory.isValidForLimits(spawnCategory)) { + if (org.bukkit.craftbukkit.util.CraftSpawnCategory.isValidForLimits(spawnCategory)) { + spawnThisTick = ticksPerSpawnTmp != 0 && level.getGameTime() % ticksPerSpawn == 0; // Paper - throttle failed spawn attempts limit = level.getWorld().getSpawnLimit(spawnCategory); } @@ -56,7 +56,7 @@ index d3f5242fc66529bf3137da4d505a6cf55e749e43..ce2621a87dec1befb016b3437ceb2d02 // Apply per-player limit int minDiff = Integer.MAX_VALUE; final ca.spottedleaf.moonrise.common.list.ReferenceList inRange = -@@ -181,12 +192,20 @@ public final class NaturalSpawner { +@@ -175,12 +186,20 @@ public final class NaturalSpawner { maxSpawns = (minDiff == Integer.MAX_VALUE) ? 0 : minDiff; canSpawn = maxSpawns > 0; @@ -79,7 +79,7 @@ index d3f5242fc66529bf3137da4d505a6cf55e749e43..ce2621a87dec1befb016b3437ceb2d02 // Paper end - Optional per player mob spawns } } -@@ -210,12 +229,21 @@ public final class NaturalSpawner { +@@ -204,12 +223,21 @@ public final class NaturalSpawner { } public static void spawnCategoryForChunk( MobCategory category, ServerLevel level, LevelChunk chunk, NaturalSpawner.SpawnPredicate filter, NaturalSpawner.AfterSpawnCallback callback, final int maxSpawns, final Consumer trackEntity @@ -102,7 +102,7 @@ index d3f5242fc66529bf3137da4d505a6cf55e749e43..ce2621a87dec1befb016b3437ceb2d02 } @VisibleForDebug -@@ -235,15 +263,23 @@ public final class NaturalSpawner { +@@ -229,15 +257,23 @@ public final class NaturalSpawner { } public static void spawnCategoryForPosition( MobCategory category, ServerLevel level, ChunkAccess chunk, BlockPos pos, NaturalSpawner.SpawnPredicate filter, NaturalSpawner.AfterSpawnCallback callback, final int maxSpawns, final @Nullable Consumer trackEntity @@ -127,23 +127,24 @@ index d3f5242fc66529bf3137da4d505a6cf55e749e43..ce2621a87dec1befb016b3437ceb2d02 for (int i1 = 0; i1 < 3; i1++) { int x = pos.getX(); -@@ -284,13 +320,13 @@ public final class NaturalSpawner { +@@ -278,14 +314,14 @@ public final class NaturalSpawner { } // Paper end - per player mob count backoff if (doSpawning == PreSpawnStatus.ABORT) { - return; + return i; // Paper - throttle failed spawn attempts } - if (doSpawning == PreSpawnStatus.SUCCESS && filter.test(spawnerData.type, mutableBlockPos, chunk)) { - // Paper end - PreCreatureSpawnEvent - Mob mobForSpawn = getMobForSpawn(level, spawnerData.type); + if (doSpawning == PreSpawnStatus.SUCCESS + // Paper end - PreCreatureSpawnEvent + && filter.test(spawnerData.type(), mutableBlockPos, chunk)) { + Mob mobForSpawn = getMobForSpawn(level, spawnerData.type()); if (mobForSpawn == null) { - return; + return i; // Paper - throttle failed spawn attempts } - mobForSpawn.moveTo(d, y, d1, level.random.nextFloat() * 360.0F, 0.0F); -@@ -313,7 +349,7 @@ public final class NaturalSpawner { + mobForSpawn.snapTo(d, y, d1, level.random.nextFloat() * 360.0F, 0.0F); +@@ -308,7 +344,7 @@ public final class NaturalSpawner { } // CraftBukkit end if (i >= mobForSpawn.getMaxSpawnClusterSize() || i >= maxSpawns) { // Paper - Optional per player mob spawns @@ -152,7 +153,7 @@ index d3f5242fc66529bf3137da4d505a6cf55e749e43..ce2621a87dec1befb016b3437ceb2d02 } if (mobForSpawn.isMaxGroupSizeReached(i3)) { -@@ -326,6 +362,8 @@ public final class NaturalSpawner { +@@ -321,6 +357,8 @@ public final class NaturalSpawner { } } } @@ -162,7 +163,7 @@ index d3f5242fc66529bf3137da4d505a6cf55e749e43..ce2621a87dec1befb016b3437ceb2d02 private static boolean isRightDistanceToPlayerAndSpawnPoint(ServerLevel level, ChunkAccess chunk, BlockPos.MutableBlockPos pos, double distance) { diff --git a/net/minecraft/world/level/chunk/ChunkAccess.java b/net/minecraft/world/level/chunk/ChunkAccess.java -index 3a6db5bc0c8be7d68e15317a621c1965fdc3a9bd..50a9903367f49ece2a267d10944b1515c7b93859 100644 +index 6683df8d0f5a61ab094393f761a3d3a22d6e0455..4fd9313ce2c87383685d80e2533b93d5b85a9f41 100644 --- a/net/minecraft/world/level/chunk/ChunkAccess.java +++ b/net/minecraft/world/level/chunk/ChunkAccess.java @@ -91,6 +91,7 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh @@ -174,7 +175,7 @@ index 3a6db5bc0c8be7d68e15317a621c1965fdc3a9bd..50a9903367f49ece2a267d10944b1515 // Paper start - rewrite chunk system private volatile ca.spottedleaf.moonrise.patches.starlight.light.SWMRNibbleArray[] blockNibbles; diff --git a/net/minecraft/world/level/chunk/storage/SerializableChunkData.java b/net/minecraft/world/level/chunk/storage/SerializableChunkData.java -index c0939c311c554a4660b80725294663bab7915733..e2df93b2500a74c4cecac1515f3991967a07a052 100644 +index 0ed7534dad28e93cd0d1af8616f6d882c47dccf4..a829a828d2f1abbf403ef77d258cd635ad9bf6de 100644 --- a/net/minecraft/world/level/chunk/storage/SerializableChunkData.java +++ b/net/minecraft/world/level/chunk/storage/SerializableChunkData.java @@ -92,6 +92,7 @@ public record SerializableChunkData( @@ -185,35 +186,35 @@ index c0939c311c554a4660b80725294663bab7915733..e2df93b2500a74c4cecac1515f399196 ) { public static final Codec> BLOCK_STATE_CODEC = PalettedContainer.codecRW( Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState(), null // Paper - Anti-Xray -@@ -216,6 +217,19 @@ public record SerializableChunkData( - lists[i] = list4; +@@ -188,6 +189,19 @@ public record SerializableChunkData( + lists[i] = list2; } + // Paper start - throttle failed spawn attempts + long[] failedSpawnAttemptsData = null; -+ if (tag.contains("Paper.FailedSpawnAttempts", net.minecraft.nbt.Tag.TAG_COMPOUND)) { ++ if (tag.contains("Paper.FailedSpawnAttempts")) { + failedSpawnAttemptsData = new long[net.minecraft.world.entity.MobCategory.values().length]; -+ CompoundTag failedSpawnAttemptsTag = tag.getCompound("Paper.FailedSpawnAttempts"); ++ CompoundTag failedSpawnAttemptsTag = tag.getCompoundOrEmpty("Paper.FailedSpawnAttempts"); + for (net.minecraft.world.entity.MobCategory mobCategory : net.minecraft.world.level.NaturalSpawner.SPAWNING_CATEGORIES) { -+ if (failedSpawnAttemptsTag.contains(mobCategory.getSerializedName(), net.minecraft.nbt.Tag.TAG_LONG)) { -+ failedSpawnAttemptsData[mobCategory.ordinal()] = failedSpawnAttemptsTag.getLong(mobCategory.getSerializedName()); ++ if (failedSpawnAttemptsTag.contains(mobCategory.getSerializedName())) { ++ failedSpawnAttemptsData[mobCategory.ordinal()] = failedSpawnAttemptsTag.getLongOr(mobCategory.getSerializedName(), 0); + } + } + } + // Paper end - throttle failed spawn attempts + - List list5 = Lists.transform(tag.getList("entities", 10), tag1 -> (CompoundTag)tag1); - List list6 = Lists.transform(tag.getList("block_entities", 10), tag1 -> (CompoundTag)tag1); - CompoundTag compound1 = tag.getCompound("structures"); -@@ -294,6 +308,7 @@ public record SerializableChunkData( - list6, - compound1 + List list3 = tag.getList("entities").stream().flatMap(ListTag::compoundStream).toList(); + List list4 = tag.getList("block_entities").stream().flatMap(ListTag::compoundStream).toList(); + CompoundTag compoundOrEmpty = tag.getCompoundOrEmpty("structures"); +@@ -269,6 +283,7 @@ public record SerializableChunkData( + list4, + compoundOrEmpty , tag.get("ChunkBukkitValues") // CraftBukkit - ChunkBukkitValues + , failedSpawnAttemptsData // Paper - throttle failed spawn attempts ); } } -@@ -450,6 +465,15 @@ public record SerializableChunkData( +@@ -425,6 +440,15 @@ public record SerializableChunkData( chunkAccess.addPackedPostProcess(this.postProcessingSections[i], i); } @@ -229,7 +230,7 @@ index c0939c311c554a4660b80725294663bab7915733..e2df93b2500a74c4cecac1515f399196 if (chunkType == ChunkType.LEVELCHUNK) { return this.loadStarlightLightData(level, new ImposterProtoChunk((LevelChunk)chunkAccess, false)); // Paper - starlight } else { -@@ -603,6 +627,7 @@ public record SerializableChunkData( +@@ -571,6 +595,7 @@ public record SerializableChunkData( persistentDataContainer = chunk.persistentDataContainer.toTagCompound(); } // CraftBukkit end @@ -237,7 +238,7 @@ index c0939c311c554a4660b80725294663bab7915733..e2df93b2500a74c4cecac1515f399196 return new SerializableChunkData( level.registryAccess().lookupOrThrow(Registries.BIOME), pos, -@@ -623,6 +648,7 @@ public record SerializableChunkData( +@@ -591,6 +616,7 @@ public record SerializableChunkData( list1, compoundTag , persistentDataContainer // CraftBukkit - persistentDataContainer @@ -245,7 +246,7 @@ index c0939c311c554a4660b80725294663bab7915733..e2df93b2500a74c4cecac1515f399196 ); } } -@@ -719,6 +745,21 @@ public record SerializableChunkData( +@@ -675,6 +701,21 @@ public record SerializableChunkData( compoundTag.put("ChunkBukkitValues", this.persistentDataContainer); } // CraftBukkit end @@ -267,7 +268,7 @@ index c0939c311c554a4660b80725294663bab7915733..e2df93b2500a74c4cecac1515f399196 // Paper start - starlight if (this.lightCorrect && !this.chunkStatus.isBefore(net.minecraft.world.level.chunk.status.ChunkStatus.LIGHT)) { // clobber vanilla value to force vanilla to relight -@@ -947,4 +988,50 @@ public record SerializableChunkData( +@@ -882,4 +923,50 @@ public record SerializableChunkData( } // Paper end - starlight - convert from record } diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0146-Improve-BlockEntity-ticking-isRemoved-check.patch b/leaf-server/minecraft-patches/features/0227-Improve-BlockEntity-ticking-isRemoved-check.patch similarity index 91% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0146-Improve-BlockEntity-ticking-isRemoved-check.patch rename to leaf-server/minecraft-patches/features/0227-Improve-BlockEntity-ticking-isRemoved-check.patch index 14f6f0fc..e8fc8329 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0146-Improve-BlockEntity-ticking-isRemoved-check.patch +++ b/leaf-server/minecraft-patches/features/0227-Improve-BlockEntity-ticking-isRemoved-check.patch @@ -10,10 +10,10 @@ Leaf (After): ~628ms (-96%) This should help for massive hopper chains or hopper matrix. diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java -index 47528dec6b1a2b36e71013a9372425a70cbc6a33..546fb78339c005ed71142cb3c894f816b8c72d08 100644 +index 5325989f46bd288c5a6f1362ec17d3354d55abfd..5ca0aa1fdaae3ba03a464e2c5bc061adc076b649 100644 --- a/net/minecraft/world/level/chunk/LevelChunk.java +++ b/net/minecraft/world/level/chunk/LevelChunk.java -@@ -1012,15 +1012,29 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -1014,15 +1014,29 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p static class RebindableTickingBlockEntityWrapper implements TickingBlockEntity { private TickingBlockEntity ticker; private BlockPos cachedPos; // Leaf - Cache tile entity position @@ -43,7 +43,7 @@ index 47528dec6b1a2b36e71013a9372425a70cbc6a33..546fb78339c005ed71142cb3c894f816 } @Override -@@ -1030,6 +1044,11 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -1032,6 +1046,11 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p @Override public boolean isRemoved() { diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0147-Raytrace-AntiXray-SDK-integration.patch b/leaf-server/minecraft-patches/features/0228-Raytrace-AntiXray-SDK-integration.patch similarity index 78% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0147-Raytrace-AntiXray-SDK-integration.patch rename to leaf-server/minecraft-patches/features/0228-Raytrace-AntiXray-SDK-integration.patch index 4489f8b1..79911fcd 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0147-Raytrace-AntiXray-SDK-integration.patch +++ b/leaf-server/minecraft-patches/features/0228-Raytrace-AntiXray-SDK-integration.patch @@ -8,11 +8,11 @@ Integrated with Imanity Software's Raytrace AntiXray for better performance Original project: https://github.com/Imanity-Software/raytrace-antixray-spigot-sdk diff --git a/net/minecraft/server/level/ServerPlayerGameMode.java b/net/minecraft/server/level/ServerPlayerGameMode.java -index a660bad3dfdb442c6aca5eb939ee103e14d37b4b..7e4cfe12312e0e36a6a19210cd76858a6eaf8abd 100644 +index d1f74d10e5e3d65895d7e87dd77f298cd9689b33..8fdc5ab8bfba0e40cedfac64d6bc5e24d1cca969 100644 --- a/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/net/minecraft/server/level/ServerPlayerGameMode.java -@@ -299,6 +299,12 @@ public class ServerPlayerGameMode { - org.bukkit.craftbukkit.event.CraftEventFactory.callBlockDamageAbortEvent(this.player, pos, this.player.getInventory().getSelected()); // CraftBukkit +@@ -296,6 +296,12 @@ public class ServerPlayerGameMode { + org.bukkit.craftbukkit.event.CraftEventFactory.callBlockDamageAbortEvent(this.player, pos, this.player.getInventory().getSelectedItem()); // CraftBukkit } } + // Imanity start - AntiXraySDK integration @@ -25,13 +25,13 @@ index a660bad3dfdb442c6aca5eb939ee103e14d37b4b..7e4cfe12312e0e36a6a19210cd76858a } diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index e0d9d7075b2c10f686c8c144c9869fa574cd19d3..ac7729d1caa80155697bfe0e8646e4eda5d1780e 100644 +index e47e4d11e7dcd8cb4ab6ef965d8b16e6396d2856..20be5c4200bfee01d62fa1103a3663b91107d5d8 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java -@@ -1191,6 +1191,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl - // CraftBukkit end - - BlockState blockState = chunkAt.setBlockState(pos, state, (flags & 64) != 0, (flags & 1024) == 0); // CraftBukkit custom NO_PLACE flag +@@ -1174,6 +1174,12 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl + snapshot.setFlags(flags); // Paper - always set the flag of the most recent call to mitigate issues with multiple update at the same pos with different flags + } + BlockState blockState = chunkAt.setBlockState(pos, state, flags); + // Imanity start - AntiXraySDK integration + dev.imanity.antixray.sdk.AntiXrayAdapter adapter = dev.imanity.antixray.sdk.AntiXraySDK.getAdapter(); + if (adapter != null) { @@ -39,5 +39,5 @@ index e0d9d7075b2c10f686c8c144c9869fa574cd19d3..ac7729d1caa80155697bfe0e8646e4ed + } + // Imanity end - AntiXraySDK integration this.chunkPacketBlockController.onBlockChange(this, pos, state, blockState, flags, recursionLeft); // Paper - Anti-Xray - + // CraftBukkit end if (blockState == null) { diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0148-Optimize-addOrUpdateTransientModifier.patch b/leaf-server/minecraft-patches/features/0229-Optimize-addOrUpdateTransientModifier.patch similarity index 90% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0148-Optimize-addOrUpdateTransientModifier.patch rename to leaf-server/minecraft-patches/features/0229-Optimize-addOrUpdateTransientModifier.patch index 4757c107..3962fb6a 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0148-Optimize-addOrUpdateTransientModifier.patch +++ b/leaf-server/minecraft-patches/features/0229-Optimize-addOrUpdateTransientModifier.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimize addOrUpdateTransientModifier diff --git a/net/minecraft/world/entity/ai/attributes/AttributeInstance.java b/net/minecraft/world/entity/ai/attributes/AttributeInstance.java -index ceff383d565267edd13a6d9006030b8e1f8053e3..7dae9cc18cd6eede8f1b2196b55103428f35382e 100644 +index d99bbf299af2b2d3a61761c5c3c33c4d371d1b9b..643a2005567e883a2ca545d0f65bc59914ddee00 100644 --- a/net/minecraft/world/entity/ai/attributes/AttributeInstance.java +++ b/net/minecraft/world/entity/ai/attributes/AttributeInstance.java -@@ -88,8 +88,13 @@ public class AttributeInstance { +@@ -90,8 +90,13 @@ public class AttributeInstance { } public void addOrUpdateTransientModifier(AttributeModifier modifier) { diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0149-Optimize-ContextMap.create.patch b/leaf-server/minecraft-patches/features/0230-Optimize-ContextMap.create.patch similarity index 100% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0149-Optimize-ContextMap.create.patch rename to leaf-server/minecraft-patches/features/0230-Optimize-ContextMap.create.patch diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0150-Micro-optimizations-for-random-tick.patch b/leaf-server/minecraft-patches/features/0231-Micro-optimizations-for-random-tick.patch similarity index 95% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0150-Micro-optimizations-for-random-tick.patch rename to leaf-server/minecraft-patches/features/0231-Micro-optimizations-for-random-tick.patch index 3c67a41e..47581da3 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0150-Micro-optimizations-for-random-tick.patch +++ b/leaf-server/minecraft-patches/features/0231-Micro-optimizations-for-random-tick.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Micro optimizations for random tick diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index b5a61261083ddab70582c1a1d5cac0b9ced9b652..ab84d6a07c094b9fb23cd63504d7652342fd6974 100644 +index d8390cb3901a40b97e99990d9f71f12c74f96607..4d7cf866452db7388ab90f9be284e859b39d8e61 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -924,7 +924,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -903,7 +903,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe // Paper start - optimise random ticking private void optimiseRandomTick(final LevelChunk chunk, final int tickSpeed) { final LevelChunkSection[] sections = chunk.getSections(); @@ -17,7 +17,7 @@ index b5a61261083ddab70582c1a1d5cac0b9ced9b652..ab84d6a07c094b9fb23cd63504d76523 final net.minecraft.world.level.levelgen.BitRandomSource simpleRandom = this.simpleRandom; // Leaf - Faster random generator - upcasting final boolean doubleTickFluids = !ca.spottedleaf.moonrise.common.PlatformHooks.get().configFixMC224294(); -@@ -933,41 +933,41 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -912,41 +912,41 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe final int offsetZ = cpos.z << 4; for (int sectionIndex = 0, sectionsLen = sections.length; sectionIndex < sectionsLen; sectionIndex++) { diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0151-Remove-streams-on-updateConnectedPlayersWithinRange.patch b/leaf-server/minecraft-patches/features/0232-Remove-streams-on-updateConnectedPlayersWithinRange.patch similarity index 94% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0151-Remove-streams-on-updateConnectedPlayersWithinRange.patch rename to leaf-server/minecraft-patches/features/0232-Remove-streams-on-updateConnectedPlayersWithinRange.patch index 89895b3a..a60ec09b 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0151-Remove-streams-on-updateConnectedPlayersWithinRange.patch +++ b/leaf-server/minecraft-patches/features/0232-Remove-streams-on-updateConnectedPlayersWithinRange.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove streams on updateConnectedPlayersWithinRange diff --git a/net/minecraft/world/level/block/entity/vault/VaultSharedData.java b/net/minecraft/world/level/block/entity/vault/VaultSharedData.java -index 50d6ff126a35ce8613175b550dac50cd82c43f9d..ea76c2084a5591ec2373172a6f31b10d12f13849 100644 +index 036087f8085f05b43703ceca3413e0b8ac0a412b..514d8167ccbcc00de95d34e5ef2203dcaf824da1 100644 --- a/net/minecraft/world/level/block/entity/vault/VaultSharedData.java +++ b/net/minecraft/world/level/block/entity/vault/VaultSharedData.java @@ -65,11 +65,17 @@ public class VaultSharedData { diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0152-Remove-streams-on-PlayerDetector.patch b/leaf-server/minecraft-patches/features/0233-Remove-streams-on-PlayerDetector.patch similarity index 100% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0152-Remove-streams-on-PlayerDetector.patch rename to leaf-server/minecraft-patches/features/0233-Remove-streams-on-PlayerDetector.patch diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0153-Async-Block-Finding.patch b/leaf-server/minecraft-patches/features/0234-Async-Block-Finding.patch similarity index 100% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0153-Async-Block-Finding.patch rename to leaf-server/minecraft-patches/features/0234-Async-Block-Finding.patch diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0154-Use-direct-iteration-on-Sensing.tick.patch b/leaf-server/minecraft-patches/features/0235-Use-direct-iteration-on-Sensing.tick.patch similarity index 100% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0154-Use-direct-iteration-on-Sensing.tick.patch rename to leaf-server/minecraft-patches/features/0235-Use-direct-iteration-on-Sensing.tick.patch diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0155-Optimise-non-flush-packet-sending.patch b/leaf-server/minecraft-patches/features/0236-Optimise-non-flush-packet-sending.patch similarity index 100% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0155-Optimise-non-flush-packet-sending.patch rename to leaf-server/minecraft-patches/features/0236-Optimise-non-flush-packet-sending.patch diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0156-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch b/leaf-server/minecraft-patches/features/0237-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch similarity index 91% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0156-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch rename to leaf-server/minecraft-patches/features/0237-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch index 544682a3..1b883400 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0156-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch +++ b/leaf-server/minecraft-patches/features/0237-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch @@ -11,10 +11,10 @@ As part of: Airplane (https://github.com/TECHNOVE/Airplane) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 17ff57db6f90b3f4facef691ad4347e67a9f5836..075fcbcde23b5bb7b27ff622e8d188c3a2583973 100644 +index cb17aaad72940ac94317a50cbe85b22c00e02a10..3a8b9157fb8607980a9b859945f509ad8b9b6fdc 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -4614,10 +4614,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4562,10 +4562,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // Paper start - optimise collisions public boolean updateFluidHeightAndDoFluidPushing(final TagKey fluid, final double flowScale) { @@ -26,7 +26,7 @@ index 17ff57db6f90b3f4facef691ad4347e67a9f5836..075fcbcde23b5bb7b27ff622e8d188c3 final AABB boundingBox = this.getBoundingBox().deflate(1.0E-3); final Level world = this.level; -@@ -4653,7 +4650,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4601,7 +4598,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess for (int currChunkZ = minChunkZ; currChunkZ <= maxChunkZ; ++currChunkZ) { for (int currChunkX = minChunkX; currChunkX <= maxChunkX; ++currChunkX) { diff --git a/leaf-archived-patches/unapplied/server/paper-patches/features/0050-Paper-PR-Throttle-failed-spawn-attempts.patch b/leaf-server/paper-patches/features/0049-Paper-PR-Throttle-failed-spawn-attempts.patch similarity index 100% rename from leaf-archived-patches/unapplied/server/paper-patches/features/0050-Paper-PR-Throttle-failed-spawn-attempts.patch rename to leaf-server/paper-patches/features/0049-Paper-PR-Throttle-failed-spawn-attempts.patch diff --git a/leaf-archived-patches/unapplied/server/paper-patches/features/0051-Async-playerdata-saving.patch b/leaf-server/paper-patches/features/0050-Async-playerdata-saving.patch similarity index 100% rename from leaf-archived-patches/unapplied/server/paper-patches/features/0051-Async-playerdata-saving.patch rename to leaf-server/paper-patches/features/0050-Async-playerdata-saving.patch diff --git a/leaf-server/src/main/java/org/dreeam/leaf/version/LeafVersionFetcher.java b/leaf-server/src/main/java/org/dreeam/leaf/version/LeafVersionFetcher.java index 861a7626..45572f3c 100644 --- a/leaf-server/src/main/java/org/dreeam/leaf/version/LeafVersionFetcher.java +++ b/leaf-server/src/main/java/org/dreeam/leaf/version/LeafVersionFetcher.java @@ -6,7 +6,7 @@ public class LeafVersionFetcher extends AbstractPaperVersionFetcher { public LeafVersionFetcher() { super( - "ver/1.21.3", + "ver/1.21.5", "https://github.com/Winds-Studio/Leaf", "Winds-Studio", "Leaf",