From 043cb215fd42f345521de91abe929134faa4c656 Mon Sep 17 00:00:00 2001 From: hayanesuru Date: Mon, 13 Oct 2025 03:26:33 +0900 Subject: [PATCH] Optimize canHoldAnyFluid in canMaybePassThrough (#527) * optimize canHoldAnyFluid in canMaybePassThrough * rebuild patches * support reload --- ...80-Cache-part-of-canHoldFluid-result.patch | 65 ------------------- ... => 0180-Configurable-tripwire-dupe.patch} | 0 ...17075-Block-Entities-Unload-Lag-Spi.patch} | 0 ...Rearrange-the-attackable-conditions.patch} | 0 ...-dirty-stats-copy-when-requesting-p.patch} | 0 ...t-dirty-flag-when-loading-maps-from.patch} | 0 ...hecking-nearby-players-for-spawning.patch} | 0 ...ue-clear-on-LevelTicks-cleanupAfter.patch} | 0 ... => 0187-Remove-stream-in-villagers.patch} | 0 ... 0188-Optimize-baby-villager-sensor.patch} | 0 ....patch => 0189-Only-player-pushable.patch} | 0 ...190-Remove-iterators-from-Inventory.patch} | 0 ....patch => 0191-optimize-mob-despawn.patch} | 0 ...-Slightly-optimise-getNearestPlayer.patch} | 0 ...writeLongArray-during-chunk-loading.patch} | 0 ...4-Improve-sorting-in-SortedArraySet.patch} | 0 ... 0195-Make-removeIf-slightly-faster.patch} | 0 ...atch => 0196-Optimize-LinearPalette.patch} | 0 ...te-ClientboundLightUpdatePacketData.patch} | 0 ...g.patch => 0198-Async-chunk-sending.patch} | 0 ...atch => 0199-Spawner-Configurations.patch} | 0 ...SparklyPaper-Parallel-world-ticking.patch} | 0 ...-SparklyPaper-Track-each-world-MSPT.patch} | 0 ...elled-Projectile-Events-still-consu.patch} | 0 ...ndInteract-and-NearestVisibleLiving.patch} | 0 ... => 0204-rewrite-InsideBrownianWalk.patch} | 0 ...=> 0205-Use-BFS-on-getSlopeDistance.patch} | 2 +- ...r-PR-Throttle-failed-spawn-attempts.patch} | 0 ...BlockEntity-ticking-isRemoved-check.patch} | 0 ...8-Raytrace-AntiXray-SDK-integration.patch} | 0 ... => 0209-Optimize-ContextMap.create.patch} | 0 ...Micro-optimizations-for-random-tick.patch} | 0 ...n-updateConnectedPlayersWithinRange.patch} | 0 ...12-Remove-streams-on-PlayerDetector.patch} | 0 ...se-direct-iteration-on-Sensing.tick.patch} | 0 ...4-Optimise-non-flush-packet-sending.patch} | 0 ...unk-retrieving-in-entity-fluid-push.patch} | 0 ...-Null-handling-on-MultifaceSpreader.patch} | 0 ....patch => 0217-More-virtual-threads.patch} | 0 ...imize-ThreadedTicketLevelPropagator.patch} | 0 ...EffectUtil-getDigSpeedAmplification.patch} | 0 ...patch => 0220-Optimise-chunkUnloads.patch} | 0 ...21-Optimize-BlockEntityType-isValid.patch} | 2 +- ...et-on-player-join-to-avoid-chunk-lo.patch} | 0 ...heck-inside-blocks-and-traverse-blo.patch} | 0 ...yList-implementation-to-BasicEntity.patch} | 0 ...ol-Core.patch => 0225-Protocol-Core.patch} | 0 ... 0226-Async-switch-connection-state.patch} | 0 ...timize-BlockEntities-tickersInLevel.patch} | 0 ...e-cactus-can-even-survive-being-pla.patch} | 0 ...0229-Flush-location-while-knockback.patch} | 0 ...tch => 0230-Only-tick-items-at-hand.patch} | 0 ...231-Optimise-player-movement-checks.patch} | 0 ...=> 0232-Remove-streams-in-MobSensor.patch} | 0 ...33-Remove-streams-in-TemptingSensor.patch} | 0 ...-death-item-drop-knockback-settings.patch} | 0 ...-Optimize-getScaledTrackingDistance.patch} | 0 ...ptimize-SynchedEntityData-packDirty.patch} | 0 ...patch => 0237-Optimize-isEyeInFluid.patch} | 0 ...atch => 0238-Cache-block-state-tags.patch} | 29 ++++----- ...ch => 0239-optimize-getEntityStatus.patch} | 0 ...on-optimized-PoweredRailBlock-logic.patch} | 0 ...1-optimise-ChunkGenerator-getMobsAt.patch} | 0 ...e-for-mob-spawning-and-advancements.patch} | 0 ...patch => 0243-optimize-mob-spawning.patch} | 0 ...atch => 0244-optimize-structure-map.patch} | 0 ...patch => 0245-throttle-mob-spawning.patch} | 0 ... => 0246-Add-BlockExplosionHitEvent.patch} | 0 ...last-Protection-explosion-knockback.patch} | 0 ...> 0248-Use-UUID-for-cure-reputation.patch} | 0 ...ing-parsing-unknown-command-message.patch} | 0 ....patch => 0250-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 => 0254-optimize-no-action-time.patch} | 0 ...int.patch => 0255-optimize-waypoint.patch} | 0 ...tion.patch => 0256-Paw-optimization.patch} | 0 ...ig-fixClimbingBypassingCrammingRule.patch} | 0 ...58-Skip-inactive-entity-for-execute.patch} | 0 ....patch => 0259-Optimise-getEntities.patch} | 0 ...-298464.patch => 0260-fix-MC-298464.patch} | 0 ...stHomeAsWalkTarget-s-poi-finding-to.patch} | 0 ...62-optimize-checkInsideBlocks-calls.patch} | 0 ...or.patch => 0263-Optimise-TextColor.patch} | 0 ...ate-fire-if-explosion-was-cancelled.patch} | 0 ...p-BlockPhysicsEvent-if-no-listeners.patch} | 0 ... => 0266-Lithium-equipment-tracking.patch} | 0 ...267-fix-purpur-attribute-base-patch.patch} | 0 ...x.patch => 0268-Bump-netty-to-4.2.x.patch} | 0 ...aper-PR-Optimise-temptation-lookups.patch} | 0 ...atch => 0270-fix-temptation-lookups.patch} | 0 ...1-Lithium-combined-heightmap-update.patch} | 0 ...eCreatureSpawnEvent-if-no-listeners.patch} | 0 ...atch => 0273-optimize-goal-selector.patch} | 0 ...tch => 0274-thread-unsafe-chunk-map.patch} | 0 ...mize-SimpleBitStorage-object-layout.patch} | 0 ...nk.patch => 0276-optimize-get-chunk.patch} | 0 ...277-remove-shouldTickBlocksAt-check.patch} | 0 ...0278-optimize-PalettedContainer-get.patch} | 0 ...imize-LevelChunk-getBlockStateFinal.patch} | 0 ... 0280-optimize-FluidState-is-TagKey.patch} | 0 ...> 0281-counting-chunk-section-fluid.patch} | 0 ...-SpreadingSnowyDirtBlock-randomTick.patch} | 0 ....patch => 0283-optimize-onClimbable.patch} | 0 ...e-applyMovementEmissionAndPlaySound.patch} | 0 ...h => 0285-optimize-isStateClimbable.patch} | 0 ...Pos.patch => 0286-optimize-getOnPos.patch} | 0 ...ch => 0287-cache-eye-block-position.patch} | 0 ...ch => 0288-optimize-entity-in-fluid.patch} | 0 ... => 0289-optimize-checkInsideBlocks.patch} | 0 ...290-Replace-entity-fluid-height-map.patch} | 0 ...ch => 0291-optimize-collision-shape.patch} | 4 +- ....patch => 0292-cache-collision-list.patch} | 0 ...t.patch => 0293-fast-bit-radix-sort.patch} | 0 ....patch => 0294-optimize-tickEffects.patch} | 0 ...luto-Expose-Direction-Plane-s-faces.patch} | 2 +- ...tch => 0296-Pluto-reduce-allocation.patch} | 0 ...Only-update-frozen-ticks-if-changed.patch} | 0 ...xecuting-commands-if-server-stopped.patch} | 0 .../0299-optimize-canHoldAnyFluid.patch | 28 ++++++++ .../java/org/dreeam/leaf/util/BlockMasks.java | 3 + 122 files changed, 50 insertions(+), 85 deletions(-) delete mode 100644 leaf-server/minecraft-patches/features/0180-Cache-part-of-canHoldFluid-result.patch rename leaf-server/minecraft-patches/features/{0181-Configurable-tripwire-dupe.patch => 0180-Configurable-tripwire-dupe.patch} (100%) rename leaf-server/minecraft-patches/features/{0182-Paper-PR-Fix-MC-117075-Block-Entities-Unload-Lag-Spi.patch => 0181-Paper-PR-Fix-MC-117075-Block-Entities-Unload-Lag-Spi.patch} (100%) rename leaf-server/minecraft-patches/features/{0183-Sepals-Rearrange-the-attackable-conditions.patch => 0182-Sepals-Rearrange-the-attackable-conditions.patch} (100%) rename leaf-server/minecraft-patches/features/{0184-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch => 0183-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch} (100%) rename leaf-server/minecraft-patches/features/{0185-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch => 0184-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch} (100%) rename leaf-server/minecraft-patches/features/{0186-Optimize-checking-nearby-players-for-spawning.patch => 0185-Optimize-checking-nearby-players-for-spawning.patch} (100%) rename leaf-server/minecraft-patches/features/{0187-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch => 0186-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch} (100%) rename leaf-server/minecraft-patches/features/{0188-Remove-stream-in-villagers.patch => 0187-Remove-stream-in-villagers.patch} (100%) rename leaf-server/minecraft-patches/features/{0189-Optimize-baby-villager-sensor.patch => 0188-Optimize-baby-villager-sensor.patch} (100%) rename leaf-server/minecraft-patches/features/{0190-Only-player-pushable.patch => 0189-Only-player-pushable.patch} (100%) rename leaf-server/minecraft-patches/features/{0191-Remove-iterators-from-Inventory.patch => 0190-Remove-iterators-from-Inventory.patch} (100%) rename leaf-server/minecraft-patches/features/{0192-optimize-mob-despawn.patch => 0191-optimize-mob-despawn.patch} (100%) rename leaf-server/minecraft-patches/features/{0193-Slightly-optimise-getNearestPlayer.patch => 0192-Slightly-optimise-getNearestPlayer.patch} (100%) rename leaf-server/minecraft-patches/features/{0194-Bulk-writes-to-writeLongArray-during-chunk-loading.patch => 0193-Bulk-writes-to-writeLongArray-during-chunk-loading.patch} (100%) rename leaf-server/minecraft-patches/features/{0195-Improve-sorting-in-SortedArraySet.patch => 0194-Improve-sorting-in-SortedArraySet.patch} (100%) rename leaf-server/minecraft-patches/features/{0196-Make-removeIf-slightly-faster.patch => 0195-Make-removeIf-slightly-faster.patch} (100%) rename leaf-server/minecraft-patches/features/{0197-Optimize-LinearPalette.patch => 0196-Optimize-LinearPalette.patch} (100%) rename leaf-server/minecraft-patches/features/{0198-Rewrite-ClientboundLightUpdatePacketData.patch => 0197-Rewrite-ClientboundLightUpdatePacketData.patch} (100%) rename leaf-server/minecraft-patches/features/{0199-Async-chunk-sending.patch => 0198-Async-chunk-sending.patch} (100%) rename leaf-server/minecraft-patches/features/{0200-Spawner-Configurations.patch => 0199-Spawner-Configurations.patch} (100%) rename leaf-server/minecraft-patches/features/{0201-SparklyPaper-Parallel-world-ticking.patch => 0200-SparklyPaper-Parallel-world-ticking.patch} (100%) rename leaf-server/minecraft-patches/features/{0202-SparklyPaper-Track-each-world-MSPT.patch => 0201-SparklyPaper-Track-each-world-MSPT.patch} (100%) rename leaf-server/minecraft-patches/features/{0203-Paper-PR-Fix-cancelled-Projectile-Events-still-consu.patch => 0202-Paper-PR-Fix-cancelled-Projectile-Events-still-consu.patch} (100%) rename leaf-server/minecraft-patches/features/{0204-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch => 0203-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch} (100%) rename leaf-server/minecraft-patches/features/{0205-rewrite-InsideBrownianWalk.patch => 0204-rewrite-InsideBrownianWalk.patch} (100%) rename leaf-server/minecraft-patches/features/{0206-Use-BFS-on-getSlopeDistance.patch => 0205-Use-BFS-on-getSlopeDistance.patch} (98%) rename leaf-server/minecraft-patches/features/{0207-Paper-PR-Throttle-failed-spawn-attempts.patch => 0206-Paper-PR-Throttle-failed-spawn-attempts.patch} (100%) rename leaf-server/minecraft-patches/features/{0208-Improve-BlockEntity-ticking-isRemoved-check.patch => 0207-Improve-BlockEntity-ticking-isRemoved-check.patch} (100%) rename leaf-server/minecraft-patches/features/{0209-Raytrace-AntiXray-SDK-integration.patch => 0208-Raytrace-AntiXray-SDK-integration.patch} (100%) rename leaf-server/minecraft-patches/features/{0210-Optimize-ContextMap.create.patch => 0209-Optimize-ContextMap.create.patch} (100%) rename leaf-server/minecraft-patches/features/{0211-Micro-optimizations-for-random-tick.patch => 0210-Micro-optimizations-for-random-tick.patch} (100%) rename leaf-server/minecraft-patches/features/{0212-Remove-streams-on-updateConnectedPlayersWithinRange.patch => 0211-Remove-streams-on-updateConnectedPlayersWithinRange.patch} (100%) rename leaf-server/minecraft-patches/features/{0213-Remove-streams-on-PlayerDetector.patch => 0212-Remove-streams-on-PlayerDetector.patch} (100%) rename leaf-server/minecraft-patches/features/{0214-Use-direct-iteration-on-Sensing.tick.patch => 0213-Use-direct-iteration-on-Sensing.tick.patch} (100%) rename leaf-server/minecraft-patches/features/{0215-Optimise-non-flush-packet-sending.patch => 0214-Optimise-non-flush-packet-sending.patch} (100%) rename leaf-server/minecraft-patches/features/{0216-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch => 0215-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch} (100%) rename leaf-server/minecraft-patches/features/{0217-Null-handling-on-MultifaceSpreader.patch => 0216-Null-handling-on-MultifaceSpreader.patch} (100%) rename leaf-server/minecraft-patches/features/{0218-More-virtual-threads.patch => 0217-More-virtual-threads.patch} (100%) rename leaf-server/minecraft-patches/features/{0219-Optimize-ThreadedTicketLevelPropagator.patch => 0218-Optimize-ThreadedTicketLevelPropagator.patch} (100%) rename leaf-server/minecraft-patches/features/{0220-Optimise-MobEffectUtil-getDigSpeedAmplification.patch => 0219-Optimise-MobEffectUtil-getDigSpeedAmplification.patch} (100%) rename leaf-server/minecraft-patches/features/{0221-Optimise-chunkUnloads.patch => 0220-Optimise-chunkUnloads.patch} (100%) rename leaf-server/minecraft-patches/features/{0222-Optimize-BlockEntityType-isValid.patch => 0221-Optimize-BlockEntityType-isValid.patch} (96%) rename leaf-server/minecraft-patches/features/{0223-Paper-PR-Add-ticket-on-player-join-to-avoid-chunk-lo.patch => 0222-Paper-PR-Add-ticket-on-player-join-to-avoid-chunk-lo.patch} (100%) rename leaf-server/minecraft-patches/features/{0224-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch => 0223-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch} (100%) rename leaf-server/minecraft-patches/features/{0225-Sakura-copy-EntityList-implementation-to-BasicEntity.patch => 0224-Sakura-copy-EntityList-implementation-to-BasicEntity.patch} (100%) rename leaf-server/minecraft-patches/features/{0226-Protocol-Core.patch => 0225-Protocol-Core.patch} (100%) rename leaf-server/minecraft-patches/features/{0227-Async-switch-connection-state.patch => 0226-Async-switch-connection-state.patch} (100%) rename leaf-server/minecraft-patches/features/{0228-Optimize-BlockEntities-tickersInLevel.patch => 0227-Optimize-BlockEntities-tickersInLevel.patch} (100%) rename leaf-server/minecraft-patches/features/{0229-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch => 0228-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch} (100%) rename leaf-server/minecraft-patches/features/{0230-Flush-location-while-knockback.patch => 0229-Flush-location-while-knockback.patch} (100%) rename leaf-server/minecraft-patches/features/{0231-Only-tick-items-at-hand.patch => 0230-Only-tick-items-at-hand.patch} (100%) rename leaf-server/minecraft-patches/features/{0232-Optimise-player-movement-checks.patch => 0231-Optimise-player-movement-checks.patch} (100%) rename leaf-server/minecraft-patches/features/{0233-Remove-streams-in-MobSensor.patch => 0232-Remove-streams-in-MobSensor.patch} (100%) rename leaf-server/minecraft-patches/features/{0234-Remove-streams-in-TemptingSensor.patch => 0233-Remove-streams-in-TemptingSensor.patch} (100%) rename leaf-server/minecraft-patches/features/{0235-Add-configurable-death-item-drop-knockback-settings.patch => 0234-Add-configurable-death-item-drop-knockback-settings.patch} (100%) rename leaf-server/minecraft-patches/features/{0236-Optimize-getScaledTrackingDistance.patch => 0235-Optimize-getScaledTrackingDistance.patch} (100%) rename leaf-server/minecraft-patches/features/{0237-Optimize-SynchedEntityData-packDirty.patch => 0236-Optimize-SynchedEntityData-packDirty.patch} (100%) rename leaf-server/minecraft-patches/features/{0238-Optimize-isEyeInFluid.patch => 0237-Optimize-isEyeInFluid.patch} (100%) rename leaf-server/minecraft-patches/features/{0239-Cache-block-state-tags.patch => 0238-Cache-block-state-tags.patch} (84%) rename leaf-server/minecraft-patches/features/{0240-optimize-getEntityStatus.patch => 0239-optimize-getEntityStatus.patch} (100%) rename leaf-server/minecraft-patches/features/{0241-Rail-Optimization-optimized-PoweredRailBlock-logic.patch => 0240-Rail-Optimization-optimized-PoweredRailBlock-logic.patch} (100%) rename leaf-server/minecraft-patches/features/{0242-optimise-ChunkGenerator-getMobsAt.patch => 0241-optimise-ChunkGenerator-getMobsAt.patch} (100%) rename leaf-server/minecraft-patches/features/{0243-cache-biome-for-mob-spawning-and-advancements.patch => 0242-cache-biome-for-mob-spawning-and-advancements.patch} (100%) rename leaf-server/minecraft-patches/features/{0244-optimize-mob-spawning.patch => 0243-optimize-mob-spawning.patch} (100%) rename leaf-server/minecraft-patches/features/{0245-optimize-structure-map.patch => 0244-optimize-structure-map.patch} (100%) rename leaf-server/minecraft-patches/features/{0246-throttle-mob-spawning.patch => 0245-throttle-mob-spawning.patch} (100%) rename leaf-server/minecraft-patches/features/{0247-Add-BlockExplosionHitEvent.patch => 0246-Add-BlockExplosionHitEvent.patch} (100%) rename leaf-server/minecraft-patches/features/{0248-Old-Blast-Protection-explosion-knockback.patch => 0247-Old-Blast-Protection-explosion-knockback.patch} (100%) rename leaf-server/minecraft-patches/features/{0249-Use-UUID-for-cure-reputation.patch => 0248-Use-UUID-for-cure-reputation.patch} (100%) rename leaf-server/minecraft-patches/features/{0250-Fix-crash-during-parsing-unknown-command-message.patch => 0249-Fix-crash-during-parsing-unknown-command-message.patch} (100%) rename leaf-server/minecraft-patches/features/{0251-optimize-random-tick.patch => 0250-optimize-random-tick.patch} (100%) rename leaf-server/minecraft-patches/features/{0252-do-not-log-invalid-flatten-text-component-parse.patch => 0251-do-not-log-invalid-flatten-text-component-parse.patch} (100%) rename leaf-server/minecraft-patches/features/{0253-Fast-BiomeManager-seed-obfuscation.patch => 0252-Fast-BiomeManager-seed-obfuscation.patch} (100%) rename leaf-server/minecraft-patches/features/{0254-Replace-EntitySelectorOptions-map-with-optimized-col.patch => 0253-Replace-EntitySelectorOptions-map-with-optimized-col.patch} (100%) rename leaf-server/minecraft-patches/features/{0255-optimize-no-action-time.patch => 0254-optimize-no-action-time.patch} (100%) rename leaf-server/minecraft-patches/features/{0256-optimize-waypoint.patch => 0255-optimize-waypoint.patch} (100%) rename leaf-server/minecraft-patches/features/{0257-Paw-optimization.patch => 0256-Paw-optimization.patch} (100%) rename leaf-server/minecraft-patches/features/{0258-Fix-Paper-config-fixClimbingBypassingCrammingRule.patch => 0257-Fix-Paper-config-fixClimbingBypassingCrammingRule.patch} (100%) rename leaf-server/minecraft-patches/features/{0259-Skip-inactive-entity-for-execute.patch => 0258-Skip-inactive-entity-for-execute.patch} (100%) rename leaf-server/minecraft-patches/features/{0260-Optimise-getEntities.patch => 0259-Optimise-getEntities.patch} (100%) rename leaf-server/minecraft-patches/features/{0261-fix-MC-298464.patch => 0260-fix-MC-298464.patch} (100%) rename leaf-server/minecraft-patches/features/{0262-Re-route-SetClosestHomeAsWalkTarget-s-poi-finding-to.patch => 0261-Re-route-SetClosestHomeAsWalkTarget-s-poi-finding-to.patch} (100%) rename leaf-server/minecraft-patches/features/{0263-optimize-checkInsideBlocks-calls.patch => 0262-optimize-checkInsideBlocks-calls.patch} (100%) rename leaf-server/minecraft-patches/features/{0264-Optimise-TextColor.patch => 0263-Optimise-TextColor.patch} (100%) rename leaf-server/minecraft-patches/features/{0265-Do-not-create-fire-if-explosion-was-cancelled.patch => 0264-Do-not-create-fire-if-explosion-was-cancelled.patch} (100%) rename leaf-server/minecraft-patches/features/{0266-Skip-BlockPhysicsEvent-if-no-listeners.patch => 0265-Skip-BlockPhysicsEvent-if-no-listeners.patch} (100%) rename leaf-server/minecraft-patches/features/{0267-Lithium-equipment-tracking.patch => 0266-Lithium-equipment-tracking.patch} (100%) rename leaf-server/minecraft-patches/features/{0268-fix-purpur-attribute-base-patch.patch => 0267-fix-purpur-attribute-base-patch.patch} (100%) rename leaf-server/minecraft-patches/features/{0269-Bump-netty-to-4.2.x.patch => 0268-Bump-netty-to-4.2.x.patch} (100%) rename leaf-server/minecraft-patches/features/{0270-Paper-PR-Optimise-temptation-lookups.patch => 0269-Paper-PR-Optimise-temptation-lookups.patch} (100%) rename leaf-server/minecraft-patches/features/{0271-fix-temptation-lookups.patch => 0270-fix-temptation-lookups.patch} (100%) rename leaf-server/minecraft-patches/features/{0272-Lithium-combined-heightmap-update.patch => 0271-Lithium-combined-heightmap-update.patch} (100%) rename leaf-server/minecraft-patches/features/{0273-Skip-PreCreatureSpawnEvent-if-no-listeners.patch => 0272-Skip-PreCreatureSpawnEvent-if-no-listeners.patch} (100%) rename leaf-server/minecraft-patches/features/{0274-optimize-goal-selector.patch => 0273-optimize-goal-selector.patch} (100%) rename leaf-server/minecraft-patches/features/{0275-thread-unsafe-chunk-map.patch => 0274-thread-unsafe-chunk-map.patch} (100%) rename leaf-server/minecraft-patches/features/{0276-optimize-SimpleBitStorage-object-layout.patch => 0275-optimize-SimpleBitStorage-object-layout.patch} (100%) rename leaf-server/minecraft-patches/features/{0277-optimize-get-chunk.patch => 0276-optimize-get-chunk.patch} (100%) rename leaf-server/minecraft-patches/features/{0278-remove-shouldTickBlocksAt-check.patch => 0277-remove-shouldTickBlocksAt-check.patch} (100%) rename leaf-server/minecraft-patches/features/{0279-optimize-PalettedContainer-get.patch => 0278-optimize-PalettedContainer-get.patch} (100%) rename leaf-server/minecraft-patches/features/{0280-optimize-LevelChunk-getBlockStateFinal.patch => 0279-optimize-LevelChunk-getBlockStateFinal.patch} (100%) rename leaf-server/minecraft-patches/features/{0281-optimize-FluidState-is-TagKey.patch => 0280-optimize-FluidState-is-TagKey.patch} (100%) rename leaf-server/minecraft-patches/features/{0282-counting-chunk-section-fluid.patch => 0281-counting-chunk-section-fluid.patch} (100%) rename leaf-server/minecraft-patches/features/{0283-optimize-SpreadingSnowyDirtBlock-randomTick.patch => 0282-optimize-SpreadingSnowyDirtBlock-randomTick.patch} (100%) rename leaf-server/minecraft-patches/features/{0284-optimize-onClimbable.patch => 0283-optimize-onClimbable.patch} (100%) rename leaf-server/minecraft-patches/features/{0285-optimize-applyMovementEmissionAndPlaySound.patch => 0284-optimize-applyMovementEmissionAndPlaySound.patch} (100%) rename leaf-server/minecraft-patches/features/{0286-optimize-isStateClimbable.patch => 0285-optimize-isStateClimbable.patch} (100%) rename leaf-server/minecraft-patches/features/{0287-optimize-getOnPos.patch => 0286-optimize-getOnPos.patch} (100%) rename leaf-server/minecraft-patches/features/{0288-cache-eye-block-position.patch => 0287-cache-eye-block-position.patch} (100%) rename leaf-server/minecraft-patches/features/{0289-optimize-entity-in-fluid.patch => 0288-optimize-entity-in-fluid.patch} (100%) rename leaf-server/minecraft-patches/features/{0290-optimize-checkInsideBlocks.patch => 0289-optimize-checkInsideBlocks.patch} (100%) rename leaf-server/minecraft-patches/features/{0291-Replace-entity-fluid-height-map.patch => 0290-Replace-entity-fluid-height-map.patch} (100%) rename leaf-server/minecraft-patches/features/{0292-optimize-collision-shape.patch => 0291-optimize-collision-shape.patch} (88%) rename leaf-server/minecraft-patches/features/{0293-cache-collision-list.patch => 0292-cache-collision-list.patch} (100%) rename leaf-server/minecraft-patches/features/{0294-fast-bit-radix-sort.patch => 0293-fast-bit-radix-sort.patch} (100%) rename leaf-server/minecraft-patches/features/{0295-optimize-tickEffects.patch => 0294-optimize-tickEffects.patch} (100%) rename leaf-server/minecraft-patches/features/{0296-Pluto-Expose-Direction-Plane-s-faces.patch => 0295-Pluto-Expose-Direction-Plane-s-faces.patch} (99%) rename leaf-server/minecraft-patches/features/{0297-Pluto-reduce-allocation.patch => 0296-Pluto-reduce-allocation.patch} (100%) rename leaf-server/minecraft-patches/features/{0298-Only-update-frozen-ticks-if-changed.patch => 0297-Only-update-frozen-ticks-if-changed.patch} (100%) rename leaf-server/minecraft-patches/features/{0299-Prevent-executing-commands-if-server-stopped.patch => 0298-Prevent-executing-commands-if-server-stopped.patch} (100%) create mode 100644 leaf-server/minecraft-patches/features/0299-optimize-canHoldAnyFluid.patch diff --git a/leaf-server/minecraft-patches/features/0180-Cache-part-of-canHoldFluid-result.patch b/leaf-server/minecraft-patches/features/0180-Cache-part-of-canHoldFluid-result.patch deleted file mode 100644 index c322ec9c..00000000 --- a/leaf-server/minecraft-patches/features/0180-Cache-part-of-canHoldFluid-result.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> -Date: Tue, 26 Nov 2024 17:15:38 -0500 -Subject: [PATCH] Cache part of canHoldFluid result - -Cache the result of part of canHoldFluid logic, since there are many state#is in canAnyHoldFluid method, -it uses map contains to do iteration to check whether a block has a specific block tag key, -which the contains iteration call is very expensive if called everytime - -In the test, it can improve ~30% performance in ~1577000 times of canHoldAnyFluid calls (~159ms -> ~111ms) - -diff --git a/net/minecraft/world/level/block/state/BlockBehaviour.java b/net/minecraft/world/level/block/state/BlockBehaviour.java -index 84f4d772bfe06383ca718b6a00d983e97e2e35f4..3219b9caa654c7a64e5e4a92178528e1104b34c7 100644 ---- a/net/minecraft/world/level/block/state/BlockBehaviour.java -+++ b/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -451,6 +451,8 @@ public abstract class BlockBehaviour implements FeatureElement { - private VoxelShape[] occlusionShapesByFace; - private boolean propagatesSkylightDown; - private int lightBlock; -+ private boolean canHoldAnyFluidInternal; // Leaf - Cache part of canHoldFluid result -+ private boolean canHoldAnyFluidInternalInit; // Leaf - Cache part of canHoldFluid result - - // Paper start - rewrite chunk system - private boolean isConditionallyFullOpaque; -@@ -600,6 +602,8 @@ public abstract class BlockBehaviour implements FeatureElement { - - this.propagatesSkylightDown = this.owner.propagatesSkylightDown(this.asState()); - this.lightBlock = this.owner.getLightBlock(this.asState()); -+ this.canHoldAnyFluidInternal = false; // Leaf - Cache part of canHoldFluid result -+ this.canHoldAnyFluidInternalInit = false; // Leaf - Cache part of canHoldFluid result - // Paper start - rewrite chunk system - this.isConditionallyFullOpaque = this.canOcclude & this.useShapeForLightOcclusion; - // Paper end - rewrite chunk system -@@ -651,6 +655,18 @@ public abstract class BlockBehaviour implements FeatureElement { - return block != Blocks.COBWEB && block != Blocks.BAMBOO_SAPLING && this.isSolid(); - } - -+ // Leaf start - Cache part of canHoldFluid result -+ public boolean canHoldAnyFluidInternal() { -+ // Lazy load cache -+ if (!canHoldAnyFluidInternalInit) { -+ canHoldAnyFluidInternal = net.minecraft.world.level.material.FlowingFluid.canHoldAnyFluid(this.asState()); -+ canHoldAnyFluidInternalInit = true; -+ } -+ -+ return canHoldAnyFluidInternal; -+ } -+ // Leaf end - Cache part of canHoldFluid result -+ - @Deprecated - public boolean isSolid() { - return this.legacySolid; -diff --git a/net/minecraft/world/level/material/FlowingFluid.java b/net/minecraft/world/level/material/FlowingFluid.java -index c4675d51bd459fcdc411b48115d512f77a232cef..4fe1b3fc6304a2a404fd0f62f52fc792bcd5dfaf 100644 ---- a/net/minecraft/world/level/material/FlowingFluid.java -+++ b/net/minecraft/world/level/material/FlowingFluid.java -@@ -467,7 +467,7 @@ public abstract class FlowingFluid extends Fluid { - } - - private static boolean canHoldFluid(BlockGetter level, BlockPos pos, BlockState state, Fluid fluid) { -- return canHoldAnyFluid(state) && canHoldSpecificFluid(level, pos, state, fluid); -+ return /*canHoldAnyFluid(state)*/ state.canHoldAnyFluidInternal() && canHoldSpecificFluid(level, pos, state, fluid); // Leaf - Cache part of canHoldFluid result - } - - private static boolean canHoldSpecificFluid(BlockGetter level, BlockPos pos, BlockState state, Fluid fluid) { diff --git a/leaf-server/minecraft-patches/features/0181-Configurable-tripwire-dupe.patch b/leaf-server/minecraft-patches/features/0180-Configurable-tripwire-dupe.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0181-Configurable-tripwire-dupe.patch rename to leaf-server/minecraft-patches/features/0180-Configurable-tripwire-dupe.patch diff --git a/leaf-server/minecraft-patches/features/0182-Paper-PR-Fix-MC-117075-Block-Entities-Unload-Lag-Spi.patch b/leaf-server/minecraft-patches/features/0181-Paper-PR-Fix-MC-117075-Block-Entities-Unload-Lag-Spi.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0182-Paper-PR-Fix-MC-117075-Block-Entities-Unload-Lag-Spi.patch rename to leaf-server/minecraft-patches/features/0181-Paper-PR-Fix-MC-117075-Block-Entities-Unload-Lag-Spi.patch diff --git a/leaf-server/minecraft-patches/features/0183-Sepals-Rearrange-the-attackable-conditions.patch b/leaf-server/minecraft-patches/features/0182-Sepals-Rearrange-the-attackable-conditions.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0183-Sepals-Rearrange-the-attackable-conditions.patch rename to leaf-server/minecraft-patches/features/0182-Sepals-Rearrange-the-attackable-conditions.patch diff --git a/leaf-server/minecraft-patches/features/0184-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch b/leaf-server/minecraft-patches/features/0183-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0184-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch rename to leaf-server/minecraft-patches/features/0183-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch diff --git a/leaf-server/minecraft-patches/features/0185-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch b/leaf-server/minecraft-patches/features/0184-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0185-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch rename to leaf-server/minecraft-patches/features/0184-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch diff --git a/leaf-server/minecraft-patches/features/0186-Optimize-checking-nearby-players-for-spawning.patch b/leaf-server/minecraft-patches/features/0185-Optimize-checking-nearby-players-for-spawning.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0186-Optimize-checking-nearby-players-for-spawning.patch rename to leaf-server/minecraft-patches/features/0185-Optimize-checking-nearby-players-for-spawning.patch diff --git a/leaf-server/minecraft-patches/features/0187-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch b/leaf-server/minecraft-patches/features/0186-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0187-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch rename to leaf-server/minecraft-patches/features/0186-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch diff --git a/leaf-server/minecraft-patches/features/0188-Remove-stream-in-villagers.patch b/leaf-server/minecraft-patches/features/0187-Remove-stream-in-villagers.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0188-Remove-stream-in-villagers.patch rename to leaf-server/minecraft-patches/features/0187-Remove-stream-in-villagers.patch diff --git a/leaf-server/minecraft-patches/features/0189-Optimize-baby-villager-sensor.patch b/leaf-server/minecraft-patches/features/0188-Optimize-baby-villager-sensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0189-Optimize-baby-villager-sensor.patch rename to leaf-server/minecraft-patches/features/0188-Optimize-baby-villager-sensor.patch diff --git a/leaf-server/minecraft-patches/features/0190-Only-player-pushable.patch b/leaf-server/minecraft-patches/features/0189-Only-player-pushable.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0190-Only-player-pushable.patch rename to leaf-server/minecraft-patches/features/0189-Only-player-pushable.patch diff --git a/leaf-server/minecraft-patches/features/0191-Remove-iterators-from-Inventory.patch b/leaf-server/minecraft-patches/features/0190-Remove-iterators-from-Inventory.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0191-Remove-iterators-from-Inventory.patch rename to leaf-server/minecraft-patches/features/0190-Remove-iterators-from-Inventory.patch diff --git a/leaf-server/minecraft-patches/features/0192-optimize-mob-despawn.patch b/leaf-server/minecraft-patches/features/0191-optimize-mob-despawn.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0192-optimize-mob-despawn.patch rename to leaf-server/minecraft-patches/features/0191-optimize-mob-despawn.patch diff --git a/leaf-server/minecraft-patches/features/0193-Slightly-optimise-getNearestPlayer.patch b/leaf-server/minecraft-patches/features/0192-Slightly-optimise-getNearestPlayer.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0193-Slightly-optimise-getNearestPlayer.patch rename to leaf-server/minecraft-patches/features/0192-Slightly-optimise-getNearestPlayer.patch diff --git a/leaf-server/minecraft-patches/features/0194-Bulk-writes-to-writeLongArray-during-chunk-loading.patch b/leaf-server/minecraft-patches/features/0193-Bulk-writes-to-writeLongArray-during-chunk-loading.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0194-Bulk-writes-to-writeLongArray-during-chunk-loading.patch rename to leaf-server/minecraft-patches/features/0193-Bulk-writes-to-writeLongArray-during-chunk-loading.patch diff --git a/leaf-server/minecraft-patches/features/0195-Improve-sorting-in-SortedArraySet.patch b/leaf-server/minecraft-patches/features/0194-Improve-sorting-in-SortedArraySet.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0195-Improve-sorting-in-SortedArraySet.patch rename to leaf-server/minecraft-patches/features/0194-Improve-sorting-in-SortedArraySet.patch diff --git a/leaf-server/minecraft-patches/features/0196-Make-removeIf-slightly-faster.patch b/leaf-server/minecraft-patches/features/0195-Make-removeIf-slightly-faster.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0196-Make-removeIf-slightly-faster.patch rename to leaf-server/minecraft-patches/features/0195-Make-removeIf-slightly-faster.patch diff --git a/leaf-server/minecraft-patches/features/0197-Optimize-LinearPalette.patch b/leaf-server/minecraft-patches/features/0196-Optimize-LinearPalette.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0197-Optimize-LinearPalette.patch rename to leaf-server/minecraft-patches/features/0196-Optimize-LinearPalette.patch diff --git a/leaf-server/minecraft-patches/features/0198-Rewrite-ClientboundLightUpdatePacketData.patch b/leaf-server/minecraft-patches/features/0197-Rewrite-ClientboundLightUpdatePacketData.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0198-Rewrite-ClientboundLightUpdatePacketData.patch rename to leaf-server/minecraft-patches/features/0197-Rewrite-ClientboundLightUpdatePacketData.patch diff --git a/leaf-server/minecraft-patches/features/0199-Async-chunk-sending.patch b/leaf-server/minecraft-patches/features/0198-Async-chunk-sending.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0199-Async-chunk-sending.patch rename to leaf-server/minecraft-patches/features/0198-Async-chunk-sending.patch diff --git a/leaf-server/minecraft-patches/features/0200-Spawner-Configurations.patch b/leaf-server/minecraft-patches/features/0199-Spawner-Configurations.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0200-Spawner-Configurations.patch rename to leaf-server/minecraft-patches/features/0199-Spawner-Configurations.patch diff --git a/leaf-server/minecraft-patches/features/0201-SparklyPaper-Parallel-world-ticking.patch b/leaf-server/minecraft-patches/features/0200-SparklyPaper-Parallel-world-ticking.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0201-SparklyPaper-Parallel-world-ticking.patch rename to leaf-server/minecraft-patches/features/0200-SparklyPaper-Parallel-world-ticking.patch diff --git a/leaf-server/minecraft-patches/features/0202-SparklyPaper-Track-each-world-MSPT.patch b/leaf-server/minecraft-patches/features/0201-SparklyPaper-Track-each-world-MSPT.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0202-SparklyPaper-Track-each-world-MSPT.patch rename to leaf-server/minecraft-patches/features/0201-SparklyPaper-Track-each-world-MSPT.patch diff --git a/leaf-server/minecraft-patches/features/0203-Paper-PR-Fix-cancelled-Projectile-Events-still-consu.patch b/leaf-server/minecraft-patches/features/0202-Paper-PR-Fix-cancelled-Projectile-Events-still-consu.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0203-Paper-PR-Fix-cancelled-Projectile-Events-still-consu.patch rename to leaf-server/minecraft-patches/features/0202-Paper-PR-Fix-cancelled-Projectile-Events-still-consu.patch diff --git a/leaf-server/minecraft-patches/features/0204-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch b/leaf-server/minecraft-patches/features/0203-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0204-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch rename to leaf-server/minecraft-patches/features/0203-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch diff --git a/leaf-server/minecraft-patches/features/0205-rewrite-InsideBrownianWalk.patch b/leaf-server/minecraft-patches/features/0204-rewrite-InsideBrownianWalk.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0205-rewrite-InsideBrownianWalk.patch rename to leaf-server/minecraft-patches/features/0204-rewrite-InsideBrownianWalk.patch diff --git a/leaf-server/minecraft-patches/features/0206-Use-BFS-on-getSlopeDistance.patch b/leaf-server/minecraft-patches/features/0205-Use-BFS-on-getSlopeDistance.patch similarity index 98% rename from leaf-server/minecraft-patches/features/0206-Use-BFS-on-getSlopeDistance.patch rename to leaf-server/minecraft-patches/features/0205-Use-BFS-on-getSlopeDistance.patch index 1ab306a0..b976fbb5 100644 --- a/leaf-server/minecraft-patches/features/0206-Use-BFS-on-getSlopeDistance.patch +++ b/leaf-server/minecraft-patches/features/0205-Use-BFS-on-getSlopeDistance.patch @@ -24,7 +24,7 @@ index 2352406b0284ddcfb755618837f641b059437a19..284e2332ca6c0af178169f2ab9acae3c BlockState blockState = this.getBlockState(pos); FluidState fluidState = blockState.getFluidState(); diff --git a/net/minecraft/world/level/material/FlowingFluid.java b/net/minecraft/world/level/material/FlowingFluid.java -index 4fe1b3fc6304a2a404fd0f62f52fc792bcd5dfaf..bcda72fbd920a087ea7d10171da933b13adc1813 100644 +index c4675d51bd459fcdc411b48115d512f77a232cef..a9c7966371f184ec2a23275496a5cfd7774dffae 100644 --- a/net/minecraft/world/level/material/FlowingFluid.java +++ b/net/minecraft/world/level/material/FlowingFluid.java @@ -342,32 +342,124 @@ public abstract class FlowingFluid extends Fluid { diff --git a/leaf-server/minecraft-patches/features/0207-Paper-PR-Throttle-failed-spawn-attempts.patch b/leaf-server/minecraft-patches/features/0206-Paper-PR-Throttle-failed-spawn-attempts.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0207-Paper-PR-Throttle-failed-spawn-attempts.patch rename to leaf-server/minecraft-patches/features/0206-Paper-PR-Throttle-failed-spawn-attempts.patch diff --git a/leaf-server/minecraft-patches/features/0208-Improve-BlockEntity-ticking-isRemoved-check.patch b/leaf-server/minecraft-patches/features/0207-Improve-BlockEntity-ticking-isRemoved-check.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0208-Improve-BlockEntity-ticking-isRemoved-check.patch rename to leaf-server/minecraft-patches/features/0207-Improve-BlockEntity-ticking-isRemoved-check.patch diff --git a/leaf-server/minecraft-patches/features/0209-Raytrace-AntiXray-SDK-integration.patch b/leaf-server/minecraft-patches/features/0208-Raytrace-AntiXray-SDK-integration.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0209-Raytrace-AntiXray-SDK-integration.patch rename to leaf-server/minecraft-patches/features/0208-Raytrace-AntiXray-SDK-integration.patch diff --git a/leaf-server/minecraft-patches/features/0210-Optimize-ContextMap.create.patch b/leaf-server/minecraft-patches/features/0209-Optimize-ContextMap.create.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0210-Optimize-ContextMap.create.patch rename to leaf-server/minecraft-patches/features/0209-Optimize-ContextMap.create.patch diff --git a/leaf-server/minecraft-patches/features/0211-Micro-optimizations-for-random-tick.patch b/leaf-server/minecraft-patches/features/0210-Micro-optimizations-for-random-tick.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0211-Micro-optimizations-for-random-tick.patch rename to leaf-server/minecraft-patches/features/0210-Micro-optimizations-for-random-tick.patch diff --git a/leaf-server/minecraft-patches/features/0212-Remove-streams-on-updateConnectedPlayersWithinRange.patch b/leaf-server/minecraft-patches/features/0211-Remove-streams-on-updateConnectedPlayersWithinRange.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0212-Remove-streams-on-updateConnectedPlayersWithinRange.patch rename to leaf-server/minecraft-patches/features/0211-Remove-streams-on-updateConnectedPlayersWithinRange.patch diff --git a/leaf-server/minecraft-patches/features/0213-Remove-streams-on-PlayerDetector.patch b/leaf-server/minecraft-patches/features/0212-Remove-streams-on-PlayerDetector.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0213-Remove-streams-on-PlayerDetector.patch rename to leaf-server/minecraft-patches/features/0212-Remove-streams-on-PlayerDetector.patch diff --git a/leaf-server/minecraft-patches/features/0214-Use-direct-iteration-on-Sensing.tick.patch b/leaf-server/minecraft-patches/features/0213-Use-direct-iteration-on-Sensing.tick.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0214-Use-direct-iteration-on-Sensing.tick.patch rename to leaf-server/minecraft-patches/features/0213-Use-direct-iteration-on-Sensing.tick.patch diff --git a/leaf-server/minecraft-patches/features/0215-Optimise-non-flush-packet-sending.patch b/leaf-server/minecraft-patches/features/0214-Optimise-non-flush-packet-sending.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0215-Optimise-non-flush-packet-sending.patch rename to leaf-server/minecraft-patches/features/0214-Optimise-non-flush-packet-sending.patch diff --git a/leaf-server/minecraft-patches/features/0216-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch b/leaf-server/minecraft-patches/features/0215-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0216-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch rename to leaf-server/minecraft-patches/features/0215-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch diff --git a/leaf-server/minecraft-patches/features/0217-Null-handling-on-MultifaceSpreader.patch b/leaf-server/minecraft-patches/features/0216-Null-handling-on-MultifaceSpreader.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0217-Null-handling-on-MultifaceSpreader.patch rename to leaf-server/minecraft-patches/features/0216-Null-handling-on-MultifaceSpreader.patch diff --git a/leaf-server/minecraft-patches/features/0218-More-virtual-threads.patch b/leaf-server/minecraft-patches/features/0217-More-virtual-threads.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0218-More-virtual-threads.patch rename to leaf-server/minecraft-patches/features/0217-More-virtual-threads.patch diff --git a/leaf-server/minecraft-patches/features/0219-Optimize-ThreadedTicketLevelPropagator.patch b/leaf-server/minecraft-patches/features/0218-Optimize-ThreadedTicketLevelPropagator.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0219-Optimize-ThreadedTicketLevelPropagator.patch rename to leaf-server/minecraft-patches/features/0218-Optimize-ThreadedTicketLevelPropagator.patch diff --git a/leaf-server/minecraft-patches/features/0220-Optimise-MobEffectUtil-getDigSpeedAmplification.patch b/leaf-server/minecraft-patches/features/0219-Optimise-MobEffectUtil-getDigSpeedAmplification.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0220-Optimise-MobEffectUtil-getDigSpeedAmplification.patch rename to leaf-server/minecraft-patches/features/0219-Optimise-MobEffectUtil-getDigSpeedAmplification.patch diff --git a/leaf-server/minecraft-patches/features/0221-Optimise-chunkUnloads.patch b/leaf-server/minecraft-patches/features/0220-Optimise-chunkUnloads.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0221-Optimise-chunkUnloads.patch rename to leaf-server/minecraft-patches/features/0220-Optimise-chunkUnloads.patch diff --git a/leaf-server/minecraft-patches/features/0222-Optimize-BlockEntityType-isValid.patch b/leaf-server/minecraft-patches/features/0221-Optimize-BlockEntityType-isValid.patch similarity index 96% rename from leaf-server/minecraft-patches/features/0222-Optimize-BlockEntityType-isValid.patch rename to leaf-server/minecraft-patches/features/0221-Optimize-BlockEntityType-isValid.patch index 5077d8d6..4c0dc369 100644 --- a/leaf-server/minecraft-patches/features/0222-Optimize-BlockEntityType-isValid.patch +++ b/leaf-server/minecraft-patches/features/0221-Optimize-BlockEntityType-isValid.patch @@ -33,7 +33,7 @@ index 386e6a48701b4c9256e33174123381a93d61e292..2bc620ceb8368e9a74b831de698de94a @Deprecated diff --git a/net/minecraft/world/level/block/state/BlockBehaviour.java b/net/minecraft/world/level/block/state/BlockBehaviour.java -index 3219b9caa654c7a64e5e4a92178528e1104b34c7..6d522e9485fadd6fc0f350cb30ba5224aa046d4f 100644 +index 84f4d772bfe06383ca718b6a00d983e97e2e35f4..f9ff9a3a9633185c66503012eeb661a6e04fe1df 100644 --- a/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/net/minecraft/world/level/block/state/BlockBehaviour.java @@ -101,6 +101,7 @@ public abstract class BlockBehaviour implements FeatureElement { diff --git a/leaf-server/minecraft-patches/features/0223-Paper-PR-Add-ticket-on-player-join-to-avoid-chunk-lo.patch b/leaf-server/minecraft-patches/features/0222-Paper-PR-Add-ticket-on-player-join-to-avoid-chunk-lo.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0223-Paper-PR-Add-ticket-on-player-join-to-avoid-chunk-lo.patch rename to leaf-server/minecraft-patches/features/0222-Paper-PR-Add-ticket-on-player-join-to-avoid-chunk-lo.patch diff --git a/leaf-server/minecraft-patches/features/0224-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch b/leaf-server/minecraft-patches/features/0223-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0224-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch rename to leaf-server/minecraft-patches/features/0223-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch diff --git a/leaf-server/minecraft-patches/features/0225-Sakura-copy-EntityList-implementation-to-BasicEntity.patch b/leaf-server/minecraft-patches/features/0224-Sakura-copy-EntityList-implementation-to-BasicEntity.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0225-Sakura-copy-EntityList-implementation-to-BasicEntity.patch rename to leaf-server/minecraft-patches/features/0224-Sakura-copy-EntityList-implementation-to-BasicEntity.patch diff --git a/leaf-server/minecraft-patches/features/0226-Protocol-Core.patch b/leaf-server/minecraft-patches/features/0225-Protocol-Core.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0226-Protocol-Core.patch rename to leaf-server/minecraft-patches/features/0225-Protocol-Core.patch diff --git a/leaf-server/minecraft-patches/features/0227-Async-switch-connection-state.patch b/leaf-server/minecraft-patches/features/0226-Async-switch-connection-state.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0227-Async-switch-connection-state.patch rename to leaf-server/minecraft-patches/features/0226-Async-switch-connection-state.patch diff --git a/leaf-server/minecraft-patches/features/0228-Optimize-BlockEntities-tickersInLevel.patch b/leaf-server/minecraft-patches/features/0227-Optimize-BlockEntities-tickersInLevel.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0228-Optimize-BlockEntities-tickersInLevel.patch rename to leaf-server/minecraft-patches/features/0227-Optimize-BlockEntities-tickersInLevel.patch diff --git a/leaf-server/minecraft-patches/features/0229-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch b/leaf-server/minecraft-patches/features/0228-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0229-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch rename to leaf-server/minecraft-patches/features/0228-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch diff --git a/leaf-server/minecraft-patches/features/0230-Flush-location-while-knockback.patch b/leaf-server/minecraft-patches/features/0229-Flush-location-while-knockback.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0230-Flush-location-while-knockback.patch rename to leaf-server/minecraft-patches/features/0229-Flush-location-while-knockback.patch diff --git a/leaf-server/minecraft-patches/features/0231-Only-tick-items-at-hand.patch b/leaf-server/minecraft-patches/features/0230-Only-tick-items-at-hand.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0231-Only-tick-items-at-hand.patch rename to leaf-server/minecraft-patches/features/0230-Only-tick-items-at-hand.patch diff --git a/leaf-server/minecraft-patches/features/0232-Optimise-player-movement-checks.patch b/leaf-server/minecraft-patches/features/0231-Optimise-player-movement-checks.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0232-Optimise-player-movement-checks.patch rename to leaf-server/minecraft-patches/features/0231-Optimise-player-movement-checks.patch diff --git a/leaf-server/minecraft-patches/features/0233-Remove-streams-in-MobSensor.patch b/leaf-server/minecraft-patches/features/0232-Remove-streams-in-MobSensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0233-Remove-streams-in-MobSensor.patch rename to leaf-server/minecraft-patches/features/0232-Remove-streams-in-MobSensor.patch diff --git a/leaf-server/minecraft-patches/features/0234-Remove-streams-in-TemptingSensor.patch b/leaf-server/minecraft-patches/features/0233-Remove-streams-in-TemptingSensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0234-Remove-streams-in-TemptingSensor.patch rename to leaf-server/minecraft-patches/features/0233-Remove-streams-in-TemptingSensor.patch diff --git a/leaf-server/minecraft-patches/features/0235-Add-configurable-death-item-drop-knockback-settings.patch b/leaf-server/minecraft-patches/features/0234-Add-configurable-death-item-drop-knockback-settings.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0235-Add-configurable-death-item-drop-knockback-settings.patch rename to leaf-server/minecraft-patches/features/0234-Add-configurable-death-item-drop-knockback-settings.patch diff --git a/leaf-server/minecraft-patches/features/0236-Optimize-getScaledTrackingDistance.patch b/leaf-server/minecraft-patches/features/0235-Optimize-getScaledTrackingDistance.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0236-Optimize-getScaledTrackingDistance.patch rename to leaf-server/minecraft-patches/features/0235-Optimize-getScaledTrackingDistance.patch diff --git a/leaf-server/minecraft-patches/features/0237-Optimize-SynchedEntityData-packDirty.patch b/leaf-server/minecraft-patches/features/0236-Optimize-SynchedEntityData-packDirty.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0237-Optimize-SynchedEntityData-packDirty.patch rename to leaf-server/minecraft-patches/features/0236-Optimize-SynchedEntityData-packDirty.patch diff --git a/leaf-server/minecraft-patches/features/0238-Optimize-isEyeInFluid.patch b/leaf-server/minecraft-patches/features/0237-Optimize-isEyeInFluid.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0238-Optimize-isEyeInFluid.patch rename to leaf-server/minecraft-patches/features/0237-Optimize-isEyeInFluid.patch diff --git a/leaf-server/minecraft-patches/features/0239-Cache-block-state-tags.patch b/leaf-server/minecraft-patches/features/0238-Cache-block-state-tags.patch similarity index 84% rename from leaf-server/minecraft-patches/features/0239-Cache-block-state-tags.patch rename to leaf-server/minecraft-patches/features/0238-Cache-block-state-tags.patch index 48e93c7a..10659f55 100644 --- a/leaf-server/minecraft-patches/features/0239-Cache-block-state-tags.patch +++ b/leaf-server/minecraft-patches/features/0238-Cache-block-state-tags.patch @@ -4,18 +4,17 @@ Date: Fri, 23 May 2025 12:01:42 +0900 Subject: [PATCH] Cache block state tags -diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java -index 284947437eacf1d527b613d883c40bb3eb5faa90..5c96307c7cdbd80164ad8759c321c66c4b63ac9e 100644 ---- a/net/minecraft/server/Main.java -+++ b/net/minecraft/server/Main.java -@@ -336,6 +336,7 @@ public class Main { - levelStorageAccess.saveDataTag(frozen, worldData); - */ - Class.forName(net.minecraft.world.entity.npc.VillagerTrades.class.getName()); // Paper - load this sync so it won't fail later async -+ net.minecraft.world.level.block.Blocks.initPathType(); // Leaf - Cache block state tags - final DedicatedServer dedicatedServer = MinecraftServer.spin( - thread1 -> { - DedicatedServer dedicatedServer1 = new DedicatedServer( +diff --git a/net/minecraft/server/ReloadableServerResources.java b/net/minecraft/server/ReloadableServerResources.java +index 42326fc40b834c944e714fec91811d5c39dbe40c..a69819ae974f41fb766f25b9138ed7e74cad36dd 100644 +--- a/net/minecraft/server/ReloadableServerResources.java ++++ b/net/minecraft/server/ReloadableServerResources.java +@@ -109,5 +109,6 @@ public class ReloadableServerResources { + + public void updateStaticRegistryTags() { + this.postponedTags.forEach(Registry.PendingTags::apply); ++ net.minecraft.world.level.block.Blocks.initPathType(); // Leaf - Cache block state tags + } + } diff --git a/net/minecraft/world/level/block/Blocks.java b/net/minecraft/world/level/block/Blocks.java index 57aad048034005543a72556e990b53db8deebfee..b7aa32927e701184d53a03e009f88e9cf6313aab 100644 --- a/net/minecraft/world/level/block/Blocks.java @@ -36,10 +35,10 @@ index 57aad048034005543a72556e990b53db8deebfee..b7aa32927e701184d53a03e009f88e9c + // Leaf end - Cache block state tags } diff --git a/net/minecraft/world/level/block/state/BlockBehaviour.java b/net/minecraft/world/level/block/state/BlockBehaviour.java -index 6d522e9485fadd6fc0f350cb30ba5224aa046d4f..9caac78f0dbadc838753e2db7b757b70cea2fae8 100644 +index f9ff9a3a9633185c66503012eeb661a6e04fe1df..503420bbeaf3da0c568c28c55582f45469f40aeb 100644 --- a/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -473,6 +473,8 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -471,6 +471,8 @@ public abstract class BlockBehaviour implements FeatureElement { private boolean emptyCollisionShape; private boolean emptyConstantCollisionShape; private VoxelShape constantCollisionShape; @@ -48,7 +47,7 @@ index 6d522e9485fadd6fc0f350cb30ba5224aa046d4f..9caac78f0dbadc838753e2db7b757b70 private static void initCaches(final VoxelShape shape, final boolean neighbours) { ((ca.spottedleaf.moonrise.patches.collisions.shape.CollisionVoxelShape)shape).moonrise$isFullBlock(); -@@ -642,6 +644,13 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -638,6 +640,13 @@ public abstract class BlockBehaviour implements FeatureElement { // Paper end - optimise collisions } diff --git a/leaf-server/minecraft-patches/features/0240-optimize-getEntityStatus.patch b/leaf-server/minecraft-patches/features/0239-optimize-getEntityStatus.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0240-optimize-getEntityStatus.patch rename to leaf-server/minecraft-patches/features/0239-optimize-getEntityStatus.patch diff --git a/leaf-server/minecraft-patches/features/0241-Rail-Optimization-optimized-PoweredRailBlock-logic.patch b/leaf-server/minecraft-patches/features/0240-Rail-Optimization-optimized-PoweredRailBlock-logic.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0241-Rail-Optimization-optimized-PoweredRailBlock-logic.patch rename to leaf-server/minecraft-patches/features/0240-Rail-Optimization-optimized-PoweredRailBlock-logic.patch diff --git a/leaf-server/minecraft-patches/features/0242-optimise-ChunkGenerator-getMobsAt.patch b/leaf-server/minecraft-patches/features/0241-optimise-ChunkGenerator-getMobsAt.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0242-optimise-ChunkGenerator-getMobsAt.patch rename to leaf-server/minecraft-patches/features/0241-optimise-ChunkGenerator-getMobsAt.patch diff --git a/leaf-server/minecraft-patches/features/0243-cache-biome-for-mob-spawning-and-advancements.patch b/leaf-server/minecraft-patches/features/0242-cache-biome-for-mob-spawning-and-advancements.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0243-cache-biome-for-mob-spawning-and-advancements.patch rename to leaf-server/minecraft-patches/features/0242-cache-biome-for-mob-spawning-and-advancements.patch diff --git a/leaf-server/minecraft-patches/features/0244-optimize-mob-spawning.patch b/leaf-server/minecraft-patches/features/0243-optimize-mob-spawning.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0244-optimize-mob-spawning.patch rename to leaf-server/minecraft-patches/features/0243-optimize-mob-spawning.patch diff --git a/leaf-server/minecraft-patches/features/0245-optimize-structure-map.patch b/leaf-server/minecraft-patches/features/0244-optimize-structure-map.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0245-optimize-structure-map.patch rename to leaf-server/minecraft-patches/features/0244-optimize-structure-map.patch diff --git a/leaf-server/minecraft-patches/features/0246-throttle-mob-spawning.patch b/leaf-server/minecraft-patches/features/0245-throttle-mob-spawning.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0246-throttle-mob-spawning.patch rename to leaf-server/minecraft-patches/features/0245-throttle-mob-spawning.patch diff --git a/leaf-server/minecraft-patches/features/0247-Add-BlockExplosionHitEvent.patch b/leaf-server/minecraft-patches/features/0246-Add-BlockExplosionHitEvent.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0247-Add-BlockExplosionHitEvent.patch rename to leaf-server/minecraft-patches/features/0246-Add-BlockExplosionHitEvent.patch diff --git a/leaf-server/minecraft-patches/features/0248-Old-Blast-Protection-explosion-knockback.patch b/leaf-server/minecraft-patches/features/0247-Old-Blast-Protection-explosion-knockback.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0248-Old-Blast-Protection-explosion-knockback.patch rename to leaf-server/minecraft-patches/features/0247-Old-Blast-Protection-explosion-knockback.patch diff --git a/leaf-server/minecraft-patches/features/0249-Use-UUID-for-cure-reputation.patch b/leaf-server/minecraft-patches/features/0248-Use-UUID-for-cure-reputation.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0249-Use-UUID-for-cure-reputation.patch rename to leaf-server/minecraft-patches/features/0248-Use-UUID-for-cure-reputation.patch diff --git a/leaf-server/minecraft-patches/features/0250-Fix-crash-during-parsing-unknown-command-message.patch b/leaf-server/minecraft-patches/features/0249-Fix-crash-during-parsing-unknown-command-message.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0250-Fix-crash-during-parsing-unknown-command-message.patch rename to leaf-server/minecraft-patches/features/0249-Fix-crash-during-parsing-unknown-command-message.patch diff --git a/leaf-server/minecraft-patches/features/0251-optimize-random-tick.patch b/leaf-server/minecraft-patches/features/0250-optimize-random-tick.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0251-optimize-random-tick.patch rename to leaf-server/minecraft-patches/features/0250-optimize-random-tick.patch diff --git a/leaf-server/minecraft-patches/features/0252-do-not-log-invalid-flatten-text-component-parse.patch b/leaf-server/minecraft-patches/features/0251-do-not-log-invalid-flatten-text-component-parse.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0252-do-not-log-invalid-flatten-text-component-parse.patch rename to leaf-server/minecraft-patches/features/0251-do-not-log-invalid-flatten-text-component-parse.patch diff --git a/leaf-server/minecraft-patches/features/0253-Fast-BiomeManager-seed-obfuscation.patch b/leaf-server/minecraft-patches/features/0252-Fast-BiomeManager-seed-obfuscation.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0253-Fast-BiomeManager-seed-obfuscation.patch rename to leaf-server/minecraft-patches/features/0252-Fast-BiomeManager-seed-obfuscation.patch diff --git a/leaf-server/minecraft-patches/features/0254-Replace-EntitySelectorOptions-map-with-optimized-col.patch b/leaf-server/minecraft-patches/features/0253-Replace-EntitySelectorOptions-map-with-optimized-col.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0254-Replace-EntitySelectorOptions-map-with-optimized-col.patch rename to leaf-server/minecraft-patches/features/0253-Replace-EntitySelectorOptions-map-with-optimized-col.patch diff --git a/leaf-server/minecraft-patches/features/0255-optimize-no-action-time.patch b/leaf-server/minecraft-patches/features/0254-optimize-no-action-time.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0255-optimize-no-action-time.patch rename to leaf-server/minecraft-patches/features/0254-optimize-no-action-time.patch diff --git a/leaf-server/minecraft-patches/features/0256-optimize-waypoint.patch b/leaf-server/minecraft-patches/features/0255-optimize-waypoint.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0256-optimize-waypoint.patch rename to leaf-server/minecraft-patches/features/0255-optimize-waypoint.patch diff --git a/leaf-server/minecraft-patches/features/0257-Paw-optimization.patch b/leaf-server/minecraft-patches/features/0256-Paw-optimization.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0257-Paw-optimization.patch rename to leaf-server/minecraft-patches/features/0256-Paw-optimization.patch diff --git a/leaf-server/minecraft-patches/features/0258-Fix-Paper-config-fixClimbingBypassingCrammingRule.patch b/leaf-server/minecraft-patches/features/0257-Fix-Paper-config-fixClimbingBypassingCrammingRule.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0258-Fix-Paper-config-fixClimbingBypassingCrammingRule.patch rename to leaf-server/minecraft-patches/features/0257-Fix-Paper-config-fixClimbingBypassingCrammingRule.patch diff --git a/leaf-server/minecraft-patches/features/0259-Skip-inactive-entity-for-execute.patch b/leaf-server/minecraft-patches/features/0258-Skip-inactive-entity-for-execute.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0259-Skip-inactive-entity-for-execute.patch rename to leaf-server/minecraft-patches/features/0258-Skip-inactive-entity-for-execute.patch diff --git a/leaf-server/minecraft-patches/features/0260-Optimise-getEntities.patch b/leaf-server/minecraft-patches/features/0259-Optimise-getEntities.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0260-Optimise-getEntities.patch rename to leaf-server/minecraft-patches/features/0259-Optimise-getEntities.patch diff --git a/leaf-server/minecraft-patches/features/0261-fix-MC-298464.patch b/leaf-server/minecraft-patches/features/0260-fix-MC-298464.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0261-fix-MC-298464.patch rename to leaf-server/minecraft-patches/features/0260-fix-MC-298464.patch diff --git a/leaf-server/minecraft-patches/features/0262-Re-route-SetClosestHomeAsWalkTarget-s-poi-finding-to.patch b/leaf-server/minecraft-patches/features/0261-Re-route-SetClosestHomeAsWalkTarget-s-poi-finding-to.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0262-Re-route-SetClosestHomeAsWalkTarget-s-poi-finding-to.patch rename to leaf-server/minecraft-patches/features/0261-Re-route-SetClosestHomeAsWalkTarget-s-poi-finding-to.patch diff --git a/leaf-server/minecraft-patches/features/0263-optimize-checkInsideBlocks-calls.patch b/leaf-server/minecraft-patches/features/0262-optimize-checkInsideBlocks-calls.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0263-optimize-checkInsideBlocks-calls.patch rename to leaf-server/minecraft-patches/features/0262-optimize-checkInsideBlocks-calls.patch diff --git a/leaf-server/minecraft-patches/features/0264-Optimise-TextColor.patch b/leaf-server/minecraft-patches/features/0263-Optimise-TextColor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0264-Optimise-TextColor.patch rename to leaf-server/minecraft-patches/features/0263-Optimise-TextColor.patch diff --git a/leaf-server/minecraft-patches/features/0265-Do-not-create-fire-if-explosion-was-cancelled.patch b/leaf-server/minecraft-patches/features/0264-Do-not-create-fire-if-explosion-was-cancelled.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0265-Do-not-create-fire-if-explosion-was-cancelled.patch rename to leaf-server/minecraft-patches/features/0264-Do-not-create-fire-if-explosion-was-cancelled.patch diff --git a/leaf-server/minecraft-patches/features/0266-Skip-BlockPhysicsEvent-if-no-listeners.patch b/leaf-server/minecraft-patches/features/0265-Skip-BlockPhysicsEvent-if-no-listeners.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0266-Skip-BlockPhysicsEvent-if-no-listeners.patch rename to leaf-server/minecraft-patches/features/0265-Skip-BlockPhysicsEvent-if-no-listeners.patch diff --git a/leaf-server/minecraft-patches/features/0267-Lithium-equipment-tracking.patch b/leaf-server/minecraft-patches/features/0266-Lithium-equipment-tracking.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0267-Lithium-equipment-tracking.patch rename to leaf-server/minecraft-patches/features/0266-Lithium-equipment-tracking.patch diff --git a/leaf-server/minecraft-patches/features/0268-fix-purpur-attribute-base-patch.patch b/leaf-server/minecraft-patches/features/0267-fix-purpur-attribute-base-patch.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0268-fix-purpur-attribute-base-patch.patch rename to leaf-server/minecraft-patches/features/0267-fix-purpur-attribute-base-patch.patch diff --git a/leaf-server/minecraft-patches/features/0269-Bump-netty-to-4.2.x.patch b/leaf-server/minecraft-patches/features/0268-Bump-netty-to-4.2.x.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0269-Bump-netty-to-4.2.x.patch rename to leaf-server/minecraft-patches/features/0268-Bump-netty-to-4.2.x.patch diff --git a/leaf-server/minecraft-patches/features/0270-Paper-PR-Optimise-temptation-lookups.patch b/leaf-server/minecraft-patches/features/0269-Paper-PR-Optimise-temptation-lookups.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0270-Paper-PR-Optimise-temptation-lookups.patch rename to leaf-server/minecraft-patches/features/0269-Paper-PR-Optimise-temptation-lookups.patch diff --git a/leaf-server/minecraft-patches/features/0271-fix-temptation-lookups.patch b/leaf-server/minecraft-patches/features/0270-fix-temptation-lookups.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0271-fix-temptation-lookups.patch rename to leaf-server/minecraft-patches/features/0270-fix-temptation-lookups.patch diff --git a/leaf-server/minecraft-patches/features/0272-Lithium-combined-heightmap-update.patch b/leaf-server/minecraft-patches/features/0271-Lithium-combined-heightmap-update.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0272-Lithium-combined-heightmap-update.patch rename to leaf-server/minecraft-patches/features/0271-Lithium-combined-heightmap-update.patch diff --git a/leaf-server/minecraft-patches/features/0273-Skip-PreCreatureSpawnEvent-if-no-listeners.patch b/leaf-server/minecraft-patches/features/0272-Skip-PreCreatureSpawnEvent-if-no-listeners.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0273-Skip-PreCreatureSpawnEvent-if-no-listeners.patch rename to leaf-server/minecraft-patches/features/0272-Skip-PreCreatureSpawnEvent-if-no-listeners.patch diff --git a/leaf-server/minecraft-patches/features/0274-optimize-goal-selector.patch b/leaf-server/minecraft-patches/features/0273-optimize-goal-selector.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0274-optimize-goal-selector.patch rename to leaf-server/minecraft-patches/features/0273-optimize-goal-selector.patch diff --git a/leaf-server/minecraft-patches/features/0275-thread-unsafe-chunk-map.patch b/leaf-server/minecraft-patches/features/0274-thread-unsafe-chunk-map.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0275-thread-unsafe-chunk-map.patch rename to leaf-server/minecraft-patches/features/0274-thread-unsafe-chunk-map.patch diff --git a/leaf-server/minecraft-patches/features/0276-optimize-SimpleBitStorage-object-layout.patch b/leaf-server/minecraft-patches/features/0275-optimize-SimpleBitStorage-object-layout.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0276-optimize-SimpleBitStorage-object-layout.patch rename to leaf-server/minecraft-patches/features/0275-optimize-SimpleBitStorage-object-layout.patch diff --git a/leaf-server/minecraft-patches/features/0277-optimize-get-chunk.patch b/leaf-server/minecraft-patches/features/0276-optimize-get-chunk.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0277-optimize-get-chunk.patch rename to leaf-server/minecraft-patches/features/0276-optimize-get-chunk.patch diff --git a/leaf-server/minecraft-patches/features/0278-remove-shouldTickBlocksAt-check.patch b/leaf-server/minecraft-patches/features/0277-remove-shouldTickBlocksAt-check.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0278-remove-shouldTickBlocksAt-check.patch rename to leaf-server/minecraft-patches/features/0277-remove-shouldTickBlocksAt-check.patch diff --git a/leaf-server/minecraft-patches/features/0279-optimize-PalettedContainer-get.patch b/leaf-server/minecraft-patches/features/0278-optimize-PalettedContainer-get.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0279-optimize-PalettedContainer-get.patch rename to leaf-server/minecraft-patches/features/0278-optimize-PalettedContainer-get.patch diff --git a/leaf-server/minecraft-patches/features/0280-optimize-LevelChunk-getBlockStateFinal.patch b/leaf-server/minecraft-patches/features/0279-optimize-LevelChunk-getBlockStateFinal.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0280-optimize-LevelChunk-getBlockStateFinal.patch rename to leaf-server/minecraft-patches/features/0279-optimize-LevelChunk-getBlockStateFinal.patch diff --git a/leaf-server/minecraft-patches/features/0281-optimize-FluidState-is-TagKey.patch b/leaf-server/minecraft-patches/features/0280-optimize-FluidState-is-TagKey.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0281-optimize-FluidState-is-TagKey.patch rename to leaf-server/minecraft-patches/features/0280-optimize-FluidState-is-TagKey.patch diff --git a/leaf-server/minecraft-patches/features/0282-counting-chunk-section-fluid.patch b/leaf-server/minecraft-patches/features/0281-counting-chunk-section-fluid.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0282-counting-chunk-section-fluid.patch rename to leaf-server/minecraft-patches/features/0281-counting-chunk-section-fluid.patch diff --git a/leaf-server/minecraft-patches/features/0283-optimize-SpreadingSnowyDirtBlock-randomTick.patch b/leaf-server/minecraft-patches/features/0282-optimize-SpreadingSnowyDirtBlock-randomTick.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0283-optimize-SpreadingSnowyDirtBlock-randomTick.patch rename to leaf-server/minecraft-patches/features/0282-optimize-SpreadingSnowyDirtBlock-randomTick.patch diff --git a/leaf-server/minecraft-patches/features/0284-optimize-onClimbable.patch b/leaf-server/minecraft-patches/features/0283-optimize-onClimbable.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0284-optimize-onClimbable.patch rename to leaf-server/minecraft-patches/features/0283-optimize-onClimbable.patch diff --git a/leaf-server/minecraft-patches/features/0285-optimize-applyMovementEmissionAndPlaySound.patch b/leaf-server/minecraft-patches/features/0284-optimize-applyMovementEmissionAndPlaySound.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0285-optimize-applyMovementEmissionAndPlaySound.patch rename to leaf-server/minecraft-patches/features/0284-optimize-applyMovementEmissionAndPlaySound.patch diff --git a/leaf-server/minecraft-patches/features/0286-optimize-isStateClimbable.patch b/leaf-server/minecraft-patches/features/0285-optimize-isStateClimbable.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0286-optimize-isStateClimbable.patch rename to leaf-server/minecraft-patches/features/0285-optimize-isStateClimbable.patch diff --git a/leaf-server/minecraft-patches/features/0287-optimize-getOnPos.patch b/leaf-server/minecraft-patches/features/0286-optimize-getOnPos.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0287-optimize-getOnPos.patch rename to leaf-server/minecraft-patches/features/0286-optimize-getOnPos.patch diff --git a/leaf-server/minecraft-patches/features/0288-cache-eye-block-position.patch b/leaf-server/minecraft-patches/features/0287-cache-eye-block-position.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0288-cache-eye-block-position.patch rename to leaf-server/minecraft-patches/features/0287-cache-eye-block-position.patch diff --git a/leaf-server/minecraft-patches/features/0289-optimize-entity-in-fluid.patch b/leaf-server/minecraft-patches/features/0288-optimize-entity-in-fluid.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0289-optimize-entity-in-fluid.patch rename to leaf-server/minecraft-patches/features/0288-optimize-entity-in-fluid.patch diff --git a/leaf-server/minecraft-patches/features/0290-optimize-checkInsideBlocks.patch b/leaf-server/minecraft-patches/features/0289-optimize-checkInsideBlocks.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0290-optimize-checkInsideBlocks.patch rename to leaf-server/minecraft-patches/features/0289-optimize-checkInsideBlocks.patch diff --git a/leaf-server/minecraft-patches/features/0291-Replace-entity-fluid-height-map.patch b/leaf-server/minecraft-patches/features/0290-Replace-entity-fluid-height-map.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0291-Replace-entity-fluid-height-map.patch rename to leaf-server/minecraft-patches/features/0290-Replace-entity-fluid-height-map.patch diff --git a/leaf-server/minecraft-patches/features/0292-optimize-collision-shape.patch b/leaf-server/minecraft-patches/features/0291-optimize-collision-shape.patch similarity index 88% rename from leaf-server/minecraft-patches/features/0292-optimize-collision-shape.patch rename to leaf-server/minecraft-patches/features/0291-optimize-collision-shape.patch index b9e229f6..4908c808 100644 --- a/leaf-server/minecraft-patches/features/0292-optimize-collision-shape.patch +++ b/leaf-server/minecraft-patches/features/0291-optimize-collision-shape.patch @@ -5,10 +5,10 @@ Subject: [PATCH] optimize collision shape diff --git a/net/minecraft/world/level/block/state/BlockBehaviour.java b/net/minecraft/world/level/block/state/BlockBehaviour.java -index 9caac78f0dbadc838753e2db7b757b70cea2fae8..ef0849eb69deee974a8dd5ada628b469822755e5 100644 +index 503420bbeaf3da0c568c28c55582f45469f40aeb..20fb2439c11f24790f58fe9d9caa100b398308a0 100644 --- a/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -623,6 +623,13 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -619,6 +619,13 @@ public abstract class BlockBehaviour implements FeatureElement { this.emptyConstantCollisionShape = this.constantCollisionShape != null && this.constantCollisionShape.isEmpty(); // init caches initCaches(collisionShape, true); diff --git a/leaf-server/minecraft-patches/features/0293-cache-collision-list.patch b/leaf-server/minecraft-patches/features/0292-cache-collision-list.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0293-cache-collision-list.patch rename to leaf-server/minecraft-patches/features/0292-cache-collision-list.patch diff --git a/leaf-server/minecraft-patches/features/0294-fast-bit-radix-sort.patch b/leaf-server/minecraft-patches/features/0293-fast-bit-radix-sort.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0294-fast-bit-radix-sort.patch rename to leaf-server/minecraft-patches/features/0293-fast-bit-radix-sort.patch diff --git a/leaf-server/minecraft-patches/features/0295-optimize-tickEffects.patch b/leaf-server/minecraft-patches/features/0294-optimize-tickEffects.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0295-optimize-tickEffects.patch rename to leaf-server/minecraft-patches/features/0294-optimize-tickEffects.patch diff --git a/leaf-server/minecraft-patches/features/0296-Pluto-Expose-Direction-Plane-s-faces.patch b/leaf-server/minecraft-patches/features/0295-Pluto-Expose-Direction-Plane-s-faces.patch similarity index 99% rename from leaf-server/minecraft-patches/features/0296-Pluto-Expose-Direction-Plane-s-faces.patch rename to leaf-server/minecraft-patches/features/0295-Pluto-Expose-Direction-Plane-s-faces.patch index 6ebfcd26..e7df2223 100644 --- a/leaf-server/minecraft-patches/features/0296-Pluto-Expose-Direction-Plane-s-faces.patch +++ b/leaf-server/minecraft-patches/features/0295-Pluto-Expose-Direction-Plane-s-faces.patch @@ -576,7 +576,7 @@ index 750162571a2277966fcddd01053f38b81e9f636f..b7b21fa8ee6824e8d646133c8a0eb269 list.add(direction); } diff --git a/net/minecraft/world/level/material/FlowingFluid.java b/net/minecraft/world/level/material/FlowingFluid.java -index bcda72fbd920a087ea7d10171da933b13adc1813..69aba8d4d83608685acb7facfb19fcf97f2500db 100644 +index a9c7966371f184ec2a23275496a5cfd7774dffae..ca6df49381fd41e6aad20604acc58f4b4c504f1a 100644 --- a/net/minecraft/world/level/material/FlowingFluid.java +++ b/net/minecraft/world/level/material/FlowingFluid.java @@ -98,7 +98,7 @@ public abstract class FlowingFluid extends Fluid { diff --git a/leaf-server/minecraft-patches/features/0297-Pluto-reduce-allocation.patch b/leaf-server/minecraft-patches/features/0296-Pluto-reduce-allocation.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0297-Pluto-reduce-allocation.patch rename to leaf-server/minecraft-patches/features/0296-Pluto-reduce-allocation.patch diff --git a/leaf-server/minecraft-patches/features/0298-Only-update-frozen-ticks-if-changed.patch b/leaf-server/minecraft-patches/features/0297-Only-update-frozen-ticks-if-changed.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0298-Only-update-frozen-ticks-if-changed.patch rename to leaf-server/minecraft-patches/features/0297-Only-update-frozen-ticks-if-changed.patch diff --git a/leaf-server/minecraft-patches/features/0299-Prevent-executing-commands-if-server-stopped.patch b/leaf-server/minecraft-patches/features/0298-Prevent-executing-commands-if-server-stopped.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0299-Prevent-executing-commands-if-server-stopped.patch rename to leaf-server/minecraft-patches/features/0298-Prevent-executing-commands-if-server-stopped.patch diff --git a/leaf-server/minecraft-patches/features/0299-optimize-canHoldAnyFluid.patch b/leaf-server/minecraft-patches/features/0299-optimize-canHoldAnyFluid.patch new file mode 100644 index 00000000..9dab9e10 --- /dev/null +++ b/leaf-server/minecraft-patches/features/0299-optimize-canHoldAnyFluid.patch @@ -0,0 +1,28 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: hayanesuru +Date: Thu, 9 Oct 2025 18:32:43 +0900 +Subject: [PATCH] optimize canHoldAnyFluid + + +diff --git a/net/minecraft/world/level/material/FlowingFluid.java b/net/minecraft/world/level/material/FlowingFluid.java +index ca6df49381fd41e6aad20604acc58f4b4c504f1a..9b4c6f7a2b8d3a74912e842c1c698c2b67a697da 100644 +--- a/net/minecraft/world/level/material/FlowingFluid.java ++++ b/net/minecraft/world/level/material/FlowingFluid.java +@@ -477,7 +477,7 @@ public abstract class FlowingFluid extends Fluid { + BlockGetter level, BlockPos pos, BlockState state, Direction direction, BlockPos spreadPos, BlockState spreadState, FluidState fluidState + ) { + return !this.isSourceBlockOfThisType(fluidState) +- && canHoldAnyFluid(spreadState) ++ && (spreadState.tagFlag & org.dreeam.leaf.util.BlockMasks.CAN_HOLD_ANY_FLUID) != 0 // Leaf - optimize canHoldAnyFluid + && canPassThroughWall(direction, level, pos, state, spreadPos, spreadState); + } + +@@ -559,7 +559,7 @@ public abstract class FlowingFluid extends Fluid { + } + + private static boolean canHoldFluid(BlockGetter level, BlockPos pos, BlockState state, Fluid fluid) { +- return canHoldAnyFluid(state) && canHoldSpecificFluid(level, pos, state, fluid); ++ return (state.tagFlag & org.dreeam.leaf.util.BlockMasks.CAN_HOLD_ANY_FLUID) != 0 && canHoldSpecificFluid(level, pos, state, fluid); // Leaf - optimize canHoldAnyFluid + } + + private static boolean canHoldSpecificFluid(BlockGetter level, BlockPos pos, BlockState state, Fluid fluid) { diff --git a/leaf-server/src/main/java/org/dreeam/leaf/util/BlockMasks.java b/leaf-server/src/main/java/org/dreeam/leaf/util/BlockMasks.java index 5004b67b..7405d91e 100644 --- a/leaf-server/src/main/java/org/dreeam/leaf/util/BlockMasks.java +++ b/leaf-server/src/main/java/org/dreeam/leaf/util/BlockMasks.java @@ -6,6 +6,7 @@ import net.minecraft.world.level.block.FenceGateBlock; import net.minecraft.world.level.block.PowderSnowBlock; import net.minecraft.world.level.block.TrapDoorBlock; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.FlowingFluid; public final class BlockMasks { public static final int WALL_TAG = 0x01; @@ -16,6 +17,7 @@ public final class BlockMasks { public static final int TRAP_DOOR_CL = 0x20; public static final int WATER = 0x40; public static final int LAVA = 0x80; + public static final int CAN_HOLD_ANY_FLUID = 0x100; public static final int FLUID = WATER | LAVA; public static final int IS_STATE_CLIMBABLE = org.dreeam.leaf.util.BlockMasks.CLIMBABLE_TAG | org.dreeam.leaf.util.BlockMasks.POWDER_SNOW_CL; @@ -30,6 +32,7 @@ public final class BlockMasks { i |= state.getBlock() instanceof TrapDoorBlock ? TRAP_DOOR_CL : 0; i |= state.getFluidState().is(FluidTags.WATER) ? WATER : 0; i |= state.getFluidState().is(FluidTags.LAVA) ? LAVA : 0; + i |= FlowingFluid.canHoldAnyFluid(state) ? CAN_HOLD_ANY_FLUID : 0; return i; } }