From a1b39f41d65213ce12848091a07ffa842f90a372 Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Thu, 14 Aug 2025 22:37:10 +0800 Subject: [PATCH] Re-add `Sakura: Optimise check inside blocks and traverse blocks` --- ...check-inside-blocks-and-traverse-blo.patch | 78 ------------------- ...check-inside-blocks-and-traverse-blo.patch | 78 +++++++++++++++++++ ...yList-implementation-to-BasicEntity.patch} | 0 ...ol-Core.patch => 0234-Protocol-Core.patch} | 0 ... 0235-Async-switch-connection-state.patch} | 0 ...timize-BlockEntities-tickersInLevel.patch} | 0 ...e-cactus-can-even-survive-being-pla.patch} | 0 ...0238-Flush-location-while-knockback.patch} | 0 ...tch => 0239-Only-tick-items-at-hand.patch} | 0 ...art-sort-items-in-NearestItemSensor.patch} | 0 ...241-Optimise-player-movement-checks.patch} | 0 ...=> 0242-Remove-streams-in-MobSensor.patch} | 0 ...43-Remove-streams-in-TemptingSensor.patch} | 0 ...0244-Use-HashedList-on-WeightedList.patch} | 0 ...-death-item-drop-knockback-settings.patch} | 0 ...-Optimize-getScaledTrackingDistance.patch} | 0 ...ptimize-SynchedEntityData-packDirty.patch} | 0 ...patch => 0248-Optimize-isEyeInFluid.patch} | 0 ...atch => 0249-Cache-block-state-tags.patch} | 0 ...ch => 0250-optimize-getEntityStatus.patch} | 0 ...on-optimized-PoweredRailBlock-logic.patch} | 0 ...2-optimise-ChunkGenerator-getMobsAt.patch} | 0 ...tBiome.patch => 0253-cache-getBiome.patch} | 0 ...patch => 0254-optimize-mob-spawning.patch} | 0 ...atch => 0255-optimize-structure-map.patch} | 0 ...patch => 0256-throttle-mob-spawning.patch} | 0 ... => 0257-Add-BlockExplosionHitEvent.patch} | 0 ...last-Protection-explosion-knockback.patch} | 0 ...> 0259-Use-UUID-for-cure-reputation.patch} | 0 ...ing-parsing-unknown-command-message.patch} | 0 ....patch => 0261-optimize-random-tick.patch} | 0 ...nvalid-flatten-text-component-parse.patch} | 0 ...-Fast-BiomeManager-seed-obfuscation.patch} | 0 ...ectorOptions-map-with-optimized-col.patch} | 0 ...tch => 0265-optimize-no-action-time.patch} | 0 ...int.patch => 0266-optimize-waypoint.patch} | 0 ...tion.patch => 0267-Paw-optimization.patch} | 0 ...ig-fixClimbingBypassingCrammingRule.patch} | 0 ...69-Skip-inactive-entity-for-execute.patch} | 0 ....patch => 0270-Optimise-getEntities.patch} | 0 ...-298464.patch => 0271-fix-MC-298464.patch} | 0 ...stHomeAsWalkTarget-s-poi-finding-to.patch} | 0 ...73-optimize-checkInsideBlocks-calls.patch} | 0 ...{0273-Op-lock.patch => 0274-Op-lock.patch} | 0 ...st.patch => 0275-Custom-NonNullList.patch} | 0 ...or.patch => 0276-Optimise-TextColor.patch} | 0 ...ate-fire-if-explosion-was-cancelled.patch} | 0 ...p-BlockPhysicsEvent-if-no-listeners.patch} | 0 ... => 0279-Lithium-equipment-tracking.patch} | 0 ...280-fix-purpur-attribute-base-patch.patch} | 2 +- .../util/{map => list}/BlockPosIterator.java | 2 +- 51 files changed, 80 insertions(+), 80 deletions(-) delete mode 100644 leaf-archived-patches/work/server/minecraft-patches/features/0244-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch create mode 100644 leaf-server/minecraft-patches/features/0232-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch rename leaf-server/minecraft-patches/features/{0232-Sakura-copy-EntityList-implementation-to-BasicEntity.patch => 0233-Sakura-copy-EntityList-implementation-to-BasicEntity.patch} (100%) rename leaf-server/minecraft-patches/features/{0233-Protocol-Core.patch => 0234-Protocol-Core.patch} (100%) rename leaf-server/minecraft-patches/features/{0234-Async-switch-connection-state.patch => 0235-Async-switch-connection-state.patch} (100%) rename leaf-server/minecraft-patches/features/{0235-Optimize-BlockEntities-tickersInLevel.patch => 0236-Optimize-BlockEntities-tickersInLevel.patch} (100%) rename leaf-server/minecraft-patches/features/{0236-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch => 0237-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch} (100%) rename leaf-server/minecraft-patches/features/{0237-Flush-location-while-knockback.patch => 0238-Flush-location-while-knockback.patch} (100%) rename leaf-server/minecraft-patches/features/{0238-Only-tick-items-at-hand.patch => 0239-Only-tick-items-at-hand.patch} (100%) rename leaf-server/minecraft-patches/features/{0239-Smart-sort-items-in-NearestItemSensor.patch => 0240-Smart-sort-items-in-NearestItemSensor.patch} (100%) rename leaf-server/minecraft-patches/features/{0240-Optimise-player-movement-checks.patch => 0241-Optimise-player-movement-checks.patch} (100%) rename leaf-server/minecraft-patches/features/{0241-Remove-streams-in-MobSensor.patch => 0242-Remove-streams-in-MobSensor.patch} (100%) rename leaf-server/minecraft-patches/features/{0242-Remove-streams-in-TemptingSensor.patch => 0243-Remove-streams-in-TemptingSensor.patch} (100%) rename leaf-server/minecraft-patches/features/{0243-Use-HashedList-on-WeightedList.patch => 0244-Use-HashedList-on-WeightedList.patch} (100%) rename leaf-server/minecraft-patches/features/{0244-Add-configurable-death-item-drop-knockback-settings.patch => 0245-Add-configurable-death-item-drop-knockback-settings.patch} (100%) rename leaf-server/minecraft-patches/features/{0245-Optimize-getScaledTrackingDistance.patch => 0246-Optimize-getScaledTrackingDistance.patch} (100%) rename leaf-server/minecraft-patches/features/{0246-Optimize-SynchedEntityData-packDirty.patch => 0247-Optimize-SynchedEntityData-packDirty.patch} (100%) rename leaf-server/minecraft-patches/features/{0247-Optimize-isEyeInFluid.patch => 0248-Optimize-isEyeInFluid.patch} (100%) rename leaf-server/minecraft-patches/features/{0248-Cache-block-state-tags.patch => 0249-Cache-block-state-tags.patch} (100%) rename leaf-server/minecraft-patches/features/{0249-optimize-getEntityStatus.patch => 0250-optimize-getEntityStatus.patch} (100%) rename leaf-server/minecraft-patches/features/{0250-Rail-Optimization-optimized-PoweredRailBlock-logic.patch => 0251-Rail-Optimization-optimized-PoweredRailBlock-logic.patch} (100%) rename leaf-server/minecraft-patches/features/{0251-optimise-ChunkGenerator-getMobsAt.patch => 0252-optimise-ChunkGenerator-getMobsAt.patch} (100%) rename leaf-server/minecraft-patches/features/{0252-cache-getBiome.patch => 0253-cache-getBiome.patch} (100%) rename leaf-server/minecraft-patches/features/{0253-optimize-mob-spawning.patch => 0254-optimize-mob-spawning.patch} (100%) rename leaf-server/minecraft-patches/features/{0254-optimize-structure-map.patch => 0255-optimize-structure-map.patch} (100%) rename leaf-server/minecraft-patches/features/{0255-throttle-mob-spawning.patch => 0256-throttle-mob-spawning.patch} (100%) rename leaf-server/minecraft-patches/features/{0256-Add-BlockExplosionHitEvent.patch => 0257-Add-BlockExplosionHitEvent.patch} (100%) rename leaf-server/minecraft-patches/features/{0257-Old-Blast-Protection-explosion-knockback.patch => 0258-Old-Blast-Protection-explosion-knockback.patch} (100%) rename leaf-server/minecraft-patches/features/{0258-Use-UUID-for-cure-reputation.patch => 0259-Use-UUID-for-cure-reputation.patch} (100%) rename leaf-server/minecraft-patches/features/{0259-Fix-crash-during-parsing-unknown-command-message.patch => 0260-Fix-crash-during-parsing-unknown-command-message.patch} (100%) rename leaf-server/minecraft-patches/features/{0260-optimize-random-tick.patch => 0261-optimize-random-tick.patch} (100%) rename leaf-server/minecraft-patches/features/{0261-do-not-log-invalid-flatten-text-component-parse.patch => 0262-do-not-log-invalid-flatten-text-component-parse.patch} (100%) rename leaf-server/minecraft-patches/features/{0262-Fast-BiomeManager-seed-obfuscation.patch => 0263-Fast-BiomeManager-seed-obfuscation.patch} (100%) rename leaf-server/minecraft-patches/features/{0263-Replace-EntitySelectorOptions-map-with-optimized-col.patch => 0264-Replace-EntitySelectorOptions-map-with-optimized-col.patch} (100%) rename leaf-server/minecraft-patches/features/{0264-optimize-no-action-time.patch => 0265-optimize-no-action-time.patch} (100%) rename leaf-server/minecraft-patches/features/{0265-optimize-waypoint.patch => 0266-optimize-waypoint.patch} (100%) rename leaf-server/minecraft-patches/features/{0266-Paw-optimization.patch => 0267-Paw-optimization.patch} (100%) rename leaf-server/minecraft-patches/features/{0267-Fix-Paper-config-fixClimbingBypassingCrammingRule.patch => 0268-Fix-Paper-config-fixClimbingBypassingCrammingRule.patch} (100%) rename leaf-server/minecraft-patches/features/{0268-Skip-inactive-entity-for-execute.patch => 0269-Skip-inactive-entity-for-execute.patch} (100%) rename leaf-server/minecraft-patches/features/{0269-Optimise-getEntities.patch => 0270-Optimise-getEntities.patch} (100%) rename leaf-server/minecraft-patches/features/{0270-fix-MC-298464.patch => 0271-fix-MC-298464.patch} (100%) rename leaf-server/minecraft-patches/features/{0271-Re-route-SetClosestHomeAsWalkTarget-s-poi-finding-to.patch => 0272-Re-route-SetClosestHomeAsWalkTarget-s-poi-finding-to.patch} (100%) rename leaf-server/minecraft-patches/features/{0272-optimize-checkInsideBlocks-calls.patch => 0273-optimize-checkInsideBlocks-calls.patch} (100%) rename leaf-server/minecraft-patches/features/{0273-Op-lock.patch => 0274-Op-lock.patch} (100%) rename leaf-server/minecraft-patches/features/{0274-Custom-NonNullList.patch => 0275-Custom-NonNullList.patch} (100%) rename leaf-server/minecraft-patches/features/{0275-Optimise-TextColor.patch => 0276-Optimise-TextColor.patch} (100%) rename leaf-server/minecraft-patches/features/{0276-Do-not-create-fire-if-explosion-was-cancelled.patch => 0277-Do-not-create-fire-if-explosion-was-cancelled.patch} (100%) rename leaf-server/minecraft-patches/features/{0277-Skip-BlockPhysicsEvent-if-no-listeners.patch => 0278-Skip-BlockPhysicsEvent-if-no-listeners.patch} (100%) rename leaf-server/minecraft-patches/features/{0278-Lithium-equipment-tracking.patch => 0279-Lithium-equipment-tracking.patch} (100%) rename leaf-server/minecraft-patches/features/{0279-fix-purpur-attribute-base-patch.patch => 0280-fix-purpur-attribute-base-patch.patch} (99%) rename leaf-server/src/main/java/org/dreeam/leaf/util/{map => list}/BlockPosIterator.java (98%) diff --git a/leaf-archived-patches/work/server/minecraft-patches/features/0244-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch b/leaf-archived-patches/work/server/minecraft-patches/features/0244-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch deleted file mode 100644 index 28f98bad..00000000 --- a/leaf-archived-patches/work/server/minecraft-patches/features/0244-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Samsuik -Date: Fri, 8 Nov 2024 19:35:49 +0000 -Subject: [PATCH] Sakura: Optimise check inside blocks and traverse blocks - -Dreeam TODO: refactor checkinsideblcoks - -diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index e0db9281f023a09d69479f28a7c8f681641f642f..cc6b6b442d72b4a974cedd8ceef710304e52ab18 100644 ---- a/net/minecraft/world/entity/Entity.java -+++ b/net/minecraft/world/entity/Entity.java -@@ -1701,6 +1701,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - private void checkInsideBlocks(List movements, InsideBlockEffectApplier.StepBasedCollector stepBasedCollector) { - if (this.isAffectedByBlocks()) { - LongSet set = this.visitedBlocks; -+ final net.minecraft.world.level.chunk.ChunkAccess[] chunkCache = new net.minecraft.world.level.chunk.ChunkAccess[4]; // Sakura - optimise check inside blocks - - for (Entity.Movement movement : movements) { - Vec3 vec3 = movement.from(); -@@ -1712,7 +1713,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - aabb, - (pos, step) -> { - if (this.isAlive()) { -- BlockState blockState = this.level().getBlockState(pos); -+ // Sakura start - optimise check inside blocks -+ final int chunkX = pos.getX() >> 4; -+ final int chunkZ = pos.getZ() >> 4; -+ final int chunkKey = ((chunkX << 2) | chunkZ) & 3; -+ net.minecraft.world.level.chunk.ChunkAccess chunk = chunkCache[chunkKey]; -+ if (chunk == null || chunk.locX != chunkX || chunk.locZ != chunkZ) { -+ chunk = this.level().getChunkIfLoadedImmediately(chunkX, chunkZ); -+ if (chunk == null) { -+ return; -+ } -+ chunkCache[chunkKey] = chunk; -+ } -+ final BlockState blockState = chunk.getBlockState(pos); -+ // Sakura end - optimise check inside blocks - if (!blockState.isAir()) { - if (set.add(pos.asLong())) { - VoxelShape entityInsideCollisionShape = blockState.getEntityInsideCollisionShape(this.level(), pos, this); -diff --git a/net/minecraft/world/level/BlockGetter.java b/net/minecraft/world/level/BlockGetter.java -index dd7e32b8b176c0f4c13e50aeed33c2c9ccba4b53..ee514d457b5c2df912daeebb5fb8b824b5496b0e 100644 ---- a/net/minecraft/world/level/BlockGetter.java -+++ b/net/minecraft/world/level/BlockGetter.java -@@ -215,18 +215,30 @@ public interface BlockGetter extends LevelHeightAccessor { - static void forEachBlockIntersectedBetween(Vec3 from, Vec3 to, AABB boundingBox, BlockGetter.BlockStepVisitor stepVisitor) { - Vec3 vec3 = to.subtract(from); - if (!(vec3.lengthSqr() < Mth.square(0.99999F))) { -+ // Sakura start - optimise check inside blocks -+ final boolean xZero = vec3.x() == 0.0; -+ final boolean yZero = vec3.y() == 0.0; -+ final boolean zZero = vec3.z() == 0.0; -+ if (xZero && yZero || yZero && zZero || xZero && zZero) { -+ int blockIndex = 0; -+ for (BlockPos blockPos : org.dreeam.leaf.util.map.BlockPosIterator.traverseArea(vec3, boundingBox)) { -+ stepVisitor.visit(blockPos, blockIndex++); -+ } -+ return; -+ } -+ // Sakura end - optimise check inside blocks - LongSet set = new LongOpenHashSet(); - Vec3 minPosition = boundingBox.getMinPosition(); - Vec3 vec31 = minPosition.subtract(vec3); - int i = addCollisionsAlongTravel(set, vec31, minPosition, boundingBox, stepVisitor); - -- for (BlockPos blockPos1 : BlockPos.betweenClosed(boundingBox)) { -+ for (BlockPos blockPos1 : org.dreeam.leaf.util.map.BlockPosIterator.iterable(boundingBox)) { // Sakura - optimise check inside blocks - if (!set.contains(blockPos1.asLong())) { - stepVisitor.visit(blockPos1, i + 1); - } - } - } else { -- for (BlockPos blockPos : BlockPos.betweenClosed(boundingBox)) { -+ for (BlockPos blockPos : org.dreeam.leaf.util.map.BlockPosIterator.iterable(boundingBox)) { // Sakura - optimise check inside blocks - stepVisitor.visit(blockPos, 0); - } - } diff --git a/leaf-server/minecraft-patches/features/0232-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch b/leaf-server/minecraft-patches/features/0232-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch new file mode 100644 index 00000000..d4b3147f --- /dev/null +++ b/leaf-server/minecraft-patches/features/0232-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch @@ -0,0 +1,78 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samsuik +Date: Fri, 8 Nov 2024 19:35:49 +0000 +Subject: [PATCH] Sakura: Optimise check inside blocks and traverse blocks + +Chunk cache is already removed from this patch, since we already have it in Leaf + +The JMH benchmark of this patch can be found in SunBox's `BetterBlocksTraverse` + +diff --git a/net/minecraft/world/entity/monster/Ghast.java b/net/minecraft/world/entity/monster/Ghast.java +index 6f312f0b8ab60c839129ea671f2d9c128fa58e58..6ec83870c67810c7d0239ff7075549a93dc232eb 100644 +--- a/net/minecraft/world/entity/monster/Ghast.java ++++ b/net/minecraft/world/entity/monster/Ghast.java +@@ -331,7 +331,7 @@ public class Ghast extends Mob implements Enemy { + AABB boundingBox = this.ghast.getBoundingBox(); + AABB aabb = boundingBox.move(delta); + if (this.careful) { +- for (BlockPos blockPos : BlockPos.betweenClosed(aabb.inflate(1.0))) { ++ for (BlockPos blockPos : org.dreeam.leaf.util.list.BlockPosIterator.iterable(aabb.inflate(1.0))) { // Leaf - Sakura - optimise check inside blocks + if (!this.blockTraversalPossible(this.ghast.level(), null, null, blockPos, false, false)) { + return false; + } +diff --git a/net/minecraft/world/entity/projectile/ThrowableProjectile.java b/net/minecraft/world/entity/projectile/ThrowableProjectile.java +index 5104636be1de4bf1dc491673cad55854a106da53..4c61f4552dc64b1347c7b8dfe9502aac11c75888 100644 +--- a/net/minecraft/world/entity/projectile/ThrowableProjectile.java ++++ b/net/minecraft/world/entity/projectile/ThrowableProjectile.java +@@ -93,7 +93,7 @@ public abstract class ThrowableProjectile extends Projectile { + + private void handleFirstTickBubbleColumn() { + if (this.firstTick) { +- for (BlockPos blockPos : BlockPos.betweenClosed(this.getBoundingBox())) { ++ for (BlockPos blockPos : org.dreeam.leaf.util.list.BlockPosIterator.iterable(this.getBoundingBox())) { // Leaf - Sakura - optimise check inside blocks + BlockState blockState = this.level().getBlockState(blockPos); + if (blockState.is(Blocks.BUBBLE_COLUMN)) { + blockState.entityInside(this.level(), blockPos, this, InsideBlockEffectApplier.NOOP); +diff --git a/net/minecraft/world/level/BlockGetter.java b/net/minecraft/world/level/BlockGetter.java +index 2146efa860d8323a88f3ad365c0cdb66de42154a..eeddffbe6a47dc1a42c07f286bfec0cbde33fc17 100644 +--- a/net/minecraft/world/level/BlockGetter.java ++++ b/net/minecraft/world/level/BlockGetter.java +@@ -215,7 +215,7 @@ public interface BlockGetter extends LevelHeightAccessor { + static boolean forEachBlockIntersectedBetween(Vec3 from, Vec3 to, AABB boundingBox, BlockGetter.BlockStepVisitor visitor) { + Vec3 vec3 = to.subtract(from); + if (vec3.lengthSqr() < Mth.square(0.99999F)) { +- for (BlockPos blockPos : BlockPos.betweenClosed(boundingBox)) { ++ for (BlockPos blockPos : org.dreeam.leaf.util.list.BlockPosIterator.iterable(boundingBox)) { // Leaf - Sakura - optimise check inside blocks + if (!visitor.visit(blockPos, 0)) { + return false; + } +@@ -223,6 +223,20 @@ public interface BlockGetter extends LevelHeightAccessor { + + return true; + } else { ++ // Leaf start - Sakura - optimise check inside blocks ++ final boolean xZero = vec3.x() == 0.0; ++ final boolean yZero = vec3.y() == 0.0; ++ final boolean zZero = vec3.z() == 0.0; ++ if (xZero && yZero || yZero && zZero || xZero && zZero) { ++ int blockIndex = 0; ++ for (final BlockPos blockPos : org.dreeam.leaf.util.list.BlockPosIterator.traverseArea(vec3, boundingBox)) { ++ if (!visitor.visit(blockPos, blockIndex++)) { ++ return false; ++ } ++ } ++ return true; ++ } ++ // Leaf end - Sakura - optimise check inside blocks + LongSet set = new LongOpenHashSet(); + Vec3 minPosition = boundingBox.getMinPosition(); + Vec3 vec31 = minPosition.subtract(vec3); +@@ -230,7 +244,7 @@ public interface BlockGetter extends LevelHeightAccessor { + if (i < 0) { + return false; + } else { +- for (BlockPos blockPos1 : BlockPos.betweenClosed(boundingBox)) { ++ for (BlockPos blockPos1 : org.dreeam.leaf.util.list.BlockPosIterator.iterable(boundingBox)) { // Leaf - Sakura - optimise check inside blocks + if (!set.contains(blockPos1.asLong()) && !visitor.visit(blockPos1, i + 1)) { + return false; + } diff --git a/leaf-server/minecraft-patches/features/0232-Sakura-copy-EntityList-implementation-to-BasicEntity.patch b/leaf-server/minecraft-patches/features/0233-Sakura-copy-EntityList-implementation-to-BasicEntity.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0232-Sakura-copy-EntityList-implementation-to-BasicEntity.patch rename to leaf-server/minecraft-patches/features/0233-Sakura-copy-EntityList-implementation-to-BasicEntity.patch diff --git a/leaf-server/minecraft-patches/features/0233-Protocol-Core.patch b/leaf-server/minecraft-patches/features/0234-Protocol-Core.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0233-Protocol-Core.patch rename to leaf-server/minecraft-patches/features/0234-Protocol-Core.patch diff --git a/leaf-server/minecraft-patches/features/0234-Async-switch-connection-state.patch b/leaf-server/minecraft-patches/features/0235-Async-switch-connection-state.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0234-Async-switch-connection-state.patch rename to leaf-server/minecraft-patches/features/0235-Async-switch-connection-state.patch diff --git a/leaf-server/minecraft-patches/features/0235-Optimize-BlockEntities-tickersInLevel.patch b/leaf-server/minecraft-patches/features/0236-Optimize-BlockEntities-tickersInLevel.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0235-Optimize-BlockEntities-tickersInLevel.patch rename to leaf-server/minecraft-patches/features/0236-Optimize-BlockEntities-tickersInLevel.patch diff --git a/leaf-server/minecraft-patches/features/0236-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch b/leaf-server/minecraft-patches/features/0237-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0236-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch rename to leaf-server/minecraft-patches/features/0237-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch diff --git a/leaf-server/minecraft-patches/features/0237-Flush-location-while-knockback.patch b/leaf-server/minecraft-patches/features/0238-Flush-location-while-knockback.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0237-Flush-location-while-knockback.patch rename to leaf-server/minecraft-patches/features/0238-Flush-location-while-knockback.patch diff --git a/leaf-server/minecraft-patches/features/0238-Only-tick-items-at-hand.patch b/leaf-server/minecraft-patches/features/0239-Only-tick-items-at-hand.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0238-Only-tick-items-at-hand.patch rename to leaf-server/minecraft-patches/features/0239-Only-tick-items-at-hand.patch diff --git a/leaf-server/minecraft-patches/features/0239-Smart-sort-items-in-NearestItemSensor.patch b/leaf-server/minecraft-patches/features/0240-Smart-sort-items-in-NearestItemSensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0239-Smart-sort-items-in-NearestItemSensor.patch rename to leaf-server/minecraft-patches/features/0240-Smart-sort-items-in-NearestItemSensor.patch diff --git a/leaf-server/minecraft-patches/features/0240-Optimise-player-movement-checks.patch b/leaf-server/minecraft-patches/features/0241-Optimise-player-movement-checks.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0240-Optimise-player-movement-checks.patch rename to leaf-server/minecraft-patches/features/0241-Optimise-player-movement-checks.patch diff --git a/leaf-server/minecraft-patches/features/0241-Remove-streams-in-MobSensor.patch b/leaf-server/minecraft-patches/features/0242-Remove-streams-in-MobSensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0241-Remove-streams-in-MobSensor.patch rename to leaf-server/minecraft-patches/features/0242-Remove-streams-in-MobSensor.patch diff --git a/leaf-server/minecraft-patches/features/0242-Remove-streams-in-TemptingSensor.patch b/leaf-server/minecraft-patches/features/0243-Remove-streams-in-TemptingSensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0242-Remove-streams-in-TemptingSensor.patch rename to leaf-server/minecraft-patches/features/0243-Remove-streams-in-TemptingSensor.patch diff --git a/leaf-server/minecraft-patches/features/0243-Use-HashedList-on-WeightedList.patch b/leaf-server/minecraft-patches/features/0244-Use-HashedList-on-WeightedList.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0243-Use-HashedList-on-WeightedList.patch rename to leaf-server/minecraft-patches/features/0244-Use-HashedList-on-WeightedList.patch diff --git a/leaf-server/minecraft-patches/features/0244-Add-configurable-death-item-drop-knockback-settings.patch b/leaf-server/minecraft-patches/features/0245-Add-configurable-death-item-drop-knockback-settings.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0244-Add-configurable-death-item-drop-knockback-settings.patch rename to leaf-server/minecraft-patches/features/0245-Add-configurable-death-item-drop-knockback-settings.patch diff --git a/leaf-server/minecraft-patches/features/0245-Optimize-getScaledTrackingDistance.patch b/leaf-server/minecraft-patches/features/0246-Optimize-getScaledTrackingDistance.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0245-Optimize-getScaledTrackingDistance.patch rename to leaf-server/minecraft-patches/features/0246-Optimize-getScaledTrackingDistance.patch diff --git a/leaf-server/minecraft-patches/features/0246-Optimize-SynchedEntityData-packDirty.patch b/leaf-server/minecraft-patches/features/0247-Optimize-SynchedEntityData-packDirty.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0246-Optimize-SynchedEntityData-packDirty.patch rename to leaf-server/minecraft-patches/features/0247-Optimize-SynchedEntityData-packDirty.patch diff --git a/leaf-server/minecraft-patches/features/0247-Optimize-isEyeInFluid.patch b/leaf-server/minecraft-patches/features/0248-Optimize-isEyeInFluid.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0247-Optimize-isEyeInFluid.patch rename to leaf-server/minecraft-patches/features/0248-Optimize-isEyeInFluid.patch diff --git a/leaf-server/minecraft-patches/features/0248-Cache-block-state-tags.patch b/leaf-server/minecraft-patches/features/0249-Cache-block-state-tags.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0248-Cache-block-state-tags.patch rename to leaf-server/minecraft-patches/features/0249-Cache-block-state-tags.patch diff --git a/leaf-server/minecraft-patches/features/0249-optimize-getEntityStatus.patch b/leaf-server/minecraft-patches/features/0250-optimize-getEntityStatus.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0249-optimize-getEntityStatus.patch rename to leaf-server/minecraft-patches/features/0250-optimize-getEntityStatus.patch diff --git a/leaf-server/minecraft-patches/features/0250-Rail-Optimization-optimized-PoweredRailBlock-logic.patch b/leaf-server/minecraft-patches/features/0251-Rail-Optimization-optimized-PoweredRailBlock-logic.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0250-Rail-Optimization-optimized-PoweredRailBlock-logic.patch rename to leaf-server/minecraft-patches/features/0251-Rail-Optimization-optimized-PoweredRailBlock-logic.patch diff --git a/leaf-server/minecraft-patches/features/0251-optimise-ChunkGenerator-getMobsAt.patch b/leaf-server/minecraft-patches/features/0252-optimise-ChunkGenerator-getMobsAt.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0251-optimise-ChunkGenerator-getMobsAt.patch rename to leaf-server/minecraft-patches/features/0252-optimise-ChunkGenerator-getMobsAt.patch diff --git a/leaf-server/minecraft-patches/features/0252-cache-getBiome.patch b/leaf-server/minecraft-patches/features/0253-cache-getBiome.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0252-cache-getBiome.patch rename to leaf-server/minecraft-patches/features/0253-cache-getBiome.patch diff --git a/leaf-server/minecraft-patches/features/0253-optimize-mob-spawning.patch b/leaf-server/minecraft-patches/features/0254-optimize-mob-spawning.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0253-optimize-mob-spawning.patch rename to leaf-server/minecraft-patches/features/0254-optimize-mob-spawning.patch diff --git a/leaf-server/minecraft-patches/features/0254-optimize-structure-map.patch b/leaf-server/minecraft-patches/features/0255-optimize-structure-map.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0254-optimize-structure-map.patch rename to leaf-server/minecraft-patches/features/0255-optimize-structure-map.patch diff --git a/leaf-server/minecraft-patches/features/0255-throttle-mob-spawning.patch b/leaf-server/minecraft-patches/features/0256-throttle-mob-spawning.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0255-throttle-mob-spawning.patch rename to leaf-server/minecraft-patches/features/0256-throttle-mob-spawning.patch diff --git a/leaf-server/minecraft-patches/features/0256-Add-BlockExplosionHitEvent.patch b/leaf-server/minecraft-patches/features/0257-Add-BlockExplosionHitEvent.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0256-Add-BlockExplosionHitEvent.patch rename to leaf-server/minecraft-patches/features/0257-Add-BlockExplosionHitEvent.patch diff --git a/leaf-server/minecraft-patches/features/0257-Old-Blast-Protection-explosion-knockback.patch b/leaf-server/minecraft-patches/features/0258-Old-Blast-Protection-explosion-knockback.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0257-Old-Blast-Protection-explosion-knockback.patch rename to leaf-server/minecraft-patches/features/0258-Old-Blast-Protection-explosion-knockback.patch diff --git a/leaf-server/minecraft-patches/features/0258-Use-UUID-for-cure-reputation.patch b/leaf-server/minecraft-patches/features/0259-Use-UUID-for-cure-reputation.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0258-Use-UUID-for-cure-reputation.patch rename to leaf-server/minecraft-patches/features/0259-Use-UUID-for-cure-reputation.patch diff --git a/leaf-server/minecraft-patches/features/0259-Fix-crash-during-parsing-unknown-command-message.patch b/leaf-server/minecraft-patches/features/0260-Fix-crash-during-parsing-unknown-command-message.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0259-Fix-crash-during-parsing-unknown-command-message.patch rename to leaf-server/minecraft-patches/features/0260-Fix-crash-during-parsing-unknown-command-message.patch diff --git a/leaf-server/minecraft-patches/features/0260-optimize-random-tick.patch b/leaf-server/minecraft-patches/features/0261-optimize-random-tick.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0260-optimize-random-tick.patch rename to leaf-server/minecraft-patches/features/0261-optimize-random-tick.patch diff --git a/leaf-server/minecraft-patches/features/0261-do-not-log-invalid-flatten-text-component-parse.patch b/leaf-server/minecraft-patches/features/0262-do-not-log-invalid-flatten-text-component-parse.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0261-do-not-log-invalid-flatten-text-component-parse.patch rename to leaf-server/minecraft-patches/features/0262-do-not-log-invalid-flatten-text-component-parse.patch diff --git a/leaf-server/minecraft-patches/features/0262-Fast-BiomeManager-seed-obfuscation.patch b/leaf-server/minecraft-patches/features/0263-Fast-BiomeManager-seed-obfuscation.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0262-Fast-BiomeManager-seed-obfuscation.patch rename to leaf-server/minecraft-patches/features/0263-Fast-BiomeManager-seed-obfuscation.patch diff --git a/leaf-server/minecraft-patches/features/0263-Replace-EntitySelectorOptions-map-with-optimized-col.patch b/leaf-server/minecraft-patches/features/0264-Replace-EntitySelectorOptions-map-with-optimized-col.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0263-Replace-EntitySelectorOptions-map-with-optimized-col.patch rename to leaf-server/minecraft-patches/features/0264-Replace-EntitySelectorOptions-map-with-optimized-col.patch diff --git a/leaf-server/minecraft-patches/features/0264-optimize-no-action-time.patch b/leaf-server/minecraft-patches/features/0265-optimize-no-action-time.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0264-optimize-no-action-time.patch rename to leaf-server/minecraft-patches/features/0265-optimize-no-action-time.patch diff --git a/leaf-server/minecraft-patches/features/0265-optimize-waypoint.patch b/leaf-server/minecraft-patches/features/0266-optimize-waypoint.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0265-optimize-waypoint.patch rename to leaf-server/minecraft-patches/features/0266-optimize-waypoint.patch diff --git a/leaf-server/minecraft-patches/features/0266-Paw-optimization.patch b/leaf-server/minecraft-patches/features/0267-Paw-optimization.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0266-Paw-optimization.patch rename to leaf-server/minecraft-patches/features/0267-Paw-optimization.patch diff --git a/leaf-server/minecraft-patches/features/0267-Fix-Paper-config-fixClimbingBypassingCrammingRule.patch b/leaf-server/minecraft-patches/features/0268-Fix-Paper-config-fixClimbingBypassingCrammingRule.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0267-Fix-Paper-config-fixClimbingBypassingCrammingRule.patch rename to leaf-server/minecraft-patches/features/0268-Fix-Paper-config-fixClimbingBypassingCrammingRule.patch diff --git a/leaf-server/minecraft-patches/features/0268-Skip-inactive-entity-for-execute.patch b/leaf-server/minecraft-patches/features/0269-Skip-inactive-entity-for-execute.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0268-Skip-inactive-entity-for-execute.patch rename to leaf-server/minecraft-patches/features/0269-Skip-inactive-entity-for-execute.patch diff --git a/leaf-server/minecraft-patches/features/0269-Optimise-getEntities.patch b/leaf-server/minecraft-patches/features/0270-Optimise-getEntities.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0269-Optimise-getEntities.patch rename to leaf-server/minecraft-patches/features/0270-Optimise-getEntities.patch diff --git a/leaf-server/minecraft-patches/features/0270-fix-MC-298464.patch b/leaf-server/minecraft-patches/features/0271-fix-MC-298464.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0270-fix-MC-298464.patch rename to leaf-server/minecraft-patches/features/0271-fix-MC-298464.patch diff --git a/leaf-server/minecraft-patches/features/0271-Re-route-SetClosestHomeAsWalkTarget-s-poi-finding-to.patch b/leaf-server/minecraft-patches/features/0272-Re-route-SetClosestHomeAsWalkTarget-s-poi-finding-to.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0271-Re-route-SetClosestHomeAsWalkTarget-s-poi-finding-to.patch rename to leaf-server/minecraft-patches/features/0272-Re-route-SetClosestHomeAsWalkTarget-s-poi-finding-to.patch diff --git a/leaf-server/minecraft-patches/features/0272-optimize-checkInsideBlocks-calls.patch b/leaf-server/minecraft-patches/features/0273-optimize-checkInsideBlocks-calls.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0272-optimize-checkInsideBlocks-calls.patch rename to leaf-server/minecraft-patches/features/0273-optimize-checkInsideBlocks-calls.patch diff --git a/leaf-server/minecraft-patches/features/0273-Op-lock.patch b/leaf-server/minecraft-patches/features/0274-Op-lock.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0273-Op-lock.patch rename to leaf-server/minecraft-patches/features/0274-Op-lock.patch diff --git a/leaf-server/minecraft-patches/features/0274-Custom-NonNullList.patch b/leaf-server/minecraft-patches/features/0275-Custom-NonNullList.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0274-Custom-NonNullList.patch rename to leaf-server/minecraft-patches/features/0275-Custom-NonNullList.patch diff --git a/leaf-server/minecraft-patches/features/0275-Optimise-TextColor.patch b/leaf-server/minecraft-patches/features/0276-Optimise-TextColor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0275-Optimise-TextColor.patch rename to leaf-server/minecraft-patches/features/0276-Optimise-TextColor.patch diff --git a/leaf-server/minecraft-patches/features/0276-Do-not-create-fire-if-explosion-was-cancelled.patch b/leaf-server/minecraft-patches/features/0277-Do-not-create-fire-if-explosion-was-cancelled.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0276-Do-not-create-fire-if-explosion-was-cancelled.patch rename to leaf-server/minecraft-patches/features/0277-Do-not-create-fire-if-explosion-was-cancelled.patch diff --git a/leaf-server/minecraft-patches/features/0277-Skip-BlockPhysicsEvent-if-no-listeners.patch b/leaf-server/minecraft-patches/features/0278-Skip-BlockPhysicsEvent-if-no-listeners.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0277-Skip-BlockPhysicsEvent-if-no-listeners.patch rename to leaf-server/minecraft-patches/features/0278-Skip-BlockPhysicsEvent-if-no-listeners.patch diff --git a/leaf-server/minecraft-patches/features/0278-Lithium-equipment-tracking.patch b/leaf-server/minecraft-patches/features/0279-Lithium-equipment-tracking.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0278-Lithium-equipment-tracking.patch rename to leaf-server/minecraft-patches/features/0279-Lithium-equipment-tracking.patch diff --git a/leaf-server/minecraft-patches/features/0279-fix-purpur-attribute-base-patch.patch b/leaf-server/minecraft-patches/features/0280-fix-purpur-attribute-base-patch.patch similarity index 99% rename from leaf-server/minecraft-patches/features/0279-fix-purpur-attribute-base-patch.patch rename to leaf-server/minecraft-patches/features/0280-fix-purpur-attribute-base-patch.patch index 76141085..3aeb2db9 100644 --- a/leaf-server/minecraft-patches/features/0279-fix-purpur-attribute-base-patch.patch +++ b/leaf-server/minecraft-patches/features/0280-fix-purpur-attribute-base-patch.patch @@ -703,7 +703,7 @@ index 5c1992a7fd5d7c5fe23ebfad35a828263d0ff93c..1b2c471c0509d8e77454169df8a5dc24 // Purpur end - Configurable entity base attributes diff --git a/net/minecraft/world/entity/monster/Ghast.java b/net/minecraft/world/entity/monster/Ghast.java -index 6f312f0b8ab60c839129ea671f2d9c128fa58e58..03805ec5e766052a85446a23a5efbac3e6759f44 100644 +index 6ec83870c67810c7d0239ff7075549a93dc232eb..c249946248a5465fd9b08eac07a306ad2aee2ae6 100644 --- a/net/minecraft/world/entity/monster/Ghast.java +++ b/net/minecraft/world/entity/monster/Ghast.java @@ -77,8 +77,8 @@ public class Ghast extends Mob implements Enemy { diff --git a/leaf-server/src/main/java/org/dreeam/leaf/util/map/BlockPosIterator.java b/leaf-server/src/main/java/org/dreeam/leaf/util/list/BlockPosIterator.java similarity index 98% rename from leaf-server/src/main/java/org/dreeam/leaf/util/map/BlockPosIterator.java rename to leaf-server/src/main/java/org/dreeam/leaf/util/list/BlockPosIterator.java index 2165d64e..87793c3d 100644 --- a/leaf-server/src/main/java/org/dreeam/leaf/util/map/BlockPosIterator.java +++ b/leaf-server/src/main/java/org/dreeam/leaf/util/list/BlockPosIterator.java @@ -1,4 +1,4 @@ -package org.dreeam.leaf.util.map; +package org.dreeam.leaf.util.list; import com.google.common.collect.AbstractIterator; import net.minecraft.core.BlockPos;