From 8e5d5b87530c6701096a5778c38f2aadf1976965 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sat, 27 Nov 2021 02:42:09 -0800 Subject: [PATCH] Add Starlight --- ...ze-NibbleArray-to-use-pooled-buffers.patch | 0 ...334-Fix-World-isChunkGenerated-calls.patch | 4 +- ...0463-Support-components-in-ItemMeta.patch} | 0 ...rgetLivingEntityEvent-for-1.16-mobs.patch} | 0 ...patch => 0465-Add-entity-liquid-API.patch} | 0 ...date-itemstack-legacy-name-and-lore.patch} | 0 ...wn-player-in-correct-world-on-login.patch} | 0 ...atch => 0468-Add-PrepareResultEvent.patch} | 0 ...-for-portal-on-world-gen-entity-add.patch} | 0 ...-Priority-Urgency-System-for-Chunks.patch} | 0 ...e-NetworkManager-Exception-Handling.patch} | 0 ...ncement-data-player-iteration-to-be.patch} | 0 ...x-arrows-never-despawning-MC-125757.patch} | 0 ...Vanilla-Command-permission-checking.patch} | 0 ...ve-range-check-for-block-placing-up.patch} | 0 ...-5989.patch => 0476-Fix-SPIGOT-5989.patch} | 0 ...-Bukkit-world-container-is-not-used.patch} | 0 ...5885-Unable-to-disable-advancements.patch} | 0 ...taPlayer-leak-due-from-quitting-ear.patch} | 0 ...eLighting-call-to-World-spigot-stri.patch} | 0 ...ix-some-rails-connecting-improperly.patch} | 0 ...stake-in-CB-NBT-int-deserialization.patch} | 0 ...rver-load-chunks-from-newer-version.patch} | 2 +- ...support.patch => 0484-Brand-support.patch} | 0 ...patch => 0485-Add-setMaxPlayers-API.patch} | 0 ...PickupItemAnimation-to-LivingEntity.patch} | 0 ...h => 0487-Don-t-require-FACING-data.patch} | 0 ...eEvent-not-firing-for-all-use-cases.patch} | 0 ...PI.patch => 0489-Add-moon-phase-API.patch} | 0 ...prove-Chunk-Status-Transition-Speed.patch} | 0 ...headless-pistons-from-being-created.patch} | 0 ...ent.patch => 0492-Add-BellRingEvent.patch} | 0 ...dd-zombie-targets-turtle-egg-config.patch} | 0 ...patch => 0494-Buffer-joins-to-world.patch} | 0 ...=> 0495-Optimize-redstone-algorithm.patch} | 0 ...s-not-working-in-some-kick-messages.patch} | 0 ...reateEvent-needs-to-know-its-entity.patch} | 0 ...ch => 0498-Fix-CraftTeam-null-check.patch} | 0 ...I.patch => 0499-Add-more-Evoker-API.patch} | 0 ...Add-methods-to-get-translation-keys.patch} | 2 +- ...te-HoverEvent-from-ItemStack-Entity.patch} | 0 ...ch => 0502-Cache-block-data-strings.patch} | 0 ...rtation-and-cancel-velocity-if-tele.patch} | 0 ...l-open-container-api-to-HumanEntity.patch} | 0 ...aFixerUpper-Rewrite-Rules-on-demand.patch} | 0 ...-capture-to-capture-all-items-added.patch} | 0 ...ty-in-invalid-locations-SPIGOT-6086.patch} | 2 +- ...-Counter-to-allow-plugins-to-use-va.patch} | 2 +- ...track-plugin-scoreboards-by-default.patch} | 2 +- ...king.patch => 0510-Entity-isTicking.patch} | 0 ...non-whitelisted-player-when-white-l.patch} | 0 ...x-Concurrency-issue-in-WeightedList.patch} | 0 ...eset-Ender-Crystals-on-Dragon-Spawn.patch} | 0 ...-large-move-vectors-crashing-server.patch} | 0 ...atch => 0515-Optimise-getType-calls.patch} | 0 ....patch => 0516-Villager-resetOffers.patch} | 0 ...nig-for-some-hot-IBlockData-methods.patch} | 0 ...ce-order-when-capturing-blockstates.patch} | 0 ...lockpos-allocation-from-pathfinding.patch} | 0 ...em-locations-dropped-from-campfires.patch} | 0 ...tch => 0521-Player-elytra-boost-API.patch} | 0 ...22-Fixed-TileEntityBell-memory-leak.patch} | 0 ...ing-up-when-item-stack-is-empty-in-.patch} | 0 ...Add-getOfflinePlayerIfCached-String.patch} | 0 ...ch => 0525-Add-ignore-discounts-API.patch} | 0 ...Toggle-for-removing-existing-dragon.patch} | 2 +- ...x-client-lag-on-advancement-loading.patch} | 2 +- ...> 0528-Item-no-age-no-player-pickup.patch} | 0 ...er-Remove-Streams-Optimized-collect.patch} | 0 ...530-Beacon-API-custom-effect-ranges.patch} | 0 ...tch => 0531-Add-API-for-quit-reason.patch} | 2 +- ...ng-Trader-spawn-rate-config-options.patch} | 2 +- ...rove-performance-of-the-end-generat.patch} | 0 ...ch => 0534-Expose-world-spawn-angle.patch} | 2 +- ...patch => 0535-Add-Destroy-Speed-API.patch} | 0 ...-spawnParticle-x-y-z-precision-loss.patch} | 0 ...37-Add-LivingEntity-clearActiveItem.patch} | 0 ...=> 0538-Add-PlayerItemCooldownEvent.patch} | 0 ...PI.patch => 0539-More-lightning-API.patch} | 0 ...should-not-bypass-cramming-gamerule.patch} | 2 +- ...-missing-default-perms-for-commands.patch} | 0 ...h => 0542-Add-PlayerShearBlockEvent.patch} | 0 ...ng-zombie-villager-discount-exploit.patch} | 2 +- ....patch => 0544-Limit-recipe-packets.patch} | 2 +- ...-CraftSound-backwards-compatibility.patch} | 0 ... 0546-MC-4-Fix-item-position-desync.patch} | 2 +- ...547-Player-Chunk-Load-Unload-Events.patch} | 0 ...8-Optimize-Dynamic-get-Missing-Keys.patch} | 0 ...-Expose-LivingEntity-hurt-direction.patch} | 0 ...OBSTRUCTED-reason-to-BedEnterResult.patch} | 0 ...-invalid-ingredient-lists-in-Villag.patch} | 0 ...rTradeEvent-and-PlayerPurchaseEvent.patch} | 0 ...ch => 0553-Implement-TargetHitEvent.patch} | 0 ...554-Additional-Block-Material-API-s.patch} | 0 ...tch => 0555-Fix-harming-potion-dupe.patch} | 0 ...get-Material-from-Boats-and-Minecar.patch} | 0 ....patch => 0557-Cache-burn-durations.patch} | 0 ...ob-spawner-spawn-egg-transformation.patch} | 2 +- ...ix-Not-a-string-Map-Conversion-spam.patch} | 0 ...ment-PlayerFlowerPotManipulateEvent.patch} | 0 ...event-not-being-called-in-adventure.patch} | 0 ...h => 0562-Zombie-API-breaking-doors.patch} | 0 ...563-Fix-nerfed-slime-when-splitting.patch} | 0 ...=> 0564-Add-EntityLoadCrossbowEvent.patch} | 0 ...ch => 0565-Guardian-beam-workaround.patch} | 0 ...0566-Added-WorldGameRuleChangeEvent.patch} | 0 ...-Added-ServerResourcesReloadedEvent.patch} | 0 ...d-settings-for-mobs-picking-up-loot.patch} | 0 ...mplemented-BlockFailedDispenseEvent.patch} | 0 ...-Added-PlayerLecternPageChangeEvent.patch} | 0 ...-Added-PlayerLoomPatternSelectEvent.patch} | 0 ...nfigurable-door-breaking-difficulty.patch} | 2 +- ...ty-commands-shall-not-be-dispatched.patch} | 0 ...I-to-expose-exact-interaction-point.patch} | 0 ...OIs.patch => 0575-Remove-stale-POIs.patch} | 0 ...h => 0576-Fix-villager-boat-exploit.patch} | 2 +- ...I.patch => 0577-Add-sendOpLevel-API.patch} | 0 ...ch => 0578-Add-StructureLocateEvent.patch} | 0 ...-for-requiring-a-player-participant.patch} | 2 +- ...leHitEvent-call-when-fireballs-dead.patch} | 0 ...nent-with-empty-text-instead-of-thr.patch} | 0 ...582-Make-schedule-command-per-world.patch} | 0 ...583-Configurable-max-leash-distance.patch} | 0 ...584-Implement-BlockPreDispenseEvent.patch} | 0 ...-API.patch => 0585-added-Wither-API.patch} | 0 ...ng-of-PlayerChangeBeaconEffectEvent.patch} | 0 ...e-for-always-placing-the-dragon-egg.patch} | 0 ...-PlayerStonecutterRecipeSelectEvent.patch} | 0 ...eash-variable-to-EntityUnleashEvent.patch} | 0 ...e-map-update-when-spawning-disabled.patch} | 0 ...shield-blocking-on-dimension-change.patch} | 0 ...atch => 0592-add-DragonEggFormEvent.patch} | 0 ...Event.patch => 0593-EntityMoveEvent.patch} | 0 ...isable-pathfinding-updates-on-block.patch} | 0 ... 0595-Inline-shift-direction-fields.patch} | 0 ...-adding-items-to-BlockDropItemEvent.patch} | 0 ...inThreadExecutor-to-BukkitScheduler.patch} | 0 ...entity-allow-attribute-registration.patch} | 0 ...ix-dead-slime-setSize-invincibility.patch} | 0 ...pes-should-return-an-immutable-list.patch} | 0 ...port-for-hex-color-codes-in-console.patch} | 0 ...atch => 0602-Expose-Tracked-Players.patch} | 0 ...3-Remove-streams-from-SensorNearest.patch} | 0 ...er-exception-on-empty-JsonList-file.patch} | 0 ...GUI.patch => 0605-Improve-ServerGUI.patch} | 0 ...ure-plate-EntityInteractEvent-for-i.patch} | 0 ...607-fix-converting-txt-to-json-file.patch} | 2 +- ...atch => 0608-Add-worldborder-events.patch} | 0 ...=> 0609-added-PlayerNameEntityEvent.patch} | 0 ...grindstones-from-overstacking-items.patch} | 0 ...h => 0611-Add-recipe-to-cook-events.patch} | 0 ...patch => 0612-Add-Block-isValidTool.patch} | 0 ...using-signs-inside-spawn-protection.patch} | 0 ...ch => 0614-Implement-Keyed-on-World.patch} | 0 ...ternative-constructor-for-Rotations.patch} | 0 ...y-API.patch => 0616-Item-Rarity-API.patch} | 2 +- ...imer-for-Wandering-Traders-spawned-.patch} | 0 ...py-TESign-isEditable-from-snapshots.patch} | 0 ...d-item-when-player-has-disconnected.patch} | 2 +- ...elist-use-configurable-kick-message.patch} | 0 ...gnore-result-of-PlayerEditBookEvent.patch} | 0 ...22-Entity-load-save-limit-per-chunk.patch} | 2 +- ...block-falling-causing-client-desync.patch} | 0 ...tch => 0624-Expose-protocol-version.patch} | 2 +- ...nt-suggestion-tooltips-in-AsyncTabC.patch} | 0 ...ab-completions-for-brigadier-comman.patch} | 2 +- ...temConsumeEvent-cancelling-properly.patch} | 0 ...patch => 0628-Add-bypass-host-check.patch} | 0 ...0629-Set-area-affect-cloud-rotation.patch} | 2 +- ...add-isDeeplySleeping-to-HumanEntity.patch} | 0 ...ting-give-items-on-item-drop-cancel.patch} | 0 ...add-consumeFuel-to-FurnaceBurnEvent.patch} | 0 ...-set-drop-chance-to-EntityEquipment.patch} | 0 ...ix-PigZombieAngerEvent-cancellation.patch} | 0 ...-checkReach-check-for-Shulker-boxes.patch} | 0 ...ix-PlayerItemHeldEvent-firing-twice.patch} | 0 ... => 0637-Added-PlayerDeepSleepEvent.patch} | 0 ...ld-API.patch => 0638-More-World-API.patch} | 0 ... 0639-Added-PlayerBedFailEnterEvent.patch} | 0 ...-to-convert-between-Component-and-B.patch} | 0 ...n-acting-as-a-bed-respawn-from-the-.patch} | 2 +- ...acon-activation-deactivation-events.patch} | 0 ...-RespawnFlags-to-PlayerRespawnEvent.patch} | 2 +- ...dd-Channel-initialization-listeners.patch} | 0 ...mands-if-tab-completion-is-disabled.patch} | 0 ...> 0646-Add-more-WanderingTrader-API.patch} | 0 ...dd-EntityBlockStorage-clearEntities.patch} | 0 ...ssage-to-PlayerAdvancementDoneEvent.patch} | 0 ...address-to-AsyncPlayerPreLoginEvent.patch} | 0 ...close.patch => 0650-Inventory-close.patch} | 0 ...reateEvent-players-and-end-platform.patch} | 0 ...-in-sunlight-API-for-Phantoms-and-S.patch} | 0 ...=> 0653-Fix-CraftPotionBrewer-cache.patch} | 0 ...atch => 0654-Add-basic-Datapack-API.patch} | 0 ...ment-variable-to-disable-server-gui.patch} | 0 ...itions-to-PlayerGameModeChangeEvent.patch} | 0 ... => 0657-ItemStack-repair-check-API.patch} | 2 +- ....patch => 0658-More-Enchantment-API.patch} | 0 ...-and-optimise-world-force-upgrading.patch} | 2 +- ...PI.patch => 0660-Add-Mob-lookAt-API.patch} | 0 ...0661-Add-Unix-domain-socket-support.patch} | 0 ... => 0662-Add-EntityInsideBlockEvent.patch} | 0 ...63-Attributes-API-for-item-defaults.patch} | 2 +- ...ause-to-Weather-ThunderChangeEvents.patch} | 2 +- ...patch => 0665-More-Lidded-Block-API.patch} | 0 ...66-Limit-item-frame-cursors-on-maps.patch} | 0 ... => 0667-Add-PlayerKickEvent-causes.patch} | 0 ...0668-Add-PufferFishStateChangeEvent.patch} | 0 ...erBucketEmptyEvent-result-itemstack.patch} | 0 ...tedContainer-instead-of-ReentrantLo.patch} | 0 ...-to-fix-items-merging-through-walls.patch} | 0 ...h => 0672-Add-BellRevealRaiderEvent.patch} | 0 ... 0673-Fix-invulnerable-end-crystals.patch} | 0 ...74-Add-ElderGuardianAppearanceEvent.patch} | 0 ...0675-Fix-dangerous-end-portal-logic.patch} | 0 ...-Biome-Mob-Lookups-for-Mob-Spawning.patch} | 0 ...-Make-item-validations-configurable.patch} | 0 ...patch => 0678-Line-Of-Sight-Changes.patch} | 0 ... => 0679-add-per-world-spawn-limits.patch} | 0 ...plashEvent-for-water-splash-potions.patch} | 0 ... => 0681-Add-more-LimitedRegion-API.patch} | 0 ...layerDropItemEvent-using-wrong-item.patch} | 0 ...=> 0683-Missing-Entity-Behavior-API.patch} | 0 ...ect-for-book-edit-is-called-on-main.patch} | 0 ...of-Block-applyBoneMeal-always-being.patch} | 0 ...tChunkIfLoadedImmediately-in-places.patch} | 2 +- ...rom-signs-not-firing-command-events.patch} | 0 ...ch => 0688-Adds-PlayerArmSwingEvent.patch} | 0 ...-event-leave-message-not-being-sent.patch} | 2 +- ...-for-mobs-immune-to-default-effects.patch} | 0 ...correct-message-for-outdated-client.patch} | 0 ...chantOffer-BuyB-Only-AssertionError.patch} | 0 ...-t-apply-cramming-damage-to-players.patch} | 0 ...d-timings-for-sensors-and-behaviors.patch} | 0 ...-bunch-of-missing-forceDrop-toggles.patch} | 0 ...inger-API.patch => 0696-Stinger-API.patch} | 0 ...cy-issue-with-empty-map-items-in-CB.patch} | 0 ... => 0698-Add-System.out-err-catcher.patch} | 0 ... => 0699-Fix-test-not-bootstrapping.patch} | 0 ...-to-contain-the-source-jars-in-stac.patch} | 0 ...-Improve-boat-collision-performance.patch} | 0 ...AFK-kick-while-watching-end-credits.patch} | 0 ...iting-of-comments-to-server.propert.patch} | 0 ...tch => 0704-Add-PlayerSetSpawnEvent.patch} | 0 ...rs-respect-inventory-max-stack-size.patch} | 0 ...ize-entity-tracker-passenger-checks.patch} | 0 ...-option-for-Piglins-guarding-chests.patch} | 2 +- ...=> 0708-Added-EntityDamageItemEvent.patch} | 0 ...timize-indirect-passenger-iteration.patch} | 0 ...osition-losing-precision-millions-o.patch} | 0 ...em-frame-map-cursor-update-interval.patch} | 0 ...Make-EntityUnleashEvent-cancellable.patch} | 0 ...713-Clear-bucket-NBT-after-dispense.patch} | 0 ...-dispatch-thread-to-be-a-daemon-thr.patch} | 0 ...ct-despawn-rate-in-item-merge-check.patch} | 0 ...stonRetractEvent-to-fix-duplication.patch} | 0 ...arget-without-changing-other-things.patch} | 0 ...ch => 0718-Add-BlockBreakBlockEvent.patch} | 0 ...revent-NBT-copy-in-smithing-recipes.patch} | 0 ...patch => 0720-More-CommandBlock-API.patch} | 0 ...-missing-team-sidebar-display-slots.patch} | 0 ...0722-Add-back-EntityPortalExitEvent.patch} | 0 ...-find-targets-for-lightning-strikes.patch} | 2 +- ... 0724-Get-entity-default-attributes.patch} | 2 +- ...d-API.patch => 0725-Left-handed-API.patch} | 0 ...=> 0726-Add-advancement-display-API.patch} | 0 ...7-Add-ItemFactory-getMonsterEgg-API.patch} | 0 ...tch => 0728-Add-critical-damage-API.patch} | 0 ...0729-Fix-issues-with-mob-conversion.patch} | 0 ...ollidable-methods-to-various-places.patch} | 2 +- ...-ram-API.patch => 0731-Goat-ram-API.patch} | 0 ...dd-API-for-resetting-a-single-score.patch} | 0 ...3-Add-Raw-Byte-Entity-Serialization.patch} | 2 +- ...34-Vanilla-command-permission-fixes.patch} | 0 ...-Make-CallbackExecutor-strict-again.patch} | 0 ...server-to-unload-chunks-at-request-.patch} | 0 ...logic-for-inventories-on-chunk-unlo.patch} | 0 ...e-recursion-for-chunkholder-updates.patch} | 0 ...ocking-from-state-access-in-UserCac.patch} | 0 ...hunks-refusing-to-unload-at-low-TPS.patch} | 0 ...et-level-changes-while-unloading-pl.patch} | 0 ...et-level-changes-when-updating-chun.patch} | 0 ...profile-lookups-to-worldgen-threads.patch} | 0 ...g-when-the-async-catcher-is-tripped.patch} | 0 ...tize-ResourceLocation-error-logging.patch} | 0 ...=> 0746-Optimise-general-POI-access.patch} | 0 ...rolled-flushing-for-network-manager.patch} | 0 ...tch => 0748-Add-more-async-catchers.patch} | 0 ...te-entity-bounding-box-lookup-calls.patch} | 4 +- ...> 0750-Execute-chunk-tasks-mid-tick.patch} | 0 ... => 0751-Do-not-copy-visible-chunks.patch} | 0 ...ulate-regionfile-header-if-it-is-co.patch} | 2 +- ...ementation-for-blockstate-state-loo.patch} | 0 ...-more-information-in-watchdog-dumps.patch} | 2 +- ...lly-inline-methods-in-BlockPosition.patch} | 0 ... 0756-Distance-manager-tick-timings.patch} | 2 +- ...ler-threads-according-to-the-plugin.patch} | 0 ...-getChunkAt-has-inlined-logic-for-l.patch} | 0 ...h => 0759-Add-packet-limiter-config.patch} | 2 +- ... 0760-Lag-compensate-block-breaking.patch} | 2 +- ...Stem-registry-when-loading-default-.patch} | 2 +- ...our-chunk-data-off-disk-when-conver.patch} | 0 ...sh-calls-for-entity-tracker-packets.patch} | 0 ...-lookup-fluid-state-when-raytracing.patch} | 0 ...atch => 0765-Time-scoreboard-search.patch} | 0 ...packets-for-hard-colliding-entities.patch} | 2 +- ...7-Do-not-run-raytrace-logic-for-AIR.patch} | 0 ...rimise-map-impl-for-tracked-players.patch} | 0 ...imise-BlockSoil-nearby-water-lookup.patch} | 0 ...ition-of-entities-to-entity-ticklis.patch} | 0 ... 0771-Optimise-random-block-ticking.patch} | 0 ...2-Optimise-non-flush-packet-sending.patch} | 0 ...0773-Optimise-nearby-player-lookups.patch} | 0 ...=> 0774-Optimise-WorldServer-notify.patch} | 0 ...0775-Remove-streams-for-villager-AI.patch} | 0 ...> 0776-Rewrite-dataconverter-system.patch} | 0 ...city-compression-and-cipher-natives.patch} | 0 ...hread-worker-count-for-low-core-cou.patch} | 0 ...tity-loads-in-CraftChunk-getEntitie.patch} | 2 +- ...ifications-to-critical-entity-state.patch} | 0 ...ix-Bukkit-NamespacedKey-shenanigans.patch} | 0 ...ntory-not-closing-on-entity-removal.patch} | 0 ...rement-before-suggesting-root-nodes.patch} | 0 ...ServerboundCommandSuggestionPacket-.patch} | 0 ...nColor-on-tropical-fish-bucket-meta.patch} | 0 ...=> 0786-Ensure-valid-vehicle-status.patch} | 0 ...ftlocked-end-exit-portal-generation.patch} | 0 ...r-causing-a-crash-when-trying-to-ge.patch} | 0 ...-t-log-debug-logging-being-disabled.patch} | 0 ...axolotls-from-buckets-as-persistent.patch} | 0 ...ous-menus-with-empty-level-accesses.patch} | 0 ...-O-threads-with-chunk-data-while-fl.patch} | 0 ...h => 0793-Preserve-overstacked-loot.patch} | 0 ...ate-head-rotation-in-missing-places.patch} | 0 ...unintended-light-block-manipulation.patch} | 0 ...piglins-and-hoglins-towards-mob-cap.patch} | 0 ...0797-Fix-CraftCriteria-defaults-map.patch} | 0 ...Fix-upstreams-block-state-factories.patch} | 0 ...ion-for-logging-player-ip-addresses.patch} | 4 +- ... => 0800-Configurable-feature-seeds.patch} | 0 ...pper-didnt-account-for-entity-sende.patch} | 0 ... 0802-Add-root-admin-user-detection.patch} | 0 ...ays-allow-item-changing-in-Fireball.patch} | 0 ...t-attempt-to-teleport-dead-entities.patch} | 0 ...l-onRemove-logic-for-breakNaturally.patch} | 0 ...pare-event-not-working-with-zero-xp.patch} | 0 ...ive-velocity-through-repeated-crits.patch} | 0 ...e-code-using-deprecated-for-removal.patch} | 0 .../0809-Rewrite-the-light-engine.patch} | 1685 +++++++++++------ 349 files changed, 1109 insertions(+), 680 deletions(-) rename patches/{server => removed/1.18}/0463-Optimize-NibbleArray-to-use-pooled-buffers.patch (100%) rename patches/server/{0464-Support-components-in-ItemMeta.patch => 0463-Support-components-in-ItemMeta.patch} (100%) rename patches/server/{0465-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch => 0464-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch} (100%) rename patches/server/{0466-Add-entity-liquid-API.patch => 0465-Add-entity-liquid-API.patch} (100%) rename patches/server/{0467-Update-itemstack-legacy-name-and-lore.patch => 0466-Update-itemstack-legacy-name-and-lore.patch} (100%) rename patches/server/{0468-Spawn-player-in-correct-world-on-login.patch => 0467-Spawn-player-in-correct-world-on-login.patch} (100%) rename patches/server/{0469-Add-PrepareResultEvent.patch => 0468-Add-PrepareResultEvent.patch} (100%) rename patches/server/{0470-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch => 0469-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch} (100%) rename patches/server/{0471-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch => 0470-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch} (100%) rename patches/server/{0472-Optimize-NetworkManager-Exception-Handling.patch => 0471-Optimize-NetworkManager-Exception-Handling.patch} (100%) rename patches/server/{0473-Optimize-the-advancement-data-player-iteration-to-be.patch => 0472-Optimize-the-advancement-data-player-iteration-to-be.patch} (100%) rename patches/server/{0474-Fix-arrows-never-despawning-MC-125757.patch => 0473-Fix-arrows-never-despawning-MC-125757.patch} (100%) rename patches/server/{0475-Thread-Safe-Vanilla-Command-permission-checking.patch => 0474-Thread-Safe-Vanilla-Command-permission-checking.patch} (100%) rename patches/server/{0476-Move-range-check-for-block-placing-up.patch => 0475-Move-range-check-for-block-placing-up.patch} (100%) rename patches/server/{0477-Fix-SPIGOT-5989.patch => 0476-Fix-SPIGOT-5989.patch} (100%) rename patches/server/{0478-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch => 0477-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch} (100%) rename patches/server/{0479-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch => 0478-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch} (100%) rename patches/server/{0480-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch => 0479-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch} (100%) rename patches/server/{0481-Add-missing-strikeLighting-call-to-World-spigot-stri.patch => 0480-Add-missing-strikeLighting-call-to-World-spigot-stri.patch} (100%) rename patches/server/{0482-Fix-some-rails-connecting-improperly.patch => 0481-Fix-some-rails-connecting-improperly.patch} (100%) rename patches/server/{0483-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch => 0482-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch} (100%) rename patches/server/{0484-Do-not-let-the-server-load-chunks-from-newer-version.patch => 0483-Do-not-let-the-server-load-chunks-from-newer-version.patch} (95%) rename patches/server/{0485-Brand-support.patch => 0484-Brand-support.patch} (100%) rename patches/server/{0486-Add-setMaxPlayers-API.patch => 0485-Add-setMaxPlayers-API.patch} (100%) rename patches/server/{0487-Add-playPickupItemAnimation-to-LivingEntity.patch => 0486-Add-playPickupItemAnimation-to-LivingEntity.patch} (100%) rename patches/server/{0488-Don-t-require-FACING-data.patch => 0487-Don-t-require-FACING-data.patch} (100%) rename patches/server/{0489-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch => 0488-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch} (100%) rename patches/server/{0490-Add-moon-phase-API.patch => 0489-Add-moon-phase-API.patch} (100%) rename patches/server/{0491-Improve-Chunk-Status-Transition-Speed.patch => 0490-Improve-Chunk-Status-Transition-Speed.patch} (100%) rename patches/server/{0492-Prevent-headless-pistons-from-being-created.patch => 0491-Prevent-headless-pistons-from-being-created.patch} (100%) rename patches/server/{0493-Add-BellRingEvent.patch => 0492-Add-BellRingEvent.patch} (100%) rename patches/server/{0494-Add-zombie-targets-turtle-egg-config.patch => 0493-Add-zombie-targets-turtle-egg-config.patch} (100%) rename patches/server/{0495-Buffer-joins-to-world.patch => 0494-Buffer-joins-to-world.patch} (100%) rename patches/server/{0496-Optimize-redstone-algorithm.patch => 0495-Optimize-redstone-algorithm.patch} (100%) rename patches/server/{0497-Fix-hex-colors-not-working-in-some-kick-messages.patch => 0496-Fix-hex-colors-not-working-in-some-kick-messages.patch} (100%) rename patches/server/{0498-PortalCreateEvent-needs-to-know-its-entity.patch => 0497-PortalCreateEvent-needs-to-know-its-entity.patch} (100%) rename patches/server/{0499-Fix-CraftTeam-null-check.patch => 0498-Fix-CraftTeam-null-check.patch} (100%) rename patches/server/{0500-Add-more-Evoker-API.patch => 0499-Add-more-Evoker-API.patch} (100%) rename patches/server/{0501-Add-methods-to-get-translation-keys.patch => 0500-Add-methods-to-get-translation-keys.patch} (98%) rename patches/server/{0502-Create-HoverEvent-from-ItemStack-Entity.patch => 0501-Create-HoverEvent-from-ItemStack-Entity.patch} (100%) rename patches/server/{0503-Cache-block-data-strings.patch => 0502-Cache-block-data-strings.patch} (100%) rename patches/server/{0504-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch => 0503-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch} (100%) rename patches/server/{0505-Add-additional-open-container-api-to-HumanEntity.patch => 0504-Add-additional-open-container-api-to-HumanEntity.patch} (100%) rename patches/server/{0506-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch => 0505-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch} (100%) rename patches/server/{0507-Extend-block-drop-capture-to-capture-all-items-added.patch => 0506-Extend-block-drop-capture-to-capture-all-items-added.patch} (100%) rename patches/server/{0508-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch => 0507-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch} (89%) rename patches/server/{0509-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch => 0508-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch} (94%) rename patches/server/{0510-Lazily-track-plugin-scoreboards-by-default.patch => 0509-Lazily-track-plugin-scoreboards-by-default.patch} (98%) rename patches/server/{0511-Entity-isTicking.patch => 0510-Entity-isTicking.patch} (100%) rename patches/server/{0512-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch => 0511-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch} (100%) rename patches/server/{0513-Fix-Concurrency-issue-in-WeightedList.patch => 0512-Fix-Concurrency-issue-in-WeightedList.patch} (100%) rename patches/server/{0514-Reset-Ender-Crystals-on-Dragon-Spawn.patch => 0513-Reset-Ender-Crystals-on-Dragon-Spawn.patch} (100%) rename patches/server/{0515-Fix-for-large-move-vectors-crashing-server.patch => 0514-Fix-for-large-move-vectors-crashing-server.patch} (100%) rename patches/server/{0516-Optimise-getType-calls.patch => 0515-Optimise-getType-calls.patch} (100%) rename patches/server/{0517-Villager-resetOffers.patch => 0516-Villager-resetOffers.patch} (100%) rename patches/server/{0518-Improve-inlinig-for-some-hot-IBlockData-methods.patch => 0517-Improve-inlinig-for-some-hot-IBlockData-methods.patch} (100%) rename patches/server/{0519-Retain-block-place-order-when-capturing-blockstates.patch => 0518-Retain-block-place-order-when-capturing-blockstates.patch} (100%) rename patches/server/{0520-Reduce-blockpos-allocation-from-pathfinding.patch => 0519-Reduce-blockpos-allocation-from-pathfinding.patch} (100%) rename patches/server/{0521-Fix-item-locations-dropped-from-campfires.patch => 0520-Fix-item-locations-dropped-from-campfires.patch} (100%) rename patches/server/{0522-Player-elytra-boost-API.patch => 0521-Player-elytra-boost-API.patch} (100%) rename patches/server/{0523-Fixed-TileEntityBell-memory-leak.patch => 0522-Fixed-TileEntityBell-memory-leak.patch} (100%) rename patches/server/{0524-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch => 0523-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch} (100%) rename patches/server/{0525-Add-getOfflinePlayerIfCached-String.patch => 0524-Add-getOfflinePlayerIfCached-String.patch} (100%) rename patches/server/{0526-Add-ignore-discounts-API.patch => 0525-Add-ignore-discounts-API.patch} (100%) rename patches/server/{0527-Toggle-for-removing-existing-dragon.patch => 0526-Toggle-for-removing-existing-dragon.patch} (95%) rename patches/server/{0528-Fix-client-lag-on-advancement-loading.patch => 0527-Fix-client-lag-on-advancement-loading.patch} (95%) rename patches/server/{0529-Item-no-age-no-player-pickup.patch => 0528-Item-no-age-no-player-pickup.patch} (100%) rename patches/server/{0530-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch => 0529-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch} (100%) rename patches/server/{0531-Beacon-API-custom-effect-ranges.patch => 0530-Beacon-API-custom-effect-ranges.patch} (100%) rename patches/server/{0532-Add-API-for-quit-reason.patch => 0531-Add-API-for-quit-reason.patch} (98%) rename patches/server/{0533-Add-Wandering-Trader-spawn-rate-config-options.patch => 0532-Add-Wandering-Trader-spawn-rate-config-options.patch} (98%) rename patches/server/{0534-Significantly-improve-performance-of-the-end-generat.patch => 0533-Significantly-improve-performance-of-the-end-generat.patch} (100%) rename patches/server/{0535-Expose-world-spawn-angle.patch => 0534-Expose-world-spawn-angle.patch} (95%) rename patches/server/{0536-Add-Destroy-Speed-API.patch => 0535-Add-Destroy-Speed-API.patch} (100%) rename patches/server/{0537-Fix-Player-spawnParticle-x-y-z-precision-loss.patch => 0536-Fix-Player-spawnParticle-x-y-z-precision-loss.patch} (100%) rename patches/server/{0538-Add-LivingEntity-clearActiveItem.patch => 0537-Add-LivingEntity-clearActiveItem.patch} (100%) rename patches/server/{0539-Add-PlayerItemCooldownEvent.patch => 0538-Add-PlayerItemCooldownEvent.patch} (100%) rename patches/server/{0540-More-lightning-API.patch => 0539-More-lightning-API.patch} (100%) rename patches/server/{0541-Climbing-should-not-bypass-cramming-gamerule.patch => 0540-Climbing-should-not-bypass-cramming-gamerule.patch} (98%) rename patches/server/{0542-Added-missing-default-perms-for-commands.patch => 0541-Added-missing-default-perms-for-commands.patch} (100%) rename patches/server/{0543-Add-PlayerShearBlockEvent.patch => 0542-Add-PlayerShearBlockEvent.patch} (100%) rename patches/server/{0544-Fix-curing-zombie-villager-discount-exploit.patch => 0543-Fix-curing-zombie-villager-discount-exploit.patch} (96%) rename patches/server/{0545-Limit-recipe-packets.patch => 0544-Limit-recipe-packets.patch} (97%) rename patches/server/{0546-Fix-CraftSound-backwards-compatibility.patch => 0545-Fix-CraftSound-backwards-compatibility.patch} (100%) rename patches/server/{0547-MC-4-Fix-item-position-desync.patch => 0546-MC-4-Fix-item-position-desync.patch} (97%) rename patches/server/{0548-Player-Chunk-Load-Unload-Events.patch => 0547-Player-Chunk-Load-Unload-Events.patch} (100%) rename patches/server/{0549-Optimize-Dynamic-get-Missing-Keys.patch => 0548-Optimize-Dynamic-get-Missing-Keys.patch} (100%) rename patches/server/{0550-Expose-LivingEntity-hurt-direction.patch => 0549-Expose-LivingEntity-hurt-direction.patch} (100%) rename patches/server/{0551-Add-OBSTRUCTED-reason-to-BedEnterResult.patch => 0550-Add-OBSTRUCTED-reason-to-BedEnterResult.patch} (100%) rename patches/server/{0552-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch => 0551-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch} (100%) rename patches/server/{0553-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch => 0552-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch} (100%) rename patches/server/{0554-Implement-TargetHitEvent.patch => 0553-Implement-TargetHitEvent.patch} (100%) rename patches/server/{0555-Additional-Block-Material-API-s.patch => 0554-Additional-Block-Material-API-s.patch} (100%) rename patches/server/{0556-Fix-harming-potion-dupe.patch => 0555-Fix-harming-potion-dupe.patch} (100%) rename patches/server/{0557-Implement-API-to-get-Material-from-Boats-and-Minecar.patch => 0556-Implement-API-to-get-Material-from-Boats-and-Minecar.patch} (100%) rename patches/server/{0558-Cache-burn-durations.patch => 0557-Cache-burn-durations.patch} (100%) rename patches/server/{0559-Allow-disabling-mob-spawner-spawn-egg-transformation.patch => 0558-Allow-disabling-mob-spawner-spawn-egg-transformation.patch} (95%) rename patches/server/{0560-Fix-Not-a-string-Map-Conversion-spam.patch => 0559-Fix-Not-a-string-Map-Conversion-spam.patch} (100%) rename patches/server/{0561-Implement-PlayerFlowerPotManipulateEvent.patch => 0560-Implement-PlayerFlowerPotManipulateEvent.patch} (100%) rename patches/server/{0562-Fix-interact-event-not-being-called-in-adventure.patch => 0561-Fix-interact-event-not-being-called-in-adventure.patch} (100%) rename patches/server/{0563-Zombie-API-breaking-doors.patch => 0562-Zombie-API-breaking-doors.patch} (100%) rename patches/server/{0564-Fix-nerfed-slime-when-splitting.patch => 0563-Fix-nerfed-slime-when-splitting.patch} (100%) rename patches/server/{0565-Add-EntityLoadCrossbowEvent.patch => 0564-Add-EntityLoadCrossbowEvent.patch} (100%) rename patches/server/{0566-Guardian-beam-workaround.patch => 0565-Guardian-beam-workaround.patch} (100%) rename patches/server/{0567-Added-WorldGameRuleChangeEvent.patch => 0566-Added-WorldGameRuleChangeEvent.patch} (100%) rename patches/server/{0568-Added-ServerResourcesReloadedEvent.patch => 0567-Added-ServerResourcesReloadedEvent.patch} (100%) rename patches/server/{0569-Added-world-settings-for-mobs-picking-up-loot.patch => 0568-Added-world-settings-for-mobs-picking-up-loot.patch} (100%) rename patches/server/{0570-Implemented-BlockFailedDispenseEvent.patch => 0569-Implemented-BlockFailedDispenseEvent.patch} (100%) rename patches/server/{0571-Added-PlayerLecternPageChangeEvent.patch => 0570-Added-PlayerLecternPageChangeEvent.patch} (100%) rename patches/server/{0572-Added-PlayerLoomPatternSelectEvent.patch => 0571-Added-PlayerLoomPatternSelectEvent.patch} (100%) rename patches/server/{0573-Configurable-door-breaking-difficulty.patch => 0572-Configurable-door-breaking-difficulty.patch} (97%) rename patches/server/{0574-Empty-commands-shall-not-be-dispatched.patch => 0573-Empty-commands-shall-not-be-dispatched.patch} (100%) rename patches/server/{0575-Implement-API-to-expose-exact-interaction-point.patch => 0574-Implement-API-to-expose-exact-interaction-point.patch} (100%) rename patches/server/{0576-Remove-stale-POIs.patch => 0575-Remove-stale-POIs.patch} (100%) rename patches/server/{0577-Fix-villager-boat-exploit.patch => 0576-Fix-villager-boat-exploit.patch} (93%) rename patches/server/{0578-Add-sendOpLevel-API.patch => 0577-Add-sendOpLevel-API.patch} (100%) rename patches/server/{0579-Add-StructureLocateEvent.patch => 0578-Add-StructureLocateEvent.patch} (100%) rename patches/server/{0580-Collision-option-for-requiring-a-player-participant.patch => 0579-Collision-option-for-requiring-a-player-participant.patch} (97%) rename patches/server/{0581-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch => 0580-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch} (100%) rename patches/server/{0582-Return-chat-component-with-empty-text-instead-of-thr.patch => 0581-Return-chat-component-with-empty-text-instead-of-thr.patch} (100%) rename patches/server/{0583-Make-schedule-command-per-world.patch => 0582-Make-schedule-command-per-world.patch} (100%) rename patches/server/{0584-Configurable-max-leash-distance.patch => 0583-Configurable-max-leash-distance.patch} (100%) rename patches/server/{0585-Implement-BlockPreDispenseEvent.patch => 0584-Implement-BlockPreDispenseEvent.patch} (100%) rename patches/server/{0586-added-Wither-API.patch => 0585-added-Wither-API.patch} (100%) rename patches/server/{0587-Added-firing-of-PlayerChangeBeaconEffectEvent.patch => 0586-Added-firing-of-PlayerChangeBeaconEffectEvent.patch} (100%) rename patches/server/{0588-Add-toggle-for-always-placing-the-dragon-egg.patch => 0587-Add-toggle-for-always-placing-the-dragon-egg.patch} (100%) rename patches/server/{0589-Added-PlayerStonecutterRecipeSelectEvent.patch => 0588-Added-PlayerStonecutterRecipeSelectEvent.patch} (100%) rename patches/server/{0590-Add-dropLeash-variable-to-EntityUnleashEvent.patch => 0589-Add-dropLeash-variable-to-EntityUnleashEvent.patch} (100%) rename patches/server/{0591-Skip-distance-map-update-when-spawning-disabled.patch => 0590-Skip-distance-map-update-when-spawning-disabled.patch} (100%) rename patches/server/{0592-Reset-shield-blocking-on-dimension-change.patch => 0591-Reset-shield-blocking-on-dimension-change.patch} (100%) rename patches/server/{0593-add-DragonEggFormEvent.patch => 0592-add-DragonEggFormEvent.patch} (100%) rename patches/server/{0594-EntityMoveEvent.patch => 0593-EntityMoveEvent.patch} (100%) rename patches/server/{0595-added-option-to-disable-pathfinding-updates-on-block.patch => 0594-added-option-to-disable-pathfinding-updates-on-block.patch} (100%) rename patches/server/{0596-Inline-shift-direction-fields.patch => 0595-Inline-shift-direction-fields.patch} (100%) rename patches/server/{0597-Allow-adding-items-to-BlockDropItemEvent.patch => 0596-Allow-adding-items-to-BlockDropItemEvent.patch} (100%) rename patches/server/{0598-Add-getMainThreadExecutor-to-BukkitScheduler.patch => 0597-Add-getMainThreadExecutor-to-BukkitScheduler.patch} (100%) rename patches/server/{0599-living-entity-allow-attribute-registration.patch => 0598-living-entity-allow-attribute-registration.patch} (100%) rename patches/server/{0600-fix-dead-slime-setSize-invincibility.patch => 0599-fix-dead-slime-setSize-invincibility.patch} (100%) rename patches/server/{0601-Merchant-getRecipes-should-return-an-immutable-list.patch => 0600-Merchant-getRecipes-should-return-an-immutable-list.patch} (100%) rename patches/server/{0602-Add-support-for-hex-color-codes-in-console.patch => 0601-Add-support-for-hex-color-codes-in-console.patch} (100%) rename patches/server/{0603-Expose-Tracked-Players.patch => 0602-Expose-Tracked-Players.patch} (100%) rename patches/server/{0604-Remove-streams-from-SensorNearest.patch => 0603-Remove-streams-from-SensorNearest.patch} (100%) rename patches/server/{0605-Throw-proper-exception-on-empty-JsonList-file.patch => 0604-Throw-proper-exception-on-empty-JsonList-file.patch} (100%) rename patches/server/{0606-Improve-ServerGUI.patch => 0605-Improve-ServerGUI.patch} (100%) rename patches/server/{0607-stop-firing-pressure-plate-EntityInteractEvent-for-i.patch => 0606-stop-firing-pressure-plate-EntityInteractEvent-for-i.patch} (100%) rename patches/server/{0608-fix-converting-txt-to-json-file.patch => 0607-fix-converting-txt-to-json-file.patch} (97%) rename patches/server/{0609-Add-worldborder-events.patch => 0608-Add-worldborder-events.patch} (100%) rename patches/server/{0610-added-PlayerNameEntityEvent.patch => 0609-added-PlayerNameEntityEvent.patch} (100%) rename patches/server/{0611-Prevent-grindstones-from-overstacking-items.patch => 0610-Prevent-grindstones-from-overstacking-items.patch} (100%) rename patches/server/{0612-Add-recipe-to-cook-events.patch => 0611-Add-recipe-to-cook-events.patch} (100%) rename patches/server/{0613-Add-Block-isValidTool.patch => 0612-Add-Block-isValidTool.patch} (100%) rename patches/server/{0614-Allow-using-signs-inside-spawn-protection.patch => 0613-Allow-using-signs-inside-spawn-protection.patch} (100%) rename patches/server/{0615-Implement-Keyed-on-World.patch => 0614-Implement-Keyed-on-World.patch} (100%) rename patches/server/{0616-Add-fast-alternative-constructor-for-Rotations.patch => 0615-Add-fast-alternative-constructor-for-Rotations.patch} (100%) rename patches/server/{0617-Item-Rarity-API.patch => 0616-Item-Rarity-API.patch} (96%) rename patches/server/{0618-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch => 0617-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch} (100%) rename patches/server/{0619-copy-TESign-isEditable-from-snapshots.patch => 0618-copy-TESign-isEditable-from-snapshots.patch} (100%) rename patches/server/{0620-Drop-carried-item-when-player-has-disconnected.patch => 0619-Drop-carried-item-when-player-has-disconnected.patch} (92%) rename patches/server/{0621-forced-whitelist-use-configurable-kick-message.patch => 0620-forced-whitelist-use-configurable-kick-message.patch} (100%) rename patches/server/{0622-Don-t-ignore-result-of-PlayerEditBookEvent.patch => 0621-Don-t-ignore-result-of-PlayerEditBookEvent.patch} (100%) rename patches/server/{0623-Entity-load-save-limit-per-chunk.patch => 0622-Entity-load-save-limit-per-chunk.patch} (98%) rename patches/server/{0624-fix-cancelling-block-falling-causing-client-desync.patch => 0623-fix-cancelling-block-falling-causing-client-desync.patch} (100%) rename patches/server/{0625-Expose-protocol-version.patch => 0624-Expose-protocol-version.patch} (91%) rename patches/server/{0626-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch => 0625-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch} (100%) rename patches/server/{0627-Enhance-console-tab-completions-for-brigadier-comman.patch => 0626-Enhance-console-tab-completions-for-brigadier-comman.patch} (99%) rename patches/server/{0628-Fix-PlayerItemConsumeEvent-cancelling-properly.patch => 0627-Fix-PlayerItemConsumeEvent-cancelling-properly.patch} (100%) rename patches/server/{0629-Add-bypass-host-check.patch => 0628-Add-bypass-host-check.patch} (100%) rename patches/server/{0630-Set-area-affect-cloud-rotation.patch => 0629-Set-area-affect-cloud-rotation.patch} (92%) rename patches/server/{0631-add-isDeeplySleeping-to-HumanEntity.patch => 0630-add-isDeeplySleeping-to-HumanEntity.patch} (100%) rename patches/server/{0632-Fix-duplicating-give-items-on-item-drop-cancel.patch => 0631-Fix-duplicating-give-items-on-item-drop-cancel.patch} (100%) rename patches/server/{0633-add-consumeFuel-to-FurnaceBurnEvent.patch => 0632-add-consumeFuel-to-FurnaceBurnEvent.patch} (100%) rename patches/server/{0634-add-get-set-drop-chance-to-EntityEquipment.patch => 0633-add-get-set-drop-chance-to-EntityEquipment.patch} (100%) rename patches/server/{0635-fix-PigZombieAngerEvent-cancellation.patch => 0634-fix-PigZombieAngerEvent-cancellation.patch} (100%) rename patches/server/{0636-Fix-checkReach-check-for-Shulker-boxes.patch => 0635-Fix-checkReach-check-for-Shulker-boxes.patch} (100%) rename patches/server/{0637-fix-PlayerItemHeldEvent-firing-twice.patch => 0636-fix-PlayerItemHeldEvent-firing-twice.patch} (100%) rename patches/server/{0638-Added-PlayerDeepSleepEvent.patch => 0637-Added-PlayerDeepSleepEvent.patch} (100%) rename patches/server/{0639-More-World-API.patch => 0638-More-World-API.patch} (100%) rename patches/server/{0640-Added-PlayerBedFailEnterEvent.patch => 0639-Added-PlayerBedFailEnterEvent.patch} (100%) rename patches/server/{0641-Implement-methods-to-convert-between-Component-and-B.patch => 0640-Implement-methods-to-convert-between-Component-and-B.patch} (100%) rename patches/server/{0642-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch => 0641-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch} (95%) rename patches/server/{0643-Introduce-beacon-activation-deactivation-events.patch => 0642-Introduce-beacon-activation-deactivation-events.patch} (100%) rename patches/server/{0644-add-RespawnFlags-to-PlayerRespawnEvent.patch => 0643-add-RespawnFlags-to-PlayerRespawnEvent.patch} (97%) rename patches/server/{0645-Add-Channel-initialization-listeners.patch => 0644-Add-Channel-initialization-listeners.patch} (100%) rename patches/server/{0646-Send-empty-commands-if-tab-completion-is-disabled.patch => 0645-Send-empty-commands-if-tab-completion-is-disabled.patch} (100%) rename patches/server/{0647-Add-more-WanderingTrader-API.patch => 0646-Add-more-WanderingTrader-API.patch} (100%) rename patches/server/{0648-Add-EntityBlockStorage-clearEntities.patch => 0647-Add-EntityBlockStorage-clearEntities.patch} (100%) rename patches/server/{0649-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch => 0648-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch} (100%) rename patches/server/{0650-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch => 0649-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch} (100%) rename patches/server/{0651-Inventory-close.patch => 0650-Inventory-close.patch} (100%) rename patches/server/{0652-call-PortalCreateEvent-players-and-end-platform.patch => 0651-call-PortalCreateEvent-players-and-end-platform.patch} (100%) rename patches/server/{0653-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch => 0652-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch} (100%) rename patches/server/{0654-Fix-CraftPotionBrewer-cache.patch => 0653-Fix-CraftPotionBrewer-cache.patch} (100%) rename patches/server/{0655-Add-basic-Datapack-API.patch => 0654-Add-basic-Datapack-API.patch} (100%) rename patches/server/{0656-Add-environment-variable-to-disable-server-gui.patch => 0655-Add-environment-variable-to-disable-server-gui.patch} (100%) rename patches/server/{0657-additions-to-PlayerGameModeChangeEvent.patch => 0656-additions-to-PlayerGameModeChangeEvent.patch} (100%) rename patches/server/{0658-ItemStack-repair-check-API.patch => 0657-ItemStack-repair-check-API.patch} (97%) rename patches/server/{0659-More-Enchantment-API.patch => 0658-More-Enchantment-API.patch} (100%) rename patches/server/{0660-Fix-and-optimise-world-force-upgrading.patch => 0659-Fix-and-optimise-world-force-upgrading.patch} (99%) rename patches/server/{0661-Add-Mob-lookAt-API.patch => 0660-Add-Mob-lookAt-API.patch} (100%) rename patches/server/{0662-Add-Unix-domain-socket-support.patch => 0661-Add-Unix-domain-socket-support.patch} (100%) rename patches/server/{0663-Add-EntityInsideBlockEvent.patch => 0662-Add-EntityInsideBlockEvent.patch} (100%) rename patches/server/{0664-Attributes-API-for-item-defaults.patch => 0663-Attributes-API-for-item-defaults.patch} (97%) rename patches/server/{0665-Add-cause-to-Weather-ThunderChangeEvents.patch => 0664-Add-cause-to-Weather-ThunderChangeEvents.patch} (98%) rename patches/server/{0666-More-Lidded-Block-API.patch => 0665-More-Lidded-Block-API.patch} (100%) rename patches/server/{0667-Limit-item-frame-cursors-on-maps.patch => 0666-Limit-item-frame-cursors-on-maps.patch} (100%) rename patches/server/{0668-Add-PlayerKickEvent-causes.patch => 0667-Add-PlayerKickEvent-causes.patch} (100%) rename patches/server/{0669-Add-PufferFishStateChangeEvent.patch => 0668-Add-PufferFishStateChangeEvent.patch} (100%) rename patches/server/{0670-Fix-PlayerBucketEmptyEvent-result-itemstack.patch => 0669-Fix-PlayerBucketEmptyEvent-result-itemstack.patch} (100%) rename patches/server/{0671-Synchronize-PalettedContainer-instead-of-ReentrantLo.patch => 0670-Synchronize-PalettedContainer-instead-of-ReentrantLo.patch} (100%) rename patches/server/{0672-Add-option-to-fix-items-merging-through-walls.patch => 0671-Add-option-to-fix-items-merging-through-walls.patch} (100%) rename patches/server/{0673-Add-BellRevealRaiderEvent.patch => 0672-Add-BellRevealRaiderEvent.patch} (100%) rename patches/server/{0674-Fix-invulnerable-end-crystals.patch => 0673-Fix-invulnerable-end-crystals.patch} (100%) rename patches/server/{0675-Add-ElderGuardianAppearanceEvent.patch => 0674-Add-ElderGuardianAppearanceEvent.patch} (100%) rename patches/server/{0676-Fix-dangerous-end-portal-logic.patch => 0675-Fix-dangerous-end-portal-logic.patch} (100%) rename patches/server/{0677-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch => 0676-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch} (100%) rename patches/server/{0678-Make-item-validations-configurable.patch => 0677-Make-item-validations-configurable.patch} (100%) rename patches/server/{0679-Line-Of-Sight-Changes.patch => 0678-Line-Of-Sight-Changes.patch} (100%) rename patches/server/{0680-add-per-world-spawn-limits.patch => 0679-add-per-world-spawn-limits.patch} (100%) rename patches/server/{0681-Fix-PotionSplashEvent-for-water-splash-potions.patch => 0680-Fix-PotionSplashEvent-for-water-splash-potions.patch} (100%) rename patches/server/{0682-Add-more-LimitedRegion-API.patch => 0681-Add-more-LimitedRegion-API.patch} (100%) rename patches/server/{0683-Fix-PlayerDropItemEvent-using-wrong-item.patch => 0682-Fix-PlayerDropItemEvent-using-wrong-item.patch} (100%) rename patches/server/{0684-Missing-Entity-Behavior-API.patch => 0683-Missing-Entity-Behavior-API.patch} (100%) rename patches/server/{0685-Ensure-disconnect-for-book-edit-is-called-on-main.patch => 0684-Ensure-disconnect-for-book-edit-is-called-on-main.patch} (100%) rename patches/server/{0686-Fix-return-value-of-Block-applyBoneMeal-always-being.patch => 0685-Fix-return-value-of-Block-applyBoneMeal-always-being.patch} (100%) rename patches/server/{0687-Use-getChunkIfLoadedImmediately-in-places.patch => 0686-Use-getChunkIfLoadedImmediately-in-places.patch} (97%) rename patches/server/{0688-Fix-commands-from-signs-not-firing-command-events.patch => 0687-Fix-commands-from-signs-not-firing-command-events.patch} (100%) rename patches/server/{0689-Adds-PlayerArmSwingEvent.patch => 0688-Adds-PlayerArmSwingEvent.patch} (100%) rename patches/server/{0690-Fixes-kick-event-leave-message-not-being-sent.patch => 0689-Fixes-kick-event-leave-message-not-being-sent.patch} (98%) rename patches/server/{0691-Add-config-for-mobs-immune-to-default-effects.patch => 0690-Add-config-for-mobs-immune-to-default-effects.patch} (100%) rename patches/server/{0692-Fix-incorrect-message-for-outdated-client.patch => 0691-Fix-incorrect-message-for-outdated-client.patch} (100%) rename patches/server/{0693-Fix-MerchantOffer-BuyB-Only-AssertionError.patch => 0692-Fix-MerchantOffer-BuyB-Only-AssertionError.patch} (100%) rename patches/server/{0694-Don-t-apply-cramming-damage-to-players.patch => 0693-Don-t-apply-cramming-damage-to-players.patch} (100%) rename patches/server/{0695-Rate-options-and-timings-for-sensors-and-behaviors.patch => 0694-Rate-options-and-timings-for-sensors-and-behaviors.patch} (100%) rename patches/server/{0696-Add-a-bunch-of-missing-forceDrop-toggles.patch => 0695-Add-a-bunch-of-missing-forceDrop-toggles.patch} (100%) rename patches/server/{0697-Stinger-API.patch => 0696-Stinger-API.patch} (100%) rename patches/server/{0698-Fix-incosistency-issue-with-empty-map-items-in-CB.patch => 0697-Fix-incosistency-issue-with-empty-map-items-in-CB.patch} (100%) rename patches/server/{0699-Add-System.out-err-catcher.patch => 0698-Add-System.out-err-catcher.patch} (100%) rename patches/server/{0700-Fix-test-not-bootstrapping.patch => 0699-Fix-test-not-bootstrapping.patch} (100%) rename patches/server/{0701-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch => 0700-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch} (100%) rename patches/server/{0702-Improve-boat-collision-performance.patch => 0701-Improve-boat-collision-performance.patch} (100%) rename patches/server/{0703-Prevent-AFK-kick-while-watching-end-credits.patch => 0702-Prevent-AFK-kick-while-watching-end-credits.patch} (100%) rename patches/server/{0704-Allow-skipping-writing-of-comments-to-server.propert.patch => 0703-Allow-skipping-writing-of-comments-to-server.propert.patch} (100%) rename patches/server/{0705-Add-PlayerSetSpawnEvent.patch => 0704-Add-PlayerSetSpawnEvent.patch} (100%) rename patches/server/{0706-Make-hoppers-respect-inventory-max-stack-size.patch => 0705-Make-hoppers-respect-inventory-max-stack-size.patch} (100%) rename patches/server/{0707-Optimize-entity-tracker-passenger-checks.patch => 0706-Optimize-entity-tracker-passenger-checks.patch} (100%) rename patches/server/{0708-Config-option-for-Piglins-guarding-chests.patch => 0707-Config-option-for-Piglins-guarding-chests.patch} (95%) rename patches/server/{0709-Added-EntityDamageItemEvent.patch => 0708-Added-EntityDamageItemEvent.patch} (100%) rename patches/server/{0710-Optimize-indirect-passenger-iteration.patch => 0709-Optimize-indirect-passenger-iteration.patch} (100%) rename patches/server/{0711-Fix-block-drops-position-losing-precision-millions-o.patch => 0710-Fix-block-drops-position-losing-precision-millions-o.patch} (100%) rename patches/server/{0712-Configurable-item-frame-map-cursor-update-interval.patch => 0711-Configurable-item-frame-map-cursor-update-interval.patch} (100%) rename patches/server/{0713-Make-EntityUnleashEvent-cancellable.patch => 0712-Make-EntityUnleashEvent-cancellable.patch} (100%) rename patches/server/{0714-Clear-bucket-NBT-after-dispense.patch => 0713-Clear-bucket-NBT-after-dispense.patch} (100%) rename patches/server/{0715-Set-AsyncAppender-dispatch-thread-to-be-a-daemon-thr.patch => 0714-Set-AsyncAppender-dispatch-thread-to-be-a-daemon-thr.patch} (100%) rename patches/server/{0716-Respect-despawn-rate-in-item-merge-check.patch => 0715-Respect-despawn-rate-in-item-merge-check.patch} (100%) rename patches/server/{0717-Move-BlockPistonRetractEvent-to-fix-duplication.patch => 0716-Move-BlockPistonRetractEvent-to-fix-duplication.patch} (100%) rename patches/server/{0718-Change-EnderEye-target-without-changing-other-things.patch => 0717-Change-EnderEye-target-without-changing-other-things.patch} (100%) rename patches/server/{0719-Add-BlockBreakBlockEvent.patch => 0718-Add-BlockBreakBlockEvent.patch} (100%) rename patches/server/{0720-Option-to-prevent-NBT-copy-in-smithing-recipes.patch => 0719-Option-to-prevent-NBT-copy-in-smithing-recipes.patch} (100%) rename patches/server/{0721-More-CommandBlock-API.patch => 0720-More-CommandBlock-API.patch} (100%) rename patches/server/{0722-Add-missing-team-sidebar-display-slots.patch => 0721-Add-missing-team-sidebar-display-slots.patch} (100%) rename patches/server/{0723-Add-back-EntityPortalExitEvent.patch => 0722-Add-back-EntityPortalExitEvent.patch} (100%) rename patches/server/{0724-Add-methods-to-find-targets-for-lightning-strikes.patch => 0723-Add-methods-to-find-targets-for-lightning-strikes.patch} (96%) rename patches/server/{0725-Get-entity-default-attributes.patch => 0724-Get-entity-default-attributes.patch} (98%) rename patches/server/{0726-Left-handed-API.patch => 0725-Left-handed-API.patch} (100%) rename patches/server/{0727-Add-advancement-display-API.patch => 0726-Add-advancement-display-API.patch} (100%) rename patches/server/{0728-Add-ItemFactory-getMonsterEgg-API.patch => 0727-Add-ItemFactory-getMonsterEgg-API.patch} (100%) rename patches/server/{0729-Add-critical-damage-API.patch => 0728-Add-critical-damage-API.patch} (100%) rename patches/server/{0730-Fix-issues-with-mob-conversion.patch => 0729-Fix-issues-with-mob-conversion.patch} (100%) rename patches/server/{0731-Add-isCollidable-methods-to-various-places.patch => 0730-Add-isCollidable-methods-to-various-places.patch} (96%) rename patches/server/{0732-Goat-ram-API.patch => 0731-Goat-ram-API.patch} (100%) rename patches/server/{0733-Add-API-for-resetting-a-single-score.patch => 0732-Add-API-for-resetting-a-single-score.patch} (100%) rename patches/server/{0734-Add-Raw-Byte-Entity-Serialization.patch => 0733-Add-Raw-Byte-Entity-Serialization.patch} (97%) rename patches/server/{0735-Vanilla-command-permission-fixes.patch => 0734-Vanilla-command-permission-fixes.patch} (100%) rename patches/server/{0736-Make-CallbackExecutor-strict-again.patch => 0735-Make-CallbackExecutor-strict-again.patch} (100%) rename patches/server/{0737-Do-not-allow-the-server-to-unload-chunks-at-request-.patch => 0736-Do-not-allow-the-server-to-unload-chunks-at-request-.patch} (100%) rename patches/server/{0738-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch => 0737-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch} (100%) rename patches/server/{0739-Correctly-handle-recursion-for-chunkholder-updates.patch => 0738-Correctly-handle-recursion-for-chunkholder-updates.patch} (100%) rename patches/server/{0740-Separate-lookup-locking-from-state-access-in-UserCac.patch => 0739-Separate-lookup-locking-from-state-access-in-UserCac.patch} (100%) rename patches/server/{0741-Fix-chunks-refusing-to-unload-at-low-TPS.patch => 0740-Fix-chunks-refusing-to-unload-at-low-TPS.patch} (100%) rename patches/server/{0742-Do-not-allow-ticket-level-changes-while-unloading-pl.patch => 0741-Do-not-allow-ticket-level-changes-while-unloading-pl.patch} (100%) rename patches/server/{0743-Do-not-allow-ticket-level-changes-when-updating-chun.patch => 0742-Do-not-allow-ticket-level-changes-when-updating-chun.patch} (100%) rename patches/server/{0744-Do-not-submit-profile-lookups-to-worldgen-threads.patch => 0743-Do-not-submit-profile-lookups-to-worldgen-threads.patch} (100%) rename patches/server/{0745-Log-when-the-async-catcher-is-tripped.patch => 0744-Log-when-the-async-catcher-is-tripped.patch} (100%) rename patches/server/{0746-Sanitize-ResourceLocation-error-logging.patch => 0745-Sanitize-ResourceLocation-error-logging.patch} (100%) rename patches/server/{0747-Optimise-general-POI-access.patch => 0746-Optimise-general-POI-access.patch} (100%) rename patches/server/{0748-Allow-controlled-flushing-for-network-manager.patch => 0747-Allow-controlled-flushing-for-network-manager.patch} (100%) rename patches/server/{0749-Add-more-async-catchers.patch => 0748-Add-more-async-catchers.patch} (100%) rename patches/server/{0750-Rewrite-entity-bounding-box-lookup-calls.patch => 0749-Rewrite-entity-bounding-box-lookup-calls.patch} (99%) rename patches/server/{0751-Execute-chunk-tasks-mid-tick.patch => 0750-Execute-chunk-tasks-mid-tick.patch} (100%) rename patches/server/{0752-Do-not-copy-visible-chunks.patch => 0751-Do-not-copy-visible-chunks.patch} (100%) rename patches/server/{0753-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch => 0752-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch} (99%) rename patches/server/{0754-Custom-table-implementation-for-blockstate-state-loo.patch => 0753-Custom-table-implementation-for-blockstate-state-loo.patch} (100%) rename patches/server/{0755-Detail-more-information-in-watchdog-dumps.patch => 0754-Detail-more-information-in-watchdog-dumps.patch} (99%) rename patches/server/{0756-Manually-inline-methods-in-BlockPosition.patch => 0755-Manually-inline-methods-in-BlockPosition.patch} (100%) rename patches/server/{0757-Distance-manager-tick-timings.patch => 0756-Distance-manager-tick-timings.patch} (96%) rename patches/server/{0758-Name-craft-scheduler-threads-according-to-the-plugin.patch => 0757-Name-craft-scheduler-threads-according-to-the-plugin.patch} (100%) rename patches/server/{0759-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch => 0758-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch} (100%) rename patches/server/{0760-Add-packet-limiter-config.patch => 0759-Add-packet-limiter-config.patch} (99%) rename patches/server/{0761-Lag-compensate-block-breaking.patch => 0760-Lag-compensate-block-breaking.patch} (98%) rename patches/server/{0762-Use-correct-LevelStem-registry-when-loading-default-.patch => 0761-Use-correct-LevelStem-registry-when-loading-default-.patch} (93%) rename patches/server/{0763-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch => 0762-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch} (100%) rename patches/server/{0764-Consolidate-flush-calls-for-entity-tracker-packets.patch => 0763-Consolidate-flush-calls-for-entity-tracker-packets.patch} (100%) rename patches/server/{0765-Don-t-lookup-fluid-state-when-raytracing.patch => 0764-Don-t-lookup-fluid-state-when-raytracing.patch} (100%) rename patches/server/{0766-Time-scoreboard-search.patch => 0765-Time-scoreboard-search.patch} (100%) rename patches/server/{0767-Send-full-pos-packets-for-hard-colliding-entities.patch => 0766-Send-full-pos-packets-for-hard-colliding-entities.patch} (96%) rename patches/server/{0768-Do-not-run-raytrace-logic-for-AIR.patch => 0767-Do-not-run-raytrace-logic-for-AIR.patch} (100%) rename patches/server/{0769-Oprimise-map-impl-for-tracked-players.patch => 0768-Oprimise-map-impl-for-tracked-players.patch} (100%) rename patches/server/{0770-Optimise-BlockSoil-nearby-water-lookup.patch => 0769-Optimise-BlockSoil-nearby-water-lookup.patch} (100%) rename patches/server/{0771-Allow-removal-addition-of-entities-to-entity-ticklis.patch => 0770-Allow-removal-addition-of-entities-to-entity-ticklis.patch} (100%) rename patches/server/{0772-Optimise-random-block-ticking.patch => 0771-Optimise-random-block-ticking.patch} (100%) rename patches/server/{0773-Optimise-non-flush-packet-sending.patch => 0772-Optimise-non-flush-packet-sending.patch} (100%) rename patches/server/{0774-Optimise-nearby-player-lookups.patch => 0773-Optimise-nearby-player-lookups.patch} (100%) rename patches/server/{0775-Optimise-WorldServer-notify.patch => 0774-Optimise-WorldServer-notify.patch} (100%) rename patches/server/{0776-Remove-streams-for-villager-AI.patch => 0775-Remove-streams-for-villager-AI.patch} (100%) rename patches/server/{0777-Rewrite-dataconverter-system.patch => 0776-Rewrite-dataconverter-system.patch} (100%) rename patches/server/{0778-Use-Velocity-compression-and-cipher-natives.patch => 0777-Use-Velocity-compression-and-cipher-natives.patch} (100%) rename patches/server/{0779-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch => 0778-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch} (100%) rename patches/server/{0780-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch => 0779-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch} (97%) rename patches/server/{0781-Async-catch-modifications-to-critical-entity-state.patch => 0780-Async-catch-modifications-to-critical-entity-state.patch} (100%) rename patches/server/{0782-Fix-Bukkit-NamespacedKey-shenanigans.patch => 0781-Fix-Bukkit-NamespacedKey-shenanigans.patch} (100%) rename patches/server/{0783-Fix-merchant-inventory-not-closing-on-entity-removal.patch => 0782-Fix-merchant-inventory-not-closing-on-entity-removal.patch} (100%) rename patches/server/{0784-Check-requirement-before-suggesting-root-nodes.patch => 0783-Check-requirement-before-suggesting-root-nodes.patch} (100%) rename patches/server/{0785-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch => 0784-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch} (100%) rename patches/server/{0786-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch => 0785-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch} (100%) rename patches/server/{0787-Ensure-valid-vehicle-status.patch => 0786-Ensure-valid-vehicle-status.patch} (100%) rename patches/server/{0788-Prevent-softlocked-end-exit-portal-generation.patch => 0787-Prevent-softlocked-end-exit-portal-generation.patch} (100%) rename patches/server/{0789-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch => 0788-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch} (100%) rename patches/server/{0790-Don-t-log-debug-logging-being-disabled.patch => 0789-Don-t-log-debug-logging-being-disabled.patch} (100%) rename patches/server/{0791-Mark-fish-and-axolotls-from-buckets-as-persistent.patch => 0790-Mark-fish-and-axolotls-from-buckets-as-persistent.patch} (100%) rename patches/server/{0792-fix-various-menus-with-empty-level-accesses.patch => 0791-fix-various-menus-with-empty-level-accesses.patch} (100%) rename patches/server/{0793-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch => 0792-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch} (100%) rename patches/server/{0794-Preserve-overstacked-loot.patch => 0793-Preserve-overstacked-loot.patch} (100%) rename patches/server/{0795-Update-head-rotation-in-missing-places.patch => 0794-Update-head-rotation-in-missing-places.patch} (100%) rename patches/server/{0796-prevent-unintended-light-block-manipulation.patch => 0795-prevent-unintended-light-block-manipulation.patch} (100%) rename patches/server/{0797-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch => 0796-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch} (100%) rename patches/server/{0798-Fix-CraftCriteria-defaults-map.patch => 0797-Fix-CraftCriteria-defaults-map.patch} (100%) rename patches/server/{0799-Fix-upstreams-block-state-factories.patch => 0798-Fix-upstreams-block-state-factories.patch} (100%) rename patches/server/{0800-Add-config-option-for-logging-player-ip-addresses.patch => 0799-Add-config-option-for-logging-player-ip-addresses.patch} (97%) rename patches/server/{0801-Configurable-feature-seeds.patch => 0800-Configurable-feature-seeds.patch} (100%) rename patches/server/{0802-VanillaCommandWrapper-didnt-account-for-entity-sende.patch => 0801-VanillaCommandWrapper-didnt-account-for-entity-sende.patch} (100%) rename patches/server/{0803-Add-root-admin-user-detection.patch => 0802-Add-root-admin-user-detection.patch} (100%) rename patches/server/{0804-Always-allow-item-changing-in-Fireball.patch => 0803-Always-allow-item-changing-in-Fireball.patch} (100%) rename patches/server/{0805-don-t-attempt-to-teleport-dead-entities.patch => 0804-don-t-attempt-to-teleport-dead-entities.patch} (100%) rename patches/server/{0806-Call-onRemove-logic-for-breakNaturally.patch => 0805-Call-onRemove-logic-for-breakNaturally.patch} (100%) rename patches/server/{0807-Fix-anvil-prepare-event-not-working-with-zero-xp.patch => 0806-Fix-anvil-prepare-event-not-working-with-zero-xp.patch} (100%) rename patches/server/{0808-Prevent-excessive-velocity-through-repeated-crits.patch => 0807-Prevent-excessive-velocity-through-repeated-crits.patch} (100%) rename patches/server/{0809-Remove-client-side-code-using-deprecated-for-removal.patch => 0808-Remove-client-side-code-using-deprecated-for-removal.patch} (100%) rename patches/{removed/1.18/0762-Rewrite-the-light-engine.patch => server/0809-Rewrite-the-light-engine.patch} (80%) diff --git a/patches/server/0463-Optimize-NibbleArray-to-use-pooled-buffers.patch b/patches/removed/1.18/0463-Optimize-NibbleArray-to-use-pooled-buffers.patch similarity index 100% rename from patches/server/0463-Optimize-NibbleArray-to-use-pooled-buffers.patch rename to patches/removed/1.18/0463-Optimize-NibbleArray-to-use-pooled-buffers.patch diff --git a/patches/server/0334-Fix-World-isChunkGenerated-calls.patch b/patches/server/0334-Fix-World-isChunkGenerated-calls.patch index 7a613ff01..890bba394 100644 --- a/patches/server/0334-Fix-World-isChunkGenerated-calls.patch +++ b/patches/server/0334-Fix-World-isChunkGenerated-calls.patch @@ -103,7 +103,7 @@ index 328f482a0bae8d2f8013ae9a90f0500ef889ffb5..6c72854aa975800bd6160d104936a5ba return (ChunkStatus) Registry.CHUNK_STATUS.get(ResourceLocation.tryParse(id)); } diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -index 9168bc15f8fbc8719e6c83428b8241053505441e..384ee6fbc65baff381d875665fd2462dbc99683e 100644 +index 9168bc15f8fbc8719e6c83428b8241053505441e..b44d621fc8a5194622775b7903de083cca999022 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java @@ -597,6 +597,17 @@ public class ChunkSerializer { @@ -117,7 +117,7 @@ index 9168bc15f8fbc8719e6c83428b8241053505441e..384ee6fbc65baff381d875665fd2462d + } + + // Note: Copied from below -+ return ChunkStatus.getStatus(compound.getCompound("Level").getString("Status")); ++ return ChunkStatus.getStatus(compound.getString("Status")); + } + // Paper end + diff --git a/patches/server/0464-Support-components-in-ItemMeta.patch b/patches/server/0463-Support-components-in-ItemMeta.patch similarity index 100% rename from patches/server/0464-Support-components-in-ItemMeta.patch rename to patches/server/0463-Support-components-in-ItemMeta.patch diff --git a/patches/server/0465-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch b/patches/server/0464-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch similarity index 100% rename from patches/server/0465-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch rename to patches/server/0464-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch diff --git a/patches/server/0466-Add-entity-liquid-API.patch b/patches/server/0465-Add-entity-liquid-API.patch similarity index 100% rename from patches/server/0466-Add-entity-liquid-API.patch rename to patches/server/0465-Add-entity-liquid-API.patch diff --git a/patches/server/0467-Update-itemstack-legacy-name-and-lore.patch b/patches/server/0466-Update-itemstack-legacy-name-and-lore.patch similarity index 100% rename from patches/server/0467-Update-itemstack-legacy-name-and-lore.patch rename to patches/server/0466-Update-itemstack-legacy-name-and-lore.patch diff --git a/patches/server/0468-Spawn-player-in-correct-world-on-login.patch b/patches/server/0467-Spawn-player-in-correct-world-on-login.patch similarity index 100% rename from patches/server/0468-Spawn-player-in-correct-world-on-login.patch rename to patches/server/0467-Spawn-player-in-correct-world-on-login.patch diff --git a/patches/server/0469-Add-PrepareResultEvent.patch b/patches/server/0468-Add-PrepareResultEvent.patch similarity index 100% rename from patches/server/0469-Add-PrepareResultEvent.patch rename to patches/server/0468-Add-PrepareResultEvent.patch diff --git a/patches/server/0470-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch b/patches/server/0469-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch similarity index 100% rename from patches/server/0470-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch rename to patches/server/0469-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch diff --git a/patches/server/0471-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/patches/server/0470-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch similarity index 100% rename from patches/server/0471-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch rename to patches/server/0470-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch diff --git a/patches/server/0472-Optimize-NetworkManager-Exception-Handling.patch b/patches/server/0471-Optimize-NetworkManager-Exception-Handling.patch similarity index 100% rename from patches/server/0472-Optimize-NetworkManager-Exception-Handling.patch rename to patches/server/0471-Optimize-NetworkManager-Exception-Handling.patch diff --git a/patches/server/0473-Optimize-the-advancement-data-player-iteration-to-be.patch b/patches/server/0472-Optimize-the-advancement-data-player-iteration-to-be.patch similarity index 100% rename from patches/server/0473-Optimize-the-advancement-data-player-iteration-to-be.patch rename to patches/server/0472-Optimize-the-advancement-data-player-iteration-to-be.patch diff --git a/patches/server/0474-Fix-arrows-never-despawning-MC-125757.patch b/patches/server/0473-Fix-arrows-never-despawning-MC-125757.patch similarity index 100% rename from patches/server/0474-Fix-arrows-never-despawning-MC-125757.patch rename to patches/server/0473-Fix-arrows-never-despawning-MC-125757.patch diff --git a/patches/server/0475-Thread-Safe-Vanilla-Command-permission-checking.patch b/patches/server/0474-Thread-Safe-Vanilla-Command-permission-checking.patch similarity index 100% rename from patches/server/0475-Thread-Safe-Vanilla-Command-permission-checking.patch rename to patches/server/0474-Thread-Safe-Vanilla-Command-permission-checking.patch diff --git a/patches/server/0476-Move-range-check-for-block-placing-up.patch b/patches/server/0475-Move-range-check-for-block-placing-up.patch similarity index 100% rename from patches/server/0476-Move-range-check-for-block-placing-up.patch rename to patches/server/0475-Move-range-check-for-block-placing-up.patch diff --git a/patches/server/0477-Fix-SPIGOT-5989.patch b/patches/server/0476-Fix-SPIGOT-5989.patch similarity index 100% rename from patches/server/0477-Fix-SPIGOT-5989.patch rename to patches/server/0476-Fix-SPIGOT-5989.patch diff --git a/patches/server/0478-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch b/patches/server/0477-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch similarity index 100% rename from patches/server/0478-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch rename to patches/server/0477-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch diff --git a/patches/server/0479-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch b/patches/server/0478-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch similarity index 100% rename from patches/server/0479-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch rename to patches/server/0478-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch diff --git a/patches/server/0480-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch b/patches/server/0479-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch similarity index 100% rename from patches/server/0480-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch rename to patches/server/0479-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch diff --git a/patches/server/0481-Add-missing-strikeLighting-call-to-World-spigot-stri.patch b/patches/server/0480-Add-missing-strikeLighting-call-to-World-spigot-stri.patch similarity index 100% rename from patches/server/0481-Add-missing-strikeLighting-call-to-World-spigot-stri.patch rename to patches/server/0480-Add-missing-strikeLighting-call-to-World-spigot-stri.patch diff --git a/patches/server/0482-Fix-some-rails-connecting-improperly.patch b/patches/server/0481-Fix-some-rails-connecting-improperly.patch similarity index 100% rename from patches/server/0482-Fix-some-rails-connecting-improperly.patch rename to patches/server/0481-Fix-some-rails-connecting-improperly.patch diff --git a/patches/server/0483-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch b/patches/server/0482-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch similarity index 100% rename from patches/server/0483-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch rename to patches/server/0482-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch diff --git a/patches/server/0484-Do-not-let-the-server-load-chunks-from-newer-version.patch b/patches/server/0483-Do-not-let-the-server-load-chunks-from-newer-version.patch similarity index 95% rename from patches/server/0484-Do-not-let-the-server-load-chunks-from-newer-version.patch rename to patches/server/0483-Do-not-let-the-server-load-chunks-from-newer-version.patch index 2fa64e3af..40d367608 100644 --- a/patches/server/0484-Do-not-let-the-server-load-chunks-from-newer-version.patch +++ b/patches/server/0483-Do-not-let-the-server-load-chunks-from-newer-version.patch @@ -9,7 +9,7 @@ the game, immediately stop the server to prevent data corruption. You can override this functionality at your own peril. diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -index 46beea026eec707c69194da6d1d51dc66b61f54e..a5bd7d9a7440887d8997a96efebaf3db155263be 100644 +index 9a6f4c0bcfe8ce331ba7f6c92e527addcf65c911..03439b92297d8a2d73f21ddb57b3b2087f70907c 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java @@ -109,9 +109,22 @@ public class ChunkSerializer { diff --git a/patches/server/0485-Brand-support.patch b/patches/server/0484-Brand-support.patch similarity index 100% rename from patches/server/0485-Brand-support.patch rename to patches/server/0484-Brand-support.patch diff --git a/patches/server/0486-Add-setMaxPlayers-API.patch b/patches/server/0485-Add-setMaxPlayers-API.patch similarity index 100% rename from patches/server/0486-Add-setMaxPlayers-API.patch rename to patches/server/0485-Add-setMaxPlayers-API.patch diff --git a/patches/server/0487-Add-playPickupItemAnimation-to-LivingEntity.patch b/patches/server/0486-Add-playPickupItemAnimation-to-LivingEntity.patch similarity index 100% rename from patches/server/0487-Add-playPickupItemAnimation-to-LivingEntity.patch rename to patches/server/0486-Add-playPickupItemAnimation-to-LivingEntity.patch diff --git a/patches/server/0488-Don-t-require-FACING-data.patch b/patches/server/0487-Don-t-require-FACING-data.patch similarity index 100% rename from patches/server/0488-Don-t-require-FACING-data.patch rename to patches/server/0487-Don-t-require-FACING-data.patch diff --git a/patches/server/0489-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/patches/server/0488-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch similarity index 100% rename from patches/server/0489-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch rename to patches/server/0488-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch diff --git a/patches/server/0490-Add-moon-phase-API.patch b/patches/server/0489-Add-moon-phase-API.patch similarity index 100% rename from patches/server/0490-Add-moon-phase-API.patch rename to patches/server/0489-Add-moon-phase-API.patch diff --git a/patches/server/0491-Improve-Chunk-Status-Transition-Speed.patch b/patches/server/0490-Improve-Chunk-Status-Transition-Speed.patch similarity index 100% rename from patches/server/0491-Improve-Chunk-Status-Transition-Speed.patch rename to patches/server/0490-Improve-Chunk-Status-Transition-Speed.patch diff --git a/patches/server/0492-Prevent-headless-pistons-from-being-created.patch b/patches/server/0491-Prevent-headless-pistons-from-being-created.patch similarity index 100% rename from patches/server/0492-Prevent-headless-pistons-from-being-created.patch rename to patches/server/0491-Prevent-headless-pistons-from-being-created.patch diff --git a/patches/server/0493-Add-BellRingEvent.patch b/patches/server/0492-Add-BellRingEvent.patch similarity index 100% rename from patches/server/0493-Add-BellRingEvent.patch rename to patches/server/0492-Add-BellRingEvent.patch diff --git a/patches/server/0494-Add-zombie-targets-turtle-egg-config.patch b/patches/server/0493-Add-zombie-targets-turtle-egg-config.patch similarity index 100% rename from patches/server/0494-Add-zombie-targets-turtle-egg-config.patch rename to patches/server/0493-Add-zombie-targets-turtle-egg-config.patch diff --git a/patches/server/0495-Buffer-joins-to-world.patch b/patches/server/0494-Buffer-joins-to-world.patch similarity index 100% rename from patches/server/0495-Buffer-joins-to-world.patch rename to patches/server/0494-Buffer-joins-to-world.patch diff --git a/patches/server/0496-Optimize-redstone-algorithm.patch b/patches/server/0495-Optimize-redstone-algorithm.patch similarity index 100% rename from patches/server/0496-Optimize-redstone-algorithm.patch rename to patches/server/0495-Optimize-redstone-algorithm.patch diff --git a/patches/server/0497-Fix-hex-colors-not-working-in-some-kick-messages.patch b/patches/server/0496-Fix-hex-colors-not-working-in-some-kick-messages.patch similarity index 100% rename from patches/server/0497-Fix-hex-colors-not-working-in-some-kick-messages.patch rename to patches/server/0496-Fix-hex-colors-not-working-in-some-kick-messages.patch diff --git a/patches/server/0498-PortalCreateEvent-needs-to-know-its-entity.patch b/patches/server/0497-PortalCreateEvent-needs-to-know-its-entity.patch similarity index 100% rename from patches/server/0498-PortalCreateEvent-needs-to-know-its-entity.patch rename to patches/server/0497-PortalCreateEvent-needs-to-know-its-entity.patch diff --git a/patches/server/0499-Fix-CraftTeam-null-check.patch b/patches/server/0498-Fix-CraftTeam-null-check.patch similarity index 100% rename from patches/server/0499-Fix-CraftTeam-null-check.patch rename to patches/server/0498-Fix-CraftTeam-null-check.patch diff --git a/patches/server/0500-Add-more-Evoker-API.patch b/patches/server/0499-Add-more-Evoker-API.patch similarity index 100% rename from patches/server/0500-Add-more-Evoker-API.patch rename to patches/server/0499-Add-more-Evoker-API.patch diff --git a/patches/server/0501-Add-methods-to-get-translation-keys.patch b/patches/server/0500-Add-methods-to-get-translation-keys.patch similarity index 98% rename from patches/server/0501-Add-methods-to-get-translation-keys.patch rename to patches/server/0500-Add-methods-to-get-translation-keys.patch index fe6531e50..ed27a602e 100644 --- a/patches/server/0501-Add-methods-to-get-translation-keys.patch +++ b/patches/server/0500-Add-methods-to-get-translation-keys.patch @@ -42,7 +42,7 @@ index eb99e0c2462a2d1ab4508a5c3f1580b6e31d7465..c536eceef3365a7b726cd970df345ba1 public net.minecraft.world.item.enchantment.Enchantment getHandle() { diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index a849724a9fb642bcd4de3c6438937adc882c610e..1380df5f70f9284b47b9e6426672d82df384b2c0 100644 +index 19401098850f3fecaaea1f27ff4febd7bda1f7c9..dd9433f014c974bbee6f00a9677403ddbbcee416 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -442,6 +442,30 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0502-Create-HoverEvent-from-ItemStack-Entity.patch b/patches/server/0501-Create-HoverEvent-from-ItemStack-Entity.patch similarity index 100% rename from patches/server/0502-Create-HoverEvent-from-ItemStack-Entity.patch rename to patches/server/0501-Create-HoverEvent-from-ItemStack-Entity.patch diff --git a/patches/server/0503-Cache-block-data-strings.patch b/patches/server/0502-Cache-block-data-strings.patch similarity index 100% rename from patches/server/0503-Cache-block-data-strings.patch rename to patches/server/0502-Cache-block-data-strings.patch diff --git a/patches/server/0504-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch b/patches/server/0503-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch similarity index 100% rename from patches/server/0504-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch rename to patches/server/0503-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch diff --git a/patches/server/0505-Add-additional-open-container-api-to-HumanEntity.patch b/patches/server/0504-Add-additional-open-container-api-to-HumanEntity.patch similarity index 100% rename from patches/server/0505-Add-additional-open-container-api-to-HumanEntity.patch rename to patches/server/0504-Add-additional-open-container-api-to-HumanEntity.patch diff --git a/patches/server/0506-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch b/patches/server/0505-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch similarity index 100% rename from patches/server/0506-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch rename to patches/server/0505-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch diff --git a/patches/server/0507-Extend-block-drop-capture-to-capture-all-items-added.patch b/patches/server/0506-Extend-block-drop-capture-to-capture-all-items-added.patch similarity index 100% rename from patches/server/0507-Extend-block-drop-capture-to-capture-all-items-added.patch rename to patches/server/0506-Extend-block-drop-capture-to-capture-all-items-added.patch diff --git a/patches/server/0508-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch b/patches/server/0507-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch similarity index 89% rename from patches/server/0508-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch rename to patches/server/0507-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch index 7d017eb96..be798e12c 100644 --- a/patches/server/0508-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch +++ b/patches/server/0507-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't mark dirty in invalid locations (SPIGOT-6086) diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java -index 8950470bbaa57ac0ef6ca4d6e3796a712e0b6cd6..b493769dd420f0dd93fdf8184c452c53cb63e95b 100644 +index 5b9abfb7b8edd686f416a46851f12bd52bea7000..874c99cdb8ea57c7ba986dd1cbd43bedbff30260 100644 --- a/src/main/java/net/minecraft/server/level/ChunkHolder.java +++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java @@ -229,6 +229,7 @@ public class ChunkHolder { diff --git a/patches/server/0509-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/server/0508-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch similarity index 94% rename from patches/server/0509-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch rename to patches/server/0508-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch index a57ddd84c..624bc4480 100644 --- a/patches/server/0509-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch +++ b/patches/server/0508-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch @@ -21,7 +21,7 @@ index d5455fda54047ad3723772a352d35a371727f0cd..f5198f23e6147adb69aa95d5da816eae + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 1380df5f70f9284b47b9e6426672d82df384b2c0..33b85d2cd6be32d70a9621c02666e297fc78ff97 100644 +index dd9433f014c974bbee6f00a9677403ddbbcee416..92e3717b217448398c4d07d8331ed8c57cd68c8f 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -466,6 +466,10 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0510-Lazily-track-plugin-scoreboards-by-default.patch b/patches/server/0509-Lazily-track-plugin-scoreboards-by-default.patch similarity index 98% rename from patches/server/0510-Lazily-track-plugin-scoreboards-by-default.patch rename to patches/server/0509-Lazily-track-plugin-scoreboards-by-default.patch index 8d8a011b2..e2d6b4054 100644 --- a/patches/server/0510-Lazily-track-plugin-scoreboards-by-default.patch +++ b/patches/server/0509-Lazily-track-plugin-scoreboards-by-default.patch @@ -14,7 +14,7 @@ this breaks your workflow you can always force all scoreboards to be tracked wit settings.track-plugin-scoreboards in paper.yml. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index b6c7aec1516a4db4fde8c9ec2772cd982ed5e304..dbfd840f2f64fa7eec5523aa2ba9e1018f4bb19d 100644 +index 16d6ce24031590ff9dfba5c938aeb9755704798d..bd7926fa89621e8cdd0b5fdd8ed3b8c6dbfbc3ec 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -96,6 +96,11 @@ public class PaperConfig { diff --git a/patches/server/0511-Entity-isTicking.patch b/patches/server/0510-Entity-isTicking.patch similarity index 100% rename from patches/server/0511-Entity-isTicking.patch rename to patches/server/0510-Entity-isTicking.patch diff --git a/patches/server/0512-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch b/patches/server/0511-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch similarity index 100% rename from patches/server/0512-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch rename to patches/server/0511-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch diff --git a/patches/server/0513-Fix-Concurrency-issue-in-WeightedList.patch b/patches/server/0512-Fix-Concurrency-issue-in-WeightedList.patch similarity index 100% rename from patches/server/0513-Fix-Concurrency-issue-in-WeightedList.patch rename to patches/server/0512-Fix-Concurrency-issue-in-WeightedList.patch diff --git a/patches/server/0514-Reset-Ender-Crystals-on-Dragon-Spawn.patch b/patches/server/0513-Reset-Ender-Crystals-on-Dragon-Spawn.patch similarity index 100% rename from patches/server/0514-Reset-Ender-Crystals-on-Dragon-Spawn.patch rename to patches/server/0513-Reset-Ender-Crystals-on-Dragon-Spawn.patch diff --git a/patches/server/0515-Fix-for-large-move-vectors-crashing-server.patch b/patches/server/0514-Fix-for-large-move-vectors-crashing-server.patch similarity index 100% rename from patches/server/0515-Fix-for-large-move-vectors-crashing-server.patch rename to patches/server/0514-Fix-for-large-move-vectors-crashing-server.patch diff --git a/patches/server/0516-Optimise-getType-calls.patch b/patches/server/0515-Optimise-getType-calls.patch similarity index 100% rename from patches/server/0516-Optimise-getType-calls.patch rename to patches/server/0515-Optimise-getType-calls.patch diff --git a/patches/server/0517-Villager-resetOffers.patch b/patches/server/0516-Villager-resetOffers.patch similarity index 100% rename from patches/server/0517-Villager-resetOffers.patch rename to patches/server/0516-Villager-resetOffers.patch diff --git a/patches/server/0518-Improve-inlinig-for-some-hot-IBlockData-methods.patch b/patches/server/0517-Improve-inlinig-for-some-hot-IBlockData-methods.patch similarity index 100% rename from patches/server/0518-Improve-inlinig-for-some-hot-IBlockData-methods.patch rename to patches/server/0517-Improve-inlinig-for-some-hot-IBlockData-methods.patch diff --git a/patches/server/0519-Retain-block-place-order-when-capturing-blockstates.patch b/patches/server/0518-Retain-block-place-order-when-capturing-blockstates.patch similarity index 100% rename from patches/server/0519-Retain-block-place-order-when-capturing-blockstates.patch rename to patches/server/0518-Retain-block-place-order-when-capturing-blockstates.patch diff --git a/patches/server/0520-Reduce-blockpos-allocation-from-pathfinding.patch b/patches/server/0519-Reduce-blockpos-allocation-from-pathfinding.patch similarity index 100% rename from patches/server/0520-Reduce-blockpos-allocation-from-pathfinding.patch rename to patches/server/0519-Reduce-blockpos-allocation-from-pathfinding.patch diff --git a/patches/server/0521-Fix-item-locations-dropped-from-campfires.patch b/patches/server/0520-Fix-item-locations-dropped-from-campfires.patch similarity index 100% rename from patches/server/0521-Fix-item-locations-dropped-from-campfires.patch rename to patches/server/0520-Fix-item-locations-dropped-from-campfires.patch diff --git a/patches/server/0522-Player-elytra-boost-API.patch b/patches/server/0521-Player-elytra-boost-API.patch similarity index 100% rename from patches/server/0522-Player-elytra-boost-API.patch rename to patches/server/0521-Player-elytra-boost-API.patch diff --git a/patches/server/0523-Fixed-TileEntityBell-memory-leak.patch b/patches/server/0522-Fixed-TileEntityBell-memory-leak.patch similarity index 100% rename from patches/server/0523-Fixed-TileEntityBell-memory-leak.patch rename to patches/server/0522-Fixed-TileEntityBell-memory-leak.patch diff --git a/patches/server/0524-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch b/patches/server/0523-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch similarity index 100% rename from patches/server/0524-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch rename to patches/server/0523-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch diff --git a/patches/server/0525-Add-getOfflinePlayerIfCached-String.patch b/patches/server/0524-Add-getOfflinePlayerIfCached-String.patch similarity index 100% rename from patches/server/0525-Add-getOfflinePlayerIfCached-String.patch rename to patches/server/0524-Add-getOfflinePlayerIfCached-String.patch diff --git a/patches/server/0526-Add-ignore-discounts-API.patch b/patches/server/0525-Add-ignore-discounts-API.patch similarity index 100% rename from patches/server/0526-Add-ignore-discounts-API.patch rename to patches/server/0525-Add-ignore-discounts-API.patch diff --git a/patches/server/0527-Toggle-for-removing-existing-dragon.patch b/patches/server/0526-Toggle-for-removing-existing-dragon.patch similarity index 95% rename from patches/server/0527-Toggle-for-removing-existing-dragon.patch rename to patches/server/0526-Toggle-for-removing-existing-dragon.patch index 5ee630202..796133333 100644 --- a/patches/server/0527-Toggle-for-removing-existing-dragon.patch +++ b/patches/server/0526-Toggle-for-removing-existing-dragon.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Toggle for removing existing dragon diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index bc93318246eab1da5462aa3fa0cde4c100622f4e..62e60057a362ad7c3e96b3167f78ba154cfefdc3 100644 +index aee981e967bfb32a531d5d79213c5d165bb64ad0..ffcfa631a519079f355cddb7bf10dbceb2496882 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -71,6 +71,14 @@ public class PaperWorldConfig { diff --git a/patches/server/0528-Fix-client-lag-on-advancement-loading.patch b/patches/server/0527-Fix-client-lag-on-advancement-loading.patch similarity index 95% rename from patches/server/0528-Fix-client-lag-on-advancement-loading.patch rename to patches/server/0527-Fix-client-lag-on-advancement-loading.patch index 4abc66ce7..ba1add3c3 100644 --- a/patches/server/0528-Fix-client-lag-on-advancement-loading.patch +++ b/patches/server/0527-Fix-client-lag-on-advancement-loading.patch @@ -15,7 +15,7 @@ manually reload the advancement data for all players, which normally takes place as a part of the datapack reloading. diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 33b85d2cd6be32d70a9621c02666e297fc78ff97..463cabee7f4f40f2f8d4f4502296d1abfff18229 100644 +index 92e3717b217448398c4d07d8331ed8c57cd68c8f..de6343455ce92835f3e5bc2646f64c03dab8aba2 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -323,7 +323,13 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0529-Item-no-age-no-player-pickup.patch b/patches/server/0528-Item-no-age-no-player-pickup.patch similarity index 100% rename from patches/server/0529-Item-no-age-no-player-pickup.patch rename to patches/server/0528-Item-no-age-no-player-pickup.patch diff --git a/patches/server/0530-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch b/patches/server/0529-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch similarity index 100% rename from patches/server/0530-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch rename to patches/server/0529-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch diff --git a/patches/server/0531-Beacon-API-custom-effect-ranges.patch b/patches/server/0530-Beacon-API-custom-effect-ranges.patch similarity index 100% rename from patches/server/0531-Beacon-API-custom-effect-ranges.patch rename to patches/server/0530-Beacon-API-custom-effect-ranges.patch diff --git a/patches/server/0532-Add-API-for-quit-reason.patch b/patches/server/0531-Add-API-for-quit-reason.patch similarity index 98% rename from patches/server/0532-Add-API-for-quit-reason.patch rename to patches/server/0531-Add-API-for-quit-reason.patch index 31b097e48..1c1706104 100644 --- a/patches/server/0532-Add-API-for-quit-reason.patch +++ b/patches/server/0531-Add-API-for-quit-reason.patch @@ -49,7 +49,7 @@ index 2dd47eab63cf9322a5844e748709e220272a8cfe..c0a685cfe62aeda3583763ecc1e4fa12 this.connection.disconnect(ichatbasecomponent); }); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index b1f93551ce3e4d12e5cbe424c1ceaf3da20d0ffd..5bbf5c83a5052df07392cd17236469b2d3ddecdc 100644 +index 5c829538a008f1a737380627f7b88c7a0914050f..d414a3abae7dea5b813e41758eccf98cd35bddc2 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -596,7 +596,7 @@ public abstract class PlayerList { diff --git a/patches/server/0533-Add-Wandering-Trader-spawn-rate-config-options.patch b/patches/server/0532-Add-Wandering-Trader-spawn-rate-config-options.patch similarity index 98% rename from patches/server/0533-Add-Wandering-Trader-spawn-rate-config-options.patch rename to patches/server/0532-Add-Wandering-Trader-spawn-rate-config-options.patch index ab3e9e7ec..b2b1e8617 100644 --- a/patches/server/0533-Add-Wandering-Trader-spawn-rate-config-options.patch +++ b/patches/server/0532-Add-Wandering-Trader-spawn-rate-config-options.patch @@ -11,7 +11,7 @@ in IWorldServerData are removed as they were only used in certain places, with h values used in other places. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 62e60057a362ad7c3e96b3167f78ba154cfefdc3..ab6ade77a7be2b0d67effcacbf74ed64a1beccff 100644 +index ffcfa631a519079f355cddb7bf10dbceb2496882..7f4e963c1bb37f929321e0a862f76f42ab72b4c4 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -79,6 +79,19 @@ public class PaperWorldConfig { diff --git a/patches/server/0534-Significantly-improve-performance-of-the-end-generat.patch b/patches/server/0533-Significantly-improve-performance-of-the-end-generat.patch similarity index 100% rename from patches/server/0534-Significantly-improve-performance-of-the-end-generat.patch rename to patches/server/0533-Significantly-improve-performance-of-the-end-generat.patch diff --git a/patches/server/0535-Expose-world-spawn-angle.patch b/patches/server/0534-Expose-world-spawn-angle.patch similarity index 95% rename from patches/server/0535-Expose-world-spawn-angle.patch rename to patches/server/0534-Expose-world-spawn-angle.patch index 8a4fd893f..0995290ba 100644 --- a/patches/server/0535-Expose-world-spawn-angle.patch +++ b/patches/server/0534-Expose-world-spawn-angle.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose world spawn angle diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 5bbf5c83a5052df07392cd17236469b2d3ddecdc..d0c824290c08f825956ec1396381ec1657a6476d 100644 +index d414a3abae7dea5b813e41758eccf98cd35bddc2..e7834772e38e61df405be406fe320a646778175a 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -874,7 +874,7 @@ public abstract class PlayerList { diff --git a/patches/server/0536-Add-Destroy-Speed-API.patch b/patches/server/0535-Add-Destroy-Speed-API.patch similarity index 100% rename from patches/server/0536-Add-Destroy-Speed-API.patch rename to patches/server/0535-Add-Destroy-Speed-API.patch diff --git a/patches/server/0537-Fix-Player-spawnParticle-x-y-z-precision-loss.patch b/patches/server/0536-Fix-Player-spawnParticle-x-y-z-precision-loss.patch similarity index 100% rename from patches/server/0537-Fix-Player-spawnParticle-x-y-z-precision-loss.patch rename to patches/server/0536-Fix-Player-spawnParticle-x-y-z-precision-loss.patch diff --git a/patches/server/0538-Add-LivingEntity-clearActiveItem.patch b/patches/server/0537-Add-LivingEntity-clearActiveItem.patch similarity index 100% rename from patches/server/0538-Add-LivingEntity-clearActiveItem.patch rename to patches/server/0537-Add-LivingEntity-clearActiveItem.patch diff --git a/patches/server/0539-Add-PlayerItemCooldownEvent.patch b/patches/server/0538-Add-PlayerItemCooldownEvent.patch similarity index 100% rename from patches/server/0539-Add-PlayerItemCooldownEvent.patch rename to patches/server/0538-Add-PlayerItemCooldownEvent.patch diff --git a/patches/server/0540-More-lightning-API.patch b/patches/server/0539-More-lightning-API.patch similarity index 100% rename from patches/server/0540-More-lightning-API.patch rename to patches/server/0539-More-lightning-API.patch diff --git a/patches/server/0541-Climbing-should-not-bypass-cramming-gamerule.patch b/patches/server/0540-Climbing-should-not-bypass-cramming-gamerule.patch similarity index 98% rename from patches/server/0541-Climbing-should-not-bypass-cramming-gamerule.patch rename to patches/server/0540-Climbing-should-not-bypass-cramming-gamerule.patch index 25859f642..f5f3eba66 100644 --- a/patches/server/0541-Climbing-should-not-bypass-cramming-gamerule.patch +++ b/patches/server/0540-Climbing-should-not-bypass-cramming-gamerule.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Climbing should not bypass cramming gamerule diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index ab6ade77a7be2b0d67effcacbf74ed64a1beccff..cf9d0877d842b7821ea7f8981aaddcf5fa604e80 100644 +index 7f4e963c1bb37f929321e0a862f76f42ab72b4c4..9bc44cbe06bc7055c4fafff899c999b5929f468b 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -92,6 +92,11 @@ public class PaperWorldConfig { diff --git a/patches/server/0542-Added-missing-default-perms-for-commands.patch b/patches/server/0541-Added-missing-default-perms-for-commands.patch similarity index 100% rename from patches/server/0542-Added-missing-default-perms-for-commands.patch rename to patches/server/0541-Added-missing-default-perms-for-commands.patch diff --git a/patches/server/0543-Add-PlayerShearBlockEvent.patch b/patches/server/0542-Add-PlayerShearBlockEvent.patch similarity index 100% rename from patches/server/0543-Add-PlayerShearBlockEvent.patch rename to patches/server/0542-Add-PlayerShearBlockEvent.patch diff --git a/patches/server/0544-Fix-curing-zombie-villager-discount-exploit.patch b/patches/server/0543-Fix-curing-zombie-villager-discount-exploit.patch similarity index 96% rename from patches/server/0544-Fix-curing-zombie-villager-discount-exploit.patch rename to patches/server/0543-Fix-curing-zombie-villager-discount-exploit.patch index 1d9ca254e..03542bbe1 100644 --- a/patches/server/0544-Fix-curing-zombie-villager-discount-exploit.patch +++ b/patches/server/0543-Fix-curing-zombie-villager-discount-exploit.patch @@ -8,7 +8,7 @@ and curing a villager on repeat by simply resetting the relevant part of the reputation when it is cured. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index cf9d0877d842b7821ea7f8981aaddcf5fa604e80..1c9958d8c989add9ef062c54d5348373ddeea4cd 100644 +index 9bc44cbe06bc7055c4fafff899c999b5929f468b..fb03c7c1c2f0e090f22964973c1499271ad3dad9 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -97,6 +97,11 @@ public class PaperWorldConfig { diff --git a/patches/server/0545-Limit-recipe-packets.patch b/patches/server/0544-Limit-recipe-packets.patch similarity index 97% rename from patches/server/0545-Limit-recipe-packets.patch rename to patches/server/0544-Limit-recipe-packets.patch index f11df1c17..b84509794 100644 --- a/patches/server/0545-Limit-recipe-packets.patch +++ b/patches/server/0544-Limit-recipe-packets.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Limit recipe packets diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index dbfd840f2f64fa7eec5523aa2ba9e1018f4bb19d..1100f44ec9dcd7183b220028c87c79a07d3f2ff7 100644 +index bd7926fa89621e8cdd0b5fdd8ed3b8c6dbfbc3ec..f20497eb1202e3e4c256f6cf04f8644a2413fe27 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -365,6 +365,13 @@ public class PaperConfig { diff --git a/patches/server/0546-Fix-CraftSound-backwards-compatibility.patch b/patches/server/0545-Fix-CraftSound-backwards-compatibility.patch similarity index 100% rename from patches/server/0546-Fix-CraftSound-backwards-compatibility.patch rename to patches/server/0545-Fix-CraftSound-backwards-compatibility.patch diff --git a/patches/server/0547-MC-4-Fix-item-position-desync.patch b/patches/server/0546-MC-4-Fix-item-position-desync.patch similarity index 97% rename from patches/server/0547-MC-4-Fix-item-position-desync.patch rename to patches/server/0546-MC-4-Fix-item-position-desync.patch index b81fcf460..4f2105a4c 100644 --- a/patches/server/0547-MC-4-Fix-item-position-desync.patch +++ b/patches/server/0546-MC-4-Fix-item-position-desync.patch @@ -9,7 +9,7 @@ loss, which forces the server to lose the same precision as the client keeping them in sync. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 1100f44ec9dcd7183b220028c87c79a07d3f2ff7..c8a49e7131d0722e4c57cc889933a43569059ba6 100644 +index f20497eb1202e3e4c256f6cf04f8644a2413fe27..d48c8e3408510cacc148e8071af95994610869a6 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -101,6 +101,11 @@ public class PaperConfig { diff --git a/patches/server/0548-Player-Chunk-Load-Unload-Events.patch b/patches/server/0547-Player-Chunk-Load-Unload-Events.patch similarity index 100% rename from patches/server/0548-Player-Chunk-Load-Unload-Events.patch rename to patches/server/0547-Player-Chunk-Load-Unload-Events.patch diff --git a/patches/server/0549-Optimize-Dynamic-get-Missing-Keys.patch b/patches/server/0548-Optimize-Dynamic-get-Missing-Keys.patch similarity index 100% rename from patches/server/0549-Optimize-Dynamic-get-Missing-Keys.patch rename to patches/server/0548-Optimize-Dynamic-get-Missing-Keys.patch diff --git a/patches/server/0550-Expose-LivingEntity-hurt-direction.patch b/patches/server/0549-Expose-LivingEntity-hurt-direction.patch similarity index 100% rename from patches/server/0550-Expose-LivingEntity-hurt-direction.patch rename to patches/server/0549-Expose-LivingEntity-hurt-direction.patch diff --git a/patches/server/0551-Add-OBSTRUCTED-reason-to-BedEnterResult.patch b/patches/server/0550-Add-OBSTRUCTED-reason-to-BedEnterResult.patch similarity index 100% rename from patches/server/0551-Add-OBSTRUCTED-reason-to-BedEnterResult.patch rename to patches/server/0550-Add-OBSTRUCTED-reason-to-BedEnterResult.patch diff --git a/patches/server/0552-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch b/patches/server/0551-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch similarity index 100% rename from patches/server/0552-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch rename to patches/server/0551-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch diff --git a/patches/server/0553-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch b/patches/server/0552-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch similarity index 100% rename from patches/server/0553-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch rename to patches/server/0552-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch diff --git a/patches/server/0554-Implement-TargetHitEvent.patch b/patches/server/0553-Implement-TargetHitEvent.patch similarity index 100% rename from patches/server/0554-Implement-TargetHitEvent.patch rename to patches/server/0553-Implement-TargetHitEvent.patch diff --git a/patches/server/0555-Additional-Block-Material-API-s.patch b/patches/server/0554-Additional-Block-Material-API-s.patch similarity index 100% rename from patches/server/0555-Additional-Block-Material-API-s.patch rename to patches/server/0554-Additional-Block-Material-API-s.patch diff --git a/patches/server/0556-Fix-harming-potion-dupe.patch b/patches/server/0555-Fix-harming-potion-dupe.patch similarity index 100% rename from patches/server/0556-Fix-harming-potion-dupe.patch rename to patches/server/0555-Fix-harming-potion-dupe.patch diff --git a/patches/server/0557-Implement-API-to-get-Material-from-Boats-and-Minecar.patch b/patches/server/0556-Implement-API-to-get-Material-from-Boats-and-Minecar.patch similarity index 100% rename from patches/server/0557-Implement-API-to-get-Material-from-Boats-and-Minecar.patch rename to patches/server/0556-Implement-API-to-get-Material-from-Boats-and-Minecar.patch diff --git a/patches/server/0558-Cache-burn-durations.patch b/patches/server/0557-Cache-burn-durations.patch similarity index 100% rename from patches/server/0558-Cache-burn-durations.patch rename to patches/server/0557-Cache-burn-durations.patch diff --git a/patches/server/0559-Allow-disabling-mob-spawner-spawn-egg-transformation.patch b/patches/server/0558-Allow-disabling-mob-spawner-spawn-egg-transformation.patch similarity index 95% rename from patches/server/0559-Allow-disabling-mob-spawner-spawn-egg-transformation.patch rename to patches/server/0558-Allow-disabling-mob-spawner-spawn-egg-transformation.patch index 204a15a90..5109435f9 100644 --- a/patches/server/0559-Allow-disabling-mob-spawner-spawn-egg-transformation.patch +++ b/patches/server/0558-Allow-disabling-mob-spawner-spawn-egg-transformation.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow disabling mob spawner spawn egg transformation diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 1c9958d8c989add9ef062c54d5348373ddeea4cd..98e7bd4c85ed9f6bb063dfc3b0e4b80150a86835 100644 +index fb03c7c1c2f0e090f22964973c1499271ad3dad9..3ad93abb830d307a0d2cf8cb4554bf3fa37cb91d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -102,6 +102,11 @@ public class PaperWorldConfig { diff --git a/patches/server/0560-Fix-Not-a-string-Map-Conversion-spam.patch b/patches/server/0559-Fix-Not-a-string-Map-Conversion-spam.patch similarity index 100% rename from patches/server/0560-Fix-Not-a-string-Map-Conversion-spam.patch rename to patches/server/0559-Fix-Not-a-string-Map-Conversion-spam.patch diff --git a/patches/server/0561-Implement-PlayerFlowerPotManipulateEvent.patch b/patches/server/0560-Implement-PlayerFlowerPotManipulateEvent.patch similarity index 100% rename from patches/server/0561-Implement-PlayerFlowerPotManipulateEvent.patch rename to patches/server/0560-Implement-PlayerFlowerPotManipulateEvent.patch diff --git a/patches/server/0562-Fix-interact-event-not-being-called-in-adventure.patch b/patches/server/0561-Fix-interact-event-not-being-called-in-adventure.patch similarity index 100% rename from patches/server/0562-Fix-interact-event-not-being-called-in-adventure.patch rename to patches/server/0561-Fix-interact-event-not-being-called-in-adventure.patch diff --git a/patches/server/0563-Zombie-API-breaking-doors.patch b/patches/server/0562-Zombie-API-breaking-doors.patch similarity index 100% rename from patches/server/0563-Zombie-API-breaking-doors.patch rename to patches/server/0562-Zombie-API-breaking-doors.patch diff --git a/patches/server/0564-Fix-nerfed-slime-when-splitting.patch b/patches/server/0563-Fix-nerfed-slime-when-splitting.patch similarity index 100% rename from patches/server/0564-Fix-nerfed-slime-when-splitting.patch rename to patches/server/0563-Fix-nerfed-slime-when-splitting.patch diff --git a/patches/server/0565-Add-EntityLoadCrossbowEvent.patch b/patches/server/0564-Add-EntityLoadCrossbowEvent.patch similarity index 100% rename from patches/server/0565-Add-EntityLoadCrossbowEvent.patch rename to patches/server/0564-Add-EntityLoadCrossbowEvent.patch diff --git a/patches/server/0566-Guardian-beam-workaround.patch b/patches/server/0565-Guardian-beam-workaround.patch similarity index 100% rename from patches/server/0566-Guardian-beam-workaround.patch rename to patches/server/0565-Guardian-beam-workaround.patch diff --git a/patches/server/0567-Added-WorldGameRuleChangeEvent.patch b/patches/server/0566-Added-WorldGameRuleChangeEvent.patch similarity index 100% rename from patches/server/0567-Added-WorldGameRuleChangeEvent.patch rename to patches/server/0566-Added-WorldGameRuleChangeEvent.patch diff --git a/patches/server/0568-Added-ServerResourcesReloadedEvent.patch b/patches/server/0567-Added-ServerResourcesReloadedEvent.patch similarity index 100% rename from patches/server/0568-Added-ServerResourcesReloadedEvent.patch rename to patches/server/0567-Added-ServerResourcesReloadedEvent.patch diff --git a/patches/server/0569-Added-world-settings-for-mobs-picking-up-loot.patch b/patches/server/0568-Added-world-settings-for-mobs-picking-up-loot.patch similarity index 100% rename from patches/server/0569-Added-world-settings-for-mobs-picking-up-loot.patch rename to patches/server/0568-Added-world-settings-for-mobs-picking-up-loot.patch diff --git a/patches/server/0570-Implemented-BlockFailedDispenseEvent.patch b/patches/server/0569-Implemented-BlockFailedDispenseEvent.patch similarity index 100% rename from patches/server/0570-Implemented-BlockFailedDispenseEvent.patch rename to patches/server/0569-Implemented-BlockFailedDispenseEvent.patch diff --git a/patches/server/0571-Added-PlayerLecternPageChangeEvent.patch b/patches/server/0570-Added-PlayerLecternPageChangeEvent.patch similarity index 100% rename from patches/server/0571-Added-PlayerLecternPageChangeEvent.patch rename to patches/server/0570-Added-PlayerLecternPageChangeEvent.patch diff --git a/patches/server/0572-Added-PlayerLoomPatternSelectEvent.patch b/patches/server/0571-Added-PlayerLoomPatternSelectEvent.patch similarity index 100% rename from patches/server/0572-Added-PlayerLoomPatternSelectEvent.patch rename to patches/server/0571-Added-PlayerLoomPatternSelectEvent.patch diff --git a/patches/server/0573-Configurable-door-breaking-difficulty.patch b/patches/server/0572-Configurable-door-breaking-difficulty.patch similarity index 97% rename from patches/server/0573-Configurable-door-breaking-difficulty.patch rename to patches/server/0572-Configurable-door-breaking-difficulty.patch index 82f9d6d01..4131ea9ff 100644 --- a/patches/server/0573-Configurable-door-breaking-difficulty.patch +++ b/patches/server/0572-Configurable-door-breaking-difficulty.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable door breaking difficulty diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 53681d342935feb4d0f0428df751a4f8004e783e..ad355eaf5e597be9c35fbf0a635944b16603bdc2 100644 +index 556bf08491466a061119338a05d6165d041e6668..79c8618eb1300239d457013c44d47277e2962904 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -6,6 +6,9 @@ import java.util.stream.Collectors; diff --git a/patches/server/0574-Empty-commands-shall-not-be-dispatched.patch b/patches/server/0573-Empty-commands-shall-not-be-dispatched.patch similarity index 100% rename from patches/server/0574-Empty-commands-shall-not-be-dispatched.patch rename to patches/server/0573-Empty-commands-shall-not-be-dispatched.patch diff --git a/patches/server/0575-Implement-API-to-expose-exact-interaction-point.patch b/patches/server/0574-Implement-API-to-expose-exact-interaction-point.patch similarity index 100% rename from patches/server/0575-Implement-API-to-expose-exact-interaction-point.patch rename to patches/server/0574-Implement-API-to-expose-exact-interaction-point.patch diff --git a/patches/server/0576-Remove-stale-POIs.patch b/patches/server/0575-Remove-stale-POIs.patch similarity index 100% rename from patches/server/0576-Remove-stale-POIs.patch rename to patches/server/0575-Remove-stale-POIs.patch diff --git a/patches/server/0577-Fix-villager-boat-exploit.patch b/patches/server/0576-Fix-villager-boat-exploit.patch similarity index 93% rename from patches/server/0577-Fix-villager-boat-exploit.patch rename to patches/server/0576-Fix-villager-boat-exploit.patch index 9ba01c225..12ae3a8b8 100644 --- a/patches/server/0577-Fix-villager-boat-exploit.patch +++ b/patches/server/0576-Fix-villager-boat-exploit.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix villager boat exploit diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index d0c824290c08f825956ec1396381ec1657a6476d..ef1b4c290a9dee365a353a9ab26159ef399f0425 100644 +index e7834772e38e61df405be406fe320a646778175a..236641fa4c325e455de0a5ad83541143f5bc18d1 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -621,6 +621,14 @@ public abstract class PlayerList { diff --git a/patches/server/0578-Add-sendOpLevel-API.patch b/patches/server/0577-Add-sendOpLevel-API.patch similarity index 100% rename from patches/server/0578-Add-sendOpLevel-API.patch rename to patches/server/0577-Add-sendOpLevel-API.patch diff --git a/patches/server/0579-Add-StructureLocateEvent.patch b/patches/server/0578-Add-StructureLocateEvent.patch similarity index 100% rename from patches/server/0579-Add-StructureLocateEvent.patch rename to patches/server/0578-Add-StructureLocateEvent.patch diff --git a/patches/server/0580-Collision-option-for-requiring-a-player-participant.patch b/patches/server/0579-Collision-option-for-requiring-a-player-participant.patch similarity index 97% rename from patches/server/0580-Collision-option-for-requiring-a-player-participant.patch rename to patches/server/0579-Collision-option-for-requiring-a-player-participant.patch index fce3f00ef..ad984fbd2 100644 --- a/patches/server/0580-Collision-option-for-requiring-a-player-participant.patch +++ b/patches/server/0579-Collision-option-for-requiring-a-player-participant.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Collision option for requiring a player participant diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index ad355eaf5e597be9c35fbf0a635944b16603bdc2..44319f7ebd5e97435b4a4068d638946b74159cf1 100644 +index 79c8618eb1300239d457013c44d47277e2962904..a1c0b9770f4f9b84778db9b42c097af146485420 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -82,6 +82,18 @@ public class PaperWorldConfig { diff --git a/patches/server/0581-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch b/patches/server/0580-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch similarity index 100% rename from patches/server/0581-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch rename to patches/server/0580-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch diff --git a/patches/server/0582-Return-chat-component-with-empty-text-instead-of-thr.patch b/patches/server/0581-Return-chat-component-with-empty-text-instead-of-thr.patch similarity index 100% rename from patches/server/0582-Return-chat-component-with-empty-text-instead-of-thr.patch rename to patches/server/0581-Return-chat-component-with-empty-text-instead-of-thr.patch diff --git a/patches/server/0583-Make-schedule-command-per-world.patch b/patches/server/0582-Make-schedule-command-per-world.patch similarity index 100% rename from patches/server/0583-Make-schedule-command-per-world.patch rename to patches/server/0582-Make-schedule-command-per-world.patch diff --git a/patches/server/0584-Configurable-max-leash-distance.patch b/patches/server/0583-Configurable-max-leash-distance.patch similarity index 100% rename from patches/server/0584-Configurable-max-leash-distance.patch rename to patches/server/0583-Configurable-max-leash-distance.patch diff --git a/patches/server/0585-Implement-BlockPreDispenseEvent.patch b/patches/server/0584-Implement-BlockPreDispenseEvent.patch similarity index 100% rename from patches/server/0585-Implement-BlockPreDispenseEvent.patch rename to patches/server/0584-Implement-BlockPreDispenseEvent.patch diff --git a/patches/server/0586-added-Wither-API.patch b/patches/server/0585-added-Wither-API.patch similarity index 100% rename from patches/server/0586-added-Wither-API.patch rename to patches/server/0585-added-Wither-API.patch diff --git a/patches/server/0587-Added-firing-of-PlayerChangeBeaconEffectEvent.patch b/patches/server/0586-Added-firing-of-PlayerChangeBeaconEffectEvent.patch similarity index 100% rename from patches/server/0587-Added-firing-of-PlayerChangeBeaconEffectEvent.patch rename to patches/server/0586-Added-firing-of-PlayerChangeBeaconEffectEvent.patch diff --git a/patches/server/0588-Add-toggle-for-always-placing-the-dragon-egg.patch b/patches/server/0587-Add-toggle-for-always-placing-the-dragon-egg.patch similarity index 100% rename from patches/server/0588-Add-toggle-for-always-placing-the-dragon-egg.patch rename to patches/server/0587-Add-toggle-for-always-placing-the-dragon-egg.patch diff --git a/patches/server/0589-Added-PlayerStonecutterRecipeSelectEvent.patch b/patches/server/0588-Added-PlayerStonecutterRecipeSelectEvent.patch similarity index 100% rename from patches/server/0589-Added-PlayerStonecutterRecipeSelectEvent.patch rename to patches/server/0588-Added-PlayerStonecutterRecipeSelectEvent.patch diff --git a/patches/server/0590-Add-dropLeash-variable-to-EntityUnleashEvent.patch b/patches/server/0589-Add-dropLeash-variable-to-EntityUnleashEvent.patch similarity index 100% rename from patches/server/0590-Add-dropLeash-variable-to-EntityUnleashEvent.patch rename to patches/server/0589-Add-dropLeash-variable-to-EntityUnleashEvent.patch diff --git a/patches/server/0591-Skip-distance-map-update-when-spawning-disabled.patch b/patches/server/0590-Skip-distance-map-update-when-spawning-disabled.patch similarity index 100% rename from patches/server/0591-Skip-distance-map-update-when-spawning-disabled.patch rename to patches/server/0590-Skip-distance-map-update-when-spawning-disabled.patch diff --git a/patches/server/0592-Reset-shield-blocking-on-dimension-change.patch b/patches/server/0591-Reset-shield-blocking-on-dimension-change.patch similarity index 100% rename from patches/server/0592-Reset-shield-blocking-on-dimension-change.patch rename to patches/server/0591-Reset-shield-blocking-on-dimension-change.patch diff --git a/patches/server/0593-add-DragonEggFormEvent.patch b/patches/server/0592-add-DragonEggFormEvent.patch similarity index 100% rename from patches/server/0593-add-DragonEggFormEvent.patch rename to patches/server/0592-add-DragonEggFormEvent.patch diff --git a/patches/server/0594-EntityMoveEvent.patch b/patches/server/0593-EntityMoveEvent.patch similarity index 100% rename from patches/server/0594-EntityMoveEvent.patch rename to patches/server/0593-EntityMoveEvent.patch diff --git a/patches/server/0595-added-option-to-disable-pathfinding-updates-on-block.patch b/patches/server/0594-added-option-to-disable-pathfinding-updates-on-block.patch similarity index 100% rename from patches/server/0595-added-option-to-disable-pathfinding-updates-on-block.patch rename to patches/server/0594-added-option-to-disable-pathfinding-updates-on-block.patch diff --git a/patches/server/0596-Inline-shift-direction-fields.patch b/patches/server/0595-Inline-shift-direction-fields.patch similarity index 100% rename from patches/server/0596-Inline-shift-direction-fields.patch rename to patches/server/0595-Inline-shift-direction-fields.patch diff --git a/patches/server/0597-Allow-adding-items-to-BlockDropItemEvent.patch b/patches/server/0596-Allow-adding-items-to-BlockDropItemEvent.patch similarity index 100% rename from patches/server/0597-Allow-adding-items-to-BlockDropItemEvent.patch rename to patches/server/0596-Allow-adding-items-to-BlockDropItemEvent.patch diff --git a/patches/server/0598-Add-getMainThreadExecutor-to-BukkitScheduler.patch b/patches/server/0597-Add-getMainThreadExecutor-to-BukkitScheduler.patch similarity index 100% rename from patches/server/0598-Add-getMainThreadExecutor-to-BukkitScheduler.patch rename to patches/server/0597-Add-getMainThreadExecutor-to-BukkitScheduler.patch diff --git a/patches/server/0599-living-entity-allow-attribute-registration.patch b/patches/server/0598-living-entity-allow-attribute-registration.patch similarity index 100% rename from patches/server/0599-living-entity-allow-attribute-registration.patch rename to patches/server/0598-living-entity-allow-attribute-registration.patch diff --git a/patches/server/0600-fix-dead-slime-setSize-invincibility.patch b/patches/server/0599-fix-dead-slime-setSize-invincibility.patch similarity index 100% rename from patches/server/0600-fix-dead-slime-setSize-invincibility.patch rename to patches/server/0599-fix-dead-slime-setSize-invincibility.patch diff --git a/patches/server/0601-Merchant-getRecipes-should-return-an-immutable-list.patch b/patches/server/0600-Merchant-getRecipes-should-return-an-immutable-list.patch similarity index 100% rename from patches/server/0601-Merchant-getRecipes-should-return-an-immutable-list.patch rename to patches/server/0600-Merchant-getRecipes-should-return-an-immutable-list.patch diff --git a/patches/server/0602-Add-support-for-hex-color-codes-in-console.patch b/patches/server/0601-Add-support-for-hex-color-codes-in-console.patch similarity index 100% rename from patches/server/0602-Add-support-for-hex-color-codes-in-console.patch rename to patches/server/0601-Add-support-for-hex-color-codes-in-console.patch diff --git a/patches/server/0603-Expose-Tracked-Players.patch b/patches/server/0602-Expose-Tracked-Players.patch similarity index 100% rename from patches/server/0603-Expose-Tracked-Players.patch rename to patches/server/0602-Expose-Tracked-Players.patch diff --git a/patches/server/0604-Remove-streams-from-SensorNearest.patch b/patches/server/0603-Remove-streams-from-SensorNearest.patch similarity index 100% rename from patches/server/0604-Remove-streams-from-SensorNearest.patch rename to patches/server/0603-Remove-streams-from-SensorNearest.patch diff --git a/patches/server/0605-Throw-proper-exception-on-empty-JsonList-file.patch b/patches/server/0604-Throw-proper-exception-on-empty-JsonList-file.patch similarity index 100% rename from patches/server/0605-Throw-proper-exception-on-empty-JsonList-file.patch rename to patches/server/0604-Throw-proper-exception-on-empty-JsonList-file.patch diff --git a/patches/server/0606-Improve-ServerGUI.patch b/patches/server/0605-Improve-ServerGUI.patch similarity index 100% rename from patches/server/0606-Improve-ServerGUI.patch rename to patches/server/0605-Improve-ServerGUI.patch diff --git a/patches/server/0607-stop-firing-pressure-plate-EntityInteractEvent-for-i.patch b/patches/server/0606-stop-firing-pressure-plate-EntityInteractEvent-for-i.patch similarity index 100% rename from patches/server/0607-stop-firing-pressure-plate-EntityInteractEvent-for-i.patch rename to patches/server/0606-stop-firing-pressure-plate-EntityInteractEvent-for-i.patch diff --git a/patches/server/0608-fix-converting-txt-to-json-file.patch b/patches/server/0607-fix-converting-txt-to-json-file.patch similarity index 97% rename from patches/server/0608-fix-converting-txt-to-json-file.patch rename to patches/server/0607-fix-converting-txt-to-json-file.patch index 3bc971a05..2f1dd0a23 100644 --- a/patches/server/0608-fix-converting-txt-to-json-file.patch +++ b/patches/server/0607-fix-converting-txt-to-json-file.patch @@ -48,7 +48,7 @@ index e968b880e435b8753314d85b919a0abc4f35be25..02d7b16f81ebf9f902a36d4f31802b20 if (!OldUsersConverter.serverReadyAfterUserconversion(this)) { return false; diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index a841435338d6c242be35441d902ef2749ea6d406..c6f98a9fbfc058ca22b54eee9ac73ade697a5e9f 100644 +index e04e4cf62d2a7dcf95ffee452dc2ee2e2a4fdf6f..5077991ca54f848a2e1a3e2f375f0957f68113bd 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -174,6 +174,7 @@ public abstract class PlayerList { diff --git a/patches/server/0609-Add-worldborder-events.patch b/patches/server/0608-Add-worldborder-events.patch similarity index 100% rename from patches/server/0609-Add-worldborder-events.patch rename to patches/server/0608-Add-worldborder-events.patch diff --git a/patches/server/0610-added-PlayerNameEntityEvent.patch b/patches/server/0609-added-PlayerNameEntityEvent.patch similarity index 100% rename from patches/server/0610-added-PlayerNameEntityEvent.patch rename to patches/server/0609-added-PlayerNameEntityEvent.patch diff --git a/patches/server/0611-Prevent-grindstones-from-overstacking-items.patch b/patches/server/0610-Prevent-grindstones-from-overstacking-items.patch similarity index 100% rename from patches/server/0611-Prevent-grindstones-from-overstacking-items.patch rename to patches/server/0610-Prevent-grindstones-from-overstacking-items.patch diff --git a/patches/server/0612-Add-recipe-to-cook-events.patch b/patches/server/0611-Add-recipe-to-cook-events.patch similarity index 100% rename from patches/server/0612-Add-recipe-to-cook-events.patch rename to patches/server/0611-Add-recipe-to-cook-events.patch diff --git a/patches/server/0613-Add-Block-isValidTool.patch b/patches/server/0612-Add-Block-isValidTool.patch similarity index 100% rename from patches/server/0613-Add-Block-isValidTool.patch rename to patches/server/0612-Add-Block-isValidTool.patch diff --git a/patches/server/0614-Allow-using-signs-inside-spawn-protection.patch b/patches/server/0613-Allow-using-signs-inside-spawn-protection.patch similarity index 100% rename from patches/server/0614-Allow-using-signs-inside-spawn-protection.patch rename to patches/server/0613-Allow-using-signs-inside-spawn-protection.patch diff --git a/patches/server/0615-Implement-Keyed-on-World.patch b/patches/server/0614-Implement-Keyed-on-World.patch similarity index 100% rename from patches/server/0615-Implement-Keyed-on-World.patch rename to patches/server/0614-Implement-Keyed-on-World.patch diff --git a/patches/server/0616-Add-fast-alternative-constructor-for-Rotations.patch b/patches/server/0615-Add-fast-alternative-constructor-for-Rotations.patch similarity index 100% rename from patches/server/0616-Add-fast-alternative-constructor-for-Rotations.patch rename to patches/server/0615-Add-fast-alternative-constructor-for-Rotations.patch diff --git a/patches/server/0617-Item-Rarity-API.patch b/patches/server/0616-Item-Rarity-API.patch similarity index 96% rename from patches/server/0617-Item-Rarity-API.patch rename to patches/server/0616-Item-Rarity-API.patch index a87f26bb6..4deefe1dd 100644 --- a/patches/server/0617-Item-Rarity-API.patch +++ b/patches/server/0616-Item-Rarity-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Item Rarity API diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 463cabee7f4f40f2f8d4f4502296d1abfff18229..6ef091d64a2b7a61fabc7c325c90754f4b500bff 100644 +index de6343455ce92835f3e5bc2646f64c03dab8aba2..a76516003fe2c2c713658837de992bf237fec9ad 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -476,6 +476,20 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0618-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch b/patches/server/0617-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch similarity index 100% rename from patches/server/0618-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch rename to patches/server/0617-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch diff --git a/patches/server/0619-copy-TESign-isEditable-from-snapshots.patch b/patches/server/0618-copy-TESign-isEditable-from-snapshots.patch similarity index 100% rename from patches/server/0619-copy-TESign-isEditable-from-snapshots.patch rename to patches/server/0618-copy-TESign-isEditable-from-snapshots.patch diff --git a/patches/server/0620-Drop-carried-item-when-player-has-disconnected.patch b/patches/server/0619-Drop-carried-item-when-player-has-disconnected.patch similarity index 92% rename from patches/server/0620-Drop-carried-item-when-player-has-disconnected.patch rename to patches/server/0619-Drop-carried-item-when-player-has-disconnected.patch index c4fdb5528..c4ba93637 100644 --- a/patches/server/0620-Drop-carried-item-when-player-has-disconnected.patch +++ b/patches/server/0619-Drop-carried-item-when-player-has-disconnected.patch @@ -7,7 +7,7 @@ Fixes disappearance of held items, when a player gets disconnected and PlayerDro Closes #5036 diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index c6f98a9fbfc058ca22b54eee9ac73ade697a5e9f..b0b3775a706a52fd02eff745ff8f0a9b97de4cf8 100644 +index 5077991ca54f848a2e1a3e2f375f0957f68113bd..29864d3c25cea7bbb84a431a82e7b80f4af2966d 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -614,6 +614,14 @@ public abstract class PlayerList { diff --git a/patches/server/0621-forced-whitelist-use-configurable-kick-message.patch b/patches/server/0620-forced-whitelist-use-configurable-kick-message.patch similarity index 100% rename from patches/server/0621-forced-whitelist-use-configurable-kick-message.patch rename to patches/server/0620-forced-whitelist-use-configurable-kick-message.patch diff --git a/patches/server/0622-Don-t-ignore-result-of-PlayerEditBookEvent.patch b/patches/server/0621-Don-t-ignore-result-of-PlayerEditBookEvent.patch similarity index 100% rename from patches/server/0622-Don-t-ignore-result-of-PlayerEditBookEvent.patch rename to patches/server/0621-Don-t-ignore-result-of-PlayerEditBookEvent.patch diff --git a/patches/server/0623-Entity-load-save-limit-per-chunk.patch b/patches/server/0622-Entity-load-save-limit-per-chunk.patch similarity index 98% rename from patches/server/0623-Entity-load-save-limit-per-chunk.patch rename to patches/server/0622-Entity-load-save-limit-per-chunk.patch index 6deab2675..2bdf1a9c3 100644 --- a/patches/server/0623-Entity-load-save-limit-per-chunk.patch +++ b/patches/server/0622-Entity-load-save-limit-per-chunk.patch @@ -9,7 +9,7 @@ defaults are only included for certain entites, this allows setting limits for any entity type. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 85203627790204cf899f955781b4e876e23e0809..f754ca5e10cc7709fc2a67eb48861da01300292f 100644 +index 9fc14f3102e2ceb10b80974fabb5c4513e17e63f..cc4c067ad70375f76ddede403b88e76f3c8f37da 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -6,7 +6,10 @@ import java.util.stream.Collectors; diff --git a/patches/server/0624-fix-cancelling-block-falling-causing-client-desync.patch b/patches/server/0623-fix-cancelling-block-falling-causing-client-desync.patch similarity index 100% rename from patches/server/0624-fix-cancelling-block-falling-causing-client-desync.patch rename to patches/server/0623-fix-cancelling-block-falling-causing-client-desync.patch diff --git a/patches/server/0625-Expose-protocol-version.patch b/patches/server/0624-Expose-protocol-version.patch similarity index 91% rename from patches/server/0625-Expose-protocol-version.patch rename to patches/server/0624-Expose-protocol-version.patch index 84f610e67..5e797761a 100644 --- a/patches/server/0625-Expose-protocol-version.patch +++ b/patches/server/0624-Expose-protocol-version.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose protocol version diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 6ef091d64a2b7a61fabc7c325c90754f4b500bff..80dc84864755bf46b9be46d69cd23f588628f9bd 100644 +index a76516003fe2c2c713658837de992bf237fec9ad..3a7b7a0766075e8a7d359138ca01dbcc88c609a3 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -490,6 +490,11 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0626-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch b/patches/server/0625-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch similarity index 100% rename from patches/server/0626-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch rename to patches/server/0625-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch diff --git a/patches/server/0627-Enhance-console-tab-completions-for-brigadier-comman.patch b/patches/server/0626-Enhance-console-tab-completions-for-brigadier-comman.patch similarity index 99% rename from patches/server/0627-Enhance-console-tab-completions-for-brigadier-comman.patch rename to patches/server/0626-Enhance-console-tab-completions-for-brigadier-comman.patch index 0f242b938..139325cbe 100644 --- a/patches/server/0627-Enhance-console-tab-completions-for-brigadier-comman.patch +++ b/patches/server/0626-Enhance-console-tab-completions-for-brigadier-comman.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Enhance console tab completions for brigadier commands diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index c8a49e7131d0722e4c57cc889933a43569059ba6..bf256ffaf9311d04712fdba38d529283a5330b09 100644 +index d48c8e3408510cacc148e8071af95994610869a6..ae7ca7fbed3a1a4532a78bb8a029bb7fc642bcb3 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -106,6 +106,13 @@ public class PaperConfig { diff --git a/patches/server/0628-Fix-PlayerItemConsumeEvent-cancelling-properly.patch b/patches/server/0627-Fix-PlayerItemConsumeEvent-cancelling-properly.patch similarity index 100% rename from patches/server/0628-Fix-PlayerItemConsumeEvent-cancelling-properly.patch rename to patches/server/0627-Fix-PlayerItemConsumeEvent-cancelling-properly.patch diff --git a/patches/server/0629-Add-bypass-host-check.patch b/patches/server/0628-Add-bypass-host-check.patch similarity index 100% rename from patches/server/0629-Add-bypass-host-check.patch rename to patches/server/0628-Add-bypass-host-check.patch diff --git a/patches/server/0630-Set-area-affect-cloud-rotation.patch b/patches/server/0629-Set-area-affect-cloud-rotation.patch similarity index 92% rename from patches/server/0630-Set-area-affect-cloud-rotation.patch rename to patches/server/0629-Set-area-affect-cloud-rotation.patch index 44fd4f57d..b7cb1837b 100644 --- a/patches/server/0630-Set-area-affect-cloud-rotation.patch +++ b/patches/server/0629-Set-area-affect-cloud-rotation.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Set area affect cloud rotation diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -index 8eb7a4579d8296b0090f9cfa215562a52fa51d75..9653604f05eb3170f4b5dca60e05f3d55db9f508 100644 +index e9d6df8339dec597e646ab3e55fb7e032664908e..15341c07f9e07ba1d875ef9de16476c07751cab6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java @@ -885,6 +885,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor { diff --git a/patches/server/0631-add-isDeeplySleeping-to-HumanEntity.patch b/patches/server/0630-add-isDeeplySleeping-to-HumanEntity.patch similarity index 100% rename from patches/server/0631-add-isDeeplySleeping-to-HumanEntity.patch rename to patches/server/0630-add-isDeeplySleeping-to-HumanEntity.patch diff --git a/patches/server/0632-Fix-duplicating-give-items-on-item-drop-cancel.patch b/patches/server/0631-Fix-duplicating-give-items-on-item-drop-cancel.patch similarity index 100% rename from patches/server/0632-Fix-duplicating-give-items-on-item-drop-cancel.patch rename to patches/server/0631-Fix-duplicating-give-items-on-item-drop-cancel.patch diff --git a/patches/server/0633-add-consumeFuel-to-FurnaceBurnEvent.patch b/patches/server/0632-add-consumeFuel-to-FurnaceBurnEvent.patch similarity index 100% rename from patches/server/0633-add-consumeFuel-to-FurnaceBurnEvent.patch rename to patches/server/0632-add-consumeFuel-to-FurnaceBurnEvent.patch diff --git a/patches/server/0634-add-get-set-drop-chance-to-EntityEquipment.patch b/patches/server/0633-add-get-set-drop-chance-to-EntityEquipment.patch similarity index 100% rename from patches/server/0634-add-get-set-drop-chance-to-EntityEquipment.patch rename to patches/server/0633-add-get-set-drop-chance-to-EntityEquipment.patch diff --git a/patches/server/0635-fix-PigZombieAngerEvent-cancellation.patch b/patches/server/0634-fix-PigZombieAngerEvent-cancellation.patch similarity index 100% rename from patches/server/0635-fix-PigZombieAngerEvent-cancellation.patch rename to patches/server/0634-fix-PigZombieAngerEvent-cancellation.patch diff --git a/patches/server/0636-Fix-checkReach-check-for-Shulker-boxes.patch b/patches/server/0635-Fix-checkReach-check-for-Shulker-boxes.patch similarity index 100% rename from patches/server/0636-Fix-checkReach-check-for-Shulker-boxes.patch rename to patches/server/0635-Fix-checkReach-check-for-Shulker-boxes.patch diff --git a/patches/server/0637-fix-PlayerItemHeldEvent-firing-twice.patch b/patches/server/0636-fix-PlayerItemHeldEvent-firing-twice.patch similarity index 100% rename from patches/server/0637-fix-PlayerItemHeldEvent-firing-twice.patch rename to patches/server/0636-fix-PlayerItemHeldEvent-firing-twice.patch diff --git a/patches/server/0638-Added-PlayerDeepSleepEvent.patch b/patches/server/0637-Added-PlayerDeepSleepEvent.patch similarity index 100% rename from patches/server/0638-Added-PlayerDeepSleepEvent.patch rename to patches/server/0637-Added-PlayerDeepSleepEvent.patch diff --git a/patches/server/0639-More-World-API.patch b/patches/server/0638-More-World-API.patch similarity index 100% rename from patches/server/0639-More-World-API.patch rename to patches/server/0638-More-World-API.patch diff --git a/patches/server/0640-Added-PlayerBedFailEnterEvent.patch b/patches/server/0639-Added-PlayerBedFailEnterEvent.patch similarity index 100% rename from patches/server/0640-Added-PlayerBedFailEnterEvent.patch rename to patches/server/0639-Added-PlayerBedFailEnterEvent.patch diff --git a/patches/server/0641-Implement-methods-to-convert-between-Component-and-B.patch b/patches/server/0640-Implement-methods-to-convert-between-Component-and-B.patch similarity index 100% rename from patches/server/0641-Implement-methods-to-convert-between-Component-and-B.patch rename to patches/server/0640-Implement-methods-to-convert-between-Component-and-B.patch diff --git a/patches/server/0642-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch b/patches/server/0641-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch similarity index 95% rename from patches/server/0642-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch rename to patches/server/0641-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch index 5ea281a03..5046cc4ab 100644 --- a/patches/server/0642-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch +++ b/patches/server/0641-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix anchor respawn acting as a bed respawn from the end diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index b0b3775a706a52fd02eff745ff8f0a9b97de4cf8..0ccbe77e8ca58dbe8cbbe04d99a3e6181fee1e9d 100644 +index 29864d3c25cea7bbb84a431a82e7b80f4af2966d..5f099d45203f155abb23c9241b55d34e04f2aa7e 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -847,6 +847,7 @@ public abstract class PlayerList { diff --git a/patches/server/0643-Introduce-beacon-activation-deactivation-events.patch b/patches/server/0642-Introduce-beacon-activation-deactivation-events.patch similarity index 100% rename from patches/server/0643-Introduce-beacon-activation-deactivation-events.patch rename to patches/server/0642-Introduce-beacon-activation-deactivation-events.patch diff --git a/patches/server/0644-add-RespawnFlags-to-PlayerRespawnEvent.patch b/patches/server/0643-add-RespawnFlags-to-PlayerRespawnEvent.patch similarity index 97% rename from patches/server/0644-add-RespawnFlags-to-PlayerRespawnEvent.patch rename to patches/server/0643-add-RespawnFlags-to-PlayerRespawnEvent.patch index 9a184cebb..187ae5be2 100644 --- a/patches/server/0644-add-RespawnFlags-to-PlayerRespawnEvent.patch +++ b/patches/server/0643-add-RespawnFlags-to-PlayerRespawnEvent.patch @@ -18,7 +18,7 @@ index eb811f9fcaf84edce3b59fc5f53cd72ffaf1506c..9daad376b7c837ac5dcda5f54d520e2a } else { if (this.player.getHealth() > 0.0F) { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 0ccbe77e8ca58dbe8cbbe04d99a3e6181fee1e9d..53fa2fbaeacc333ab28392df4613819719a55d2e 100644 +index 5f099d45203f155abb23c9241b55d34e04f2aa7e..f61c31a028c286399f0921c516b5d94ad52f88b5 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -806,6 +806,12 @@ public abstract class PlayerList { diff --git a/patches/server/0645-Add-Channel-initialization-listeners.patch b/patches/server/0644-Add-Channel-initialization-listeners.patch similarity index 100% rename from patches/server/0645-Add-Channel-initialization-listeners.patch rename to patches/server/0644-Add-Channel-initialization-listeners.patch diff --git a/patches/server/0646-Send-empty-commands-if-tab-completion-is-disabled.patch b/patches/server/0645-Send-empty-commands-if-tab-completion-is-disabled.patch similarity index 100% rename from patches/server/0646-Send-empty-commands-if-tab-completion-is-disabled.patch rename to patches/server/0645-Send-empty-commands-if-tab-completion-is-disabled.patch diff --git a/patches/server/0647-Add-more-WanderingTrader-API.patch b/patches/server/0646-Add-more-WanderingTrader-API.patch similarity index 100% rename from patches/server/0647-Add-more-WanderingTrader-API.patch rename to patches/server/0646-Add-more-WanderingTrader-API.patch diff --git a/patches/server/0648-Add-EntityBlockStorage-clearEntities.patch b/patches/server/0647-Add-EntityBlockStorage-clearEntities.patch similarity index 100% rename from patches/server/0648-Add-EntityBlockStorage-clearEntities.patch rename to patches/server/0647-Add-EntityBlockStorage-clearEntities.patch diff --git a/patches/server/0649-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch b/patches/server/0648-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch similarity index 100% rename from patches/server/0649-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch rename to patches/server/0648-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch diff --git a/patches/server/0650-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch b/patches/server/0649-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch similarity index 100% rename from patches/server/0650-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch rename to patches/server/0649-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch diff --git a/patches/server/0651-Inventory-close.patch b/patches/server/0650-Inventory-close.patch similarity index 100% rename from patches/server/0651-Inventory-close.patch rename to patches/server/0650-Inventory-close.patch diff --git a/patches/server/0652-call-PortalCreateEvent-players-and-end-platform.patch b/patches/server/0651-call-PortalCreateEvent-players-and-end-platform.patch similarity index 100% rename from patches/server/0652-call-PortalCreateEvent-players-and-end-platform.patch rename to patches/server/0651-call-PortalCreateEvent-players-and-end-platform.patch diff --git a/patches/server/0653-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch b/patches/server/0652-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch similarity index 100% rename from patches/server/0653-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch rename to patches/server/0652-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch diff --git a/patches/server/0654-Fix-CraftPotionBrewer-cache.patch b/patches/server/0653-Fix-CraftPotionBrewer-cache.patch similarity index 100% rename from patches/server/0654-Fix-CraftPotionBrewer-cache.patch rename to patches/server/0653-Fix-CraftPotionBrewer-cache.patch diff --git a/patches/server/0655-Add-basic-Datapack-API.patch b/patches/server/0654-Add-basic-Datapack-API.patch similarity index 100% rename from patches/server/0655-Add-basic-Datapack-API.patch rename to patches/server/0654-Add-basic-Datapack-API.patch diff --git a/patches/server/0656-Add-environment-variable-to-disable-server-gui.patch b/patches/server/0655-Add-environment-variable-to-disable-server-gui.patch similarity index 100% rename from patches/server/0656-Add-environment-variable-to-disable-server-gui.patch rename to patches/server/0655-Add-environment-variable-to-disable-server-gui.patch diff --git a/patches/server/0657-additions-to-PlayerGameModeChangeEvent.patch b/patches/server/0656-additions-to-PlayerGameModeChangeEvent.patch similarity index 100% rename from patches/server/0657-additions-to-PlayerGameModeChangeEvent.patch rename to patches/server/0656-additions-to-PlayerGameModeChangeEvent.patch diff --git a/patches/server/0658-ItemStack-repair-check-API.patch b/patches/server/0657-ItemStack-repair-check-API.patch similarity index 97% rename from patches/server/0658-ItemStack-repair-check-API.patch rename to patches/server/0657-ItemStack-repair-check-API.patch index 3fa1f719a..518bb7932 100644 --- a/patches/server/0658-ItemStack-repair-check-API.patch +++ b/patches/server/0657-ItemStack-repair-check-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] ItemStack repair check API diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 80dc84864755bf46b9be46d69cd23f588628f9bd..e3f55036f44a92adb268880a458518bcccca34be 100644 +index 3a7b7a0766075e8a7d359138ca01dbcc88c609a3..d9eb0f7c38118014b8dd22c42f3330977c6af228 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -491,6 +491,14 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0659-More-Enchantment-API.patch b/patches/server/0658-More-Enchantment-API.patch similarity index 100% rename from patches/server/0659-More-Enchantment-API.patch rename to patches/server/0658-More-Enchantment-API.patch diff --git a/patches/server/0660-Fix-and-optimise-world-force-upgrading.patch b/patches/server/0659-Fix-and-optimise-world-force-upgrading.patch similarity index 99% rename from patches/server/0660-Fix-and-optimise-world-force-upgrading.patch rename to patches/server/0659-Fix-and-optimise-world-force-upgrading.patch index 6fa8f7173..83dd9f896 100644 --- a/patches/server/0660-Fix-and-optimise-world-force-upgrading.patch +++ b/patches/server/0659-Fix-and-optimise-world-force-upgrading.patch @@ -274,7 +274,7 @@ index f685ab3cc6e4fd76e8dec3d2d3627a13715cda44..36a1d58dd238c835ce3cc9c2376a86a0 Main.LOGGER.info("Forcing world upgrade! {}", session.getLevelId()); // CraftBukkit WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, generatorOptions, eraseCache); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f1713ceace84ecbe2e4a0dcde050c43a636e3595..fcdae82ecaaa86854a5cddcb652ed3bc388e33c3 100644 +index 80e101301f148520a04dfc914caa58ea3a6653d2..6715920dcbc7cd895f8662d9c7b9dbb8b8790323 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -556,11 +556,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 4096 -+ final byte[] visibleBytes = this.storageVisible; -+ if (visibleBytes == null) { -+ return 0; -+ } -+ final byte value = visibleBytes[index >>> 1]; -+ -+ // if we are an even index, we want lower 4 bits -+ // if we are an odd index, we want upper 4 bits -+ return ((value >>> ((index & 1) << 2)) & 0xF); ++ // indices range from 0 -> 4096 ++ final byte[] visibleBytes = this.storageVisible; ++ if (visibleBytes == null) { ++ return 0; + } ++ final byte value = visibleBytes[index >>> 1]; ++ ++ // if we are an even index, we want lower 4 bits ++ // if we are an odd index, we want upper 4 bits ++ return ((value >>> ((index & 1) << 2)) & 0xF); + } + + // operation type: updating @@ -770,15 +772,15 @@ index 0000000000000000000000000000000000000000..174dc7ffa66258da0b867fba5c54880e + } + } +} -diff --git a/src/main/java/ca/spottedleaf/starlight/light/SkyStarLightEngine.java b/src/main/java/ca/spottedleaf/starlight/light/SkyStarLightEngine.java +diff --git a/src/main/java/ca/spottedleaf/starlight/common/light/SkyStarLightEngine.java b/src/main/java/ca/spottedleaf/starlight/common/light/SkyStarLightEngine.java new file mode 100644 -index 0000000000000000000000000000000000000000..e843ceb27bce134f7785e8c45fac25d5ec747233 +index 0000000000000000000000000000000000000000..5f771962afb44175d446f138c8e7453230f48c6c --- /dev/null -+++ b/src/main/java/ca/spottedleaf/starlight/light/SkyStarLightEngine.java -@@ -0,0 +1,715 @@ -+package ca.spottedleaf.starlight.light; ++++ b/src/main/java/ca/spottedleaf/starlight/common/light/SkyStarLightEngine.java +@@ -0,0 +1,709 @@ ++package ca.spottedleaf.starlight.common.light; + -+import io.papermc.paper.util.WorldUtil; ++import ca.spottedleaf.starlight.common.util.WorldUtil; +import it.unimi.dsi.fastutil.shorts.ShortCollection; +import it.unimi.dsi.fastutil.shorts.ShortIterator; +import net.minecraft.core.BlockPos; @@ -871,7 +873,7 @@ index 0000000000000000000000000000000000000000..e843ceb27bce134f7785e8c45fac25d5 + if (emptinessMap == null) { + // cannot delay nibble init for lit chunks, as we need to init to propagate into them. + final LevelChunkSection current = this.getChunkSection(chunkX, currY, chunkZ); -+ if (current == null || current == EMPTY_CHUNK_SECTION) { ++ if (current == null || current.hasOnlyAir()) { + continue; + } + } else { @@ -1080,7 +1082,7 @@ index 0000000000000000000000000000000000000000..e843ceb27bce134f7785e8c45fac25d5 + final BlockState centerState = this.getBlockState(worldX, worldY, worldZ); + int opacity = centerState.getOpacityIfCached(); + -+ BlockState conditionallyOpaqueState; ++ final BlockState conditionallyOpaqueState; + if (opacity < 0) { + this.recalcCenterPos.set(worldX, worldY, worldZ); + opacity = Math.max(1, centerState.getLightBlock(lightAccess.getLevel(), this.recalcCenterPos)); @@ -1243,7 +1245,7 @@ index 0000000000000000000000000000000000000000..e843ceb27bce134f7785e8c45fac25d5 + + int highestNonEmptySection = this.maxSection; + while (highestNonEmptySection == (this.minSection - 1) || -+ sections[highestNonEmptySection - this.minSection] == null || sections[highestNonEmptySection - this.minSection].isEmpty()) { ++ sections[highestNonEmptySection - this.minSection] == null || sections[highestNonEmptySection - this.minSection].hasOnlyAir()) { + this.checkNullSection(chunkX, highestNonEmptySection, chunkZ, false); + // try propagate FULL to neighbours + @@ -1398,19 +1400,13 @@ index 0000000000000000000000000000000000000000..e843ceb27bce134f7785e8c45fac25d5 + this.checkNullSection(worldX >> 4, startY >> 4, worldZ >> 4, extrudeInitialised); + + BlockState above = this.getBlockState(worldX, startY + 1, worldZ); -+ if (above == null) { -+ above = AIR_BLOCK_STATE; -+ } + + for (;startY >= (this.minLightSection << 4); --startY) { + if ((startY & 15) == 15) { + // ensure this section is always checked + this.checkNullSection(worldX >> 4, startY >> 4, worldZ >> 4, extrudeInitialised); + } -+ BlockState current = this.getBlockState(worldX, startY, worldZ); -+ if (current == null) { -+ current = AIR_BLOCK_STATE; -+ } ++ final BlockState current = this.getBlockState(worldX, startY, worldZ); + + final VoxelShape fromShape; + if (above.isConditionallyFullOpaque()) { @@ -1491,24 +1487,28 @@ index 0000000000000000000000000000000000000000..e843ceb27bce134f7785e8c45fac25d5 + return startY; + } +} -diff --git a/src/main/java/ca/spottedleaf/starlight/light/StarLightEngine.java b/src/main/java/ca/spottedleaf/starlight/light/StarLightEngine.java +diff --git a/src/main/java/ca/spottedleaf/starlight/common/light/StarLightEngine.java b/src/main/java/ca/spottedleaf/starlight/common/light/StarLightEngine.java new file mode 100644 -index 0000000000000000000000000000000000000000..319e5c674f027e2e06322bb75b38acd46b51cc7a +index 0000000000000000000000000000000000000000..f0ef2192df6ef7f9decceaa790a054ecd99794cc --- /dev/null -+++ b/src/main/java/ca/spottedleaf/starlight/light/StarLightEngine.java -@@ -0,0 +1,1577 @@ -+package ca.spottedleaf.starlight.light; ++++ b/src/main/java/ca/spottedleaf/starlight/common/light/StarLightEngine.java +@@ -0,0 +1,1571 @@ ++package ca.spottedleaf.starlight.common.light; + -+import io.papermc.paper.util.CoordinateUtils; -+import io.papermc.paper.util.IntegerUtil; -+import io.papermc.paper.util.WorldUtil; ++import ca.spottedleaf.starlight.common.util.CoordinateUtils; ++import ca.spottedleaf.starlight.common.util.IntegerUtil; ++import ca.spottedleaf.starlight.common.util.WorldUtil; +import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; +import it.unimi.dsi.fastutil.shorts.ShortCollection; +import it.unimi.dsi.fastutil.shorts.ShortIterator; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.SectionPos; -+import net.minecraft.world.level.*; ++import net.minecraft.world.level.BlockGetter; ++import net.minecraft.world.level.ChunkPos; ++import net.minecraft.world.level.Level; ++import net.minecraft.world.level.LevelHeightAccessor; ++import net.minecraft.world.level.LightLayer; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.chunk.ChunkAccess; @@ -1527,8 +1527,6 @@ index 0000000000000000000000000000000000000000..319e5c674f027e2e06322bb75b38acd4 + + protected static final BlockState AIR_BLOCK_STATE = Blocks.AIR.defaultBlockState(); + -+ protected static final LevelChunkSection EMPTY_CHUNK_SECTION = new LevelChunkSection(0); -+ + protected static final AxisDirection[] DIRECTIONS = AxisDirection.values(); + protected static final AxisDirection[] AXIS_DIRECTIONS = DIRECTIONS; + protected static final AxisDirection[] ONLY_HORIZONTAL_DIRECTIONS = new AxisDirection[] { @@ -1722,7 +1720,7 @@ index 0000000000000000000000000000000000000000..319e5c674f027e2e06322bb75b38acd4 + protected final void setBlocksForChunkInCache(final int chunkX, final int chunkZ, final LevelChunkSection[] sections) { + for (int cy = this.minLightSection; cy <= this.maxLightSection; ++cy) { + this.setChunkSectionInCache(chunkX, cy, chunkZ, -+ sections == null ? null : (cy >= this.minSection && cy <= this.maxSection ? (sections[cy - this.minSection] == null || sections[cy - this.minSection].isEmpty() ? EMPTY_CHUNK_SECTION : sections[cy - this.minSection]) : EMPTY_CHUNK_SECTION)); ++ sections == null ? null : (cy >= this.minSection && cy <= this.maxSection ? sections[cy - this.minSection] : null)); + } + } + @@ -1780,20 +1778,20 @@ index 0000000000000000000000000000000000000000..319e5c674f027e2e06322bb75b38acd4 + final LevelChunkSection section = this.sectionCache[(worldX >> 4) + 5 * (worldZ >> 4) + (5 * 5) * (worldY >> 4) + this.chunkSectionIndexOffset]; + + if (section != null) { -+ return section == EMPTY_CHUNK_SECTION ? AIR_BLOCK_STATE : section.getBlockState(worldX & 15, worldY & 15, worldZ & 15); ++ return section.hasOnlyAir() ? AIR_BLOCK_STATE : section.getBlockState(worldX & 15, worldY & 15, worldZ & 15); + } + -+ return null; ++ return AIR_BLOCK_STATE; + } + + protected final BlockState getBlockState(final int sectionIndex, final int localIndex) { + final LevelChunkSection section = this.sectionCache[sectionIndex]; + + if (section != null) { -+ return section == EMPTY_CHUNK_SECTION ? AIR_BLOCK_STATE : section.states.get(localIndex); ++ return section.hasOnlyAir() ? AIR_BLOCK_STATE : section.states.get(localIndex); + } + -+ return null; ++ return AIR_BLOCK_STATE; + } + + protected final int getLightLevel(final int worldX, final int worldY, final int worldZ) { @@ -1881,15 +1879,6 @@ index 0000000000000000000000000000000000000000..319e5c674f027e2e06322bb75b38acd4 + this.emptinessMapCache[chunkX + 5*chunkZ + this.chunkIndexOffset] = emptinessMap; + } + -+ protected final long getKnownTransparency(final int worldX, final int worldY, final int worldZ) { -+ throw new UnsupportedOperationException(); // :( -+ } -+ -+ // warn: localIndex = y | (x << 4) | (z << 8) -+ protected final long getKnownTransparency(final int sectionIndex, final int localIndex) { -+ throw new UnsupportedOperationException(); // :( -+ } -+ + public static SWMRNibbleArray[] getFilledEmptyLight(final LevelHeightAccessor world) { + return getFilledEmptyLight(WorldUtil.getTotalLightSections(world)); + } @@ -2180,7 +2169,7 @@ index 0000000000000000000000000000000000000000..319e5c674f027e2e06322bb75b38acd4 + final Boolean[] ret = new Boolean[sections.length]; + + for (int i = 0; i < sections.length; ++i) { -+ if (sections[i] == null || sections[i].isEmpty()) { ++ if (sections[i] == null || sections[i].hasOnlyAir()) { + ret[i] = Boolean.TRUE; + } else { + ret[i] = Boolean.FALSE; @@ -2253,12 +2242,13 @@ index 0000000000000000000000000000000000000000..319e5c674f027e2e06322bb75b38acd4 + + // update emptiness map + for (int sectionIndex = (emptinessChanges.length - 1); sectionIndex >= 0; --sectionIndex) { -+ final Boolean valueBoxed = emptinessChanges[sectionIndex]; ++ Boolean valueBoxed = emptinessChanges[sectionIndex]; + if (valueBoxed == null) { -+ if (needsInit) { -+ throw new IllegalStateException("Current chunk has not initialised emptiness map yet supplied emptiness map isn't filled?"); ++ if (!needsInit) { ++ continue; + } -+ continue; ++ final LevelChunkSection section = this.getChunkSection(chunkX, sectionIndex + this.minSection, chunkZ); ++ emptinessChanges[sectionIndex] = valueBoxed = section == null || section.hasOnlyAir() ? Boolean.TRUE : Boolean.FALSE; + } + chunkEmptinessMap[sectionIndex] = valueBoxed.booleanValue(); + } @@ -2326,7 +2316,7 @@ index 0000000000000000000000000000000000000000..319e5c674f027e2e06322bb75b38acd4 + } + } else { + final LevelChunkSection section = this.getChunkSection(dx + dx2 + chunkX, y, dz + dz2 + chunkZ); -+ if (section != null && section != EMPTY_CHUNK_SECTION) { ++ if (section != null && !section.hasOnlyAir()) { + allEmpty = false; + break neighbour_search; + } @@ -2949,7 +2939,7 @@ index 0000000000000000000000000000000000000000..319e5c674f027e2e06322bb75b38acd4 + final int sectionIndex = (offX >> 4) + 5 * (offZ >> 4) + (5 * 5) * (offY >> 4) + sectionOffset; + final int localIndex = (offX & 15) | ((offZ & 15) << 4) | ((offY & 15) << 8); + -+ final VoxelShape fromShape = fromBlock.isConditionallyFullOpaque() ? fromBlock.getFaceOcclusionShape(world, this.mutablePos2, propagate.nms) : Shapes.empty(); ++ final VoxelShape fromShape = (fromBlock.isConditionallyFullOpaque()) ? fromBlock.getFaceOcclusionShape(world, this.mutablePos2, propagate.nms) : Shapes.empty(); + + if (fromShape != Shapes.empty() && Shapes.faceShapeOccludes(Shapes.empty(), fromShape)) { + continue; @@ -3074,21 +3064,22 @@ index 0000000000000000000000000000000000000000..319e5c674f027e2e06322bb75b38acd4 + this.performLightIncrease(lightAccess); + } +} -diff --git a/src/main/java/ca/spottedleaf/starlight/light/StarLightInterface.java b/src/main/java/ca/spottedleaf/starlight/light/StarLightInterface.java +diff --git a/src/main/java/ca/spottedleaf/starlight/common/light/StarLightInterface.java b/src/main/java/ca/spottedleaf/starlight/common/light/StarLightInterface.java new file mode 100644 -index 0000000000000000000000000000000000000000..9b8412f50d161471166cdf5c9effc2d58915faa1 +index 0000000000000000000000000000000000000000..d857dfe72550378375ce288be028d4fe51669209 --- /dev/null -+++ b/src/main/java/ca/spottedleaf/starlight/light/StarLightInterface.java -@@ -0,0 +1,635 @@ -+package ca.spottedleaf.starlight.light; ++++ b/src/main/java/ca/spottedleaf/starlight/common/light/StarLightInterface.java +@@ -0,0 +1,652 @@ ++package ca.spottedleaf.starlight.common.light; + -+import io.papermc.paper.util.CoordinateUtils; -+import io.papermc.paper.util.WorldUtil; ++import ca.spottedleaf.starlight.common.util.CoordinateUtils; ++import ca.spottedleaf.starlight.common.util.WorldUtil; +import it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap; +import it.unimi.dsi.fastutil.shorts.ShortCollection; +import it.unimi.dsi.fastutil.shorts.ShortOpenHashSet; +import net.minecraft.core.BlockPos; +import net.minecraft.core.SectionPos; ++import net.minecraft.server.level.ServerChunkCache; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.TicketType; +import net.minecraft.world.level.ChunkPos; @@ -3096,10 +3087,15 @@ index 0000000000000000000000000000000000000000..9b8412f50d161471166cdf5c9effc2d5 +import net.minecraft.world.level.chunk.ChunkAccess; +import net.minecraft.world.level.chunk.ChunkStatus; +import net.minecraft.world.level.chunk.DataLayer; ++import net.minecraft.world.level.chunk.LevelChunk; +import net.minecraft.world.level.chunk.LightChunkGetter; +import net.minecraft.world.level.lighting.LayerLightEventListener; +import net.minecraft.world.level.lighting.LevelLightEngine; -+import java.util.*; ++import java.util.ArrayDeque; ++import java.util.ArrayList; ++import java.util.HashSet; ++import java.util.List; ++import java.util.Set; +import java.util.concurrent.CompletableFuture; +import java.util.function.Consumer; +import java.util.function.IntConsumer; @@ -3137,10 +3133,10 @@ index 0000000000000000000000000000000000000000..9b8412f50d161471166cdf5c9effc2d5 + this.cachedBlockPropagators = hasBlockLight && lightAccess != null ? new ArrayDeque<>() : null; + this.isClientSide = !(this.world instanceof ServerLevel); + if (this.world == null) { -+ this.minSection = 0; -+ this.maxSection = 15; -+ this.minLightSection = -1; -+ this.maxLightSection = 16; ++ this.minSection = -4; ++ this.maxSection = 19; ++ this.minLightSection = -5; ++ this.maxLightSection = 20; + } else { + this.minSection = WorldUtil.getMinSection(this.world); + this.maxSection = WorldUtil.getMaxSection(this.world); @@ -3197,78 +3193,7 @@ index 0000000000000000000000000000000000000000..9b8412f50d161471166cdf5c9effc2d5 + + @Override + public int getLightValue(final BlockPos blockPos) { -+ final int x = blockPos.getX(); -+ int y = blockPos.getY(); -+ final int z = blockPos.getZ(); -+ -+ final ChunkAccess chunk = StarLightInterface.this.getAnyChunkNow(x >> 4, z >> 4); -+ if (chunk == null || (!StarLightInterface.this.isClientSide && !chunk.isLightCorrect()) || !chunk.getStatus().isOrAfter(ChunkStatus.LIGHT)) { -+ return 15; -+ } -+ -+ int sectionY = y >> 4; -+ -+ if (sectionY > StarLightInterface.this.maxLightSection) { -+ return 15; -+ } -+ -+ if (sectionY < StarLightInterface.this.minLightSection) { -+ sectionY = StarLightInterface.this.minLightSection; -+ y = sectionY << 4; -+ } -+ -+ final SWMRNibbleArray[] nibbles = chunk.getSkyNibbles(); -+ final SWMRNibbleArray immediate = nibbles[sectionY - StarLightInterface.this.minLightSection]; -+ -+ if (StarLightInterface.this.isClientSide) { -+ if (!immediate.isNullNibbleUpdating()) { -+ return immediate.getUpdating(x, y, z); -+ } -+ } else { -+ if (!immediate.isNullNibbleVisible()) { -+ return immediate.getVisible(x, y, z); -+ } -+ } -+ -+ final boolean[] emptinessMap = chunk.getSkyEmptinessMap(); -+ -+ if (emptinessMap == null) { -+ return 15; -+ } -+ -+ // are we above this chunk's lowest empty section? -+ int lowestY = StarLightInterface.this.minLightSection - 1; -+ for (int currY = StarLightInterface.this.maxSection; currY >= StarLightInterface.this.minSection; --currY) { -+ if (emptinessMap[currY - StarLightInterface.this.minSection]) { -+ continue; -+ } -+ -+ // should always be full lit here -+ lowestY = currY; -+ break; -+ } -+ -+ if (sectionY > lowestY) { -+ return 15; -+ } -+ -+ // this nibble is going to depend solely on the skylight data above it -+ // find first non-null data above (there does exist one, as we just found it above) -+ for (int currY = sectionY + 1; currY <= StarLightInterface.this.maxLightSection; ++currY) { -+ final SWMRNibbleArray nibble = nibbles[currY - StarLightInterface.this.minLightSection]; -+ if (StarLightInterface.this.isClientSide) { -+ if (!nibble.isNullNibbleUpdating()) { -+ return nibble.getUpdating(x, 0, z); -+ } -+ } else { -+ if (!nibble.isNullNibbleVisible()) { -+ return nibble.getVisible(x, 0, z); -+ } -+ } -+ } -+ -+ // should never reach here -+ return 15; ++ return StarLightInterface.this.getSkyLightValue(blockPos, StarLightInterface.this.getAnyChunkNow(blockPos.getX() >> 4, blockPos.getZ() >> 4)); + } + + @Override @@ -3316,26 +3241,7 @@ index 0000000000000000000000000000000000000000..9b8412f50d161471166cdf5c9effc2d5 + + @Override + public int getLightValue(final BlockPos blockPos) { -+ final int cx = blockPos.getX() >> 4; -+ final int cy = blockPos.getY() >> 4; -+ final int cz = blockPos.getZ() >> 4; -+ -+ if (cy < StarLightInterface.this.minLightSection || cy > StarLightInterface.this.maxLightSection) { -+ return 0; -+ } -+ -+ final ChunkAccess chunk = StarLightInterface.this.getAnyChunkNow(cx, cz); -+ -+ if (chunk == null) { -+ return 0; -+ } -+ -+ final SWMRNibbleArray nibble = chunk.getBlockNibbles()[cy - StarLightInterface.this.minLightSection]; -+ if (StarLightInterface.this.isClientSide) { -+ return nibble.getUpdating(blockPos.getX(), blockPos.getY(), blockPos.getZ()); -+ } else { -+ return nibble.getVisible(blockPos.getX(), blockPos.getY(), blockPos.getZ()); -+ } ++ return StarLightInterface.this.getBlockLightValue(blockPos, StarLightInterface.this.getAnyChunkNow(blockPos.getX() >> 4, blockPos.getZ() >> 4)); + } + + @Override @@ -3345,6 +3251,100 @@ index 0000000000000000000000000000000000000000..9b8412f50d161471166cdf5c9effc2d5 + }; + } + ++ protected int getSkyLightValue(final BlockPos blockPos, final ChunkAccess chunk) { ++ final int x = blockPos.getX(); ++ int y = blockPos.getY(); ++ final int z = blockPos.getZ(); ++ ++ final int minSection = this.minSection; ++ final int maxSection = this.maxSection; ++ final int minLightSection = this.minLightSection; ++ final int maxLightSection = this.maxLightSection; ++ ++ if (chunk == null || (!this.isClientSide && !chunk.isLightCorrect()) || !chunk.getStatus().isOrAfter(ChunkStatus.LIGHT)) { ++ return 15; ++ } ++ ++ int sectionY = y >> 4; ++ ++ if (sectionY > maxLightSection) { ++ return 15; ++ } ++ ++ if (sectionY < minLightSection) { ++ sectionY = minLightSection; ++ y = sectionY << 4; ++ } ++ ++ final SWMRNibbleArray[] nibbles = chunk.getSkyNibbles(); ++ final SWMRNibbleArray immediate = nibbles[sectionY - minLightSection]; ++ ++ if (!immediate.isNullNibbleVisible()) { ++ return immediate.getVisible(x, y, z); ++ } ++ ++ final boolean[] emptinessMap = chunk.getSkyEmptinessMap(); ++ ++ if (emptinessMap == null) { ++ return 15; ++ } ++ ++ // are we above this chunk's lowest empty section? ++ int lowestY = minLightSection - 1; ++ for (int currY = maxSection; currY >= minSection; --currY) { ++ if (emptinessMap[currY - minSection]) { ++ continue; ++ } ++ ++ // should always be full lit here ++ lowestY = currY; ++ break; ++ } ++ ++ if (sectionY > lowestY) { ++ return 15; ++ } ++ ++ // this nibble is going to depend solely on the skylight data above it ++ // find first non-null data above (there does exist one, as we just found it above) ++ for (int currY = sectionY + 1; currY <= maxLightSection; ++currY) { ++ final SWMRNibbleArray nibble = nibbles[currY - minLightSection]; ++ if (!nibble.isNullNibbleVisible()) { ++ return nibble.getVisible(x, 0, z); ++ } ++ } ++ ++ // should never reach here ++ return 15; ++ } ++ ++ protected int getBlockLightValue(final BlockPos blockPos, final ChunkAccess chunk) { ++ final int y = blockPos.getY(); ++ final int cy = y >> 4; ++ ++ final int minLightSection = this.minLightSection; ++ final int maxLightSection = this.maxLightSection; ++ ++ if (cy < minLightSection || cy > maxLightSection) { ++ return 0; ++ } ++ ++ if (chunk == null) { ++ return 0; ++ } ++ ++ final SWMRNibbleArray nibble = chunk.getBlockNibbles()[cy - minLightSection]; ++ return nibble.getVisible(blockPos.getX(), y, blockPos.getZ()); ++ } ++ ++ public int getRawBrightness(final BlockPos pos, final int ambientDarkness) { ++ final ChunkAccess chunk = this.getAnyChunkNow(pos.getX() >> 4, pos.getZ() >> 4); ++ ++ final int sky = this.getSkyLightValue(pos, chunk) - ambientDarkness; ++ final int block = this.getBlockLightValue(pos, chunk); ++ return Math.max(sky, block); ++ } ++ + public LayerLightEventListener getSkyReader() { + return this.skyReader; + } @@ -3362,7 +3362,14 @@ index 0000000000000000000000000000000000000000..9b8412f50d161471166cdf5c9effc2d5 + // empty world + return null; + } -+ return ((ServerLevel)this.world).getChunkSource().getChunkAtImmediately(chunkX, chunkZ); ++ ++ final ServerChunkCache chunkProvider = ((ServerLevel)this.world).getChunkSource(); ++ final LevelChunk fullLoaded = chunkProvider.getChunkAtIfLoadedImmediately(chunkX, chunkZ); ++ if (fullLoaded != null) { ++ return fullLoaded; ++ } ++ ++ return chunkProvider.getChunkAtImmediately(chunkX, chunkZ); + } + + public boolean hasUpdates() { @@ -3715,8 +3722,618 @@ index 0000000000000000000000000000000000000000..9b8412f50d161471166cdf5c9effc2d5 + } + } +} +diff --git a/src/main/java/ca/spottedleaf/starlight/common/util/CoordinateUtils.java b/src/main/java/ca/spottedleaf/starlight/common/util/CoordinateUtils.java +new file mode 100644 +index 0000000000000000000000000000000000000000..16a4a14e7ccf9e4d7fdf1166674fe8f529c06d39 +--- /dev/null ++++ b/src/main/java/ca/spottedleaf/starlight/common/util/CoordinateUtils.java +@@ -0,0 +1,128 @@ ++package ca.spottedleaf.starlight.common.util; ++ ++import net.minecraft.core.BlockPos; ++import net.minecraft.core.SectionPos; ++import net.minecraft.util.Mth; ++import net.minecraft.world.entity.Entity; ++import net.minecraft.world.level.ChunkPos; ++ ++public final class CoordinateUtils { ++ ++ // dx, dz are relative to the target chunk ++ // dx, dz in [-radius, radius] ++ public static int getNeighbourMappedIndex(final int dx, final int dz, final int radius) { ++ return (dx + radius) + (2 * radius + 1)*(dz + radius); ++ } ++ ++ // the chunk keys are compatible with vanilla ++ ++ public static long getChunkKey(final BlockPos pos) { ++ return ((long)(pos.getZ() >> 4) << 32) | ((pos.getX() >> 4) & 0xFFFFFFFFL); ++ } ++ ++ public static long getChunkKey(final Entity entity) { ++ return ((long)(Mth.floor(entity.getZ()) >> 4) << 32) | ((Mth.floor(entity.getX()) >> 4) & 0xFFFFFFFFL); ++ } ++ ++ public static long getChunkKey(final ChunkPos pos) { ++ return ((long)pos.z << 32) | (pos.x & 0xFFFFFFFFL); ++ } ++ ++ public static long getChunkKey(final SectionPos pos) { ++ return ((long)pos.getZ() << 32) | (pos.getX() & 0xFFFFFFFFL); ++ } ++ ++ public static long getChunkKey(final int x, final int z) { ++ return ((long)z << 32) | (x & 0xFFFFFFFFL); ++ } ++ ++ public static int getChunkX(final long chunkKey) { ++ return (int)chunkKey; ++ } ++ ++ public static int getChunkZ(final long chunkKey) { ++ return (int)(chunkKey >>> 32); ++ } ++ ++ public static int getChunkCoordinate(final double blockCoordinate) { ++ return Mth.floor(blockCoordinate) >> 4; ++ } ++ ++ // the section keys are compatible with vanilla's ++ ++ static final int SECTION_X_BITS = 22; ++ static final long SECTION_X_MASK = (1L << SECTION_X_BITS) - 1; ++ static final int SECTION_Y_BITS = 20; ++ static final long SECTION_Y_MASK = (1L << SECTION_Y_BITS) - 1; ++ static final int SECTION_Z_BITS = 22; ++ static final long SECTION_Z_MASK = (1L << SECTION_Z_BITS) - 1; ++ // format is y,z,x (in order of LSB to MSB) ++ static final int SECTION_Y_SHIFT = 0; ++ static final int SECTION_Z_SHIFT = SECTION_Y_SHIFT + SECTION_Y_BITS; ++ static final int SECTION_X_SHIFT = SECTION_Z_SHIFT + SECTION_X_BITS; ++ static final int SECTION_TO_BLOCK_SHIFT = 4; ++ ++ public static long getChunkSectionKey(final int x, final int y, final int z) { ++ return ((x & SECTION_X_MASK) << SECTION_X_SHIFT) ++ | ((y & SECTION_Y_MASK) << SECTION_Y_SHIFT) ++ | ((z & SECTION_Z_MASK) << SECTION_Z_SHIFT); ++ } ++ ++ public static long getChunkSectionKey(final SectionPos pos) { ++ return ((pos.getX() & SECTION_X_MASK) << SECTION_X_SHIFT) ++ | ((pos.getY() & SECTION_Y_MASK) << SECTION_Y_SHIFT) ++ | ((pos.getZ() & SECTION_Z_MASK) << SECTION_Z_SHIFT); ++ } ++ ++ public static long getChunkSectionKey(final ChunkPos pos, final int y) { ++ return ((pos.x & SECTION_X_MASK) << SECTION_X_SHIFT) ++ | ((y & SECTION_Y_MASK) << SECTION_Y_SHIFT) ++ | ((pos.z & SECTION_Z_MASK) << SECTION_Z_SHIFT); ++ } ++ ++ public static long getChunkSectionKey(final BlockPos pos) { ++ return (((long)pos.getX() << (SECTION_X_SHIFT - SECTION_TO_BLOCK_SHIFT)) & (SECTION_X_MASK << SECTION_X_SHIFT)) | ++ ((pos.getY() >> SECTION_TO_BLOCK_SHIFT) & (SECTION_Y_MASK << SECTION_Y_SHIFT)) | ++ (((long)pos.getZ() << (SECTION_Z_SHIFT - SECTION_TO_BLOCK_SHIFT)) & (SECTION_Z_MASK << SECTION_Z_SHIFT)); ++ } ++ ++ public static long getChunkSectionKey(final Entity entity) { ++ return ((Mth.lfloor(entity.getX()) << (SECTION_X_SHIFT - SECTION_TO_BLOCK_SHIFT)) & (SECTION_X_MASK << SECTION_X_SHIFT)) | ++ ((Mth.lfloor(entity.getY()) >> SECTION_TO_BLOCK_SHIFT) & (SECTION_Y_MASK << SECTION_Y_SHIFT)) | ++ ((Mth.lfloor(entity.getZ()) << (SECTION_Z_SHIFT - SECTION_TO_BLOCK_SHIFT)) & (SECTION_Z_MASK << SECTION_Z_SHIFT)); ++ } ++ ++ public static int getChunkSectionX(final long key) { ++ return (int)(key << (Long.SIZE - (SECTION_X_SHIFT + SECTION_X_BITS)) >> (Long.SIZE - SECTION_X_BITS)); ++ } ++ ++ public static int getChunkSectionY(final long key) { ++ return (int)(key << (Long.SIZE - (SECTION_Y_SHIFT + SECTION_Y_BITS)) >> (Long.SIZE - SECTION_Y_BITS)); ++ } ++ ++ public static int getChunkSectionZ(final long key) { ++ return (int)(key << (Long.SIZE - (SECTION_Z_SHIFT + SECTION_Z_BITS)) >> (Long.SIZE - SECTION_Z_BITS)); ++ } ++ ++ // the block coordinates are not necessarily compatible with vanilla's ++ ++ public static int getBlockCoordinate(final double blockCoordinate) { ++ return Mth.floor(blockCoordinate); ++ } ++ ++ public static long getBlockKey(final int x, final int y, final int z) { ++ return ((long)x & 0x7FFFFFF) | (((long)z & 0x7FFFFFF) << 27) | ((long)y << 54); ++ } ++ ++ public static long getBlockKey(final BlockPos pos) { ++ return ((long)pos.getX() & 0x7FFFFFF) | (((long)pos.getZ() & 0x7FFFFFF) << 27) | ((long)pos.getY() << 54); ++ } ++ ++ public static long getBlockKey(final Entity entity) { ++ return ((long)entity.getX() & 0x7FFFFFF) | (((long)entity.getZ() & 0x7FFFFFF) << 27) | ((long)entity.getY() << 54); ++ } ++ ++ private CoordinateUtils() { ++ throw new RuntimeException(); ++ } ++} +diff --git a/src/main/java/ca/spottedleaf/starlight/common/util/IntegerUtil.java b/src/main/java/ca/spottedleaf/starlight/common/util/IntegerUtil.java +new file mode 100644 +index 0000000000000000000000000000000000000000..177d0a969f3d72a34e773e8309c3719a235ee06d +--- /dev/null ++++ b/src/main/java/ca/spottedleaf/starlight/common/util/IntegerUtil.java +@@ -0,0 +1,226 @@ ++package ca.spottedleaf.starlight.common.util; ++ ++public final class IntegerUtil { ++ ++ public static final int HIGH_BIT_U32 = Integer.MIN_VALUE; ++ public static final long HIGH_BIT_U64 = Long.MIN_VALUE; ++ ++ public static int ceilLog2(final int value) { ++ return Integer.SIZE - Integer.numberOfLeadingZeros(value - 1); // see doc of numberOfLeadingZeros ++ } ++ ++ public static long ceilLog2(final long value) { ++ return Long.SIZE - Long.numberOfLeadingZeros(value - 1); // see doc of numberOfLeadingZeros ++ } ++ ++ public static int floorLog2(final int value) { ++ // xor is optimized subtract for 2^n -1 ++ // note that (2^n -1) - k = (2^n -1) ^ k for k <= (2^n - 1) ++ return (Integer.SIZE - 1) ^ Integer.numberOfLeadingZeros(value); // see doc of numberOfLeadingZeros ++ } ++ ++ public static int floorLog2(final long value) { ++ // xor is optimized subtract for 2^n -1 ++ // note that (2^n -1) - k = (2^n -1) ^ k for k <= (2^n - 1) ++ return (Long.SIZE - 1) ^ Long.numberOfLeadingZeros(value); // see doc of numberOfLeadingZeros ++ } ++ ++ public static int roundCeilLog2(final int value) { ++ // optimized variant of 1 << (32 - leading(val - 1)) ++ // given ++ // 1 << n = HIGH_BIT_32 >>> (31 - n) for n [0, 32) ++ // 1 << (32 - leading(val - 1)) = HIGH_BIT_32 >>> (31 - (32 - leading(val - 1))) ++ // HIGH_BIT_32 >>> (31 - (32 - leading(val - 1))) ++ // HIGH_BIT_32 >>> (31 - 32 + leading(val - 1)) ++ // HIGH_BIT_32 >>> (-1 + leading(val - 1)) ++ return HIGH_BIT_U32 >>> (Integer.numberOfLeadingZeros(value - 1) - 1); ++ } ++ ++ public static long roundCeilLog2(final long value) { ++ // see logic documented above ++ return HIGH_BIT_U64 >>> (Long.numberOfLeadingZeros(value - 1) - 1); ++ } ++ ++ public static int roundFloorLog2(final int value) { ++ // optimized variant of 1 << (31 - leading(val)) ++ // given ++ // 1 << n = HIGH_BIT_32 >>> (31 - n) for n [0, 32) ++ // 1 << (31 - leading(val)) = HIGH_BIT_32 >> (31 - (31 - leading(val))) ++ // HIGH_BIT_32 >> (31 - (31 - leading(val))) ++ // HIGH_BIT_32 >> (31 - 31 + leading(val)) ++ return HIGH_BIT_U32 >>> Integer.numberOfLeadingZeros(value); ++ } ++ ++ public static long roundFloorLog2(final long value) { ++ // see logic documented above ++ return HIGH_BIT_U64 >>> Long.numberOfLeadingZeros(value); ++ } ++ ++ public static boolean isPowerOfTwo(final int n) { ++ // 2^n has one bit ++ // note: this rets true for 0 still ++ return IntegerUtil.getTrailingBit(n) == n; ++ } ++ ++ public static boolean isPowerOfTwo(final long n) { ++ // 2^n has one bit ++ // note: this rets true for 0 still ++ return IntegerUtil.getTrailingBit(n) == n; ++ } ++ ++ public static int getTrailingBit(final int n) { ++ return -n & n; ++ } ++ ++ public static long getTrailingBit(final long n) { ++ return -n & n; ++ } ++ ++ public static int trailingZeros(final int n) { ++ return Integer.numberOfTrailingZeros(n); ++ } ++ ++ public static int trailingZeros(final long n) { ++ return Long.numberOfTrailingZeros(n); ++ } ++ ++ // from hacker's delight (signed division magic value) ++ public static int getDivisorMultiple(final long numbers) { ++ return (int)(numbers >>> 32); ++ } ++ ++ // from hacker's delight (signed division magic value) ++ public static int getDivisorShift(final long numbers) { ++ return (int)numbers; ++ } ++ ++ // copied from hacker's delight (signed division magic value) ++ // http://www.hackersdelight.org/hdcodetxt/magic.c.txt ++ public static long getDivisorNumbers(final int d) { ++ final int ad = IntegerUtil.branchlessAbs(d); ++ ++ if (ad < 2) { ++ throw new IllegalArgumentException("|number| must be in [2, 2^31 -1], not: " + d); ++ } ++ ++ final int two31 = 0x80000000; ++ final long mask = 0xFFFFFFFFL; // mask for enforcing unsigned behaviour ++ ++ int p = 31; ++ ++ // all these variables are UNSIGNED! ++ int t = two31 + (d >>> 31); ++ int anc = t - 1 - t%ad; ++ int q1 = (int)((two31 & mask)/(anc & mask)); ++ int r1 = two31 - q1*anc; ++ int q2 = (int)((two31 & mask)/(ad & mask)); ++ int r2 = two31 - q2*ad; ++ int delta; ++ ++ do { ++ p = p + 1; ++ q1 = 2*q1; // Update q1 = 2**p/|nc|. ++ r1 = 2*r1; // Update r1 = rem(2**p, |nc|). ++ if ((r1 & mask) >= (anc & mask)) {// (Must be an unsigned comparison here) ++ q1 = q1 + 1; ++ r1 = r1 - anc; ++ } ++ q2 = 2*q2; // Update q2 = 2**p/|d|. ++ r2 = 2*r2; // Update r2 = rem(2**p, |d|). ++ if ((r2 & mask) >= (ad & mask)) {// (Must be an unsigned comparison here) ++ q2 = q2 + 1; ++ r2 = r2 - ad; ++ } ++ delta = ad - r2; ++ } while ((q1 & mask) < (delta & mask) || (q1 == delta && r1 == 0)); ++ ++ int magicNum = q2 + 1; ++ if (d < 0) { ++ magicNum = -magicNum; ++ } ++ int shift = p - 32; ++ return ((long)magicNum << 32) | shift; ++ } ++ ++ public static int branchlessAbs(final int val) { ++ // -n = -1 ^ n + 1 ++ final int mask = val >> (Integer.SIZE - 1); // -1 if < 0, 0 if >= 0 ++ return (mask ^ val) - mask; // if val < 0, then (0 ^ val) - 0 else (-1 ^ val) + 1 ++ } ++ ++ public static long branchlessAbs(final long val) { ++ // -n = -1 ^ n + 1 ++ final long mask = val >> (Long.SIZE - 1); // -1 if < 0, 0 if >= 0 ++ return (mask ^ val) - mask; // if val < 0, then (0 ^ val) - 0 else (-1 ^ val) + 1 ++ } ++ ++ //https://github.com/skeeto/hash-prospector for hash functions ++ ++ //score = ~590.47984224483832 ++ public static int hash0(int x) { ++ x *= 0x36935555; ++ x ^= x >>> 16; ++ return x; ++ } ++ ++ //score = ~310.01596637036749 ++ public static int hash1(int x) { ++ x ^= x >>> 15; ++ x *= 0x356aaaad; ++ x ^= x >>> 17; ++ return x; ++ } ++ ++ public static int hash2(int x) { ++ x ^= x >>> 16; ++ x *= 0x7feb352d; ++ x ^= x >>> 15; ++ x *= 0x846ca68b; ++ x ^= x >>> 16; ++ return x; ++ } ++ ++ public static int hash3(int x) { ++ x ^= x >>> 17; ++ x *= 0xed5ad4bb; ++ x ^= x >>> 11; ++ x *= 0xac4c1b51; ++ x ^= x >>> 15; ++ x *= 0x31848bab; ++ x ^= x >>> 14; ++ return x; ++ } ++ ++ //score = ~365.79959673201887 ++ public static long hash1(long x) { ++ x ^= x >>> 27; ++ x *= 0xb24924b71d2d354bL; ++ x ^= x >>> 28; ++ return x; ++ } ++ ++ //h2 hash ++ public static long hash2(long x) { ++ x ^= x >>> 32; ++ x *= 0xd6e8feb86659fd93L; ++ x ^= x >>> 32; ++ x *= 0xd6e8feb86659fd93L; ++ x ^= x >>> 32; ++ return x; ++ } ++ ++ public static long hash3(long x) { ++ x ^= x >>> 45; ++ x *= 0xc161abe5704b6c79L; ++ x ^= x >>> 41; ++ x *= 0xe3e5389aedbc90f7L; ++ x ^= x >>> 56; ++ x *= 0x1f9aba75a52db073L; ++ x ^= x >>> 53; ++ return x; ++ } ++ ++ private IntegerUtil() { ++ throw new RuntimeException(); ++ } ++} +diff --git a/src/main/java/ca/spottedleaf/starlight/common/util/SaveUtil.java b/src/main/java/ca/spottedleaf/starlight/common/util/SaveUtil.java +new file mode 100644 +index 0000000000000000000000000000000000000000..0cfb9c213e7970e98895cafdc9dd4b66cf557d72 +--- /dev/null ++++ b/src/main/java/ca/spottedleaf/starlight/common/util/SaveUtil.java +@@ -0,0 +1,185 @@ ++package ca.spottedleaf.starlight.common.util; ++ ++import ca.spottedleaf.starlight.common.light.SWMRNibbleArray; ++import ca.spottedleaf.starlight.common.light.StarLightEngine; ++import net.minecraft.nbt.CompoundTag; ++import net.minecraft.nbt.ListTag; ++import net.minecraft.server.level.ServerLevel; ++import net.minecraft.world.level.ChunkPos; ++import net.minecraft.world.level.Level; ++import net.minecraft.world.level.chunk.ChunkAccess; ++import net.minecraft.world.level.chunk.ChunkStatus; ++import org.apache.logging.log4j.LogManager; ++import org.apache.logging.log4j.Logger; ++ ++public final class SaveUtil { ++ ++ private static final Logger LOGGER = LogManager.getLogger(); ++ ++ private static final int STARLIGHT_LIGHT_VERSION = 6; ++ ++ private static final String BLOCKLIGHT_STATE_TAG = "starlight.blocklight_state"; ++ private static final String SKYLIGHT_STATE_TAG = "starlight.skylight_state"; ++ private static final String STARLIGHT_VERSION_TAG = "starlight.light_version"; ++ ++ public static void saveLightHook(final Level world, final ChunkAccess chunk, final CompoundTag nbt) { ++ try { ++ saveLightHookReal(world, chunk, nbt); ++ } catch (final Exception ex) { ++ // failing to inject is not fatal so we catch anything here. if it fails, it will have correctly set lit to false ++ // for Vanilla to relight on load and it will not set our lit tag so we will relight on load ++ LOGGER.warn("Failed to inject light data into save data for chunk " + chunk.getPos() + ", chunk light will be recalculated on its next load", ex); ++ } ++ } ++ ++ private static void saveLightHookReal(final Level world, final ChunkAccess chunk, final CompoundTag nbt) { ++ if (nbt == null) { ++ return; ++ } ++ ++ final int minSection = WorldUtil.getMinLightSection(world); ++ final int maxSection = WorldUtil.getMaxLightSection(world); ++ ++ SWMRNibbleArray[] blockNibbles = chunk.getBlockNibbles(); ++ SWMRNibbleArray[] skyNibbles = chunk.getSkyNibbles(); ++ ++ CompoundTag level = nbt.getCompound("Level"); ++ boolean lit = chunk.isLightCorrect() || !(world instanceof ServerLevel); ++ // diff start - store our tag for whether light data is init'd ++ if (lit) { ++ level.putBoolean("isLightOn", false); ++ } ++ // diff end - store our tag for whether light data is init'd ++ ChunkStatus status = ChunkStatus.byName(level.getString("Status")); ++ ++ CompoundTag[] sections = new CompoundTag[maxSection - minSection + 1]; ++ ++ ListTag sectionsStored = level.getList("Sections", 10); ++ ++ for (int i = 0; i < sectionsStored.size(); ++i) { ++ CompoundTag sectionStored = sectionsStored.getCompound(i); ++ int k = sectionStored.getByte("Y"); ++ ++ // strip light data ++ sectionStored.remove("BlockLight"); ++ sectionStored.remove("SkyLight"); ++ ++ if (!sectionStored.isEmpty()) { ++ sections[k - minSection] = sectionStored; ++ } ++ } ++ ++ if (lit && status.isOrAfter(ChunkStatus.LIGHT)) { ++ for (int i = minSection; i <= maxSection; ++i) { ++ SWMRNibbleArray.SaveState blockNibble = blockNibbles[i - minSection].getSaveState(); ++ SWMRNibbleArray.SaveState skyNibble = skyNibbles[i - minSection].getSaveState(); ++ if (blockNibble != null || skyNibble != null) { ++ CompoundTag section = sections[i - minSection]; ++ if (section == null) { ++ section = new CompoundTag(); ++ section.putByte("Y", (byte)i); ++ sections[i - minSection] = section; ++ } ++ ++ // we store under the same key so mod programs editing nbt ++ // can still read the data, hopefully. ++ // however, for compatibility we store chunks as unlit so vanilla ++ // is forced to re-light them if it encounters our data. It's too much of a burden ++ // to try and maintain compatibility with a broken and inferior skylight management system. ++ ++ if (blockNibble != null) { ++ if (blockNibble.data != null) { ++ section.putByteArray("BlockLight", blockNibble.data); ++ } ++ section.putInt(BLOCKLIGHT_STATE_TAG, blockNibble.state); ++ } ++ ++ if (skyNibble != null) { ++ if (skyNibble.data != null) { ++ section.putByteArray("SkyLight", skyNibble.data); ++ } ++ section.putInt(SKYLIGHT_STATE_TAG, skyNibble.state); ++ } ++ } ++ } ++ } ++ ++ // rewrite section list ++ sectionsStored.clear(); ++ for (CompoundTag section : sections) { ++ if (section != null) { ++ sectionsStored.add(section); ++ } ++ } ++ level.put("Sections", sectionsStored); ++ if (lit) { ++ level.putInt(STARLIGHT_VERSION_TAG, STARLIGHT_LIGHT_VERSION); // only mark as fully lit after we have successfully injected our data ++ } ++ } ++ ++ public static void loadLightHook(final Level world, final ChunkPos pos, final CompoundTag tag, final ChunkAccess into) { ++ try { ++ loadLightHookReal(world, pos, tag, into); ++ } catch (final Exception ex) { ++ // failing to inject is not fatal so we catch anything here. if it fails, then we simply relight. Not a problem, we get correct ++ // lighting in both cases. ++ LOGGER.warn("Failed to load light for chunk " + pos + ", light will be recalculated", ex); ++ } ++ } ++ ++ private static void loadLightHookReal(final Level world, final ChunkPos pos, final CompoundTag tag, final ChunkAccess into) { ++ if (into == null) { ++ return; ++ } ++ final int minSection = WorldUtil.getMinLightSection(world); ++ final int maxSection = WorldUtil.getMaxLightSection(world); ++ ++ into.setLightCorrect(false); // mark as unlit in case we fail parsing ++ ++ SWMRNibbleArray[] blockNibbles = StarLightEngine.getFilledEmptyLight(world); ++ SWMRNibbleArray[] skyNibbles = StarLightEngine.getFilledEmptyLight(world); ++ ++ ++ // start copy from from the original method ++ CompoundTag levelTag = tag.getCompound("Level"); ++ boolean lit = levelTag.get("isLightOn") != null && levelTag.getInt(STARLIGHT_VERSION_TAG) == STARLIGHT_LIGHT_VERSION; ++ boolean canReadSky = world.dimensionType().hasSkyLight(); ++ ChunkStatus status = ChunkStatus.byName(tag.getCompound("Level").getString("Status")); ++ if (lit && status.isOrAfter(ChunkStatus.LIGHT)) { // diff - we add the status check here ++ ListTag sections = levelTag.getList("Sections", 10); ++ ++ for (int i = 0; i < sections.size(); ++i) { ++ CompoundTag sectionData = sections.getCompound(i); ++ int y = sectionData.getByte("Y"); ++ ++ if (sectionData.contains("BlockLight", 7)) { ++ // this is where our diff is ++ blockNibbles[y - minSection] = new SWMRNibbleArray(sectionData.getByteArray("BlockLight").clone(), sectionData.getInt(BLOCKLIGHT_STATE_TAG)); // clone for data safety ++ } else { ++ blockNibbles[y - minSection] = new SWMRNibbleArray(null, sectionData.getInt(BLOCKLIGHT_STATE_TAG)); ++ } ++ ++ if (canReadSky) { ++ if (sectionData.contains("SkyLight", 7)) { ++ // we store under the same key so mod programs editing nbt ++ // can still read the data, hopefully. ++ // however, for compatibility we store chunks as unlit so vanilla ++ // is forced to re-light them if it encounters our data. It's too much of a burden ++ // to try and maintain compatibility with a broken and inferior skylight management system. ++ skyNibbles[y - minSection] = new SWMRNibbleArray(sectionData.getByteArray("SkyLight").clone(), sectionData.getInt(SKYLIGHT_STATE_TAG)); // clone for data safety ++ } else { ++ skyNibbles[y - minSection] = new SWMRNibbleArray(null, sectionData.getInt(SKYLIGHT_STATE_TAG)); ++ } ++ } ++ } ++ } ++ // end copy from vanilla ++ ++ into.setBlockNibbles(blockNibbles); ++ into.setSkyNibbles(skyNibbles); ++ into.setLightCorrect(lit); // now we set lit here, only after we've correctly parsed data ++ } ++ ++ private SaveUtil() {} ++ ++} +diff --git a/src/main/java/ca/spottedleaf/starlight/common/util/WorldUtil.java b/src/main/java/ca/spottedleaf/starlight/common/util/WorldUtil.java +new file mode 100644 +index 0000000000000000000000000000000000000000..dd995e25ae620ae36cd5eecb2fe10ad034ba50d2 +--- /dev/null ++++ b/src/main/java/ca/spottedleaf/starlight/common/util/WorldUtil.java +@@ -0,0 +1,47 @@ ++package ca.spottedleaf.starlight.common.util; ++ ++import net.minecraft.world.level.LevelHeightAccessor; ++ ++public final class WorldUtil { ++ ++ // min, max are inclusive ++ ++ public static int getMaxSection(final LevelHeightAccessor world) { ++ return world.getMaxSection() - 1; // getMaxSection() is exclusive ++ } ++ ++ public static int getMinSection(final LevelHeightAccessor world) { ++ return world.getMinSection(); ++ } ++ ++ public static int getMaxLightSection(final LevelHeightAccessor world) { ++ return getMaxSection(world) + 1; ++ } ++ ++ public static int getMinLightSection(final LevelHeightAccessor world) { ++ return getMinSection(world) - 1; ++ } ++ ++ ++ ++ public static int getTotalSections(final LevelHeightAccessor world) { ++ return getMaxSection(world) - getMinSection(world) + 1; ++ } ++ ++ public static int getTotalLightSections(final LevelHeightAccessor world) { ++ return getMaxLightSection(world) - getMinLightSection(world) + 1; ++ } ++ ++ public static int getMinBlockY(final LevelHeightAccessor world) { ++ return getMinSection(world) << 4; ++ } ++ ++ public static int getMaxBlockY(final LevelHeightAccessor world) { ++ return (getMaxSection(world) << 4) | 15; ++ } ++ ++ private WorldUtil() { ++ throw new RuntimeException(); ++ } ++ ++} diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java -index f436ab35798c9b6e6cb2eb60d2c02cbf9b742e69..807bbe54f6516f794bdcb735bb7b8d6812e3ef01 100644 +index 85beb460aa59313cf2ace2d6a6bf24938e3e2b80..2ef4b4c2ff81d0fa33d4630593266066d8e6a6f3 100644 --- a/src/main/java/com/destroystokyo/paper/PaperCommand.java +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -501,6 +501,46 @@ public class PaperCommand extends Command { @@ -3789,87 +4406,34 @@ index f436ab35798c9b6e6cb2eb60d2c02cbf9b742e69..807bbe54f6516f794bdcb735bb7b8d68 net.minecraft.core.BlockPos center = MCUtil.toBlockPosition(player.getLocation()); Deque queue = new ArrayDeque<>(MCUtil.getSpiralOutChunks(center, radius)); updateLight(sender, world, lightengine, queue); -diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLightUpdatePacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLightUpdatePacket.java -index d8be2ad889f46491e50404916fb4ae0de5f42098..29ba097a7b230ef67d4d1b5f4ebe20cd5228d214 100644 ---- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLightUpdatePacket.java -+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLightUpdatePacket.java -@@ -32,25 +32,17 @@ public class ClientboundLightUpdatePacket implements Packet { -- if (remainingSends.get() == 0) { -- cleaner1.run(); -- cleaner2.run(); -- } -- }, "Light Packet Release"); -- } -+ // Paper - rewrite light engine - } - - @Override - public boolean hasFinishListener() { -- return true; -+ return false; // Paper - rewrite light engine - } - - // Paper end -@@ -63,8 +55,8 @@ public class ClientboundLightUpdatePacket implements Packet> fullChunkFuture; private int fullChunkCreateCount; private volatile boolean isFullChunkReady; // Paper - cache chunk ticking stage private volatile CompletableFuture> tickingChunkFuture; private volatile boolean isTickingReady; // Paper - cache chunk ticking stage private volatile CompletableFuture> entityTickingChunkFuture; private volatile boolean isEntityTickingReady; // Paper - cache chunk ticking stage - private CompletableFuture chunkToSave; -+ public CompletableFuture chunkToSave; // Paper - public ++ public CompletableFuture chunkToSave; // Paper - public @Nullable private final DebugBuffer chunkToSaveHistory; public int oldTicketLevel; diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index efaab00b73f48e267a033a4ef466dcbaf2af2044..aae8dca773686bec3f867b79aa11d668032b9244 100644 +index 7c4154b1b5ccc53af5f5fb186c2a5d1ff88c7af1..cf6f5388e171035a22e9c35c9dd5d75d147562a4 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -121,7 +121,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -130,7 +130,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public final LongSet entitiesInLevel; public final ServerLevel level; private final ThreadedLevelLightEngine lightEngine; - private final BlockableEventLoop mainThreadExecutor; + public final BlockableEventLoop mainThreadExecutor; // Paper - public final java.util.concurrent.Executor mainInvokingExecutor; // Paper - public final ChunkGenerator generator; + public ChunkGenerator generator; public final Supplier overworldDataStorage; diff --git a/src/main/java/net/minecraft/server/level/ThreadedLevelLightEngine.java b/src/main/java/net/minecraft/server/level/ThreadedLevelLightEngine.java -index 833b6b2193cf08e123aabb344f2283730aed1bcd..136ca55ac38b709e086f8e2e68dc1d0db2670ae4 100644 +index fec2a2a9f958492eefbbffcaf8179a2fac5a4d99..731001489eb6d2562e4685af79efa8116941638d 100644 --- a/src/main/java/net/minecraft/server/level/ThreadedLevelLightEngine.java +++ b/src/main/java/net/minecraft/server/level/ThreadedLevelLightEngine.java @@ -25,6 +25,17 @@ import net.minecraft.world.level.lighting.LevelLightEngine; @@ -3877,7 +4441,7 @@ index 833b6b2193cf08e123aabb344f2283730aed1bcd..136ca55ac38b709e086f8e2e68dc1d0d import org.apache.logging.log4j.Logger; +// Paper start -+import ca.spottedleaf.starlight.light.StarLightEngine; ++import ca.spottedleaf.starlight.common.light.StarLightEngine; +import io.papermc.paper.util.CoordinateUtils; +import java.util.function.Supplier; +import net.minecraft.world.level.lighting.LayerLightEventListener; @@ -3895,7 +4459,7 @@ index 833b6b2193cf08e123aabb344f2283730aed1bcd..136ca55ac38b709e086f8e2e68dc1d0d private final AtomicBoolean scheduled = new AtomicBoolean(); + // Paper start - replace light engine impl -+ protected final ca.spottedleaf.starlight.light.StarLightInterface theLightEngine; ++ protected final ca.spottedleaf.starlight.common.light.StarLightInterface theLightEngine; + public final boolean hasBlockLight; + public final boolean hasSkyLight; + // Paper end - replace light engine impl @@ -3909,11 +4473,11 @@ index 833b6b2193cf08e123aabb344f2283730aed1bcd..136ca55ac38b709e086f8e2e68dc1d0d + // Paper start - replace light engine impl + this.hasBlockLight = true; + this.hasSkyLight = hasBlockLight; // Nice variable name. -+ this.theLightEngine = new ca.spottedleaf.starlight.light.StarLightInterface(chunkProvider, this.hasSkyLight, this.hasBlockLight, this); ++ this.theLightEngine = new ca.spottedleaf.starlight.common.light.StarLightInterface(chunkProvider, this.hasSkyLight, this.hasBlockLight, this); + // Paper end - replace light engine impl + } + -+ // Paper start - replace light engine impl ++// Paper start - replace light engine impl + protected final ChunkAccess getChunk(final int chunkX, final int chunkZ) { + return ((ServerLevel)this.theLightEngine.getWorld()).getChunkSource().getChunkAtImmediately(chunkX, chunkZ); + } @@ -4002,7 +4566,7 @@ index 833b6b2193cf08e123aabb344f2283730aed1bcd..136ca55ac38b709e086f8e2e68dc1d0d + final int references = this.chunksBeingWorkedOn.addTo(key, 1); + if (references == 0) { + final ChunkPos pos = new ChunkPos(chunkX, chunkZ); -+ world.getChunkSource().addRegionTicket(ca.spottedleaf.starlight.light.StarLightInterface.CHUNK_WORK_TICKET, pos, 0, pos); ++ world.getChunkSource().addRegionTicket(ca.spottedleaf.starlight.common.light.StarLightInterface.CHUNK_WORK_TICKET, pos, 0, pos); + } + + // append future to this chunk and 1 radius neighbours chunk save futures @@ -4024,7 +4588,7 @@ index 833b6b2193cf08e123aabb344f2283730aed1bcd..136ca55ac38b709e086f8e2e68dc1d0d + if (newReferences == 1) { + this.chunksBeingWorkedOn.remove(key); + final ChunkPos pos = new ChunkPos(chunkX, chunkZ); -+ world.getChunkSource().removeRegionTicket(ca.spottedleaf.starlight.light.StarLightInterface.CHUNK_WORK_TICKET, pos, 0, pos); ++ world.getChunkSource().removeRegionTicket(ca.spottedleaf.starlight.common.light.StarLightInterface.CHUNK_WORK_TICKET, pos, 0, pos); + } else { + this.chunksBeingWorkedOn.put(key, newReferences - 1); + } @@ -4053,7 +4617,7 @@ index 833b6b2193cf08e123aabb344f2283730aed1bcd..136ca55ac38b709e086f8e2e68dc1d0d + final int block = this.theLightEngine.getBlockReader().getLightValue(pos); + return Math.max(sky, block); + } -+ // Paper end - replace light engine impl ++ // Paper end - replace light engine imp + @Override public void close() { @@ -4100,15 +4664,15 @@ index 833b6b2193cf08e123aabb344f2283730aed1bcd..136ca55ac38b709e086f8e2e68dc1d0d } @Override - public void enableLightSources(ChunkPos chunkPos, boolean bl) { + public void enableLightSources(ChunkPos pos, boolean retainData) { + if (true) return; // Paper - replace light engine impl - this.addTask(chunkPos.x, chunkPos.z, ThreadedLevelLightEngine.TaskType.PRE_UPDATE, Util.name(() -> { - super.enableLightSources(chunkPos, bl); + this.addTask(pos.x, pos.z, ThreadedLevelLightEngine.TaskType.PRE_UPDATE, Util.name(() -> { + super.enableLightSources(pos, retainData); }, () -> { @@ -233,6 +397,7 @@ public class ThreadedLevelLightEngine extends LevelLightEngine implements AutoCl @Override - public void queueSectionData(LightLayer lightType, SectionPos pos, @Nullable DataLayer nibbles, boolean bl) { + public void queueSectionData(LightLayer lightType, SectionPos pos, @Nullable DataLayer nibbles, boolean nonEdge) { + if (true) return; // Paper - replace light engine impl this.addTask(pos.x(), pos.z(), () -> { return 0; @@ -4164,7 +4728,7 @@ index 833b6b2193cf08e123aabb344f2283730aed1bcd..136ca55ac38b709e086f8e2e68dc1d0d public void tryScheduleUpdate() { - if ((!this.queue.isEmpty() || super.hasLightWork()) && this.scheduled.compareAndSet(false, true)) { // Paper -+ if (this.hasLightWork() && this.scheduled.compareAndSet(false, true)) { // Paper // Paper - rewrite light engine ++ if (this.hasLightWork() && this.scheduled.compareAndSet(false, true)) { // Paper // Paper - rewrite light engine this.taskMailbox.tell(() -> { this.runUpdate(); this.scheduled.set(false); @@ -4184,22 +4748,22 @@ index 833b6b2193cf08e123aabb344f2283730aed1bcd..136ca55ac38b709e086f8e2e68dc1d0d // Paper end } diff --git a/src/main/java/net/minecraft/server/level/TicketType.java b/src/main/java/net/minecraft/server/level/TicketType.java -index 41ddcf6775f99c56cf4b13b284420061e5dd6bdc..ae46429264e6a7e5c88b6b6a41a6df4db7b3e70d 100644 +index 3c1698ba0d3bc412ab957777d9b5211dbc555208..858e94f07b675f4aed2930491633fb6e3a7d168e 100644 --- a/src/main/java/net/minecraft/server/level/TicketType.java +++ b/src/main/java/net/minecraft/server/level/TicketType.java -@@ -32,6 +32,7 @@ public class TicketType { +@@ -31,6 +31,7 @@ public class TicketType { + public static final TicketType PLUGIN = TicketType.create("plugin", (a, b) -> 0); // CraftBukkit public static final TicketType PLUGIN_TICKET = TicketType.create("plugin_ticket", (plugin1, plugin2) -> plugin1.getClass().getName().compareTo(plugin2.getClass().getName())); // CraftBukkit public static final TicketType DELAY_UNLOAD = create("delay_unload", Long::compareTo, 300); // Paper - public static final TicketType REQUIRED_LOAD = create("required_load", Long::compareTo); // Paper - make sure getChunkAt does not fail + public static final TicketType CHUNK_RELIGHT = create("light_update", Long::compareTo); // Paper - ensure chunks stay loaded for lighting public static TicketType create(String name, Comparator argumentComparator) { return new TicketType<>(name, argumentComparator, 0L); diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index b534fd9e5d2a17926282cf40c9d66a2143a37bfe..4a7fdea6a5f966db444dc41f7215faa99e3820b3 100644 +index ce4848bdd00c091b9eb5fa2d47b03378d43c91b2..1831588b275f11aff37573fead835f6ddabfece1 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -643,6 +643,7 @@ public abstract class BlockBehaviour { +@@ -684,6 +684,7 @@ public abstract class BlockBehaviour { this.isViewBlocking = blockbase_info.isViewBlocking; this.hasPostProcess = blockbase_info.hasPostProcess; this.emissiveRendering = blockbase_info.emissiveRendering; @@ -4207,7 +4771,7 @@ index b534fd9e5d2a17926282cf40c9d66a2143a37bfe..4a7fdea6a5f966db444dc41f7215faa9 } // Paper start - impl cached craft block data, lazy load to fix issue with loading at the wrong time private org.bukkit.craftbukkit.block.data.CraftBlockData cachedCraftBlockData; -@@ -663,6 +664,18 @@ public abstract class BlockBehaviour { +@@ -704,6 +705,18 @@ public abstract class BlockBehaviour { protected boolean isTicking; protected FluidState fluid; // Paper end @@ -4226,7 +4790,7 @@ index b534fd9e5d2a17926282cf40c9d66a2143a37bfe..4a7fdea6a5f966db444dc41f7215faa9 public void initCache() { this.fluid = this.getBlock().getFluidState(this.asState()); // Paper - moved from getFluid() -@@ -671,6 +684,7 @@ public abstract class BlockBehaviour { +@@ -712,6 +725,7 @@ public abstract class BlockBehaviour { this.cache = new BlockBehaviour.BlockStateBase.Cache(this.asState()); } this.shapeExceedsCube = this.cache == null || this.cache.largeCollisionShape; // Paper - moved from actual method to here @@ -4235,395 +4799,246 @@ index b534fd9e5d2a17926282cf40c9d66a2143a37bfe..4a7fdea6a5f966db444dc41f7215faa9 } diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java -index 8393950a0b38ec7897d7643803d5accdb1f983f3..ae2050da03ea2ed82b5b0dadbe4e9d37162e8fdb 100644 +index a44901edc49259ebbbb4367b0d10b8daa76b07cd..4a04e742ffa090046341974cf8ec9c1b97dc382d 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java -@@ -41,6 +41,36 @@ public interface ChunkAccess extends BlockGetter, FeatureAccess { - net.minecraft.world.level.Level getLevel(); - // Paper end - -+ // Paper start -+ default ca.spottedleaf.starlight.light.SWMRNibbleArray[] getBlockNibbles() { -+ throw new UnsupportedOperationException(this.getClass().getName()); -+ } -+ default void setBlockNibbles(ca.spottedleaf.starlight.light.SWMRNibbleArray[] nibbles) { -+ throw new UnsupportedOperationException(this.getClass().getName()); -+ } -+ -+ default ca.spottedleaf.starlight.light.SWMRNibbleArray[] getSkyNibbles() { -+ throw new UnsupportedOperationException(this.getClass().getName()); -+ } -+ default void setSkyNibbles(ca.spottedleaf.starlight.light.SWMRNibbleArray[] nibbles) { -+ throw new UnsupportedOperationException(this.getClass().getName()); -+ } -+ public default boolean[] getSkyEmptinessMap() { -+ throw new UnsupportedOperationException(this.getClass().getName()); -+ } -+ public default void setSkyEmptinessMap(final boolean[] emptinessMap) { -+ throw new UnsupportedOperationException(this.getClass().getName()); -+ } -+ -+ public default boolean[] getBlockEmptinessMap() { -+ throw new UnsupportedOperationException(this.getClass().getName()); -+ } -+ -+ public default void setBlockEmptinessMap(final boolean[] emptinessMap) { -+ throw new UnsupportedOperationException(this.getClass().getName()); -+ } -+ // Paper end -+ - BlockState getType(final int x, final int y, final int z); // Paper - @Nullable - BlockState setBlockState(BlockPos pos, BlockState state, boolean moved); -diff --git a/src/main/java/net/minecraft/world/level/chunk/DataLayer.java b/src/main/java/net/minecraft/world/level/chunk/DataLayer.java -index 68a6c4db5980e733d81ef9a34cf32950f0983de6..0ed00b98e2e183aa6a8a2dfeaabea6b3c8ab97a9 100644 ---- a/src/main/java/net/minecraft/world/level/chunk/DataLayer.java -+++ b/src/main/java/net/minecraft/world/level/chunk/DataLayer.java -@@ -12,7 +12,7 @@ public final class DataLayer { - public static final int SIZE = 2048; - private static final int NIBBLE_SIZE = 4; - @Nullable -- protected byte[] data; -+ protected byte[] data; public final byte[] getDataRaw() { return this.data; } // Paper - provide accessor - // Paper start - public static byte[] EMPTY_NIBBLE = new byte[2048]; - private static final int nibbleBucketSizeMultiplier = Integer.getInteger("Paper.nibbleBucketSize", 3072); -@@ -55,6 +55,7 @@ public final class DataLayer { - boolean poolSafe = false; - public java.lang.Runnable cleaner; - private void registerCleaner() { -+ if (true) return; // Paper - purge cleaner usage - if (!poolSafe) { - cleaner = net.minecraft.server.MCUtil.registerCleaner(this, this.data, DataLayer::releaseBytes); - } else { -@@ -69,7 +70,7 @@ public final class DataLayer { - } - public DataLayer(byte[] bytes, boolean isSafe) { - this.data = bytes; -- if (!isSafe) this.data = getCloneIfSet(); // Paper - clone for safety -+ // Paper - purge cleaner usage - registerCleaner(); - // Paper end - if (bytes.length != 2048) { -@@ -155,7 +156,7 @@ public final class DataLayer { - } - // Paper end - public DataLayer copy() { -- return this.data == null ? new DataLayer() : new DataLayer(this.data); // Paper - clone in ctor -+ return this.data == null ? new DataLayer() : new DataLayer(this.data.clone()); // Paper - clone in ctor // Paper - no longer clone in constructor - } - - public String toString() { -diff --git a/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java b/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java -index 8245c5834ec69beb8e3b95fb3900601009a9273f..5f6b611dc99cc04cd553b9e01dba19ec6d8b250e 100644 ---- a/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java -+++ b/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java -@@ -1,5 +1,6 @@ - package net.minecraft.world.level.chunk; - -+import ca.spottedleaf.starlight.light.SWMRNibbleArray; - import it.unimi.dsi.fastutil.longs.LongSet; - import java.util.BitSet; - import java.util.Map; -@@ -29,6 +30,48 @@ public class ImposterProtoChunk extends ProtoChunk { - this.wrapped = wrapped; - } +@@ -77,6 +77,48 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom + protected final LevelHeightAccessor levelHeightAccessor; + protected final LevelChunkSection[] sections; + // Paper start - rewrite light engine -+ @Override -+ public SWMRNibbleArray[] getBlockNibbles() { -+ return this.getWrapped().getBlockNibbles(); -+ } ++ private volatile ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] blockNibbles; + -+ @Override -+ public void setBlockNibbles(SWMRNibbleArray[] nibbles) { -+ this.getWrapped().setBlockNibbles(nibbles); -+ } ++ private volatile ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] skyNibbles; + -+ @Override -+ public SWMRNibbleArray[] getSkyNibbles() { -+ return this.getWrapped().getSkyNibbles(); -+ } ++ private volatile boolean[] skyEmptinessMap; + -+ @Override -+ public void setSkyNibbles(SWMRNibbleArray[] nibbles) { -+ this.getWrapped().setSkyNibbles(nibbles); -+ } ++ private volatile boolean[] blockEmptinessMap; + -+ @Override -+ public boolean[] getSkyEmptinessMap() { -+ return this.getWrapped().getSkyEmptinessMap(); -+ } -+ -+ @Override -+ public void setSkyEmptinessMap(boolean[] emptinessMap) { -+ this.getWrapped().setSkyEmptinessMap(emptinessMap); -+ } -+ -+ @Override -+ public boolean[] getBlockEmptinessMap() { -+ return this.getWrapped().getBlockEmptinessMap(); -+ } -+ -+ @Override -+ public void setBlockEmptinessMap(boolean[] emptinessMap) { -+ this.getWrapped().setBlockEmptinessMap(emptinessMap); -+ } -+ // Paper end - rewrite light engine -+ - @Nullable - @Override - public BlockEntity getBlockEntity(BlockPos pos) { -diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index d580f0375cce5e995c024f1b0cd4843b5718121c..f0c43f9f636a5dd1f0dfbae604dfa1f4ff9ebd4e 100644 ---- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -1,5 +1,7 @@ - package net.minecraft.world.level.chunk; - -+import ca.spottedleaf.starlight.light.SWMRNibbleArray; -+import ca.spottedleaf.starlight.light.StarLightEngine; - import com.google.common.collect.ImmutableList; - import com.destroystokyo.paper.exception.ServerInternalException; - import com.google.common.collect.Maps; -@@ -17,7 +19,6 @@ import java.util.Collections; - import java.util.Iterator; - import java.util.Map; - import java.util.Map.Entry; --import java.util.Objects; - import java.util.Set; - import java.util.function.Consumer; - import java.util.function.Supplier; -@@ -28,7 +29,6 @@ import net.minecraft.CrashReport; - import net.minecraft.CrashReportCategory; - import net.minecraft.ReportedException; - import net.minecraft.core.BlockPos; --import net.minecraft.core.DefaultedRegistry; - import net.minecraft.core.Registry; - import net.minecraft.core.SectionPos; - import net.minecraft.nbt.CompoundTag; -@@ -125,11 +125,62 @@ public class LevelChunk implements ChunkAccess { - private volatile boolean isLightCorrect; - private final Int2ObjectMap gameEventDispatcherSections; - -+ // Paper start - rewrite light engine -+ protected volatile SWMRNibbleArray[] blockNibbles; -+ protected volatile SWMRNibbleArray[] skyNibbles; -+ protected volatile boolean[] skyEmptinessMap; -+ protected volatile boolean[] blockEmptinessMap; -+ -+ @Override -+ public SWMRNibbleArray[] getBlockNibbles() { ++ public ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] getBlockNibbles() { + return this.blockNibbles; + } + -+ @Override -+ public void setBlockNibbles(SWMRNibbleArray[] nibbles) { ++ public void setBlockNibbles(final ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] nibbles) { + this.blockNibbles = nibbles; + } + -+ @Override -+ public SWMRNibbleArray[] getSkyNibbles() { ++ public ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] getSkyNibbles() { + return this.skyNibbles; + } + -+ @Override -+ public void setSkyNibbles(SWMRNibbleArray[] nibbles) { ++ public void setSkyNibbles(final ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] nibbles) { + this.skyNibbles = nibbles; + } + -+ @Override + public boolean[] getSkyEmptinessMap() { + return this.skyEmptinessMap; + } + -+ @Override -+ public void setSkyEmptinessMap(boolean[] emptinessMap) { ++ public void setSkyEmptinessMap(final boolean[] emptinessMap) { + this.skyEmptinessMap = emptinessMap; + } + -+ @Override + public boolean[] getBlockEmptinessMap() { + return this.blockEmptinessMap; + } + -+ @Override -+ public void setBlockEmptinessMap(boolean[] emptinessMap) { ++ public void setBlockEmptinessMap(final boolean[] emptinessMap) { + this.blockEmptinessMap = emptinessMap; + } + // Paper end - rewrite light engine + - public LevelChunk(Level world, ChunkPos pos, ChunkBiomeContainer biomes) { - this(world, pos, biomes, UpgradeData.EMPTY, EmptyTickList.empty(), EmptyTickList.empty(), 0L, (LevelChunkSection[]) null, (Consumer) null); + public ChunkAccess(ChunkPos pos, UpgradeData upgradeData, LevelHeightAccessor heightLimitView, Registry biome, long inhabitedTime, @Nullable LevelChunkSection[] sectionArrayInitializer, @Nullable BlendingData blendingData) { + this.locX = pos.x; this.locZ = pos.z; // Paper - reduce need for field lookups + this.chunkPos = pos; this.coordinateKey = ChunkPos.asLong(locX, locZ); // Paper - cache long key +diff --git a/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java +index 25e9cc39d748dfd99d38f504c14f40f9ec7bdd2d..d14416f186292f2dda5f6539d285705226b7c699 100644 +--- a/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java ++++ b/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java +@@ -18,6 +18,38 @@ public class EmptyLevelChunk extends LevelChunk { + super(world, pos); } - public LevelChunk(Level world, ChunkPos pos, ChunkBiomeContainer biomes, UpgradeData upgradeData, TickList blockTickScheduler, TickList fluidTickScheduler, long inhabitedTime, @Nullable LevelChunkSection[] sections, @Nullable Consumer loadToWorldConsumer) { -+ // Paper start -+ this.blockNibbles = StarLightEngine.getFilledEmptyLight(world); -+ this.skyNibbles = StarLightEngine.getFilledEmptyLight(world); -+ // Paper end - this.pendingBlockEntities = Maps.newHashMap(); - this.tickersInLevel = Maps.newHashMap(); - this.heightmaps = Maps.newEnumMap(Heightmap.Types.class); -@@ -333,6 +384,12 @@ public class LevelChunk implements ChunkAccess { ++ @Override ++ public ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] getBlockNibbles() { ++ return ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(this.getLevel()); ++ } ++ ++ @Override ++ public void setBlockNibbles(final ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] nibbles) {} ++ ++ @Override ++ public ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] getSkyNibbles() { ++ return ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(this.getLevel()); ++ } ++ ++ @Override ++ public void setSkyNibbles(final ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] nibbles) {} ++ ++ @Override ++ public boolean[] getSkyEmptinessMap() { ++ return null; ++ } ++ ++ @Override ++ public void setSkyEmptinessMap(final boolean[] emptinessMap) {} ++ ++ @Override ++ public boolean[] getBlockEmptinessMap() { ++ return null; ++ } ++ ++ @Override ++ public void setBlockEmptinessMap(final boolean[] emptinessMap) {} ++ + // Paper start + @Override public BlockState getType(int x, int y, int z) { + return Blocks.VOID_AIR.defaultBlockState(); +diff --git a/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java b/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java +index 7c5b3acd299c5b021bd20f17ff0b89c8208a6623..d29739c3a67e60741a06fb25bcaf7705329804a4 100644 +--- a/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java ++++ b/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java +@@ -30,6 +30,48 @@ public class ImposterProtoChunk extends ProtoChunk { + private final LevelChunk wrapped; + private final boolean allowWrites; - public LevelChunk(ServerLevel worldserver, ProtoChunk protoChunk, @Nullable Consumer consumer) { - this(worldserver, protoChunk.getPos(), protoChunk.getBiomes(), protoChunk.getUpgradeData(), protoChunk.getBlockTicks(), protoChunk.getLiquidTicks(), protoChunk.getInhabitedTime(), protoChunk.getSections(), consumer); -+ // Paper start - copy over protochunk light ++ // Paper start - rewrite light engine ++ @Override ++ public ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] getBlockNibbles() { ++ return this.wrapped.getBlockNibbles(); ++ } ++ ++ @Override ++ public void setBlockNibbles(final ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] nibbles) { ++ this.wrapped.setBlockNibbles(nibbles); ++ } ++ ++ @Override ++ public ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] getSkyNibbles() { ++ return this.wrapped.getSkyNibbles(); ++ } ++ ++ @Override ++ public void setSkyNibbles(final ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] nibbles) { ++ this.wrapped.setSkyNibbles(nibbles); ++ } ++ ++ @Override ++ public boolean[] getSkyEmptinessMap() { ++ return this.wrapped.getSkyEmptinessMap(); ++ } ++ ++ @Override ++ public void setSkyEmptinessMap(final boolean[] emptinessMap) { ++ this.wrapped.setSkyEmptinessMap(emptinessMap); ++ } ++ ++ @Override ++ public boolean[] getBlockEmptinessMap() { ++ return this.wrapped.getBlockEmptinessMap(); ++ } ++ ++ @Override ++ public void setBlockEmptinessMap(final boolean[] emptinessMap) { ++ this.wrapped.setBlockEmptinessMap(emptinessMap); ++ } ++ // Paper end - rewrite light engine ++ + public ImposterProtoChunk(LevelChunk wrapped, boolean bl) { + super(wrapped.getPos(), UpgradeData.EMPTY, wrapped.levelHeightAccessor, wrapped.getLevel().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), wrapped.getBlendingData()); + this.wrapped = wrapped; +diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +index 0435c750ec03f65bad3f904070960d56c2ed4832..0a0f6efe5687f35bff31e39746636738c1248533 100644 +--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java ++++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +@@ -100,6 +100,10 @@ public class LevelChunk extends ChunkAccess { + + public LevelChunk(Level world, ChunkPos pos, UpgradeData upgradeData, LevelChunkTicks blockTickScheduler, LevelChunkTicks fluidTickScheduler, long inhabitedTime, @Nullable LevelChunkSection[] sectionArrayInitializer, @Nullable LevelChunk.PostLoadProcessor entityLoader, @Nullable BlendingData blendingData) { + super(pos, upgradeData, world, world.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), inhabitedTime, sectionArrayInitializer, blendingData); ++ // Paper start - rewrite light engine ++ this.setBlockNibbles(ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(world)); ++ this.setSkyNibbles(ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(world)); ++ // Paper end - rewrite light engine + this.tickersInLevel = Maps.newHashMap(); + this.clientLightReady = false; + this.level = (ServerLevel) world; // CraftBukkit - type +@@ -327,6 +331,12 @@ public class LevelChunk extends ChunkAccess { + + public LevelChunk(ServerLevel world, ProtoChunk protoChunk, @Nullable LevelChunk.PostLoadProcessor chunk_c) { + this(world, protoChunk.getPos(), protoChunk.getUpgradeData(), protoChunk.unpackBlockTicks(), protoChunk.unpackFluidTicks(), protoChunk.getInhabitedTime(), protoChunk.getSections(), chunk_c, protoChunk.getBlendingData()); ++ // Paper start - rewrite light engine + this.setBlockNibbles(protoChunk.getBlockNibbles()); + this.setSkyNibbles(protoChunk.getSkyNibbles()); + this.setSkyEmptinessMap(protoChunk.getSkyEmptinessMap()); + this.setBlockEmptinessMap(protoChunk.getBlockEmptinessMap()); -+ // Paper end - copy over protochunk light ++ // Paper end - rewrite light engine Iterator iterator = protoChunk.getBlockEntities().values().iterator(); while (iterator.hasNext()) { -diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -index cdac1f7b30e4c043dcb12ac9e29af926df8170bd..c1c95ac9deb134a0cf5c7763090ac5f3cddf24cc 100644 ---- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -@@ -18,7 +18,7 @@ public class LevelChunkSection { - short nonEmptyBlockCount; // Paper - package-private - private short tickingBlockCount; - private short tickingFluidCount; -- final PalettedContainer states; // Paper - package-private -+ public final PalettedContainer states; // Paper - package-private // Paper - public - - // Paper start - Anti-Xray - Add parameters - @Deprecated public LevelChunkSection(int yOffset) { this(yOffset, null, null, true); } // Notice for updates: Please make sure this constructor isn't used anywhere diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java -index 554474d4b2e57d8a005b3c3b9b23f32a62243058..79fd7a6e8a6eb1f699d03801910d97066677311c 100644 +index dea80ddba894453a0229888adfa235638cc9f659..8005df9339d3dca5bd4ec72e502a9cb516d161a4 100644 --- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java +++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java -@@ -174,7 +174,7 @@ public class PalettedContainer implements PaletteResize { - return this.get(y << 8 | z << 4 | x); // Paper - inline +@@ -127,7 +127,7 @@ public class PalettedContainer implements PaletteResize { + return this.get(this.strategy.getIndex(x, y, z)); } - protected T get(int index) { + public T get(int index) { // Paper - public - T object = this.palette.valueFor(this.storage.get(index)); - return (T)(object == null ? this.defaultValue : object); + PalettedContainer.Data data = this.data; + return data.palette.valueFor(data.storage.get(index)); } diff --git a/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java b/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java -index 7dc3d806a680150c6a2fffa1436fd63bbdc31eb3..e1b32b644bc976ff66258ed706f4d1e8de99420d 100644 +index 568dc3c9cbf009a3892766cacdd00667556e27c5..e7676e86c08affa8e730c13f11d4b269ca896ee8 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java -@@ -1,5 +1,7 @@ - package net.minecraft.world.level.chunk; +@@ -54,6 +54,12 @@ public class ProtoChunk extends ChunkAccess { -+import ca.spottedleaf.starlight.light.SWMRNibbleArray; -+import ca.spottedleaf.starlight.light.StarLightEngine; - import com.google.common.collect.Lists; - import com.google.common.collect.Maps; - import com.google.common.collect.Sets; -@@ -72,6 +74,53 @@ public class ProtoChunk implements ChunkAccess { - // Paper end - private static boolean PRINTED_OUTDATED_CTOR_MSG = false; // Paper - Add level - -+ // Paper start - rewrite light engine -+ protected volatile SWMRNibbleArray[] blockNibbles; -+ protected volatile SWMRNibbleArray[] skyNibbles; -+ protected volatile boolean[] skyEmptinessMap; -+ protected volatile boolean[] blockEmptinessMap; -+ -+ @Override -+ public SWMRNibbleArray[] getBlockNibbles() { -+ return this.blockNibbles; -+ } -+ -+ @Override -+ public void setBlockNibbles(SWMRNibbleArray[] nibbles) { -+ this.blockNibbles = nibbles; -+ } -+ -+ @Override -+ public SWMRNibbleArray[] getSkyNibbles() { -+ return this.skyNibbles; -+ } -+ -+ @Override -+ public void setSkyNibbles(SWMRNibbleArray[] nibbles) { -+ this.skyNibbles = nibbles; -+ } -+ -+ @Override -+ public boolean[] getSkyEmptinessMap() { -+ return this.skyEmptinessMap; -+ } -+ -+ @Override -+ public void setSkyEmptinessMap(boolean[] emptinessMap) { -+ this.skyEmptinessMap = emptinessMap; -+ } -+ -+ @Override -+ public boolean[] getBlockEmptinessMap() { -+ return this.blockEmptinessMap; -+ } -+ -+ @Override -+ public void setBlockEmptinessMap(boolean[] emptinessMap) { -+ this.blockEmptinessMap = emptinessMap; -+ } -+ // Paper end - rewrite light engine -+ - @Deprecated // Paper start - add level - public ProtoChunk(ChunkPos pos, UpgradeData upgradeData, LevelHeightAccessor world) { - // Paper start -@@ -100,6 +149,10 @@ public class ProtoChunk implements ChunkAccess { - } + public ProtoChunk(ChunkPos pos, UpgradeData upgradeData, @Nullable LevelChunkSection[] sections, ProtoChunkTicks blockTickScheduler, ProtoChunkTicks fluidTickScheduler, LevelHeightAccessor world, Registry biomeRegistry, @Nullable BlendingData blendingData) { + super(pos, upgradeData, world, biomeRegistry, 0L, sections, blendingData); ++ // Paper start - rewrite light engine ++ if (!(this instanceof ImposterProtoChunk)) { ++ this.setBlockNibbles(ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(world)); ++ this.setSkyNibbles(ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(world)); ++ } ++ // Paper end - rewrite light engine + this.blockTicks = blockTickScheduler; + this.fluidTicks = fluidTickScheduler; } - public ProtoChunk(ChunkPos pos, UpgradeData upgradeData, @Nullable LevelChunkSection[] levelChunkSections, ProtoTickList blockTickScheduler, ProtoTickList fluidTickScheduler, LevelHeightAccessor world, net.minecraft.server.level.ServerLevel level) { -+ // Paper start -+ this.blockNibbles = StarLightEngine.getFilledEmptyLight(world); -+ this.skyNibbles = StarLightEngine.getFilledEmptyLight(world); -+ // Paper end - this.level = level; - // Paper end - this.chunkPos = pos; -@@ -197,7 +250,7 @@ public class ProtoChunk implements ChunkAccess { - - LevelChunkSection levelChunkSection = this.getOrCreateSection(l); - BlockState blockState = levelChunkSection.setBlockState(i & 15, j & 15, k & 15, state); -- if (this.status.isOrAfter(ChunkStatus.FEATURES) && state != blockState && (state.getLightBlock(this, pos) != blockState.getLightBlock(this, pos) || state.getLightEmission() != blockState.getLightEmission() || state.useShapeForLightOcclusion() || blockState.useShapeForLightOcclusion())) { -+ if (this.status.isOrAfter(ChunkStatus.LIGHT) && state != blockState && (state.getLightBlock(this, pos) != blockState.getLightBlock(this, pos) || state.getLightEmission() != blockState.getLightEmission() || state.useShapeForLightOcclusion() || blockState.useShapeForLightOcclusion())) { // Paper - move block updates to only happen after lighting occurs (or during, thanks chunk system) - this.lightEngine.checkBlock(pos); - } - diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -index 80b9f3547bc30cb470d272132e96fcce188efd91..c81392f5b4a6dcef9c1864c1b2c268914b904561 100644 +index 45930793e7fffe6ce243c7637cb9c0e948c6a83d..e072a895ed71bb2e98a3a0c4aef37418c7c39f41 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -@@ -63,6 +63,14 @@ import org.apache.logging.log4j.Logger; - - public class ChunkSerializer { +@@ -79,6 +79,14 @@ public class ChunkSerializer { + private static final String BLOCK_TICKS_TAG = "block_ticks"; + private static final String FLUID_TICKS_TAG = "fluid_ticks"; + // Paper start - replace light engine impl -+ private static final int STARLIGHT_LIGHT_VERSION = 5; ++ private static final int STARLIGHT_LIGHT_VERSION = 6; + + private static final String BLOCKLIGHT_STATE_TAG = "starlight.blocklight_state"; + private static final String SKYLIGHT_STATE_TAG = "starlight.skylight_state"; + private static final String STARLIGHT_VERSION_TAG = "starlight.light_version"; + // Paper end - replace light engine impl + - private static final Logger LOGGER = LogManager.getLogger(); - public static final String TAG_UPGRADE_DATA = "UpgradeData"; + public ChunkSerializer() {} -@@ -131,13 +139,20 @@ public class ChunkSerializer { - ProtoTickList protochunkticklist1 = new ProtoTickList<>((fluidtype) -> { - return fluidtype == null || fluidtype == Fluids.EMPTY; - }, pos, nbttagcompound1.getList("LiquidsToBeTicked", 9), world); -- boolean flag = nbttagcompound1.getBoolean("isLightOn"); -+ boolean flag = getStatus(nbt).isOrAfter(ChunkStatus.LIGHT) && nbttagcompound1.get("isLightOn") != null && nbttagcompound1.getInt(STARLIGHT_VERSION_TAG) == STARLIGHT_LIGHT_VERSION; // Paper - ListTag nbttaglist = nbttagcompound1.getList("Sections", 10); + // Paper start - guard against serializing mismatching coordinates +@@ -138,13 +146,20 @@ public class ChunkSerializer { + } + + UpgradeData chunkconverter = nbt.contains("UpgradeData", 10) ? new UpgradeData(nbt.getCompound("UpgradeData"), world) : UpgradeData.EMPTY; +- boolean flag = nbt.getBoolean("isLightOn"); ++ boolean flag = getStatus(nbt).isOrAfter(ChunkStatus.LIGHT) && nbt.get("isLightOn") != null && nbt.getInt(STARLIGHT_VERSION_TAG) == STARLIGHT_LIGHT_VERSION; // Paper + ListTag nbttaglist = nbt.getList("sections", 10); int i = world.getSectionsCount(); LevelChunkSection[] achunksection = new LevelChunkSection[i]; boolean flag1 = world.dimensionType().hasSkyLight(); ServerChunkCache chunkproviderserver = world.getChunkSource(); LevelLightEngine lightengine = chunkproviderserver.getLightEngine(); + // Paper start -+ ca.spottedleaf.starlight.light.SWMRNibbleArray[] blockNibbles = ca.spottedleaf.starlight.light.StarLightEngine.getFilledEmptyLight(world); // Paper - replace light impl -+ ca.spottedleaf.starlight.light.SWMRNibbleArray[] skyNibbles = ca.spottedleaf.starlight.light.StarLightEngine.getFilledEmptyLight(world); // Paper - replace light impl ++ ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] blockNibbles = ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(world); // Paper - replace light impl ++ ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] skyNibbles = ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(world); // Paper - replace light impl + final int minSection = io.papermc.paper.util.WorldUtil.getMinLightSection(world); + final int maxSection = io.papermc.paper.util.WorldUtil.getMaxLightSection(world); + boolean canReadSky = world.dimensionType().hasSkyLight(); @@ -4631,22 +5046,22 @@ index 80b9f3547bc30cb470d272132e96fcce188efd91..c81392f5b4a6dcef9c1864c1b2c26891 if (flag) { tasksToExecuteOnMain.add(() -> { // Paper - delay this task since we're executing off-main -@@ -146,7 +161,7 @@ public class ChunkSerializer { - } +@@ -158,7 +173,7 @@ public class ChunkSerializer { + DataResult dataresult; for (int j = 0; j < nbttaglist.size(); ++j) { -- CompoundTag nbttagcompound2 = nbttaglist.getCompound(j); -+ CompoundTag nbttagcompound2 = nbttaglist.getCompound(j); CompoundTag sectionData = nbttagcompound2; // Paper - byte b0 = nbttagcompound2.getByte("Y"); +- CompoundTag nbttagcompound1 = nbttaglist.getCompound(j); ++ CompoundTag nbttagcompound1 = nbttaglist.getCompound(j); CompoundTag sectionData = nbttagcompound1; // Paper + byte b0 = nbttagcompound1.getByte("Y"); + int k = world.getSectionIndexFromSectionY(b0); - if (nbttagcompound2.contains("Palette", 9) && nbttagcompound2.contains("BlockStates", 12)) { -@@ -164,23 +179,29 @@ public class ChunkSerializer { +@@ -199,23 +214,29 @@ public class ChunkSerializer { } if (flag) { -- if (nbttagcompound2.contains("BlockLight", 7)) { +- if (nbttagcompound1.contains("BlockLight", 7)) { - // Paper start - delay this task since we're executing off-main -- DataLayer blockLight = new DataLayer(nbttagcompound2.getByteArray("BlockLight")); +- DataLayer blockLight = new DataLayer(nbttagcompound1.getByteArray("BlockLight")); - tasksToExecuteOnMain.add(() -> { - lightengine.queueSectionData(LightLayer.BLOCK, SectionPos.of(chunkcoordintpair1, b0), blockLight, true); - }); @@ -4656,18 +5071,18 @@ index 80b9f3547bc30cb470d272132e96fcce188efd91..c81392f5b4a6dcef9c1864c1b2c26891 + + if (sectionData.contains("BlockLight", 7)) { + // this is where our diff is -+ blockNibbles[y - minSection] = new ca.spottedleaf.starlight.light.SWMRNibbleArray(sectionData.getByteArray("BlockLight").clone(), sectionData.getInt(BLOCKLIGHT_STATE_TAG)); // clone for data safety ++ blockNibbles[y - minSection] = new ca.spottedleaf.starlight.common.light.SWMRNibbleArray(sectionData.getByteArray("BlockLight").clone(), sectionData.getInt(BLOCKLIGHT_STATE_TAG)); // clone for data safety + } else { -+ blockNibbles[y - minSection] = new ca.spottedleaf.starlight.light.SWMRNibbleArray(null, sectionData.getInt(BLOCKLIGHT_STATE_TAG)); ++ blockNibbles[y - minSection] = new ca.spottedleaf.starlight.common.light.SWMRNibbleArray(null, sectionData.getInt(BLOCKLIGHT_STATE_TAG)); } -- if (flag1 && nbttagcompound2.contains("SkyLight", 7)) { +- if (flag1 && nbttagcompound1.contains("SkyLight", 7)) { - // Paper start - delay this task since we're executing off-main -- DataLayer skyLight = new DataLayer(nbttagcompound2.getByteArray("SkyLight")); +- DataLayer skyLight = new DataLayer(nbttagcompound1.getByteArray("SkyLight")); - tasksToExecuteOnMain.add(() -> { - lightengine.queueSectionData(LightLayer.SKY, SectionPos.of(chunkcoordintpair1, b0), skyLight, true); - }); -- // Paper end - delay this task since we're executing off-main +- // Paper end - delay this task since we're executing off-mai + if (canReadSky) { + if (sectionData.contains("SkyLight", 7)) { + // we store under the same key so mod programs editing nbt @@ -4675,29 +5090,34 @@ index 80b9f3547bc30cb470d272132e96fcce188efd91..c81392f5b4a6dcef9c1864c1b2c26891 + // however, for compatibility we store chunks as unlit so vanilla + // is forced to re-light them if it encounters our data. It's too much of a burden + // to try and maintain compatibility with a broken and inferior skylight management system. -+ skyNibbles[y - minSection] = new ca.spottedleaf.starlight.light.SWMRNibbleArray(sectionData.getByteArray("SkyLight").clone(), sectionData.getInt(SKYLIGHT_STATE_TAG)); // clone for data safety ++ skyNibbles[y - minSection] = new ca.spottedleaf.starlight.common.light.SWMRNibbleArray(sectionData.getByteArray("SkyLight").clone(), sectionData.getInt(SKYLIGHT_STATE_TAG)); // clone for data safety + } else { -+ skyNibbles[y - minSection] = new ca.spottedleaf.starlight.light.SWMRNibbleArray(null, sectionData.getInt(SKYLIGHT_STATE_TAG)); ++ skyNibbles[y - minSection] = new ca.spottedleaf.starlight.common.light.SWMRNibbleArray(null, sectionData.getInt(SKYLIGHT_STATE_TAG)); + } } + // Paper end - rewrite light engine } } -@@ -224,8 +245,12 @@ public class ChunkSerializer { - object = new LevelChunk(world.getLevel(), pos, biomestorage, chunkconverter, (TickList) object1, (TickList) object2, k, achunksection, // Paper start - fix massive nbt memory leak due to lambda. move lambda into a container method to not leak scope. Only clone needed NBT keys. - createLoadEntitiesConsumer(new SafeNBTCopy(nbttagcompound1, "TileEntities", "Entities", "ChunkBukkitValues")) // Paper - move CB Chunk PDC into here - );// Paper end +@@ -244,6 +265,8 @@ public class ChunkSerializer { + }, chunkPos); + + object = new LevelChunk(world.getLevel(), chunkPos, chunkconverter, levelchunkticks, levelchunkticks1, l, achunksection, ChunkSerializer.postLoadChunk(world, nbt), blendingdata); + ((LevelChunk)object).setBlockNibbles(blockNibbles); // Paper - replace light impl + ((LevelChunk)object).setSkyNibbles(skyNibbles); // Paper - replace light impl } else { - ProtoChunk protochunk = new ProtoChunk(pos, chunkconverter, achunksection, protochunkticklist, protochunkticklist1, world, world); // Paper - add level + ProtoChunkTicks protochunkticklist = ProtoChunkTicks.load(nbt.getList("block_ticks", 10), (s) -> { + return Registry.BLOCK.getOptional(ResourceLocation.tryParse(s)); +@@ -252,6 +275,8 @@ public class ChunkSerializer { + return Registry.FLUID.getOptional(ResourceLocation.tryParse(s)); + }, chunkPos); + ProtoChunk protochunk = new ProtoChunk(chunkPos, chunkconverter, achunksection, protochunkticklist, protochunkticklist1, world, iregistry, blendingdata); + protochunk.setBlockNibbles(blockNibbles); // Paper - replace light impl + protochunk.setSkyNibbles(skyNibbles); // Paper - replace light impl - protochunk.setBiomes(biomestorage); object = protochunk; -@@ -406,7 +431,7 @@ public class ChunkSerializer { + protochunk.setInhabitedTime(l); +@@ -390,7 +415,7 @@ public class ChunkSerializer { DataLayer[] blockLight = new DataLayer[lightenginethreaded.getMaxLightSection() - lightenginethreaded.getMinLightSection()]; DataLayer[] skyLight = new DataLayer[lightenginethreaded.getMaxLightSection() - lightenginethreaded.getMinLightSection()]; @@ -4706,23 +5126,23 @@ index 80b9f3547bc30cb470d272132e96fcce188efd91..c81392f5b4a6dcef9c1864c1b2c26891 DataLayer blockArray = lightenginethreaded.getLayerListener(LightLayer.BLOCK).getDataLayerData(SectionPos.of(chunkPos, i)); DataLayer skyArray = lightenginethreaded.getLayerListener(LightLayer.SKY).getDataLayerData(SectionPos.of(chunkPos, i)); -@@ -455,6 +480,12 @@ public class ChunkSerializer { - return saveChunk(world, chunk, null); +@@ -442,6 +467,12 @@ public class ChunkSerializer { } - public static CompoundTag saveChunk(ServerLevel world, ChunkAccess chunk, AsyncSaveData asyncsavedata) { + public static CompoundTag saveChunk(ServerLevel world, ChunkAccess chunk, @org.checkerframework.checker.nullness.qual.Nullable AsyncSaveData asyncsavedata) { + // Paper end + // Paper start - rewrite light impl + final int minSection = io.papermc.paper.util.WorldUtil.getMinLightSection(world); + final int maxSection = io.papermc.paper.util.WorldUtil.getMaxLightSection(world); -+ ca.spottedleaf.starlight.light.SWMRNibbleArray[] blockNibbles = chunk.getBlockNibbles(); -+ ca.spottedleaf.starlight.light.SWMRNibbleArray[] skyNibbles = chunk.getSkyNibbles(); ++ ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] blockNibbles = chunk.getBlockNibbles(); ++ ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] skyNibbles = chunk.getSkyNibbles(); + // Paper end - rewrite light impl - // Paper end ChunkPos chunkcoordintpair = chunk.getPos(); CompoundTag nbttagcompound = new CompoundTag(); -@@ -483,32 +514,33 @@ public class ChunkSerializer { - LevelChunkSection chunksection = (LevelChunkSection) Arrays.stream(achunksection).filter((chunksection1) -> { - return chunksection1 != null && SectionPos.blockToSectionCoord(chunksection1.bottomBlockY()) == finalI; // CraftBukkit - decompile errors - }).findFirst().orElse(LevelChunk.EMPTY_SECTION); + +@@ -492,20 +523,14 @@ public class ChunkSerializer { + for (int i = lightenginethreaded.getMinLightSection(); i < lightenginethreaded.getMaxLightSection(); ++i) { + int j = chunk.getSectionIndexFromSectionY(i); + boolean flag1 = j >= 0 && j < achunksection.length; - // Paper start - async chunk save for unload - DataLayer nibblearray; // block light - DataLayer nibblearray1; // sky light @@ -4734,23 +5154,32 @@ index 80b9f3547bc30cb470d272132e96fcce188efd91..c81392f5b4a6dcef9c1864c1b2c26891 - nibblearray1 = asyncsavedata.skyLight[i - lightenginethreaded.getMinLightSection()]; - } - // Paper end -- if (chunksection != LevelChunk.EMPTY_SECTION || nibblearray != null || nibblearray1 != null) { -- CompoundTag nbttagcompound2 = new CompoundTag(); -+ // Paper start - replace light engine -+ ca.spottedleaf.starlight.light.SWMRNibbleArray.SaveState blockNibble = blockNibbles[i - minSection].getSaveState(); -+ ca.spottedleaf.starlight.light.SWMRNibbleArray.SaveState skyNibble = skyNibbles[i - minSection].getSaveState(); -+ if (chunksection != LevelChunk.EMPTY_SECTION || blockNibble != null || skyNibble != null) { -+ // Paper end - replace light engine -+ CompoundTag nbttagcompound2 = new CompoundTag(); CompoundTag section = nbttagcompound2; // Paper ++ // Paper - replace light engine - nbttagcompound2.putByte("Y", (byte) (i & 255)); - if (chunksection != LevelChunk.EMPTY_SECTION) { - chunksection.getStates().write(nbttagcompound2, "Palette", "BlockStates"); +- if (flag1 || nibblearray != null || nibblearray1 != null) { +- CompoundTag nbttagcompound1 = new CompoundTag(); ++ // Paper start - replace light engine ++ ca.spottedleaf.starlight.common.light.SWMRNibbleArray.SaveState blockNibble = blockNibbles[i - minSection].getSaveState(); ++ ca.spottedleaf.starlight.common.light.SWMRNibbleArray.SaveState skyNibble = skyNibbles[i - minSection].getSaveState(); ++ if (flag1 || blockNibble != null || skyNibble != null) { ++ // Paper end - replace light engine ++ CompoundTag nbttagcompound1 = new CompoundTag(); CompoundTag section = nbttagcompound1; // Paper + + if (flag1) { + LevelChunkSection chunksection = achunksection[j]; +@@ -520,13 +545,27 @@ public class ChunkSerializer { + nbttagcompound1.put("biomes", (Tag) dataresult1.getOrThrow(false, logger1::error)); } - if (nibblearray != null && !nibblearray.isEmpty()) { -- nbttagcompound2.putByteArray("BlockLight", nibblearray.asBytesPoolSafe().clone()); // Paper -+ // Paper start - replace light engine +- nbttagcompound1.putByteArray("BlockLight", nibblearray.getData()); ++ // Paper start ++ // we store under the same key so mod programs editing nbt ++ // can still read the data, hopefully. ++ // however, for compatibility we store chunks as unlit so vanilla ++ // is forced to re-light them if it encounters our data. It's too much of a burden ++ // to try and maintain compatibility with a broken and inferior skylight management system. ++ + if (blockNibble != null) { + if (blockNibble.data != null) { + section.putByteArray("BlockLight", blockNibble.data); @@ -4759,24 +5188,24 @@ index 80b9f3547bc30cb470d272132e96fcce188efd91..c81392f5b4a6dcef9c1864c1b2c26891 } - if (nibblearray1 != null && !nibblearray1.isEmpty()) { -- nbttagcompound2.putByteArray("SkyLight", nibblearray1.asBytesPoolSafe().clone()); // Paper +- nbttagcompound1.putByteArray("SkyLight", nibblearray1.getData()); + if (skyNibble != null) { + if (skyNibble.data != null) { + section.putByteArray("SkyLight", skyNibble.data); + } + section.putInt(SKYLIGHT_STATE_TAG, skyNibble.state); } -+ // Paper end - replace light engine ++ // Paper end - nbttaglist.add(nbttagcompound2); - } -@@ -516,7 +548,8 @@ public class ChunkSerializer { + if (!nbttagcompound1.isEmpty()) { + nbttagcompound1.putByte("Y", (byte) i); +@@ -537,7 +576,8 @@ public class ChunkSerializer { - nbttagcompound1.put("Sections", nbttaglist); + nbttagcompound.put("sections", nbttaglist); if (flag) { -- nbttagcompound1.putBoolean("isLightOn", true); -+ nbttagcompound1.putInt(STARLIGHT_VERSION_TAG, STARLIGHT_LIGHT_VERSION); // Paper -+ nbttagcompound1.putBoolean("isLightOn", false); // Paper - set to false but still store, this allows us to detect --eraseCache (as eraseCache _removes_) +- nbttagcompound.putBoolean("isLightOn", true); ++ nbttagcompound.putInt(STARLIGHT_VERSION_TAG, STARLIGHT_LIGHT_VERSION); // Paper ++ nbttagcompound.putBoolean("isLightOn", false); // Paper - set to false but still store, this allows us to detect --eraseCache (as eraseCache _removes_) } - ChunkBiomeContainer biomestorage = chunk.getBiomes(); + // Paper start