From 852ce7359080b9313752e70261438cfe0a575c07 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Tue, 15 Jun 2021 23:25:38 -0700 Subject: [PATCH] more patches added back --- ...647-Entity-load-save-limit-per-chunk.patch | 2 +- ...Remove-unused-World-Tile-Entity-List.patch | 0 ...-being-ticked-when-notifying-navigat.patch | 0 ...mit-lightning-strike-effect-distance.patch | 0 ...334-Allow-Saving-of-Oversized-Chunks.patch | 76 ++---- ...35-Fix-World-isChunkGenerated-calls.patch} | 27 +- ...te-location-if-we-failed-to-read-it.patch} | 0 ...l-Spawned-mobs-towards-natural-spaw.patch} | 0 ...urable-projectile-relative-velocity.patch} | 0 ...h => 0339-offset-item-frame-ticking.patch} | 0 ...f-we-have-a-custom-Bukkit-generator.patch} | 0 ...-158900.patch => 0341-Fix-MC-158900.patch} | 0 ...event-consuming-the-wrong-itemstack.patch} | 0 ...gs.patch => 0343-Generator-Settings.patch} | 0 ...-161754.patch => 0344-Fix-MC-161754.patch} | 0 ...anging-entities-that-are-not-ItemFr.patch} | 0 ...46-Expose-the-internal-current-tick.patch} | 0 ...sneak-when-changing-worlds-MC-10657.patch} | 0 ...-option-to-disable-pillager-patrols.patch} | 0 ...r-when-player-hand-set-to-empty-typ.patch} | 0 ...k-loads-when-villagers-try-to-find-.patch} | 0 ...656-Fix-Follow-Range-Initial-Target.patch} | 0 .../0352-Duplicate-UUID-Resolve-Option.patch | 175 ++++++------- ...pers.patch => 0353-Optimize-Hoppers.patch} | 4 +- ...ayerDeathEvent-shouldDropExperience.patch} | 0 ...ading-chunks-checking-hive-position.patch} | 0 ...hunks-from-Hoppers-and-other-things.patch} | 0 ...ializing-mismatching-chunk-coordina.patch} | 0 ...imise-IEntityAccess-getPlayerByUUID.patch} | 0 ...359-Fix-items-not-falling-correctly.patch} | 0 ...patch => 0360-Lag-compensate-eating.patch} | 0 ...ize-call-to-getFluid-for-explosions.patch} | 0 ...-in-stack-not-having-effects-when-d.patch} | 0 ...Add-effect-to-block-break-naturally.patch} | 0 ...=> 0364-Entity-Activation-Range-2.0.patch} | 0 ...h => 0365-Increase-Light-Queue-Size.patch} | 4 +- ...and.patch => 0366-Fix-Light-Command.patch} | 6 +- ...5-Anti-Xray.patch => 0367-Anti-Xray.patch} | 8 +- ...o-Tick-view-distance-implementation.patch} | 39 +-- ...ement-alternative-item-despawn-rate.patch} | 4 +- ...=> 0370-Tracking-Range-Improvements.patch} | 4 +- ...-items-vanishing-through-end-portal.patch} | 0 ...ment-optional-per-player-mob-spawns.patch} | 12 +- ...pper-searches-if-there-are-no-items.patch} | 0 ...et-gravity-in-void.-Fixes-MC-167279.patch} | 0 ...-getChunkAt-calls-for-loaded-chunks.patch} | 0 ...0376-Add-debug-for-sync-chunk-loads.patch} | 0 ...w-overriding-the-java-version-check.patch} | 0 ...tch => 0378-Add-ThrownEggHatchEvent.patch} | 0 ... 0379-Optimise-random-block-ticking.patch} | 0 ...p-API.patch => 0380-Entity-Jump-API.patch} | 0 ...-to-nerf-pigmen-from-nether-portals.patch} | 4 +- ... => 0382-Make-the-GUI-graph-fancier.patch} | 0 ...83-add-hand-to-BlockMultiPlaceEvent.patch} | 0 ...4-Prevent-teleporting-dead-entities.patch} | 0 ...ipwire-hook-placement-before-update.patch} | 0 ...o-allow-iron-golems-to-spawn-in-air.patch} | 2 +- ...chance-of-villager-zombie-infection.patch} | 4 +- ...tch => 0388-Optimise-Chunk-getFluid.patch} | 0 ...mise-TickListServer-by-rewriting-it.patch} | 0 ...pawn-settings-and-per-player-option.patch} | 4 +- ...nections-shouldn-t-hold-up-shutdown.patch} | 0 ...ow-bees-to-load-chunks-for-beehives.patch} | 0 ...PlayerChunkMap-adds-crashing-server.patch} | 4 +- ...timize-Collision-to-not-load-chunks.patch} | 0 ...tch => 0395-Don-t-tick-dead-players.patch} | 0 ...-Player-s-shouldn-t-be-able-to-move.patch} | 0 ...unkMap-memory-use-for-visibleChunks.patch} | 16 +- ...sks-Speed-up-processing-of-chunk-lo.patch} | 0 ...ove-existing-players-to-world-spawn.patch} | 0 ...Add-tick-times-API-and-mspt-command.patch} | 0 ...01-Expose-MinecraftServer-isRunning.patch} | 0 ...dd-Raw-Byte-ItemStack-Serialization.patch} | 0 ...3-Remove-streams-from-Mob-AI-System.patch} | 0 ... => 0404-Async-command-map-building.patch} | 0 ...h => 0405-Improved-Watchdog-Support.patch} | 4 +- ....patch => 0406-Optimize-Pathfinding.patch} | 0 ...7-Reduce-Either-Optional-allocation.patch} | 0 ...408-Remove-streams-from-PairedQueue.patch} | 0 ...-memory-footprint-of-NBTTagCompound.patch} | 0 ...ent-opening-inventories-when-frozen.patch} | 0 ...11-Optimise-ArraySetSorted-removeIf.patch} | 0 ...entity-collision-code-if-not-needed.patch} | 0 ...teleport-command-to-valid-locations.patch} | 0 ...Implement-Player-Client-Options-API.patch} | 0 ...Chunk-Post-Processing-deadlock-risk.patch} | 6 +- ...ayer-is-attempted-to-be-removed-fro.patch} | 0 ...7-Broadcast-join-message-to-console.patch} | 0 ...-Broken-behavior-of-PlayerJoinEvent.patch} | 4 +- ...oad-Chunks-for-Login-Asynchronously.patch} | 0 ...awn-point-if-spawn-in-unloaded-worl.patch} | 0 ...layerAttackEntityCooldownResetEvent.patch} | 0 ...llbacks-to-schedule-for-Callback-Ex.patch} | 4 +- ...-fire-BlockFade-on-worldgen-threads.patch} | 0 ...tom-creative-and-insomniac-controls.patch} | 4 +- ...-duplication-issues-and-teleport-is.patch} | 0 ...0426-Implement-Brigadier-Mojang-API.patch} | 0 ...patch => 0427-Villager-Restocks-API.patch} | 0 ...ickItem-Packet-and-kick-for-invalid.patch} | 0 ...n.patch => 0429-Expose-game-version.patch} | 0 ...> 0430-Optimize-Voxel-Shape-Merging.patch} | 0 ...per-thread-native-byte-buffer-cache.patch} | 0 ...atch => 0432-Implement-Mob-Goal-API.patch} | 0 ...ance-map-to-optimise-entity-tracker.patch} | 24 +- ...isOutsideRange-to-use-distance-maps.patch} | 18 +- ...=> 0435-Add-villager-reputation-API.patch} | 0 ...maximum-exp-value-when-merging-orbs.patch} | 2 +- ...tch => 0437-ExperienceOrbMergeEvent.patch} | 0 ...-Fix-PotionEffect-ignores-icon-flag.patch} | 0 ...brigadier-child-sorting-performance.patch} | 0 ...API.patch => 0440-Potential-bed-API.patch} | 0 ...ait-for-Async-Tasks-during-shutdown.patch} | 0 ...er-respects-game-and-entity-rules-f.patch} | 0 ...nd-End-Portal-Frames-from-being-des.patch} | 0 ...leInt-allocations-from-light-engine.patch} | 0 ...location-of-Vec3D-by-entity-tracker.patch} | 4 +- ...> 0446-Ensure-safe-gateway-teleport.patch} | 0 ...-for-console-having-all-permissions.patch} | 0 ...n-Full-Status-Chunk-NBT-Memory-Leak.patch} | 0 ...packets-to-nearby-locations-sounds-.patch} | 0 ...x-villager-trading-demand-MC-163962.patch} | 0 ... => 0451-Maps-shouldn-t-load-chunks.patch} | 0 ...okup-for-Treasure-Maps-Fixes-lag-fr.patch} | 0 ...nk-Unloads-based-on-Player-Movement.patch} | 4 +- ...Optimize-Bit-Operations-by-inlining.patch} | 0 ...ch => 0455-incremental-chunk-saving.patch} | 14 +- ...Plugin-Tickets-to-API-Chunk-Methods.patch} | 0 ...sing-chunks-due-to-integer-overflow.patch} | 0 ...r-runTaskTimerAsynchronously-Plugin.patch} | 0 ...ton-physics-inconsistency-MC-188840.patch} | 0 ...uping.patch => 0460-Fix-sand-duping.patch} | 0 ...desync-in-playerconnection-causing-.patch} | 0 ...older-method-without-block-snapshot.patch} | 0 ...h => 0463-Expose-Arrow-getItemStack.patch} | 0 ...mplement-PlayerRecipeBookClickEvent.patch} | 0 ...-Hide-sync-chunk-writes-behind-flag.patch} | 0 ...6-Add-permission-for-command-blocks.patch} | 0 ...ure-Entity-AABB-s-are-never-invalid.patch} | 0 ...orldBorder-collision-checks-and-air.patch} | 0 ...d-Difficulty-Remembering-Difficulty.patch} | 0 ...atch => 0470-Paper-dumpitem-command.patch} | 0 ...71-Don-t-allow-null-UUID-s-for-chat.patch} | 0 ...Legacy-Component-serialization-size.patch} | 0 ...e-operations-for-updating-light-dat.patch} | 0 ...474-Support-old-UUID-format-for-NBT.patch} | 0 ...p-duplicated-GameProfile-Properties.patch} | 0 ...vert-legacy-attributes-in-Item-Meta.patch} | 0 ...-Priority-Urgency-System-for-Chunks.patch} | 24 +- ...Remove-some-streams-from-structures.patch} | 0 ...rom-classes-related-villager-gossip.patch} | 0 ...e-NibbleArray-to-use-pooled-buffers.patch} | 247 +++++++----------- ...0481-Support-components-in-ItemMeta.patch} | 0 ...rgetLivingEntityEvent-for-1.16-mobs.patch} | 0 ...patch => 0483-Add-entity-liquid-API.patch} | 0 ...date-itemstack-legacy-name-and-lore.patch} | 0 ...wn-player-in-correct-world-on-login.patch} | 0 ...atch => 0486-Add-PrepareResultEvent.patch} | 0 ...low-delegation-to-vanilla-chunk-gen.patch} | 0 ...-for-portal-on-world-gen-entity-add.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 => 0494-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 ...h => 0500-Incremental-player-saving.patch} | 0 ...Fix-MC-187716-Use-configured-height.patch} | 0 ...stake-in-CB-NBT-int-deserialization.patch} | 0 ...rver-load-chunks-from-newer-version.patch} | 2 +- ...support.patch => 0504-Brand-support.patch} | 0 ...patch => 0505-Add-setMaxPlayers-API.patch} | 0 ...PickupItemAnimation-to-LivingEntity.patch} | 0 ...h => 0507-Don-t-require-FACING-data.patch} | 0 ...eEvent-not-firing-for-all-use-cases.patch} | 0 ...PI.patch => 0509-Add-moon-phase-API.patch} | 0 ...headless-pistons-from-being-created.patch} | 0 ...ent.patch => 0511-Add-BellRingEvent.patch} | 0 ...dd-zombie-targets-turtle-egg-config.patch} | 2 +- ...patch => 0513-Buffer-joins-to-world.patch} | 0 ...=> 0514-Optimize-redstone-algorithm.patch} | 2 +- ...s-not-working-in-some-kick-messages.patch} | 0 ...reateEvent-needs-to-know-its-entity.patch} | 0 ...ch => 0517-Fix-CraftTeam-null-check.patch} | 0 ...I.patch => 0518-Add-more-Evoker-API.patch} | 0 ...translation-keys-for-blocks-entitie.patch} | 0 ...te-HoverEvent-from-ItemStack-Entity.patch} | 0 ...ch => 0521-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} | 0 ...-Counter-to-allow-plugins-to-use-va.patch} | 0 ...track-plugin-scoreboards-by-default.patch} | 0 ...king.patch => 0529-Entity-isTicking.patch} | 0 ...non-whitelisted-player-when-white-l.patch} | 0 ...g-a-passenger-in-CreatureSpawnEvent.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 => 0535-Optimise-getType-calls.patch} | 0 ....patch => 0536-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 => 0541-Player-elytra-boost-API.patch} | 0 ...42-Fixed-TileEntityBell-memory-leak.patch} | 0 ...ing-up-when-item-stack-is-empty-in-.patch} | 0 ...Add-getOfflinePlayerIfCached-String.patch} | 0 ...ch => 0545-Add-ignore-discounts-API.patch} | 0 ...Toggle-for-removing-existing-dragon.patch} | 2 +- ...x-client-lag-on-advancement-loading.patch} | 0 ...> 0548-Item-no-age-no-player-pickup.patch} | 0 ...er-Remove-Streams-Optimized-collect.patch} | 0 ...550-Beacon-API-custom-effect-ranges.patch} | 0 ...tch => 0551-Add-API-for-quit-reason.patch} | 0 ...h => 0552-Seed-based-feature-search.patch} | 2 +- ...ng-Trader-spawn-rate-config-options.patch} | 2 +- ...rove-performance-of-the-end-generat.patch} | 0 ...ch => 0555-Expose-world-spawn-angle.patch} | 0 ...patch => 0556-Add-Destroy-Speed-API.patch} | 0 ...-spawnParticle-x-y-z-precision-loss.patch} | 0 ...58-Add-LivingEntity-clearActiveItem.patch} | 0 ...=> 0559-Add-PlayerItemCooldownEvent.patch} | 0 ...PI.patch => 0560-More-lightning-API.patch} | 0 ...should-not-bypass-cramming-gamerule.patch} | 2 +- ...-missing-default-perms-for-commands.patch} | 0 ...h => 0563-Add-PlayerShearBlockEvent.patch} | 0 ...rbose-world-setting-to-false-by-def.patch} | 0 ...ng-zombie-villager-discount-exploit.patch} | 2 +- ....patch => 0566-Limit-recipe-packets.patch} | 0 ...-CraftSound-backwards-compatibility.patch} | 0 ... 0568-MC-4-Fix-item-position-desync.patch} | 0 ...569-Player-Chunk-Load-Unload-Events.patch} | 0 ...0-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 ...atch => 0574-added-PlayerTradeEvent.patch} | 0 ...ch => 0575-Implement-TargetHitEvent.patch} | 0 ...576-Additional-Block-Material-API-s.patch} | 0 ...tch => 0577-Fix-harming-potion-dupe.patch} | 0 ...get-Material-from-Boats-and-Minecar.patch} | 0 ....patch => 0579-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 => 0584-Zombie-API-breaking-doors.patch} | 0 ...585-Fix-nerfed-slime-when-splitting.patch} | 0 ...=> 0586-Add-EntityLoadCrossbowEvent.patch} | 0 ...ch => 0587-Guardian-beam-workaround.patch} | 0 ...0588-Added-WorldGameRuleChangeEvent.patch} | 0 ...-Added-ServerResourcesReloadedEvent.patch} | 0 ...d-settings-for-mobs-picking-up-loot.patch} | 2 +- ...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 => 0597-Remove-stale-POIs.patch} | 0 ...h => 0598-Fix-villager-boat-exploit.patch} | 0 ...I.patch => 0599-Add-sendOpLevel-API.patch} | 0 ...ch => 0600-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 ...604-Make-schedule-command-per-world.patch} | 0 ...605-Configurable-max-leash-distance.patch} | 2 +- ...606-Implement-BlockPreDispenseEvent.patch} | 0 ...h => 0607-Added-Vanilla-Entity-Tags.patch} | 0 ...-API.patch => 0608-added-Wither-API.patch} | 0 ...ng-of-PlayerChangeBeaconEffectEvent.patch} | 0 ...-spam-when-removing-chests-in-water.patch} | 0 ...e-for-always-placing-the-dragon-egg.patch} | 4 +- ...-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 => 0616-add-DragonEggFormEvent.patch} | 0 ...Event.patch => 0617-EntityMoveEvent.patch} | 0 ...isable-pathfinding-updates-on-block.patch} | 4 +- ... 0619-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 ....patch => 0625-misc-debugging-dumps.patch} | 0 ...port-for-hex-color-codes-in-console.patch} | 0 ...atch => 0627-Expose-Tracked-Players.patch} | 0 ...8-Remove-streams-from-SensorNearest.patch} | 0 ...ix-Wither-hostility-towards-players.patch} | 4 +- ...er-exception-on-empty-JsonList-file.patch} | 0 ...GUI.patch => 0631-Improve-ServerGUI.patch} | 0 ...ure-plate-EntityInteractEvent-for-i.patch} | 0 ...633-fix-converting-txt-to-json-file.patch} | 0 ...atch => 0634-Add-worldborder-events.patch} | 0 ...=> 0635-added-PlayerNameEntityEvent.patch} | 0 ...grindstones-from-overstacking-items.patch} | 0 ...h => 0637-Add-recipe-to-cook-events.patch} | 0 ...patch => 0638-Add-Block-isValidTool.patch} | 0 ...using-signs-inside-spawn-protection.patch} | 4 +- ...ch => 0640-Implement-Keyed-on-World.patch} | 0 ...ternative-constructor-for-Rotations.patch} | 0 ...y-API.patch => 0642-Item-Rarity-API.patch} | 0 ...imer-for-Wandering-Traders-spawned-.patch} | 0 ...py-TESign-isEditable-from-snapshots.patch} | 0 ...d-item-when-player-has-disconnected.patch} | 0 ...elist-use-configurable-kick-message.patch} | 0 ...gnore-result-of-PlayerEditBookEvent.patch} | 0 ...block-falling-causing-client-desync.patch} | 0 ...tch => 0649-Expose-protocol-version.patch} | 0 ...nt-suggestion-tooltips-in-AsyncTabC.patch} | 0 ...ab-completions-for-brigadier-comman.patch} | 0 ...temConsumeEvent-cancelling-properly.patch} | 0 ...patch => 0653-Add-bypass-host-check.patch} | 0 ...0654-Set-area-affect-cloud-rotation.patch} | 0 ...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 ... => 0662-Added-PlayerDeepSleepEvent.patch} | 0 ...ld-API.patch => 0663-More-World-API.patch} | 0 ... 0664-Added-PlayerBedFailEnterEvent.patch} | 0 ...-to-convert-between-Component-and-B.patch} | 0 ...n-acting-as-a-bed-respawn-from-the-.patch} | 0 ...acon-activation-deactivation-events.patch} | 0 ...-RespawnFlags-to-PlayerRespawnEvent.patch} | 0 ...dd-Channel-initialization-listeners.patch} | 0 ...mands-if-tab-completion-is-disabled.patch} | 0 ...> 0671-Add-more-WanderingTrader-API.patch} | 0 ...dd-EntityBlockStorage-clearEntities.patch} | 0 ...ssage-to-PlayerAdvancementDoneEvent.patch} | 0 ...address-to-AsyncPlayerPreLoginEvent.patch} | 0 ...close.patch => 0675-Inventory-close.patch} | 0 ...reateEvent-players-and-end-platform.patch} | 0 ...-in-sunlight-API-for-Phantoms-and-S.patch} | 0 ...=> 0678-Fix-CraftPotionBrewer-cache.patch} | 0 ...atch => 0679-Add-basic-Datapack-API.patch} | 0 ...ment-variable-to-disable-server-gui.patch} | 0 ...itions-to-PlayerGameModeChangeEvent.patch} | 0 ...fo.patch => 0682-Clear-SyncLoadInfo.patch} | 0 ... => 0683-ItemStack-repair-check-API.patch} | 0 ....patch => 0684-More-Enchantment-API.patch} | 0 ...option-to-load-extra-plugin-jars-no.patch} | 0 ...-and-optimise-world-force-upgrading.patch} | 4 +- ...PI.patch => 0687-Add-Mob-lookAt-API.patch} | 0 ...0688-Add-Unix-domain-socket-support.patch} | 0 ... => 0689-Add-EntityInsideBlockEvent.patch} | 0 ...90-Attributes-API-for-item-defaults.patch} | 0 ...hantCustom-emit-PlayerPurchaseEvent.patch} | 0 ...ause-to-Weather-ThunderChangeEvents.patch} | 0 ...patch => 0693-More-Lidded-Block-API.patch} | 0 ...94-Limit-item-frame-cursors-on-maps.patch} | 4 +- ...0695-Add-PufferFishStateChangeEvent.patch} | 0 ... => 0696-Add-PlayerKickEvent-causes.patch} | 0 ...erBucketEmptyEvent-result-itemstack.patch} | 0 ...tedContainer-instead-of-ReentrantLo.patch} | 0 ...-to-fix-items-merging-through-walls.patch} | 4 +- ...h => 0700-Add-BellRevealRaiderEvent.patch} | 0 ... 0701-Fix-invulnerable-end-crystals.patch} | 4 +- ...02-Add-ElderGuardianAppearanceEvent.patch} | 0 ...inventory-on-cancelled-pickup-event.patch} | 0 ...0704-Fix-dangerous-end-portal-logic.patch} | 0 ...-Biome-Mob-Lookups-for-Mob-Spawning.patch} | 0 ...-Make-item-validations-configurable.patch} | 0 ...0707-Add-more-line-of-sight-methods.patch} | 0 ... => 0708-add-per-world-spawn-limits.patch} | 4 +- ...plashEvent-for-water-splash-potions.patch} | 0 ...tus-dataconverter-for-pre-1.13-chun.patch} | 0 381 files changed, 353 insertions(+), 463 deletions(-) rename patches/removed/1.17/{ => No longer needed}/0087-Remove-unused-World-Tile-Entity-List.patch (100%) rename patches/removed/1.17/{ => No longer needed}/0367-Mark-entities-as-being-ticked-when-notifying-navigat.patch (100%) rename patches/removed/1.17/{ => No longer needed}/0506-Limit-lightning-strike-effect-distance.patch (100%) rename patches/{removed/1.17 => server}/0334-Allow-Saving-of-Oversized-Chunks.patch (77%) rename patches/server/{0334-Fix-World-isChunkGenerated-calls.patch => 0335-Fix-World-isChunkGenerated-calls.patch} (95%) rename patches/server/{0335-Show-blockstate-location-if-we-failed-to-read-it.patch => 0336-Show-blockstate-location-if-we-failed-to-read-it.patch} (100%) rename patches/server/{0336-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch => 0337-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch} (100%) rename patches/server/{0337-Configurable-projectile-relative-velocity.patch => 0338-Configurable-projectile-relative-velocity.patch} (100%) rename patches/server/{0338-offset-item-frame-ticking.patch => 0339-offset-item-frame-ticking.patch} (100%) rename patches/server/{0339-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch => 0340-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch} (100%) rename patches/server/{0340-Fix-MC-158900.patch => 0341-Fix-MC-158900.patch} (100%) rename patches/server/{0341-Prevent-consuming-the-wrong-itemstack.patch => 0342-Prevent-consuming-the-wrong-itemstack.patch} (100%) rename patches/server/{0342-Generator-Settings.patch => 0343-Generator-Settings.patch} (100%) rename patches/server/{0343-Fix-MC-161754.patch => 0344-Fix-MC-161754.patch} (100%) rename patches/server/{0344-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch => 0345-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch} (100%) rename patches/server/{0345-Expose-the-internal-current-tick.patch => 0346-Expose-the-internal-current-tick.patch} (100%) rename patches/server/{0346-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch => 0347-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch} (100%) rename patches/server/{0347-Add-option-to-disable-pillager-patrols.patch => 0348-Add-option-to-disable-pillager-patrols.patch} (100%) rename patches/server/{0348-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch => 0349-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch} (100%) rename patches/server/{0349-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch => 0350-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch} (100%) rename patches/server/{0350-MC-145656-Fix-Follow-Range-Initial-Target.patch => 0351-MC-145656-Fix-Follow-Range-Initial-Target.patch} (100%) rename patches/{removed/1.17 => server}/0352-Duplicate-UUID-Resolve-Option.patch (55%) rename patches/server/{0351-Optimize-Hoppers.patch => 0353-Optimize-Hoppers.patch} (99%) rename patches/server/{0352-PlayerDeathEvent-shouldDropExperience.patch => 0354-PlayerDeathEvent-shouldDropExperience.patch} (100%) rename patches/server/{0353-Prevent-bees-loading-chunks-checking-hive-position.patch => 0355-Prevent-bees-loading-chunks-checking-hive-position.patch} (100%) rename patches/server/{0354-Don-t-load-Chunks-from-Hoppers-and-other-things.patch => 0356-Don-t-load-Chunks-from-Hoppers-and-other-things.patch} (100%) rename patches/server/{0355-Guard-against-serializing-mismatching-chunk-coordina.patch => 0357-Guard-against-serializing-mismatching-chunk-coordina.patch} (100%) rename patches/server/{0356-Optimise-IEntityAccess-getPlayerByUUID.patch => 0358-Optimise-IEntityAccess-getPlayerByUUID.patch} (100%) rename patches/server/{0357-Fix-items-not-falling-correctly.patch => 0359-Fix-items-not-falling-correctly.patch} (100%) rename patches/server/{0358-Lag-compensate-eating.patch => 0360-Lag-compensate-eating.patch} (100%) rename patches/server/{0359-Optimize-call-to-getFluid-for-explosions.patch => 0361-Optimize-call-to-getFluid-for-explosions.patch} (100%) rename patches/server/{0360-Fix-last-firework-in-stack-not-having-effects-when-d.patch => 0362-Fix-last-firework-in-stack-not-having-effects-when-d.patch} (100%) rename patches/server/{0361-Add-effect-to-block-break-naturally.patch => 0363-Add-effect-to-block-break-naturally.patch} (100%) rename patches/server/{0362-Entity-Activation-Range-2.0.patch => 0364-Entity-Activation-Range-2.0.patch} (100%) rename patches/server/{0363-Increase-Light-Queue-Size.patch => 0365-Increase-Light-Queue-Size.patch} (93%) rename patches/server/{0364-Fix-Light-Command.patch => 0366-Fix-Light-Command.patch} (97%) rename patches/server/{0365-Anti-Xray.patch => 0367-Anti-Xray.patch} (99%) rename patches/server/{0366-No-Tick-view-distance-implementation.patch => 0368-No-Tick-view-distance-implementation.patch} (97%) rename patches/server/{0367-Implement-alternative-item-despawn-rate.patch => 0369-Implement-alternative-item-despawn-rate.patch} (97%) rename patches/server/{0368-Tracking-Range-Improvements.patch => 0370-Tracking-Range-Improvements.patch} (95%) rename patches/server/{0369-Fix-items-vanishing-through-end-portal.patch => 0371-Fix-items-vanishing-through-end-portal.patch} (100%) rename patches/server/{0370-implement-optional-per-player-mob-spawns.patch => 0372-implement-optional-per-player-mob-spawns.patch} (98%) rename patches/server/{0371-Avoid-hopper-searches-if-there-are-no-items.patch => 0373-Avoid-hopper-searches-if-there-are-no-items.patch} (100%) rename patches/server/{0372-Bees-get-gravity-in-void.-Fixes-MC-167279.patch => 0374-Bees-get-gravity-in-void.-Fixes-MC-167279.patch} (100%) rename patches/server/{0373-Optimise-getChunkAt-calls-for-loaded-chunks.patch => 0375-Optimise-getChunkAt-calls-for-loaded-chunks.patch} (100%) rename patches/server/{0374-Add-debug-for-sync-chunk-loads.patch => 0376-Add-debug-for-sync-chunk-loads.patch} (100%) rename patches/server/{0375-Allow-overriding-the-java-version-check.patch => 0377-Allow-overriding-the-java-version-check.patch} (100%) rename patches/server/{0376-Add-ThrownEggHatchEvent.patch => 0378-Add-ThrownEggHatchEvent.patch} (100%) rename patches/server/{0377-Optimise-random-block-ticking.patch => 0379-Optimise-random-block-ticking.patch} (100%) rename patches/server/{0378-Entity-Jump-API.patch => 0380-Entity-Jump-API.patch} (100%) rename patches/server/{0379-Add-option-to-nerf-pigmen-from-nether-portals.patch => 0381-Add-option-to-nerf-pigmen-from-nether-portals.patch} (95%) rename patches/server/{0380-Make-the-GUI-graph-fancier.patch => 0382-Make-the-GUI-graph-fancier.patch} (100%) rename patches/server/{0381-add-hand-to-BlockMultiPlaceEvent.patch => 0383-add-hand-to-BlockMultiPlaceEvent.patch} (100%) rename patches/server/{0382-Prevent-teleporting-dead-entities.patch => 0384-Prevent-teleporting-dead-entities.patch} (100%) rename patches/server/{0383-Validate-tripwire-hook-placement-before-update.patch => 0385-Validate-tripwire-hook-placement-before-update.patch} (100%) rename patches/server/{0384-Add-option-to-allow-iron-golems-to-spawn-in-air.patch => 0386-Add-option-to-allow-iron-golems-to-spawn-in-air.patch} (95%) rename patches/server/{0385-Configurable-chance-of-villager-zombie-infection.patch => 0387-Configurable-chance-of-villager-zombie-infection.patch} (94%) rename patches/server/{0386-Optimise-Chunk-getFluid.patch => 0388-Optimise-Chunk-getFluid.patch} (100%) rename patches/server/{0387-Optimise-TickListServer-by-rewriting-it.patch => 0389-Optimise-TickListServer-by-rewriting-it.patch} (100%) rename patches/server/{0388-Pillager-patrol-spawn-settings-and-per-player-option.patch => 0390-Pillager-patrol-spawn-settings-and-per-player-option.patch} (97%) rename patches/server/{0389-Remote-Connections-shouldn-t-hold-up-shutdown.patch => 0391-Remote-Connections-shouldn-t-hold-up-shutdown.patch} (100%) rename patches/server/{0390-Do-not-allow-bees-to-load-chunks-for-beehives.patch => 0392-Do-not-allow-bees-to-load-chunks-for-beehives.patch} (100%) rename patches/server/{0391-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch => 0393-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch} (94%) rename patches/server/{0392-Optimize-Collision-to-not-load-chunks.patch => 0394-Optimize-Collision-to-not-load-chunks.patch} (100%) rename patches/server/{0393-Don-t-tick-dead-players.patch => 0395-Don-t-tick-dead-players.patch} (100%) rename patches/server/{0394-Dead-Player-s-shouldn-t-be-able-to-move.patch => 0396-Dead-Player-s-shouldn-t-be-able-to-move.patch} (100%) rename patches/server/{0395-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch => 0397-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch} (96%) rename patches/server/{0396-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch => 0398-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch} (100%) rename patches/server/{0397-Don-t-move-existing-players-to-world-spawn.patch => 0399-Don-t-move-existing-players-to-world-spawn.patch} (100%) rename patches/server/{0398-Add-tick-times-API-and-mspt-command.patch => 0400-Add-tick-times-API-and-mspt-command.patch} (100%) rename patches/server/{0399-Expose-MinecraftServer-isRunning.patch => 0401-Expose-MinecraftServer-isRunning.patch} (100%) rename patches/server/{0400-Add-Raw-Byte-ItemStack-Serialization.patch => 0402-Add-Raw-Byte-ItemStack-Serialization.patch} (100%) rename patches/server/{0401-Remove-streams-from-Mob-AI-System.patch => 0403-Remove-streams-from-Mob-AI-System.patch} (100%) rename patches/server/{0402-Async-command-map-building.patch => 0404-Async-command-map-building.patch} (100%) rename patches/server/{0403-Improved-Watchdog-Support.patch => 0405-Improved-Watchdog-Support.patch} (99%) rename patches/server/{0404-Optimize-Pathfinding.patch => 0406-Optimize-Pathfinding.patch} (100%) rename patches/server/{0405-Reduce-Either-Optional-allocation.patch => 0407-Reduce-Either-Optional-allocation.patch} (100%) rename patches/server/{0406-Remove-streams-from-PairedQueue.patch => 0408-Remove-streams-from-PairedQueue.patch} (100%) rename patches/server/{0407-Reduce-memory-footprint-of-NBTTagCompound.patch => 0409-Reduce-memory-footprint-of-NBTTagCompound.patch} (100%) rename patches/server/{0408-Prevent-opening-inventories-when-frozen.patch => 0410-Prevent-opening-inventories-when-frozen.patch} (100%) rename patches/server/{0409-Optimise-ArraySetSorted-removeIf.patch => 0411-Optimise-ArraySetSorted-removeIf.patch} (100%) rename patches/server/{0410-Don-t-run-entity-collision-code-if-not-needed.patch => 0412-Don-t-run-entity-collision-code-if-not-needed.patch} (100%) rename patches/server/{0411-Restrict-vanilla-teleport-command-to-valid-locations.patch => 0413-Restrict-vanilla-teleport-command-to-valid-locations.patch} (100%) rename patches/server/{0412-Implement-Player-Client-Options-API.patch => 0414-Implement-Player-Client-Options-API.patch} (100%) rename patches/server/{0413-Fix-Chunk-Post-Processing-deadlock-risk.patch => 0415-Fix-Chunk-Post-Processing-deadlock-risk.patch} (93%) rename patches/server/{0414-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch => 0416-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch} (100%) rename patches/server/{0415-Broadcast-join-message-to-console.patch => 0417-Broadcast-join-message-to-console.patch} (100%) rename patches/server/{0416-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch => 0418-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch} (97%) rename patches/server/{0417-Load-Chunks-for-Login-Asynchronously.patch => 0419-Load-Chunks-for-Login-Asynchronously.patch} (100%) rename patches/server/{0418-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch => 0420-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch} (100%) rename patches/server/{0419-Add-PlayerAttackEntityCooldownResetEvent.patch => 0421-Add-PlayerAttackEntityCooldownResetEvent.patch} (100%) rename patches/server/{0420-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch => 0422-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch} (93%) rename patches/server/{0421-Don-t-fire-BlockFade-on-worldgen-threads.patch => 0423-Don-t-fire-BlockFade-on-worldgen-threads.patch} (100%) rename patches/server/{0422-Add-phantom-creative-and-insomniac-controls.patch => 0424-Add-phantom-creative-and-insomniac-controls.patch} (96%) rename patches/server/{0423-Fix-numerous-item-duplication-issues-and-teleport-is.patch => 0425-Fix-numerous-item-duplication-issues-and-teleport-is.patch} (100%) rename patches/server/{0424-Implement-Brigadier-Mojang-API.patch => 0426-Implement-Brigadier-Mojang-API.patch} (100%) rename patches/server/{0425-Villager-Restocks-API.patch => 0427-Villager-Restocks-API.patch} (100%) rename patches/server/{0426-Validate-PickItem-Packet-and-kick-for-invalid.patch => 0428-Validate-PickItem-Packet-and-kick-for-invalid.patch} (100%) rename patches/server/{0427-Expose-game-version.patch => 0429-Expose-game-version.patch} (100%) rename patches/server/{0428-Optimize-Voxel-Shape-Merging.patch => 0430-Optimize-Voxel-Shape-Merging.patch} (100%) rename patches/server/{0429-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch => 0431-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch} (100%) rename patches/server/{0430-Implement-Mob-Goal-API.patch => 0432-Implement-Mob-Goal-API.patch} (100%) rename patches/server/{0431-Use-distance-map-to-optimise-entity-tracker.patch => 0433-Use-distance-map-to-optimise-entity-tracker.patch} (96%) rename patches/server/{0432-Optimize-isOutsideRange-to-use-distance-maps.patch => 0434-Optimize-isOutsideRange-to-use-distance-maps.patch} (97%) rename patches/server/{0433-Add-villager-reputation-API.patch => 0435-Add-villager-reputation-API.patch} (100%) rename patches/server/{0434-Option-for-maximum-exp-value-when-merging-orbs.patch => 0436-Option-for-maximum-exp-value-when-merging-orbs.patch} (97%) rename patches/server/{0435-ExperienceOrbMergeEvent.patch => 0437-ExperienceOrbMergeEvent.patch} (100%) rename patches/server/{0436-Fix-PotionEffect-ignores-icon-flag.patch => 0438-Fix-PotionEffect-ignores-icon-flag.patch} (100%) rename patches/server/{0437-Optimize-brigadier-child-sorting-performance.patch => 0439-Optimize-brigadier-child-sorting-performance.patch} (100%) rename patches/server/{0438-Potential-bed-API.patch => 0440-Potential-bed-API.patch} (100%) rename patches/server/{0439-Wait-for-Async-Tasks-during-shutdown.patch => 0441-Wait-for-Async-Tasks-during-shutdown.patch} (100%) rename patches/server/{0440-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch => 0442-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch} (100%) rename patches/server/{0441-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch => 0443-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch} (100%) rename patches/server/{0442-Reduce-MutableInt-allocations-from-light-engine.patch => 0444-Reduce-MutableInt-allocations-from-light-engine.patch} (100%) rename patches/server/{0443-Reduce-allocation-of-Vec3D-by-entity-tracker.patch => 0445-Reduce-allocation-of-Vec3D-by-entity-tracker.patch} (96%) rename patches/server/{0444-Ensure-safe-gateway-teleport.patch => 0446-Ensure-safe-gateway-teleport.patch} (100%) rename patches/server/{0445-Add-option-for-console-having-all-permissions.patch => 0447-Add-option-for-console-having-all-permissions.patch} (100%) rename patches/server/{0446-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch => 0448-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch} (100%) rename patches/server/{0447-Optimize-sending-packets-to-nearby-locations-sounds-.patch => 0449-Optimize-sending-packets-to-nearby-locations-sounds-.patch} (100%) rename patches/server/{0448-Fix-villager-trading-demand-MC-163962.patch => 0450-Fix-villager-trading-demand-MC-163962.patch} (100%) rename patches/server/{0449-Maps-shouldn-t-load-chunks.patch => 0451-Maps-shouldn-t-load-chunks.patch} (100%) rename patches/server/{0450-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch => 0452-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch} (100%) rename patches/server/{0451-Delay-Chunk-Unloads-based-on-Player-Movement.patch => 0453-Delay-Chunk-Unloads-based-on-Player-Movement.patch} (97%) rename patches/server/{0452-Optimize-Bit-Operations-by-inlining.patch => 0454-Optimize-Bit-Operations-by-inlining.patch} (100%) rename patches/server/{0453-incremental-chunk-saving.patch => 0455-incremental-chunk-saving.patch} (96%) rename patches/server/{0454-Add-Plugin-Tickets-to-API-Chunk-Methods.patch => 0456-Add-Plugin-Tickets-to-API-Chunk-Methods.patch} (100%) rename patches/server/{0455-Fix-missing-chunks-due-to-integer-overflow.patch => 0457-Fix-missing-chunks-due-to-integer-overflow.patch} (100%) rename patches/server/{0456-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch => 0458-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch} (100%) rename patches/server/{0457-Fix-piston-physics-inconsistency-MC-188840.patch => 0459-Fix-piston-physics-inconsistency-MC-188840.patch} (100%) rename patches/server/{0458-Fix-sand-duping.patch => 0460-Fix-sand-duping.patch} (100%) rename patches/server/{0459-Prevent-position-desync-in-playerconnection-causing-.patch => 0461-Prevent-position-desync-in-playerconnection-causing-.patch} (100%) rename patches/server/{0460-Inventory-getHolder-method-without-block-snapshot.patch => 0462-Inventory-getHolder-method-without-block-snapshot.patch} (100%) rename patches/server/{0461-Expose-Arrow-getItemStack.patch => 0463-Expose-Arrow-getItemStack.patch} (100%) rename patches/server/{0462-Add-and-implement-PlayerRecipeBookClickEvent.patch => 0464-Add-and-implement-PlayerRecipeBookClickEvent.patch} (100%) rename patches/server/{0463-Hide-sync-chunk-writes-behind-flag.patch => 0465-Hide-sync-chunk-writes-behind-flag.patch} (100%) rename patches/server/{0464-Add-permission-for-command-blocks.patch => 0466-Add-permission-for-command-blocks.patch} (100%) rename patches/server/{0465-Ensure-Entity-AABB-s-are-never-invalid.patch => 0467-Ensure-Entity-AABB-s-are-never-invalid.patch} (100%) rename patches/server/{0466-Optimize-WorldBorder-collision-checks-and-air.patch => 0468-Optimize-WorldBorder-collision-checks-and-air.patch} (100%) rename patches/server/{0467-Fix-Per-World-Difficulty-Remembering-Difficulty.patch => 0469-Fix-Per-World-Difficulty-Remembering-Difficulty.patch} (100%) rename patches/server/{0468-Paper-dumpitem-command.patch => 0470-Paper-dumpitem-command.patch} (100%) rename patches/server/{0469-Don-t-allow-null-UUID-s-for-chat.patch => 0471-Don-t-allow-null-UUID-s-for-chat.patch} (100%) rename patches/server/{0470-Improve-Legacy-Component-serialization-size.patch => 0472-Improve-Legacy-Component-serialization-size.patch} (100%) rename patches/server/{0471-Stop-copy-on-write-operations-for-updating-light-dat.patch => 0473-Stop-copy-on-write-operations-for-updating-light-dat.patch} (100%) rename patches/server/{0472-Support-old-UUID-format-for-NBT.patch => 0474-Support-old-UUID-format-for-NBT.patch} (100%) rename patches/server/{0473-Clean-up-duplicated-GameProfile-Properties.patch => 0475-Clean-up-duplicated-GameProfile-Properties.patch} (100%) rename patches/server/{0474-Convert-legacy-attributes-in-Item-Meta.patch => 0476-Convert-legacy-attributes-in-Item-Meta.patch} (100%) rename patches/server/{0475-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch => 0477-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch} (98%) rename patches/server/{0476-Remove-some-streams-from-structures.patch => 0478-Remove-some-streams-from-structures.patch} (100%) rename patches/server/{0477-Remove-streams-from-classes-related-villager-gossip.patch => 0479-Remove-streams-from-classes-related-villager-gossip.patch} (100%) rename patches/{removed/1.17/0479-Optimize-NibbleArray-to-use-pooled-buffers.patch => server/0480-Optimize-NibbleArray-to-use-pooled-buffers.patch} (58%) rename patches/server/{0478-Support-components-in-ItemMeta.patch => 0481-Support-components-in-ItemMeta.patch} (100%) rename patches/server/{0479-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch => 0482-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch} (100%) rename patches/server/{0480-Add-entity-liquid-API.patch => 0483-Add-entity-liquid-API.patch} (100%) rename patches/server/{0481-Update-itemstack-legacy-name-and-lore.patch => 0484-Update-itemstack-legacy-name-and-lore.patch} (100%) rename patches/server/{0482-Spawn-player-in-correct-world-on-login.patch => 0485-Spawn-player-in-correct-world-on-login.patch} (100%) rename patches/server/{0483-Add-PrepareResultEvent.patch => 0486-Add-PrepareResultEvent.patch} (100%) rename patches/server/{0484-Allow-delegation-to-vanilla-chunk-gen.patch => 0487-Allow-delegation-to-vanilla-chunk-gen.patch} (100%) rename patches/server/{0485-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch => 0488-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch} (100%) rename patches/server/{0486-Optimize-NetworkManager-Exception-Handling.patch => 0489-Optimize-NetworkManager-Exception-Handling.patch} (100%) rename patches/server/{0487-Optimize-the-advancement-data-player-iteration-to-be.patch => 0490-Optimize-the-advancement-data-player-iteration-to-be.patch} (100%) rename patches/server/{0488-Fix-arrows-never-despawning-MC-125757.patch => 0491-Fix-arrows-never-despawning-MC-125757.patch} (100%) rename patches/server/{0489-Thread-Safe-Vanilla-Command-permission-checking.patch => 0492-Thread-Safe-Vanilla-Command-permission-checking.patch} (100%) rename patches/server/{0490-Move-range-check-for-block-placing-up.patch => 0493-Move-range-check-for-block-placing-up.patch} (100%) rename patches/server/{0491-Fix-SPIGOT-5989.patch => 0494-Fix-SPIGOT-5989.patch} (100%) rename patches/server/{0492-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch => 0495-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch} (100%) rename patches/server/{0493-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch => 0496-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch} (100%) rename patches/server/{0494-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch => 0497-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch} (100%) rename patches/server/{0495-Add-missing-strikeLighting-call-to-World-spigot-stri.patch => 0498-Add-missing-strikeLighting-call-to-World-spigot-stri.patch} (100%) rename patches/server/{0496-Fix-some-rails-connecting-improperly.patch => 0499-Fix-some-rails-connecting-improperly.patch} (100%) rename patches/server/{0497-Incremental-player-saving.patch => 0500-Incremental-player-saving.patch} (100%) rename patches/server/{0498-Fix-MC-187716-Use-configured-height.patch => 0501-Fix-MC-187716-Use-configured-height.patch} (100%) rename patches/server/{0499-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch => 0502-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch} (100%) rename patches/server/{0500-Do-not-let-the-server-load-chunks-from-newer-version.patch => 0503-Do-not-let-the-server-load-chunks-from-newer-version.patch} (96%) rename patches/server/{0501-Brand-support.patch => 0504-Brand-support.patch} (100%) rename patches/server/{0502-Add-setMaxPlayers-API.patch => 0505-Add-setMaxPlayers-API.patch} (100%) rename patches/server/{0503-Add-playPickupItemAnimation-to-LivingEntity.patch => 0506-Add-playPickupItemAnimation-to-LivingEntity.patch} (100%) rename patches/server/{0504-Don-t-require-FACING-data.patch => 0507-Don-t-require-FACING-data.patch} (100%) rename patches/server/{0505-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch => 0508-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch} (100%) rename patches/server/{0506-Add-moon-phase-API.patch => 0509-Add-moon-phase-API.patch} (100%) rename patches/server/{0507-Prevent-headless-pistons-from-being-created.patch => 0510-Prevent-headless-pistons-from-being-created.patch} (100%) rename patches/server/{0508-Add-BellRingEvent.patch => 0511-Add-BellRingEvent.patch} (100%) rename patches/server/{0509-Add-zombie-targets-turtle-egg-config.patch => 0512-Add-zombie-targets-turtle-egg-config.patch} (95%) rename patches/server/{0510-Buffer-joins-to-world.patch => 0513-Buffer-joins-to-world.patch} (100%) rename patches/server/{0511-Optimize-redstone-algorithm.patch => 0514-Optimize-redstone-algorithm.patch} (99%) rename patches/server/{0512-Fix-hex-colors-not-working-in-some-kick-messages.patch => 0515-Fix-hex-colors-not-working-in-some-kick-messages.patch} (100%) rename patches/server/{0513-PortalCreateEvent-needs-to-know-its-entity.patch => 0516-PortalCreateEvent-needs-to-know-its-entity.patch} (100%) rename patches/server/{0514-Fix-CraftTeam-null-check.patch => 0517-Fix-CraftTeam-null-check.patch} (100%) rename patches/server/{0515-Add-more-Evoker-API.patch => 0518-Add-more-Evoker-API.patch} (100%) rename patches/server/{0516-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch => 0519-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch} (100%) rename patches/server/{0517-Create-HoverEvent-from-ItemStack-Entity.patch => 0520-Create-HoverEvent-from-ItemStack-Entity.patch} (100%) rename patches/server/{0518-Cache-block-data-strings.patch => 0521-Cache-block-data-strings.patch} (100%) rename patches/server/{0519-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch => 0522-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch} (100%) rename patches/server/{0520-Add-additional-open-container-api-to-HumanEntity.patch => 0523-Add-additional-open-container-api-to-HumanEntity.patch} (100%) rename patches/server/{0521-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch => 0524-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch} (100%) rename patches/server/{0522-Extend-block-drop-capture-to-capture-all-items-added.patch => 0525-Extend-block-drop-capture-to-capture-all-items-added.patch} (100%) rename patches/server/{0523-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch => 0526-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch} (100%) rename patches/server/{0524-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch => 0527-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch} (100%) rename patches/server/{0525-Lazily-track-plugin-scoreboards-by-default.patch => 0528-Lazily-track-plugin-scoreboards-by-default.patch} (100%) rename patches/server/{0526-Entity-isTicking.patch => 0529-Entity-isTicking.patch} (100%) rename patches/server/{0527-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch => 0530-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch} (100%) rename patches/server/{0528-Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch => 0531-Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch} (100%) rename patches/server/{0529-Fix-Concurrency-issue-in-WeightedList.patch => 0532-Fix-Concurrency-issue-in-WeightedList.patch} (100%) rename patches/server/{0530-Reset-Ender-Crystals-on-Dragon-Spawn.patch => 0533-Reset-Ender-Crystals-on-Dragon-Spawn.patch} (100%) rename patches/server/{0531-Fix-for-large-move-vectors-crashing-server.patch => 0534-Fix-for-large-move-vectors-crashing-server.patch} (100%) rename patches/server/{0532-Optimise-getType-calls.patch => 0535-Optimise-getType-calls.patch} (100%) rename patches/server/{0533-Villager-resetOffers.patch => 0536-Villager-resetOffers.patch} (100%) rename patches/server/{0534-Improve-inlinig-for-some-hot-IBlockData-methods.patch => 0537-Improve-inlinig-for-some-hot-IBlockData-methods.patch} (100%) rename patches/server/{0535-Retain-block-place-order-when-capturing-blockstates.patch => 0538-Retain-block-place-order-when-capturing-blockstates.patch} (100%) rename patches/server/{0536-Reduce-blockpos-allocation-from-pathfinding.patch => 0539-Reduce-blockpos-allocation-from-pathfinding.patch} (100%) rename patches/server/{0537-Fix-item-locations-dropped-from-campfires.patch => 0540-Fix-item-locations-dropped-from-campfires.patch} (100%) rename patches/server/{0538-Player-elytra-boost-API.patch => 0541-Player-elytra-boost-API.patch} (100%) rename patches/server/{0539-Fixed-TileEntityBell-memory-leak.patch => 0542-Fixed-TileEntityBell-memory-leak.patch} (100%) rename patches/server/{0540-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch => 0543-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch} (100%) rename patches/server/{0541-Add-getOfflinePlayerIfCached-String.patch => 0544-Add-getOfflinePlayerIfCached-String.patch} (100%) rename patches/server/{0542-Add-ignore-discounts-API.patch => 0545-Add-ignore-discounts-API.patch} (100%) rename patches/server/{0543-Toggle-for-removing-existing-dragon.patch => 0546-Toggle-for-removing-existing-dragon.patch} (95%) rename patches/server/{0544-Fix-client-lag-on-advancement-loading.patch => 0547-Fix-client-lag-on-advancement-loading.patch} (100%) rename patches/server/{0545-Item-no-age-no-player-pickup.patch => 0548-Item-no-age-no-player-pickup.patch} (100%) rename patches/server/{0546-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch => 0549-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch} (100%) rename patches/server/{0547-Beacon-API-custom-effect-ranges.patch => 0550-Beacon-API-custom-effect-ranges.patch} (100%) rename patches/server/{0548-Add-API-for-quit-reason.patch => 0551-Add-API-for-quit-reason.patch} (100%) rename patches/server/{0549-Seed-based-feature-search.patch => 0552-Seed-based-feature-search.patch} (98%) rename patches/server/{0550-Add-Wandering-Trader-spawn-rate-config-options.patch => 0553-Add-Wandering-Trader-spawn-rate-config-options.patch} (98%) rename patches/server/{0551-Significantly-improve-performance-of-the-end-generat.patch => 0554-Significantly-improve-performance-of-the-end-generat.patch} (100%) rename patches/server/{0552-Expose-world-spawn-angle.patch => 0555-Expose-world-spawn-angle.patch} (100%) rename patches/server/{0553-Add-Destroy-Speed-API.patch => 0556-Add-Destroy-Speed-API.patch} (100%) rename patches/server/{0554-Fix-Player-spawnParticle-x-y-z-precision-loss.patch => 0557-Fix-Player-spawnParticle-x-y-z-precision-loss.patch} (100%) rename patches/server/{0555-Add-LivingEntity-clearActiveItem.patch => 0558-Add-LivingEntity-clearActiveItem.patch} (100%) rename patches/server/{0556-Add-PlayerItemCooldownEvent.patch => 0559-Add-PlayerItemCooldownEvent.patch} (100%) rename patches/server/{0557-More-lightning-API.patch => 0560-More-lightning-API.patch} (100%) rename patches/server/{0558-Climbing-should-not-bypass-cramming-gamerule.patch => 0561-Climbing-should-not-bypass-cramming-gamerule.patch} (98%) rename patches/server/{0559-Added-missing-default-perms-for-commands.patch => 0562-Added-missing-default-perms-for-commands.patch} (100%) rename patches/server/{0560-Add-PlayerShearBlockEvent.patch => 0563-Add-PlayerShearBlockEvent.patch} (100%) rename patches/server/{0561-Set-spigots-verbose-world-setting-to-false-by-def.patch => 0564-Set-spigots-verbose-world-setting-to-false-by-def.patch} (100%) rename patches/server/{0562-Fix-curing-zombie-villager-discount-exploit.patch => 0565-Fix-curing-zombie-villager-discount-exploit.patch} (96%) rename patches/server/{0563-Limit-recipe-packets.patch => 0566-Limit-recipe-packets.patch} (100%) rename patches/server/{0564-Fix-CraftSound-backwards-compatibility.patch => 0567-Fix-CraftSound-backwards-compatibility.patch} (100%) rename patches/server/{0565-MC-4-Fix-item-position-desync.patch => 0568-MC-4-Fix-item-position-desync.patch} (100%) rename patches/server/{0566-Player-Chunk-Load-Unload-Events.patch => 0569-Player-Chunk-Load-Unload-Events.patch} (100%) rename patches/server/{0567-Optimize-Dynamic-get-Missing-Keys.patch => 0570-Optimize-Dynamic-get-Missing-Keys.patch} (100%) rename patches/server/{0568-Expose-LivingEntity-hurt-direction.patch => 0571-Expose-LivingEntity-hurt-direction.patch} (100%) rename patches/server/{0569-Add-OBSTRUCTED-reason-to-BedEnterResult.patch => 0572-Add-OBSTRUCTED-reason-to-BedEnterResult.patch} (100%) rename patches/server/{0570-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch => 0573-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch} (100%) rename patches/server/{0571-added-PlayerTradeEvent.patch => 0574-added-PlayerTradeEvent.patch} (100%) rename patches/server/{0572-Implement-TargetHitEvent.patch => 0575-Implement-TargetHitEvent.patch} (100%) rename patches/server/{0573-Additional-Block-Material-API-s.patch => 0576-Additional-Block-Material-API-s.patch} (100%) rename patches/server/{0574-Fix-harming-potion-dupe.patch => 0577-Fix-harming-potion-dupe.patch} (100%) rename patches/server/{0575-Implement-API-to-get-Material-from-Boats-and-Minecar.patch => 0578-Implement-API-to-get-Material-from-Boats-and-Minecar.patch} (100%) rename patches/server/{0576-Cache-burn-durations.patch => 0579-Cache-burn-durations.patch} (100%) rename patches/server/{0577-Allow-disabling-mob-spawner-spawn-egg-transformation.patch => 0580-Allow-disabling-mob-spawner-spawn-egg-transformation.patch} (95%) rename patches/server/{0578-Fix-Not-a-string-Map-Conversion-spam.patch => 0581-Fix-Not-a-string-Map-Conversion-spam.patch} (100%) rename patches/server/{0579-Implement-PlayerFlowerPotManipulateEvent.patch => 0582-Implement-PlayerFlowerPotManipulateEvent.patch} (100%) rename patches/server/{0580-Fix-interact-event-not-being-called-in-adventure.patch => 0583-Fix-interact-event-not-being-called-in-adventure.patch} (100%) rename patches/server/{0581-Zombie-API-breaking-doors.patch => 0584-Zombie-API-breaking-doors.patch} (100%) rename patches/server/{0582-Fix-nerfed-slime-when-splitting.patch => 0585-Fix-nerfed-slime-when-splitting.patch} (100%) rename patches/server/{0583-Add-EntityLoadCrossbowEvent.patch => 0586-Add-EntityLoadCrossbowEvent.patch} (100%) rename patches/server/{0584-Guardian-beam-workaround.patch => 0587-Guardian-beam-workaround.patch} (100%) rename patches/server/{0585-Added-WorldGameRuleChangeEvent.patch => 0588-Added-WorldGameRuleChangeEvent.patch} (100%) rename patches/server/{0586-Added-ServerResourcesReloadedEvent.patch => 0589-Added-ServerResourcesReloadedEvent.patch} (100%) rename patches/server/{0587-Added-world-settings-for-mobs-picking-up-loot.patch => 0590-Added-world-settings-for-mobs-picking-up-loot.patch} (97%) rename patches/server/{0588-Implemented-BlockFailedDispenseEvent.patch => 0591-Implemented-BlockFailedDispenseEvent.patch} (100%) rename patches/server/{0589-Added-PlayerLecternPageChangeEvent.patch => 0592-Added-PlayerLecternPageChangeEvent.patch} (100%) rename patches/server/{0590-Added-PlayerLoomPatternSelectEvent.patch => 0593-Added-PlayerLoomPatternSelectEvent.patch} (100%) rename patches/server/{0591-Configurable-door-breaking-difficulty.patch => 0594-Configurable-door-breaking-difficulty.patch} (97%) rename patches/server/{0592-Empty-commands-shall-not-be-dispatched.patch => 0595-Empty-commands-shall-not-be-dispatched.patch} (100%) rename patches/server/{0593-Implement-API-to-expose-exact-interaction-point.patch => 0596-Implement-API-to-expose-exact-interaction-point.patch} (100%) rename patches/server/{0594-Remove-stale-POIs.patch => 0597-Remove-stale-POIs.patch} (100%) rename patches/server/{0595-Fix-villager-boat-exploit.patch => 0598-Fix-villager-boat-exploit.patch} (100%) rename patches/server/{0596-Add-sendOpLevel-API.patch => 0599-Add-sendOpLevel-API.patch} (100%) rename patches/server/{0597-Add-StructureLocateEvent.patch => 0600-Add-StructureLocateEvent.patch} (100%) rename patches/server/{0598-Collision-option-for-requiring-a-player-participant.patch => 0601-Collision-option-for-requiring-a-player-participant.patch} (98%) rename patches/server/{0599-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch => 0602-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch} (100%) rename patches/server/{0600-Return-chat-component-with-empty-text-instead-of-thr.patch => 0603-Return-chat-component-with-empty-text-instead-of-thr.patch} (100%) rename patches/server/{0601-Make-schedule-command-per-world.patch => 0604-Make-schedule-command-per-world.patch} (100%) rename patches/server/{0602-Configurable-max-leash-distance.patch => 0605-Configurable-max-leash-distance.patch} (96%) rename patches/server/{0603-Implement-BlockPreDispenseEvent.patch => 0606-Implement-BlockPreDispenseEvent.patch} (100%) rename patches/server/{0604-Added-Vanilla-Entity-Tags.patch => 0607-Added-Vanilla-Entity-Tags.patch} (100%) rename patches/server/{0605-added-Wither-API.patch => 0608-added-Wither-API.patch} (100%) rename patches/server/{0606-Added-firing-of-PlayerChangeBeaconEffectEvent.patch => 0609-Added-firing-of-PlayerChangeBeaconEffectEvent.patch} (100%) rename patches/server/{0607-Fix-console-spam-when-removing-chests-in-water.patch => 0610-Fix-console-spam-when-removing-chests-in-water.patch} (100%) rename patches/server/{0608-Add-toggle-for-always-placing-the-dragon-egg.patch => 0611-Add-toggle-for-always-placing-the-dragon-egg.patch} (92%) rename patches/server/{0609-Added-PlayerStonecutterRecipeSelectEvent.patch => 0612-Added-PlayerStonecutterRecipeSelectEvent.patch} (100%) rename patches/server/{0610-Add-dropLeash-variable-to-EntityUnleashEvent.patch => 0613-Add-dropLeash-variable-to-EntityUnleashEvent.patch} (100%) rename patches/server/{0611-Skip-distance-map-update-when-spawning-disabled.patch => 0614-Skip-distance-map-update-when-spawning-disabled.patch} (100%) rename patches/server/{0612-Reset-shield-blocking-on-dimension-change.patch => 0615-Reset-shield-blocking-on-dimension-change.patch} (100%) rename patches/server/{0613-add-DragonEggFormEvent.patch => 0616-add-DragonEggFormEvent.patch} (100%) rename patches/server/{0614-EntityMoveEvent.patch => 0617-EntityMoveEvent.patch} (100%) rename patches/server/{0615-added-option-to-disable-pathfinding-updates-on-block.patch => 0618-added-option-to-disable-pathfinding-updates-on-block.patch} (93%) rename patches/server/{0616-Inline-shift-direction-fields.patch => 0619-Inline-shift-direction-fields.patch} (100%) rename patches/server/{0617-Allow-adding-items-to-BlockDropItemEvent.patch => 0620-Allow-adding-items-to-BlockDropItemEvent.patch} (100%) rename patches/server/{0618-Add-getMainThreadExecutor-to-BukkitScheduler.patch => 0621-Add-getMainThreadExecutor-to-BukkitScheduler.patch} (100%) rename patches/server/{0619-living-entity-allow-attribute-registration.patch => 0622-living-entity-allow-attribute-registration.patch} (100%) rename patches/server/{0620-fix-dead-slime-setSize-invincibility.patch => 0623-fix-dead-slime-setSize-invincibility.patch} (100%) rename patches/server/{0621-Merchant-getRecipes-should-return-an-immutable-list.patch => 0624-Merchant-getRecipes-should-return-an-immutable-list.patch} (100%) rename patches/server/{0622-misc-debugging-dumps.patch => 0625-misc-debugging-dumps.patch} (100%) rename patches/server/{0623-Add-support-for-hex-color-codes-in-console.patch => 0626-Add-support-for-hex-color-codes-in-console.patch} (100%) rename patches/server/{0624-Expose-Tracked-Players.patch => 0627-Expose-Tracked-Players.patch} (100%) rename patches/server/{0625-Remove-streams-from-SensorNearest.patch => 0628-Remove-streams-from-SensorNearest.patch} (100%) rename patches/server/{0626-MC-29274-Fix-Wither-hostility-towards-players.patch => 0629-MC-29274-Fix-Wither-hostility-towards-players.patch} (93%) rename patches/server/{0627-Throw-proper-exception-on-empty-JsonList-file.patch => 0630-Throw-proper-exception-on-empty-JsonList-file.patch} (100%) rename patches/server/{0628-Improve-ServerGUI.patch => 0631-Improve-ServerGUI.patch} (100%) rename patches/server/{0629-stop-firing-pressure-plate-EntityInteractEvent-for-i.patch => 0632-stop-firing-pressure-plate-EntityInteractEvent-for-i.patch} (100%) rename patches/server/{0630-fix-converting-txt-to-json-file.patch => 0633-fix-converting-txt-to-json-file.patch} (100%) rename patches/server/{0631-Add-worldborder-events.patch => 0634-Add-worldborder-events.patch} (100%) rename patches/server/{0632-added-PlayerNameEntityEvent.patch => 0635-added-PlayerNameEntityEvent.patch} (100%) rename patches/server/{0633-Prevent-grindstones-from-overstacking-items.patch => 0636-Prevent-grindstones-from-overstacking-items.patch} (100%) rename patches/server/{0634-Add-recipe-to-cook-events.patch => 0637-Add-recipe-to-cook-events.patch} (100%) rename patches/server/{0635-Add-Block-isValidTool.patch => 0638-Add-Block-isValidTool.patch} (100%) rename patches/server/{0636-Allow-using-signs-inside-spawn-protection.patch => 0639-Allow-using-signs-inside-spawn-protection.patch} (94%) rename patches/server/{0637-Implement-Keyed-on-World.patch => 0640-Implement-Keyed-on-World.patch} (100%) rename patches/server/{0638-Add-fast-alternative-constructor-for-Rotations.patch => 0641-Add-fast-alternative-constructor-for-Rotations.patch} (100%) rename patches/server/{0639-Item-Rarity-API.patch => 0642-Item-Rarity-API.patch} (100%) rename patches/server/{0640-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch => 0643-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch} (100%) rename patches/server/{0641-copy-TESign-isEditable-from-snapshots.patch => 0644-copy-TESign-isEditable-from-snapshots.patch} (100%) rename patches/server/{0642-Drop-carried-item-when-player-has-disconnected.patch => 0645-Drop-carried-item-when-player-has-disconnected.patch} (100%) rename patches/server/{0643-forced-whitelist-use-configurable-kick-message.patch => 0646-forced-whitelist-use-configurable-kick-message.patch} (100%) rename patches/server/{0644-Don-t-ignore-result-of-PlayerEditBookEvent.patch => 0647-Don-t-ignore-result-of-PlayerEditBookEvent.patch} (100%) rename patches/server/{0645-fix-cancelling-block-falling-causing-client-desync.patch => 0648-fix-cancelling-block-falling-causing-client-desync.patch} (100%) rename patches/server/{0646-Expose-protocol-version.patch => 0649-Expose-protocol-version.patch} (100%) rename patches/server/{0647-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch => 0650-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch} (100%) rename patches/server/{0648-Enhance-console-tab-completions-for-brigadier-comman.patch => 0651-Enhance-console-tab-completions-for-brigadier-comman.patch} (100%) rename patches/server/{0649-Fix-PlayerItemConsumeEvent-cancelling-properly.patch => 0652-Fix-PlayerItemConsumeEvent-cancelling-properly.patch} (100%) rename patches/server/{0650-Add-bypass-host-check.patch => 0653-Add-bypass-host-check.patch} (100%) rename patches/server/{0651-Set-area-affect-cloud-rotation.patch => 0654-Set-area-affect-cloud-rotation.patch} (100%) rename patches/server/{0652-add-isDeeplySleeping-to-HumanEntity.patch => 0655-add-isDeeplySleeping-to-HumanEntity.patch} (100%) rename patches/server/{0653-Fix-duplicating-give-items-on-item-drop-cancel.patch => 0656-Fix-duplicating-give-items-on-item-drop-cancel.patch} (100%) rename patches/server/{0654-add-consumeFuel-to-FurnaceBurnEvent.patch => 0657-add-consumeFuel-to-FurnaceBurnEvent.patch} (100%) rename patches/server/{0655-add-get-set-drop-chance-to-EntityEquipment.patch => 0658-add-get-set-drop-chance-to-EntityEquipment.patch} (100%) rename patches/server/{0656-fix-PigZombieAngerEvent-cancellation.patch => 0659-fix-PigZombieAngerEvent-cancellation.patch} (100%) rename patches/server/{0657-Fix-checkReach-check-for-Shulker-boxes.patch => 0660-Fix-checkReach-check-for-Shulker-boxes.patch} (100%) rename patches/server/{0658-fix-PlayerItemHeldEvent-firing-twice.patch => 0661-fix-PlayerItemHeldEvent-firing-twice.patch} (100%) rename patches/server/{0659-Added-PlayerDeepSleepEvent.patch => 0662-Added-PlayerDeepSleepEvent.patch} (100%) rename patches/server/{0660-More-World-API.patch => 0663-More-World-API.patch} (100%) rename patches/server/{0661-Added-PlayerBedFailEnterEvent.patch => 0664-Added-PlayerBedFailEnterEvent.patch} (100%) rename patches/server/{0662-Implement-methods-to-convert-between-Component-and-B.patch => 0665-Implement-methods-to-convert-between-Component-and-B.patch} (100%) rename patches/server/{0663-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch => 0666-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch} (100%) rename patches/server/{0664-Introduce-beacon-activation-deactivation-events.patch => 0667-Introduce-beacon-activation-deactivation-events.patch} (100%) rename patches/server/{0665-add-RespawnFlags-to-PlayerRespawnEvent.patch => 0668-add-RespawnFlags-to-PlayerRespawnEvent.patch} (100%) rename patches/server/{0666-Add-Channel-initialization-listeners.patch => 0669-Add-Channel-initialization-listeners.patch} (100%) rename patches/server/{0667-Send-empty-commands-if-tab-completion-is-disabled.patch => 0670-Send-empty-commands-if-tab-completion-is-disabled.patch} (100%) rename patches/server/{0668-Add-more-WanderingTrader-API.patch => 0671-Add-more-WanderingTrader-API.patch} (100%) rename patches/server/{0669-Add-EntityBlockStorage-clearEntities.patch => 0672-Add-EntityBlockStorage-clearEntities.patch} (100%) rename patches/server/{0670-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch => 0673-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch} (100%) rename patches/server/{0671-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch => 0674-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch} (100%) rename patches/server/{0672-Inventory-close.patch => 0675-Inventory-close.patch} (100%) rename patches/server/{0673-call-PortalCreateEvent-players-and-end-platform.patch => 0676-call-PortalCreateEvent-players-and-end-platform.patch} (100%) rename patches/server/{0674-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch => 0677-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch} (100%) rename patches/server/{0675-Fix-CraftPotionBrewer-cache.patch => 0678-Fix-CraftPotionBrewer-cache.patch} (100%) rename patches/server/{0676-Add-basic-Datapack-API.patch => 0679-Add-basic-Datapack-API.patch} (100%) rename patches/server/{0677-Add-environment-variable-to-disable-server-gui.patch => 0680-Add-environment-variable-to-disable-server-gui.patch} (100%) rename patches/server/{0678-additions-to-PlayerGameModeChangeEvent.patch => 0681-additions-to-PlayerGameModeChangeEvent.patch} (100%) rename patches/server/{0679-Clear-SyncLoadInfo.patch => 0682-Clear-SyncLoadInfo.patch} (100%) rename patches/server/{0680-ItemStack-repair-check-API.patch => 0683-ItemStack-repair-check-API.patch} (100%) rename patches/server/{0681-More-Enchantment-API.patch => 0684-More-Enchantment-API.patch} (100%) rename patches/server/{0682-Add-command-line-option-to-load-extra-plugin-jars-no.patch => 0685-Add-command-line-option-to-load-extra-plugin-jars-no.patch} (100%) rename patches/server/{0683-Fix-and-optimise-world-force-upgrading.patch => 0686-Fix-and-optimise-world-force-upgrading.patch} (99%) rename patches/server/{0684-Add-Mob-lookAt-API.patch => 0687-Add-Mob-lookAt-API.patch} (100%) rename patches/server/{0685-Add-Unix-domain-socket-support.patch => 0688-Add-Unix-domain-socket-support.patch} (100%) rename patches/server/{0686-Add-EntityInsideBlockEvent.patch => 0689-Add-EntityInsideBlockEvent.patch} (100%) rename patches/server/{0687-Attributes-API-for-item-defaults.patch => 0690-Attributes-API-for-item-defaults.patch} (100%) rename patches/server/{0688-Have-CraftMerchantCustom-emit-PlayerPurchaseEvent.patch => 0691-Have-CraftMerchantCustom-emit-PlayerPurchaseEvent.patch} (100%) rename patches/server/{0689-Add-cause-to-Weather-ThunderChangeEvents.patch => 0692-Add-cause-to-Weather-ThunderChangeEvents.patch} (100%) rename patches/server/{0690-More-Lidded-Block-API.patch => 0693-More-Lidded-Block-API.patch} (100%) rename patches/server/{0691-Limit-item-frame-cursors-on-maps.patch => 0694-Limit-item-frame-cursors-on-maps.patch} (93%) rename patches/server/{0692-Add-PufferFishStateChangeEvent.patch => 0695-Add-PufferFishStateChangeEvent.patch} (100%) rename patches/server/{0693-Add-PlayerKickEvent-causes.patch => 0696-Add-PlayerKickEvent-causes.patch} (100%) rename patches/server/{0694-Fix-PlayerBucketEmptyEvent-result-itemstack.patch => 0697-Fix-PlayerBucketEmptyEvent-result-itemstack.patch} (100%) rename patches/server/{0695-Synchronize-PalettedContainer-instead-of-ReentrantLo.patch => 0698-Synchronize-PalettedContainer-instead-of-ReentrantLo.patch} (100%) rename patches/server/{0696-Add-option-to-fix-items-merging-through-walls.patch => 0699-Add-option-to-fix-items-merging-through-walls.patch} (93%) rename patches/server/{0697-Add-BellRevealRaiderEvent.patch => 0700-Add-BellRevealRaiderEvent.patch} (100%) rename patches/server/{0698-Fix-invulnerable-end-crystals.patch => 0701-Fix-invulnerable-end-crystals.patch} (96%) rename patches/server/{0699-Add-ElderGuardianAppearanceEvent.patch => 0702-Add-ElderGuardianAppearanceEvent.patch} (100%) rename patches/server/{0700-Reset-villager-inventory-on-cancelled-pickup-event.patch => 0703-Reset-villager-inventory-on-cancelled-pickup-event.patch} (100%) rename patches/server/{0701-Fix-dangerous-end-portal-logic.patch => 0704-Fix-dangerous-end-portal-logic.patch} (100%) rename patches/server/{0702-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch => 0705-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch} (100%) rename patches/server/{0703-Make-item-validations-configurable.patch => 0706-Make-item-validations-configurable.patch} (100%) rename patches/server/{0704-Add-more-line-of-sight-methods.patch => 0707-Add-more-line-of-sight-methods.patch} (100%) rename patches/server/{0705-add-per-world-spawn-limits.patch => 0708-add-per-world-spawn-limits.patch} (94%) rename patches/server/{0706-Fix-PotionSplashEvent-for-water-splash-potions.patch => 0709-Fix-PotionSplashEvent-for-water-splash-potions.patch} (100%) rename patches/server/{0707-Fix-incorrect-status-dataconverter-for-pre-1.13-chun.patch => 0710-Fix-incorrect-status-dataconverter-for-pre-1.13-chun.patch} (100%) diff --git a/patches/removed/1.17/0647-Entity-load-save-limit-per-chunk.patch b/patches/removed/1.17/0647-Entity-load-save-limit-per-chunk.patch index 1a5c3c2a1..784088ba5 100644 --- a/patches/removed/1.17/0647-Entity-load-save-limit-per-chunk.patch +++ b/patches/removed/1.17/0647-Entity-load-save-limit-per-chunk.patch @@ -8,7 +8,7 @@ to a chunk. The default values of -1 disable the limit. Although defaults are only included for certain entites, this allows setting limits for any entity type. -1.17: looks like tracking the count on should work fine just putting it in the EntityType#loadEntitiesRecursive, but +1.17: looks like tracking the count on loading should work fine just putting it in the EntityType#loadEntitiesRecursive, but the tracking count on save needs some more work to implement. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/patches/removed/1.17/0087-Remove-unused-World-Tile-Entity-List.patch b/patches/removed/1.17/No longer needed/0087-Remove-unused-World-Tile-Entity-List.patch similarity index 100% rename from patches/removed/1.17/0087-Remove-unused-World-Tile-Entity-List.patch rename to patches/removed/1.17/No longer needed/0087-Remove-unused-World-Tile-Entity-List.patch diff --git a/patches/removed/1.17/0367-Mark-entities-as-being-ticked-when-notifying-navigat.patch b/patches/removed/1.17/No longer needed/0367-Mark-entities-as-being-ticked-when-notifying-navigat.patch similarity index 100% rename from patches/removed/1.17/0367-Mark-entities-as-being-ticked-when-notifying-navigat.patch rename to patches/removed/1.17/No longer needed/0367-Mark-entities-as-being-ticked-when-notifying-navigat.patch diff --git a/patches/removed/1.17/0506-Limit-lightning-strike-effect-distance.patch b/patches/removed/1.17/No longer needed/0506-Limit-lightning-strike-effect-distance.patch similarity index 100% rename from patches/removed/1.17/0506-Limit-lightning-strike-effect-distance.patch rename to patches/removed/1.17/No longer needed/0506-Limit-lightning-strike-effect-distance.patch diff --git a/patches/removed/1.17/0334-Allow-Saving-of-Oversized-Chunks.patch b/patches/server/0334-Allow-Saving-of-Oversized-Chunks.patch similarity index 77% rename from patches/removed/1.17/0334-Allow-Saving-of-Oversized-Chunks.patch rename to patches/server/0334-Allow-Saving-of-Oversized-Chunks.patch index 2c2f7bdb5..2b81e0e59 100644 --- a/patches/removed/1.17/0334-Allow-Saving-of-Oversized-Chunks.patch +++ b/patches/server/0334-Allow-Saving-of-Oversized-Chunks.patch @@ -32,28 +32,8 @@ This fix also maintains compatability if someone switches server jars to one wit this fix, as the data will remain in the oversized file. Once the server returns to a jar with this fix, the data will be restored. -diff --git a/src/main/java/net/minecraft/nbt/NbtIo.java b/src/main/java/net/minecraft/nbt/NbtIo.java -index c4fbc0bc8b80d16f09d3c6642acc7476a0817868..b3838e709c1581c25da7738c9a03a827761845b1 100644 ---- a/src/main/java/net/minecraft/nbt/NbtIo.java -+++ b/src/main/java/net/minecraft/nbt/NbtIo.java -@@ -132,6 +132,7 @@ public class NbtIo { - - } - -+ public static CompoundTag readNBT(DataInput datainput) throws IOException { return read(datainput); } // Paper - OBFHELPER - public static CompoundTag read(DataInput input) throws IOException { - return read(input, NbtAccounter.UNLIMITED); - } -@@ -152,6 +153,7 @@ public class NbtIo { - } - } - -+ public static void writeNBT(CompoundTag nbttagcompound, DataOutput dataoutput) throws IOException { write(nbttagcompound, dataoutput); } // Paper - OBFHELPER - public static void write(CompoundTag tag, DataOutput output) throws IOException { - writeUnnamedTag((Tag) tag, output); - } diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -index 1aa4d342b97f8be71c108194a6f1e0e2828aa364..424628c9588c02454558bc7e7c5bad3a3e75ec9f 100644 +index 357da4846344d1182ab7149c4d352d5019384715..26ad58e7a73e63d2393eb277984be20472157539 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java @@ -20,8 +20,12 @@ import java.nio.file.LinkOption; @@ -69,25 +49,25 @@ index 1aa4d342b97f8be71c108194a6f1e0e2828aa364..424628c9588c02454558bc7e7c5bad3a import net.minecraft.world.level.ChunkPos; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -@@ -38,6 +42,7 @@ public class RegionFile implements AutoCloseable { - private final IntBuffer timestamps; +@@ -48,6 +52,7 @@ public class RegionFile implements AutoCloseable { @VisibleForTesting protected final RegionBitmap usedSectors; -+ public final File file; // Paper + public final java.util.concurrent.locks.ReentrantLock fileLock = new java.util.concurrent.locks.ReentrantLock(true); // Paper ++ public final File regionFile; // Paper public RegionFile(File file, File directory, boolean dsync) throws IOException { this(file.toPath(), directory.toPath(), RegionFileVersion.VERSION_DEFLATE, dsync); -@@ -45,6 +50,8 @@ public class RegionFile implements AutoCloseable { +@@ -55,6 +60,8 @@ public class RegionFile implements AutoCloseable { public RegionFile(Path file, Path directory, RegionFileVersion outputChunkStreamVersion, boolean dsync) throws IOException { this.header = ByteBuffer.allocateDirect(8192); -+ this.file = file.toFile(); // Paper ++ this.regionFile = file.toFile(); // Paper + initOversizedState(); // Paper this.usedSectors = new RegionBitmap(); this.version = outputChunkStreamVersion; if (!Files.isDirectory(directory, new LinkOption[0])) { -@@ -408,6 +415,74 @@ public class RegionFile implements AutoCloseable { - void run() throws IOException; +@@ -434,6 +441,74 @@ public class RegionFile implements AutoCloseable { + } + // Paper start @@ -143,26 +123,26 @@ index 1aa4d342b97f8be71c108194a6f1e0e2828aa364..424628c9588c02454558bc7e7c5bad3a + } + + private File getOversizedMetaFile() { -+ return new File(this.file.getParentFile(), this.file.getName().replaceAll("\\.mca$", "") + ".oversized.nbt"); ++ return new File(this.regionFile.getParentFile(), this.regionFile.getName().replaceAll("\\.mca$", "") + ".oversized.nbt"); + } + + private File getOversizedFile(int x, int z) { -+ return new File(this.file.getParentFile(), this.file.getName().replaceAll("\\.mca$", "") + "_oversized_" + x + "_" + z + ".nbt"); ++ return new File(this.regionFile.getParentFile(), this.regionFile.getName().replaceAll("\\.mca$", "") + "_oversized_" + x + "_" + z + ".nbt"); + } + + synchronized CompoundTag getOversizedData(int x, int z) throws IOException { + File file = getOversizedFile(x, z); + try (DataInputStream out = new DataInputStream(new BufferedInputStream(new InflaterInputStream(new java.io.FileInputStream(file))))) { -+ return NbtIo.readNBT((java.io.DataInput) out); ++ return NbtIo.read((java.io.DataInput) out); + } + + } + // Paper end - class ChunkBuffer extends ByteArrayOutputStream { + private class ChunkBuffer extends ByteArrayOutputStream { private final ChunkPos pos; diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java -index f33a5fc725d1d5e895f8878d82ebc4172237ad29..6d3e1bb20d1ab8ce5c9ea613322042d80550761a 100644 +index ebb1a050beab9530942c4498335f084c89faef06..f53268f2d7d2d1909d64d06bb6a61086386830e1 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java @@ -10,7 +10,9 @@ import java.io.File; @@ -175,7 +155,7 @@ index f33a5fc725d1d5e895f8878d82ebc4172237ad29..6d3e1bb20d1ab8ce5c9ea613322042d8 import net.minecraft.server.MinecraftServer; import net.minecraft.util.ExceptionCollector; import net.minecraft.world.level.ChunkPos; -@@ -50,6 +52,74 @@ public final class RegionFileStorage implements AutoCloseable { +@@ -81,6 +83,74 @@ public class RegionFileStorage implements AutoCloseable { } } @@ -204,7 +184,7 @@ index f33a5fc725d1d5e895f8878d82ebc4172237ad29..6d3e1bb20d1ab8ce5c9ea613322042d8 + synchronized (regionfile) { + try (DataInputStream datainputstream = regionfile.getReadStream(chunkCoordinate)) { + CompoundTag oversizedData = regionfile.getOversizedData(chunkCoordinate.x, chunkCoordinate.z); -+ CompoundTag chunk = NbtIo.readNBT((DataInput) datainputstream); ++ CompoundTag chunk = NbtIo.read((DataInput) datainputstream); + if (oversizedData == null) { + return chunk; + } @@ -250,24 +230,24 @@ index f33a5fc725d1d5e895f8878d82ebc4172237ad29..6d3e1bb20d1ab8ce5c9ea613322042d8 @Nullable public CompoundTag read(ChunkPos pos) throws IOException { // CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing -@@ -59,6 +129,12 @@ public final class RegionFileStorage implements AutoCloseable { - } - // CraftBukkit end +@@ -92,6 +162,12 @@ public class RegionFileStorage implements AutoCloseable { + try { // Paper DataInputStream datainputstream = regionfile.getChunkDataInputStream(pos); + + // Paper start + if (regionfile.isOversized(pos.x, pos.z)) { -+ printOversizedLog("Loading Oversized Chunk!", regionfile.file, pos.x, pos.z); ++ printOversizedLog("Loading Oversized Chunk!", regionfile.regionFile, pos.x, pos.z); + return readOversizedChunk(regionfile, pos); + } + // Paper end - Throwable throwable = null; - CompoundTag nbttagcompound; -@@ -99,6 +175,7 @@ public final class RegionFileStorage implements AutoCloseable { + label43: + { +@@ -143,6 +219,7 @@ public class RegionFileStorage implements AutoCloseable { - try { - NbtIo.write(tag, (DataOutput) dataoutputstream); -+ regionfile.setOversized(pos.x, pos.z, false); // Paper - We don't do this anymore, mojang stores differently, but clear old meta flag if it exists to get rid of our own meta file once last oversized is gone - } catch (Throwable throwable1) { - throwable = throwable1; - throw throwable1; + try { + NbtIo.write(nbt, (DataOutput) dataoutputstream); ++ regionfile.setOversized(pos.x, pos.z, false); // Paper - We don't do this anymore, mojang stores differently, but clear old meta flag if it exists to get rid of our own meta file once last oversized is gone + } catch (Throwable throwable) { + if (dataoutputstream != null) { + try { diff --git a/patches/server/0334-Fix-World-isChunkGenerated-calls.patch b/patches/server/0335-Fix-World-isChunkGenerated-calls.patch similarity index 95% rename from patches/server/0334-Fix-World-isChunkGenerated-calls.patch rename to patches/server/0335-Fix-World-isChunkGenerated-calls.patch index ce3b66652..98d145121 100644 --- a/patches/server/0334-Fix-World-isChunkGenerated-calls.patch +++ b/patches/server/0335-Fix-World-isChunkGenerated-calls.patch @@ -172,20 +172,20 @@ index 2621739b8dd11860084ea574c243cb8ba167ac40..fc320450878279a6aa48019fbde35bb1 if (nbt != null) { ChunkStatus chunkstatus = ChunkStatus.byName(nbt.getCompound("Level").getString("Status")); diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -index 357da4846344d1182ab7149c4d352d5019384715..832392cc2adc94e1fcb1055d91eb465529da1e92 100644 +index 26ad58e7a73e63d2393eb277984be20472157539..3dae5a4d13118c232529d4d5af29bf7b76ac2a7c 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -@@ -23,6 +23,7 @@ import java.nio.file.StandardOpenOption; - import javax.annotation.Nullable; - import net.minecraft.Util; +@@ -27,6 +27,7 @@ import net.minecraft.Util; + import net.minecraft.nbt.CompoundTag; + import net.minecraft.nbt.NbtIo; import net.minecraft.world.level.ChunkPos; +import net.minecraft.world.level.chunk.ChunkStatus; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -@@ -49,6 +50,30 @@ public class RegionFile implements AutoCloseable { - protected final RegionBitmap usedSectors; +@@ -54,6 +55,30 @@ public class RegionFile implements AutoCloseable { public final java.util.concurrent.locks.ReentrantLock fileLock = new java.util.concurrent.locks.ReentrantLock(true); // Paper + public final File regionFile; // Paper + // Paper start - Cache chunk status + private final ChunkStatus[] statuses = new ChunkStatus[32 * 32]; @@ -214,7 +214,7 @@ index 357da4846344d1182ab7149c4d352d5019384715..832392cc2adc94e1fcb1055d91eb4655 public RegionFile(File file, File directory, boolean dsync) throws IOException { this(file.toPath(), directory.toPath(), RegionFileVersion.VERSION_DEFLATE, dsync); } -@@ -395,6 +420,7 @@ public class RegionFile implements AutoCloseable { +@@ -402,6 +427,7 @@ public class RegionFile implements AutoCloseable { return this.getOffset(pos) != 0; } @@ -222,7 +222,7 @@ index 357da4846344d1182ab7149c4d352d5019384715..832392cc2adc94e1fcb1055d91eb4655 private static int getOffsetIndex(ChunkPos pos) { return pos.getRegionLocalX() + pos.getRegionLocalZ() * 32; } -@@ -405,6 +431,7 @@ public class RegionFile implements AutoCloseable { +@@ -412,6 +438,7 @@ public class RegionFile implements AutoCloseable { synchronized (this) { try { // Paper end @@ -231,22 +231,17 @@ index 357da4846344d1182ab7149c4d352d5019384715..832392cc2adc94e1fcb1055d91eb4655 this.padToFullSector(); } finally { diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java -index ebb1a050beab9530942c4498335f084c89faef06..4ab881f0488af3577deda2f90a31a3f9243306dc 100644 +index f53268f2d7d2d1909d64d06bb6a61086386830e1..e1b9051f8537db6f023cfdeaca4fb89305ece363 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java -@@ -143,6 +143,7 @@ public class RegionFileStorage implements AutoCloseable { +@@ -219,6 +219,7 @@ public class RegionFileStorage implements AutoCloseable { try { NbtIo.write(nbt, (DataOutput) dataoutputstream); + regionfile.setStatus(pos.x, pos.z, ChunkSerializer.getStatus(nbt)); // Paper - cache status on disk + regionfile.setOversized(pos.x, pos.z, false); // Paper - We don't do this anymore, mojang stores differently, but clear old meta flag if it exists to get rid of our own meta file once last oversized is gone } catch (Throwable throwable) { if (dataoutputstream != null) { - try { -@@ -205,3 +206,4 @@ public class RegionFileStorage implements AutoCloseable { - - } - } -+ diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 98b2d054b6436e3fdb8fadd03369a65cf4156843..f9c58de7fa8b3c2ab5ac78cf0b366df69e0b40df 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/patches/server/0335-Show-blockstate-location-if-we-failed-to-read-it.patch b/patches/server/0336-Show-blockstate-location-if-we-failed-to-read-it.patch similarity index 100% rename from patches/server/0335-Show-blockstate-location-if-we-failed-to-read-it.patch rename to patches/server/0336-Show-blockstate-location-if-we-failed-to-read-it.patch diff --git a/patches/server/0336-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/patches/server/0337-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch similarity index 100% rename from patches/server/0336-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch rename to patches/server/0337-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch diff --git a/patches/server/0337-Configurable-projectile-relative-velocity.patch b/patches/server/0338-Configurable-projectile-relative-velocity.patch similarity index 100% rename from patches/server/0337-Configurable-projectile-relative-velocity.patch rename to patches/server/0338-Configurable-projectile-relative-velocity.patch diff --git a/patches/server/0338-offset-item-frame-ticking.patch b/patches/server/0339-offset-item-frame-ticking.patch similarity index 100% rename from patches/server/0338-offset-item-frame-ticking.patch rename to patches/server/0339-offset-item-frame-ticking.patch diff --git a/patches/server/0339-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch b/patches/server/0340-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch similarity index 100% rename from patches/server/0339-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch rename to patches/server/0340-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch diff --git a/patches/server/0340-Fix-MC-158900.patch b/patches/server/0341-Fix-MC-158900.patch similarity index 100% rename from patches/server/0340-Fix-MC-158900.patch rename to patches/server/0341-Fix-MC-158900.patch diff --git a/patches/server/0341-Prevent-consuming-the-wrong-itemstack.patch b/patches/server/0342-Prevent-consuming-the-wrong-itemstack.patch similarity index 100% rename from patches/server/0341-Prevent-consuming-the-wrong-itemstack.patch rename to patches/server/0342-Prevent-consuming-the-wrong-itemstack.patch diff --git a/patches/server/0342-Generator-Settings.patch b/patches/server/0343-Generator-Settings.patch similarity index 100% rename from patches/server/0342-Generator-Settings.patch rename to patches/server/0343-Generator-Settings.patch diff --git a/patches/server/0343-Fix-MC-161754.patch b/patches/server/0344-Fix-MC-161754.patch similarity index 100% rename from patches/server/0343-Fix-MC-161754.patch rename to patches/server/0344-Fix-MC-161754.patch diff --git a/patches/server/0344-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch b/patches/server/0345-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch similarity index 100% rename from patches/server/0344-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch rename to patches/server/0345-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch diff --git a/patches/server/0345-Expose-the-internal-current-tick.patch b/patches/server/0346-Expose-the-internal-current-tick.patch similarity index 100% rename from patches/server/0345-Expose-the-internal-current-tick.patch rename to patches/server/0346-Expose-the-internal-current-tick.patch diff --git a/patches/server/0346-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch b/patches/server/0347-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch similarity index 100% rename from patches/server/0346-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch rename to patches/server/0347-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch diff --git a/patches/server/0347-Add-option-to-disable-pillager-patrols.patch b/patches/server/0348-Add-option-to-disable-pillager-patrols.patch similarity index 100% rename from patches/server/0347-Add-option-to-disable-pillager-patrols.patch rename to patches/server/0348-Add-option-to-disable-pillager-patrols.patch diff --git a/patches/server/0348-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch b/patches/server/0349-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch similarity index 100% rename from patches/server/0348-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch rename to patches/server/0349-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch diff --git a/patches/server/0349-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch b/patches/server/0350-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch similarity index 100% rename from patches/server/0349-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch rename to patches/server/0350-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch diff --git a/patches/server/0350-MC-145656-Fix-Follow-Range-Initial-Target.patch b/patches/server/0351-MC-145656-Fix-Follow-Range-Initial-Target.patch similarity index 100% rename from patches/server/0350-MC-145656-Fix-Follow-Range-Initial-Target.patch rename to patches/server/0351-MC-145656-Fix-Follow-Range-Initial-Target.patch diff --git a/patches/removed/1.17/0352-Duplicate-UUID-Resolve-Option.patch b/patches/server/0352-Duplicate-UUID-Resolve-Option.patch similarity index 55% rename from patches/removed/1.17/0352-Duplicate-UUID-Resolve-Option.patch rename to patches/server/0352-Duplicate-UUID-Resolve-Option.patch index 29914b85b..5238e1c3f 100644 --- a/patches/removed/1.17/0352-Duplicate-UUID-Resolve-Option.patch +++ b/patches/server/0352-Duplicate-UUID-Resolve-Option.patch @@ -33,14 +33,13 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA It is recommended you regenerate the entities, as these were legit entities, and deserve your love. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index fbf3ccfb347a5ba6e895339e9576629d940d1aa4..38d25a12c6a52d8a83214e2a0f43a218cf15ceac 100644 +index 8190c30346c0fd2d86fb7cbcfc7ce17333e05146..9860f5a0ddff83f1393ee13a96b38c3b14077512 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -401,4 +401,43 @@ public class PaperWorldConfig { - private void preventMovingIntoUnloadedChunks() { +@@ -402,6 +402,45 @@ public class PaperWorldConfig { preventMovingIntoUnloadedChunks = getBoolean("prevent-moving-into-unloaded-chunks", false); } -+ + + public enum DuplicateUUIDMode { + SAFE_REGEN, DELETE, NOTHING, WARN + } @@ -79,9 +78,12 @@ index fbf3ccfb347a5ba6e895339e9576629d940d1aa4..38d25a12c6a52d8a83214e2a0f43a218 + break; + } + } - } ++ + public boolean countAllMobsForSpawning = false; + private void countAllMobsForSpawning() { + countAllMobsForSpawning = getBoolean("count-all-mobs-for-spawning", false); diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 083db6c1899b5391231b6d5d5044a334212f148c..5d87a282042d7112415b7d7175031f734219f2c9 100644 +index 6d69f15d90e9096f0ee6cb7259effa87622c787b..7345d92ccebf6ca4011e2845628e2cf29b462277 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -1,6 +1,7 @@ @@ -92,12 +94,12 @@ index 083db6c1899b5391231b6d5d5044a334212f148c..5d87a282042d7112415b7d7175031f73 import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import com.google.common.collect.ComparisonChain; // Paper -@@ -23,14 +24,17 @@ import it.unimi.dsi.fastutil.objects.ObjectIterator; - import java.io.File; +@@ -24,13 +25,17 @@ import java.io.File; import java.io.IOException; import java.io.Writer; + import java.util.BitSet; +import java.util.HashMap; // Paper - import java.util.Collection; ++import java.util.Collection; import java.util.Iterator; import java.util.List; +import java.util.Map; // Paper @@ -109,45 +111,21 @@ index 083db6c1899b5391231b6d5d5044a334212f148c..5d87a282042d7112415b7d7175031f73 +import java.util.UUID; // Paper import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionException; - import java.util.concurrent.Executor; -@@ -71,6 +75,7 @@ import net.minecraft.world.entity.ai.village.poi.PoiManager; - import net.minecraft.world.entity.boss.EnderDragonPart; - import net.minecraft.world.level.ChunkPos; - import net.minecraft.world.level.GameRules; -+import net.minecraft.world.level.Level; - import net.minecraft.world.level.chunk.ChunkAccess; - import net.minecraft.world.level.chunk.ChunkGenerator; - import net.minecraft.world.level.chunk.ChunkStatus; -@@ -697,18 +702,18 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - if (chunk.needsDecoration) { - net.minecraft.server.dedicated.DedicatedServer server = this.level.getCraftServer().getServer(); - if (!server.areNpcsEnabled() && entity instanceof net.minecraft.world.entity.npc.Npc) { -- entity.remove(); -+ entity.removed = true; // Paper - needsRemoval = true; - } - - if (!server.isSpawningAnimals() && (entity instanceof net.minecraft.world.entity.animal.Animal || entity instanceof net.minecraft.world.entity.animal.WaterAnimal)) { -- entity.remove(); -+ entity.removed = true; // Paper - needsRemoval = true; - } - } -- -- if (!(entity instanceof net.minecraft.world.entity.player.Player) && (needsRemoval || !this.level.loadFromChunk(entity))) { -- // CraftBukkit end -+ // CraftBukkit end -+ checkDupeUUID(entity); // Paper -+ if (!(entity instanceof net.minecraft.world.entity.player.Player) && (entity.removed || !this.level.loadFromChunk(entity))) { // Paper - if (list == null) { - list = Lists.newArrayList(new Entity[]{entity}); - } else { -@@ -735,6 +740,44 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + import java.util.concurrent.CompletionStage; +@@ -788,6 +793,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + entity.discard(); + needsRemoval = true; + } ++ checkDupeUUID(worldserver, entity); // Paper + return !needsRemoval; + })); + // CraftBukkit end +@@ -837,6 +843,43 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider }); } + // Paper start -+ private void checkDupeUUID(Entity entity) { ++ private static void checkDupeUUID(ServerLevel level, Entity entity) { + PaperWorldConfig.DuplicateUUIDMode mode = level.paperConfig.duplicateUUIDMode; + if (mode != PaperWorldConfig.DuplicateUUIDMode.WARN + && mode != PaperWorldConfig.DuplicateUUIDMode.DELETE @@ -156,15 +134,15 @@ index 083db6c1899b5391231b6d5d5044a334212f148c..5d87a282042d7112415b7d7175031f73 + } + Entity other = level.getEntity(entity.getUUID()); + -+ if (mode == PaperWorldConfig.DuplicateUUIDMode.SAFE_REGEN && other != null && !other.removed -+ && Objects.equals(other.getEncodeId(), entity.getEncodeId()) -+ && entity.getBukkitEntity().getLocation().distance(other.getBukkitEntity().getLocation()) < level.paperConfig.duplicateUUIDDeleteRange ++ if (mode == PaperWorldConfig.DuplicateUUIDMode.SAFE_REGEN && other != null && !other.isRemoved() ++ && Objects.equals(other.getEncodeId(), entity.getEncodeId()) ++ && entity.getBukkitEntity().getLocation().distance(other.getBukkitEntity().getLocation()) < level.paperConfig.duplicateUUIDDeleteRange + ) { + if (Level.DEBUG_ENTITIES) LOGGER.warn("[DUPE-UUID] Duplicate UUID found used by " + other + ", deleted entity " + entity + " because it was near the duplicate and likely an actual duplicate. See https://github.com/PaperMC/Paper/issues/1223 for discussion on what this is about."); -+ entity.removed = true; ++ entity.discard(); + return; + } -+ if (other != null && !other.removed) { ++ if (other != null && !other.isRemoved()) { + switch (mode) { + case SAFE_REGEN: { + entity.setUUID(UUID.randomUUID()); @@ -173,7 +151,7 @@ index 083db6c1899b5391231b6d5d5044a334212f148c..5d87a282042d7112415b7d7175031f73 + } + case DELETE: { + if (Level.DEBUG_ENTITIES) LOGGER.warn("[DUPE-UUID] Duplicate UUID found used by " + other + ", deleted entity " + entity + ". See https://github.com/PaperMC/Paper/issues/1223 for discussion on what this is about."); -+ entity.removed = true; ++ entity.discard(); + break; + } + default: @@ -183,67 +161,68 @@ index 083db6c1899b5391231b6d5d5044a334212f148c..5d87a282042d7112415b7d7175031f73 + } + } + // Paper end -+ - public CompletableFuture> postProcess(ChunkHolder holder) { + public CompletableFuture> prepareTickingChunk(ChunkHolder holder) { ChunkPos chunkcoordintpair = holder.getPos(); CompletableFuture, ChunkHolder.ChunkLoadingFailure>> completablefuture = this.getChunkRangeFuture(chunkcoordintpair, 1, (i) -> { -diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 99883c83c126405fc93becefed8a1d0727b94aa7..20b74fc8e1273fcd07ea4417eaedc8bd9aba93b3 100644 ---- a/src/main/java/net/minecraft/server/level/ServerLevel.java -+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -4,6 +4,8 @@ import com.google.common.annotations.VisibleForTesting; - import com.google.common.collect.Iterables; - import co.aikar.timings.TimingHistory; // Paper - import co.aikar.timings.Timings; // Paper -+ -+import com.destroystokyo.paper.PaperWorldConfig; // Paper - import com.google.common.collect.Lists; - import com.google.common.collect.Maps; - import com.google.common.collect.Queues; -@@ -1102,7 +1104,22 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl - if (entity1 == null) { - return false; - } else { +diff --git a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java +index 390d841d34bb0ef67fe5b82199fbe268277a5f44..58de276b1ba709d466ca8e6bde42be4f3bdcf26c 100644 +--- a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java ++++ b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java +@@ -61,7 +61,21 @@ public class PersistentEntitySectionManager implements A + + private boolean addEntityUuid(T entity) { + if (!this.knownUuids.add(entity.getUUID())) { + // Paper start -+ if (entity1.removed) { -+ onEntityRemoved(entity1); // remove the existing entity ++ if (((Entity) entity).isRemoved()) { ++ stopTracking(entity); // remove the existing entity + return false; + } + // Paper end - ServerLevel.LOGGER.warn("Trying to add entity with duplicated UUID {}. Existing {}#{}, new: {}#{}", uuid, EntityType.getKey(entity1.getType()), entity1.getId(), EntityType.getKey(entity.getType()), entity.getId()); // CraftBukkit // Paper + LOGGER.warn("UUID of added entity already exists: {}", (Object)entity); + // Paper start -+ if (DEBUG_ENTITIES && entity.level.paperConfig.duplicateUUIDMode != PaperWorldConfig.DuplicateUUIDMode.NOTHING) { -+ if (entity1.addedToWorldStack != null) { -+ entity1.addedToWorldStack.printStackTrace(); ++ if (net.minecraft.world.level.Level.DEBUG_ENTITIES && ((Entity) entity).level.paperConfig.duplicateUUIDMode != com.destroystokyo.paper.PaperWorldConfig.DuplicateUUIDMode.NOTHING) { ++ if (((Entity) entity).addedToWorldStack != null) { ++ ((Entity) entity).addedToWorldStack.printStackTrace(); + } -+ -+ getAddToWorldStackTrace(entity).printStackTrace(); ++ net.minecraft.server.level.ServerLevel.getAddToWorldStackTrace((net.minecraft.world.entity.Entity) entity).printStackTrace(); + } + // Paper end + return false; + } else { return true; - } +@@ -238,7 +252,7 @@ public class PersistentEntitySectionManager implements A } -diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 6faac8773136412ca129dfa884178f311e197f6e..af86c370c6f834514115a8e40659f5e1aaabec75 100644 ---- a/src/main/java/net/minecraft/world/entity/Entity.java -+++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2803,6 +2803,7 @@ public abstract class Entity implements Nameable, CommandSource, net.minecraft.s + + private void processUnloads() { +- this.chunksToUnload.removeIf((pos) -> { ++ this.chunksToUnload.removeIf((java.util.function.LongPredicate) (pos) -> { // Paper - decompile fix + return this.chunkVisibility.get(pos) != Visibility.HIDDEN ? true : this.processChunkUnload(pos); }); } +@@ -272,7 +286,7 @@ public class PersistentEntitySectionManager implements A + } -+ public final void setUUID(UUID uuid) { setUUID(uuid); } // Paper - OBFHELPER - public void setUUID(UUID uuid) { - this.uuid = uuid; - this.stringUUID = this.uuid.toString(); -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 db28bfe95c885cdefa855c7aaa3bcf92bc52df26..55872a17060a35b727a597bc414fecec3ada3515 100644 ---- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -541,6 +541,7 @@ public class LevelChunk implements ChunkAccess { - if (i != this.chunkPos.x || j != this.chunkPos.z) { - LevelChunk.LOGGER.warn("Wrong location! ({}, {}) should be ({}, {}), {}", i, j, this.chunkPos.x, this.chunkPos.z, entity); - entity.removed = true; -+ return; // Paper - } + public void autoSave() { +- this.getAllChunksToSave().forEach((pos) -> { ++ this.getAllChunksToSave().forEach((java.util.function.LongConsumer) (pos) -> { // Paper - decompile fix + boolean bl = this.chunkVisibility.get(pos) == Visibility.HIDDEN; + if (bl) { + this.processChunkUnload(pos); +@@ -290,7 +304,7 @@ public class PersistentEntitySectionManager implements A + while(!longSet.isEmpty()) { + this.permanentStorage.flush(); + this.processPendingLoads(); +- longSet.removeIf((pos) -> { ++ longSet.removeIf((java.util.function.LongPredicate) (pos) -> { // Paper - decompile fix + boolean bl = this.chunkVisibility.get(pos) == Visibility.HIDDEN; + return bl ? this.processChunkUnload(pos) : this.storeChunkSections(pos, (entityAccess) -> { + }); +@@ -327,7 +341,7 @@ public class PersistentEntitySectionManager implements A - int k = Mth.floor(entity.getY() / 16.0D); + public void dumpSections(Writer writer) throws IOException { + CsvOutput csvOutput = CsvOutput.builder().addColumn("x").addColumn("y").addColumn("z").addColumn("visibility").addColumn("load_status").addColumn("entity_count").build(writer); +- this.sectionStorage.getAllChunksWithExistingSections().forEach((chunkPos) -> { ++ this.sectionStorage.getAllChunksWithExistingSections().forEach((java.util.function.LongConsumer) (chunkPos) -> { // Paper - decompile fix + PersistentEntitySectionManager.ChunkLoadStatus chunkLoadStatus = this.chunkLoadStatuses.get(chunkPos); + this.sectionStorage.getExistingSectionPositionsInChunk(chunkPos).forEach((sectionPos) -> { + EntitySection entitySection = this.sectionStorage.getSection(sectionPos); diff --git a/patches/server/0351-Optimize-Hoppers.patch b/patches/server/0353-Optimize-Hoppers.patch similarity index 99% rename from patches/server/0351-Optimize-Hoppers.patch rename to patches/server/0353-Optimize-Hoppers.patch index b4d794752..0a9295daa 100644 --- a/patches/server/0351-Optimize-Hoppers.patch +++ b/patches/server/0353-Optimize-Hoppers.patch @@ -13,10 +13,10 @@ Subject: [PATCH] Optimize Hoppers * Remove Streams from Item Suck In and restore restore 1.12 AABB checks which is simpler and no voxel allocations (was doing TWO Item Suck ins) diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 8190c30346c0fd2d86fb7cbcfc7ce17333e05146..041efecbfcd54384d15ebf771cdfa0e711483997 100644 +index 9860f5a0ddff83f1393ee13a96b38c3b14077512..bf704993d0abd50dba91682a7fbb575e3696be62 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -431,5 +431,14 @@ public class PaperWorldConfig { +@@ -470,5 +470,14 @@ public class PaperWorldConfig { private void entitiesTargetWithFollowRange() { entitiesTargetWithFollowRange = getBoolean("entities-target-with-follow-range", entitiesTargetWithFollowRange); } diff --git a/patches/server/0352-PlayerDeathEvent-shouldDropExperience.patch b/patches/server/0354-PlayerDeathEvent-shouldDropExperience.patch similarity index 100% rename from patches/server/0352-PlayerDeathEvent-shouldDropExperience.patch rename to patches/server/0354-PlayerDeathEvent-shouldDropExperience.patch diff --git a/patches/server/0353-Prevent-bees-loading-chunks-checking-hive-position.patch b/patches/server/0355-Prevent-bees-loading-chunks-checking-hive-position.patch similarity index 100% rename from patches/server/0353-Prevent-bees-loading-chunks-checking-hive-position.patch rename to patches/server/0355-Prevent-bees-loading-chunks-checking-hive-position.patch diff --git a/patches/server/0354-Don-t-load-Chunks-from-Hoppers-and-other-things.patch b/patches/server/0356-Don-t-load-Chunks-from-Hoppers-and-other-things.patch similarity index 100% rename from patches/server/0354-Don-t-load-Chunks-from-Hoppers-and-other-things.patch rename to patches/server/0356-Don-t-load-Chunks-from-Hoppers-and-other-things.patch diff --git a/patches/server/0355-Guard-against-serializing-mismatching-chunk-coordina.patch b/patches/server/0357-Guard-against-serializing-mismatching-chunk-coordina.patch similarity index 100% rename from patches/server/0355-Guard-against-serializing-mismatching-chunk-coordina.patch rename to patches/server/0357-Guard-against-serializing-mismatching-chunk-coordina.patch diff --git a/patches/server/0356-Optimise-IEntityAccess-getPlayerByUUID.patch b/patches/server/0358-Optimise-IEntityAccess-getPlayerByUUID.patch similarity index 100% rename from patches/server/0356-Optimise-IEntityAccess-getPlayerByUUID.patch rename to patches/server/0358-Optimise-IEntityAccess-getPlayerByUUID.patch diff --git a/patches/server/0357-Fix-items-not-falling-correctly.patch b/patches/server/0359-Fix-items-not-falling-correctly.patch similarity index 100% rename from patches/server/0357-Fix-items-not-falling-correctly.patch rename to patches/server/0359-Fix-items-not-falling-correctly.patch diff --git a/patches/server/0358-Lag-compensate-eating.patch b/patches/server/0360-Lag-compensate-eating.patch similarity index 100% rename from patches/server/0358-Lag-compensate-eating.patch rename to patches/server/0360-Lag-compensate-eating.patch diff --git a/patches/server/0359-Optimize-call-to-getFluid-for-explosions.patch b/patches/server/0361-Optimize-call-to-getFluid-for-explosions.patch similarity index 100% rename from patches/server/0359-Optimize-call-to-getFluid-for-explosions.patch rename to patches/server/0361-Optimize-call-to-getFluid-for-explosions.patch diff --git a/patches/server/0360-Fix-last-firework-in-stack-not-having-effects-when-d.patch b/patches/server/0362-Fix-last-firework-in-stack-not-having-effects-when-d.patch similarity index 100% rename from patches/server/0360-Fix-last-firework-in-stack-not-having-effects-when-d.patch rename to patches/server/0362-Fix-last-firework-in-stack-not-having-effects-when-d.patch diff --git a/patches/server/0361-Add-effect-to-block-break-naturally.patch b/patches/server/0363-Add-effect-to-block-break-naturally.patch similarity index 100% rename from patches/server/0361-Add-effect-to-block-break-naturally.patch rename to patches/server/0363-Add-effect-to-block-break-naturally.patch diff --git a/patches/server/0362-Entity-Activation-Range-2.0.patch b/patches/server/0364-Entity-Activation-Range-2.0.patch similarity index 100% rename from patches/server/0362-Entity-Activation-Range-2.0.patch rename to patches/server/0364-Entity-Activation-Range-2.0.patch diff --git a/patches/server/0363-Increase-Light-Queue-Size.patch b/patches/server/0365-Increase-Light-Queue-Size.patch similarity index 93% rename from patches/server/0363-Increase-Light-Queue-Size.patch rename to patches/server/0365-Increase-Light-Queue-Size.patch index 980579a32..f92506167 100644 --- a/patches/server/0363-Increase-Light-Queue-Size.patch +++ b/patches/server/0365-Increase-Light-Queue-Size.patch @@ -14,10 +14,10 @@ light engine on shutdown... The queue size only puts a cap on max loss, doesn't solve that problem. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 041efecbfcd54384d15ebf771cdfa0e711483997..e29566cad2647da4d9288e912188b57f00e8dd0c 100644 +index bf704993d0abd50dba91682a7fbb575e3696be62..a91a7d8f56a068b18d50a8b987b71510b0a19d5b 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -440,5 +440,10 @@ public class PaperWorldConfig { +@@ -479,5 +479,10 @@ public class PaperWorldConfig { disableHopperMoveEvents = getBoolean("hopper.disable-move-event", disableHopperMoveEvents); log("Hopper Move Item Events: " + (disableHopperMoveEvents ? "disabled" : "enabled")); } diff --git a/patches/server/0364-Fix-Light-Command.patch b/patches/server/0366-Fix-Light-Command.patch similarity index 97% rename from patches/server/0364-Fix-Light-Command.patch rename to patches/server/0366-Fix-Light-Command.patch index 80d2a105f..d203856b2 100644 --- a/patches/server/0364-Fix-Light-Command.patch +++ b/patches/server/0366-Fix-Light-Command.patch @@ -134,10 +134,10 @@ index 71ffa66973d8994e2a480435ac1ada3fe61600a4..7b5afc5d34b78e6404c1a5c6bb823d95 + } } diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 6d69f15d90e9096f0ee6cb7259effa87622c787b..fe0fd4e590f7ceb47467c692c81e2b3579596f4e 100644 +index 7345d92ccebf6ca4011e2845628e2cf29b462277..d11c04ddd2bb40f1d0bbc98da8eb43a9f7b57f63 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -123,6 +123,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -128,6 +128,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider private final ChunkTaskPriorityQueueSorter queueSorter; private final ProcessorHandle> worldgenMailbox; private final ProcessorHandle> mainThreadMailbox; @@ -150,7 +150,7 @@ index 6d69f15d90e9096f0ee6cb7259effa87622c787b..fe0fd4e590f7ceb47467c692c81e2b35 public final ChunkProgressListener progressListener; private final ChunkStatusUpdateListener chunkStatusListener; public final ChunkMap.ChunkDistanceManager distanceManager; -@@ -199,11 +205,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -204,11 +210,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.progressListener = worldGenerationProgressListener; this.chunkStatusListener = chunkStatusChangeListener; diff --git a/patches/server/0365-Anti-Xray.patch b/patches/server/0367-Anti-Xray.patch similarity index 99% rename from patches/server/0365-Anti-Xray.patch rename to patches/server/0367-Anti-Xray.patch index ebe19a754..5e46c5b21 100644 --- a/patches/server/0365-Anti-Xray.patch +++ b/patches/server/0367-Anti-Xray.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Anti-Xray diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index e29566cad2647da4d9288e912188b57f00e8dd0c..edb9952ddd014c92b9604a9a187fdcd46de8a04f 100644 +index a91a7d8f56a068b18d50a8b987b71510b0a19d5b..c1bf19629cca9a6b616a63ae7a919827ec839c12 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -1,7 +1,9 @@ @@ -18,7 +18,7 @@ index e29566cad2647da4d9288e912188b57f00e8dd0c..edb9952ddd014c92b9604a9a187fdcd4 import org.bukkit.Bukkit; import org.bukkit.configuration.file.YamlConfiguration; import org.spigotmc.SpigotWorldConfig; -@@ -445,5 +447,41 @@ public class PaperWorldConfig { +@@ -484,5 +486,41 @@ public class PaperWorldConfig { private void lightQueueSize() { lightQueueSize = getInt("light-queue-size", lightQueueSize); } @@ -1105,10 +1105,10 @@ index c28879f32b004f36ff746ea2274f91ddd9501e71..7762d8ff94f856d613a6f50311006b69 + // Paper end } diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index fe0fd4e590f7ceb47467c692c81e2b3579596f4e..3a16316a8ecd658b2fbd473fa6ff14abe18e00de 100644 +index d11c04ddd2bb40f1d0bbc98da8eb43a9f7b57f63..2e08fc8f9d139609e063f4c7d8f3f2bf440abf0d 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1444,7 +1444,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1487,7 +1487,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public void playerLoadedChunk(ServerPlayer player, Packet[] packets, LevelChunk chunk) { if (packets[0] == null) { diff --git a/patches/server/0366-No-Tick-view-distance-implementation.patch b/patches/server/0368-No-Tick-view-distance-implementation.patch similarity index 97% rename from patches/server/0366-No-Tick-view-distance-implementation.patch rename to patches/server/0368-No-Tick-view-distance-implementation.patch index b4c7643d1..9ddb40693 100644 --- a/patches/server/0366-No-Tick-view-distance-implementation.patch +++ b/patches/server/0368-No-Tick-view-distance-implementation.patch @@ -23,10 +23,10 @@ index f27fadc15cb7f5c782e45885ec6a5a69963beade..2ff4d4921e2076abf415bd3c8f5173ec })); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index edb9952ddd014c92b9604a9a187fdcd46de8a04f..3e3097f23f775eec4107f5c2f3f2266f4250ba15 100644 +index c1bf19629cca9a6b616a63ae7a919827ec839c12..ab39c75da393f639b8b6f20bbcb00b4f6513d702 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -448,6 +448,11 @@ public class PaperWorldConfig { +@@ -487,6 +487,11 @@ public class PaperWorldConfig { lightQueueSize = getInt("light-queue-size", lightQueueSize); } @@ -145,10 +145,10 @@ index 2aa86f35b8960273ad91b21e260bcf91cf861e08..8fff5580a88fd1643845967eb7bdab26 public CompletableFuture> getOrScheduleFuture(ChunkStatus targetStatus, ChunkMap chunkStorage) { diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 3a16316a8ecd658b2fbd473fa6ff14abe18e00de..91930daa3c965dcc1cb50ae260c159be55f351ed 100644 +index 2e08fc8f9d139609e063f4c7d8f3f2bf440abf0d..63608698747abc8577fe2bd6746e779122377895 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -122,7 +122,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -127,7 +127,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider private boolean modified; private final ChunkTaskPriorityQueueSorter queueSorter; private final ProcessorHandle> worldgenMailbox; @@ -157,7 +157,7 @@ index 3a16316a8ecd658b2fbd473fa6ff14abe18e00de..91930daa3c965dcc1cb50ae260c159be // Paper start final ProcessorHandle> mailboxLight; public void addLightTask(ChunkHolder playerchunk, Runnable run) { -@@ -164,21 +164,68 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -169,21 +169,68 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // Paper start - distance maps private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>(); @@ -226,7 +226,7 @@ index 3a16316a8ecd658b2fbd473fa6ff14abe18e00de..91930daa3c965dcc1cb50ae260c159be } // Paper end -@@ -216,6 +263,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -221,6 +268,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.overworldDataStorage = persistentStateManagerFactory; this.poiManager = new PoiManager(new File(this.storageFolder, "poi"), dataFixer, dsync, world); this.setViewDistance(viewDistance); @@ -272,7 +272,7 @@ index 3a16316a8ecd658b2fbd473fa6ff14abe18e00de..91930daa3c965dcc1cb50ae260c159be } private static double euclideanDistanceSquared(ChunkPos pos, Entity entity) { -@@ -863,14 +949,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -906,14 +992,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider completablefuture1.thenAcceptAsync((either) -> { either.ifLeft((chunk) -> { this.tickingGenerated.getAndIncrement(); @@ -289,7 +289,7 @@ index 3a16316a8ecd658b2fbd473fa6ff14abe18e00de..91930daa3c965dcc1cb50ae260c159be }); return completablefuture1; } -@@ -963,27 +1045,34 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1006,27 +1088,34 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } public void setViewDistance(int watchDistance) { @@ -337,7 +337,7 @@ index 3a16316a8ecd658b2fbd473fa6ff14abe18e00de..91930daa3c965dcc1cb50ae260c159be } } -@@ -995,7 +1084,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1038,7 +1127,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider ChunkHolder playerchunk = this.getVisibleChunkIfPresent(pos.toLong()); if (playerchunk != null) { @@ -346,7 +346,7 @@ index 3a16316a8ecd658b2fbd473fa6ff14abe18e00de..91930daa3c965dcc1cb50ae260c159be if (chunk != null) { this.playerLoadedChunk(player, packets, chunk); -@@ -1091,7 +1180,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1134,7 +1223,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // Paper end @Nullable @@ -355,7 +355,7 @@ index 3a16316a8ecd658b2fbd473fa6ff14abe18e00de..91930daa3c965dcc1cb50ae260c159be CompoundTag nbttagcompound = this.read(pos); // Paper start - Cache chunk status on disk if (nbttagcompound == null) { -@@ -1202,13 +1291,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1245,13 +1334,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.removePlayerFromDistanceMaps(player); // Paper - distance maps } @@ -370,7 +370,7 @@ index 3a16316a8ecd658b2fbd473fa6ff14abe18e00de..91930daa3c965dcc1cb50ae260c159be } -@@ -1216,7 +1299,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1259,7 +1342,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider SectionPos sectionposition = SectionPos.of((Entity) player); player.setLastSectionPos(sectionposition); @@ -379,7 +379,7 @@ index 3a16316a8ecd658b2fbd473fa6ff14abe18e00de..91930daa3c965dcc1cb50ae260c159be return sectionposition; } -@@ -1271,6 +1354,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1314,6 +1397,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider int k1; int l1; @@ -387,7 +387,7 @@ index 3a16316a8ecd658b2fbd473fa6ff14abe18e00de..91930daa3c965dcc1cb50ae260c159be if (Math.abs(i1 - i) <= this.viewDistance * 2 && Math.abs(j1 - j) <= this.viewDistance * 2) { k1 = Math.min(i, i1) - this.viewDistance; l1 = Math.min(j, j1) - this.viewDistance; -@@ -1309,6 +1393,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1352,6 +1436,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } } } @@ -395,19 +395,20 @@ index 3a16316a8ecd658b2fbd473fa6ff14abe18e00de..91930daa3c965dcc1cb50ae260c159be this.updateMaps(player); // Paper - distance maps -@@ -1316,11 +1401,46 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1359,11 +1444,46 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @Override public Stream getPlayers(ChunkPos chunkPos, boolean onlyOnWatchDistanceEdge) { - return this.playerMap.getPlayers(chunkPos.toLong()).filter((entityplayer) -> { - int i = ChunkMap.checkerboardDistance(chunkPos, entityplayer, true); +- +- return i > this.viewDistance ? false : !onlyOnWatchDistanceEdge || i == this.viewDistance; +- }); + // Paper start - per player view distance + // there can be potential desync with player's last mapped section and the view distance map, so use the + // view distance map here. + com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet inRange = this.playerViewDistanceBroadcastMap.getObjectsInRange(chunkPos); - -- return i > this.viewDistance ? false : !onlyOnWatchDistanceEdge || i == this.viewDistance; -- }); ++ + if (inRange == null) { + return Stream.empty(); + } @@ -446,7 +447,7 @@ index 3a16316a8ecd658b2fbd473fa6ff14abe18e00de..91930daa3c965dcc1cb50ae260c159be } public void addEntity(Entity entity) { -@@ -1442,6 +1562,47 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1485,6 +1605,47 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } diff --git a/patches/server/0367-Implement-alternative-item-despawn-rate.patch b/patches/server/0369-Implement-alternative-item-despawn-rate.patch similarity index 97% rename from patches/server/0367-Implement-alternative-item-despawn-rate.patch rename to patches/server/0369-Implement-alternative-item-despawn-rate.patch index 71362a496..dffa854a8 100644 --- a/patches/server/0367-Implement-alternative-item-despawn-rate.patch +++ b/patches/server/0369-Implement-alternative-item-despawn-rate.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement alternative item-despawn-rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 3e3097f23f775eec4107f5c2f3f2266f4250ba15..1a21a177e3062130d7bbcde53e49732c634db73d 100644 +index ab39c75da393f639b8b6f20bbcb00b4f6513d702..9ab9645f8dbda50912fd6b6d6c661ca7bdff88bd 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -453,6 +453,54 @@ public class PaperWorldConfig { +@@ -492,6 +492,54 @@ public class PaperWorldConfig { this.noTickViewDistance = this.getInt("viewdistances.no-tick-view-distance", -1); } diff --git a/patches/server/0368-Tracking-Range-Improvements.patch b/patches/server/0370-Tracking-Range-Improvements.patch similarity index 95% rename from patches/server/0368-Tracking-Range-Improvements.patch rename to patches/server/0370-Tracking-Range-Improvements.patch index 8879bf835..06044634a 100644 --- a/patches/server/0368-Tracking-Range-Improvements.patch +++ b/patches/server/0370-Tracking-Range-Improvements.patch @@ -8,10 +8,10 @@ Sets tracking range of watermobs to animals instead of misc and simplifies code Also ignores Enderdragon, defaulting it to Mojang's setting diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 91930daa3c965dcc1cb50ae260c159be55f351ed..38c0437b0676e3f5f4bbc96c1f3a42712794ba5f 100644 +index 63608698747abc8577fe2bd6746e779122377895..0cbb735f1b4753f373eaadf57476c0b522a5cfc7 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1791,6 +1791,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially +@@ -1834,6 +1834,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); int j = entity.getType().clientTrackingRange() * 16; diff --git a/patches/server/0369-Fix-items-vanishing-through-end-portal.patch b/patches/server/0371-Fix-items-vanishing-through-end-portal.patch similarity index 100% rename from patches/server/0369-Fix-items-vanishing-through-end-portal.patch rename to patches/server/0371-Fix-items-vanishing-through-end-portal.patch diff --git a/patches/server/0370-implement-optional-per-player-mob-spawns.patch b/patches/server/0372-implement-optional-per-player-mob-spawns.patch similarity index 98% rename from patches/server/0370-implement-optional-per-player-mob-spawns.patch rename to patches/server/0372-implement-optional-per-player-mob-spawns.patch index ad605ed13..02ebdb647 100644 --- a/patches/server/0370-implement-optional-per-player-mob-spawns.patch +++ b/patches/server/0372-implement-optional-per-player-mob-spawns.patch @@ -25,10 +25,10 @@ index fe79c0add4f7cb18d487c5bb9415c40c5b551ea2..8d9ddad1879e7616d980ca70de8aecac poiUnload = Timings.ofSafe(name + "Chunk unload - POI"); chunkUnload = Timings.ofSafe(name + "Chunk unload - Chunk"); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 1a21a177e3062130d7bbcde53e49732c634db73d..154866506a33cf2185891cd5051d51de9e2e4584 100644 +index 9ab9645f8dbda50912fd6b6d6c661ca7bdff88bd..b6d680d6d6762125db180638ee43bf9ece4dc51a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -536,5 +536,10 @@ public class PaperWorldConfig { +@@ -575,5 +575,10 @@ public class PaperWorldConfig { Bukkit.getLogger().warning("You have enabled permission-based Anti-Xray checking - depending on your permission plugin, this may cause performance issues"); } } @@ -545,10 +545,10 @@ index 0000000000000000000000000000000000000000..11de56afaf059b00fa5bec293516bcdc + } +} diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 38c0437b0676e3f5f4bbc96c1f3a42712794ba5f..ebcfe31c8395aa2bbcc9a9ac74d4c6e1f2e5d0f7 100644 +index 0cbb735f1b4753f373eaadf57476c0b522a5cfc7..e10ded850c770a6aaa5321693525296ee77bb7e0 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -140,6 +140,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -145,6 +145,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider private final Long2ByteMap chunkTypeCache; private final Queue unloadQueue; int viewDistance; @@ -556,7 +556,7 @@ index 38c0437b0676e3f5f4bbc96c1f3a42712794ba5f..ebcfe31c8395aa2bbcc9a9ac74d4c6e1 // CraftBukkit start - recursion-safe executor for Chunk loadCallback() and unloadCallback() public final CallbackExecutor callbackExecutor = new CallbackExecutor(); -@@ -263,6 +264,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -268,6 +269,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.overworldDataStorage = persistentStateManagerFactory; this.poiManager = new PoiManager(new File(this.storageFolder, "poi"), dataFixer, dsync, world); this.setViewDistance(viewDistance); @@ -564,7 +564,7 @@ index 38c0437b0676e3f5f4bbc96c1f3a42712794ba5f..ebcfe31c8395aa2bbcc9a9ac74d4c6e1 // Paper start - no-tick view distance this.setNoTickViewDistance(this.level.paperConfig.noTickViewDistance); this.playerViewDistanceTickMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, -@@ -304,6 +306,25 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -309,6 +311,25 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // Paper end - no-tick view distance } diff --git a/patches/server/0371-Avoid-hopper-searches-if-there-are-no-items.patch b/patches/server/0373-Avoid-hopper-searches-if-there-are-no-items.patch similarity index 100% rename from patches/server/0371-Avoid-hopper-searches-if-there-are-no-items.patch rename to patches/server/0373-Avoid-hopper-searches-if-there-are-no-items.patch diff --git a/patches/server/0372-Bees-get-gravity-in-void.-Fixes-MC-167279.patch b/patches/server/0374-Bees-get-gravity-in-void.-Fixes-MC-167279.patch similarity index 100% rename from patches/server/0372-Bees-get-gravity-in-void.-Fixes-MC-167279.patch rename to patches/server/0374-Bees-get-gravity-in-void.-Fixes-MC-167279.patch diff --git a/patches/server/0373-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/patches/server/0375-Optimise-getChunkAt-calls-for-loaded-chunks.patch similarity index 100% rename from patches/server/0373-Optimise-getChunkAt-calls-for-loaded-chunks.patch rename to patches/server/0375-Optimise-getChunkAt-calls-for-loaded-chunks.patch diff --git a/patches/server/0374-Add-debug-for-sync-chunk-loads.patch b/patches/server/0376-Add-debug-for-sync-chunk-loads.patch similarity index 100% rename from patches/server/0374-Add-debug-for-sync-chunk-loads.patch rename to patches/server/0376-Add-debug-for-sync-chunk-loads.patch diff --git a/patches/server/0375-Allow-overriding-the-java-version-check.patch b/patches/server/0377-Allow-overriding-the-java-version-check.patch similarity index 100% rename from patches/server/0375-Allow-overriding-the-java-version-check.patch rename to patches/server/0377-Allow-overriding-the-java-version-check.patch diff --git a/patches/server/0376-Add-ThrownEggHatchEvent.patch b/patches/server/0378-Add-ThrownEggHatchEvent.patch similarity index 100% rename from patches/server/0376-Add-ThrownEggHatchEvent.patch rename to patches/server/0378-Add-ThrownEggHatchEvent.patch diff --git a/patches/server/0377-Optimise-random-block-ticking.patch b/patches/server/0379-Optimise-random-block-ticking.patch similarity index 100% rename from patches/server/0377-Optimise-random-block-ticking.patch rename to patches/server/0379-Optimise-random-block-ticking.patch diff --git a/patches/server/0378-Entity-Jump-API.patch b/patches/server/0380-Entity-Jump-API.patch similarity index 100% rename from patches/server/0378-Entity-Jump-API.patch rename to patches/server/0380-Entity-Jump-API.patch diff --git a/patches/server/0379-Add-option-to-nerf-pigmen-from-nether-portals.patch b/patches/server/0381-Add-option-to-nerf-pigmen-from-nether-portals.patch similarity index 95% rename from patches/server/0379-Add-option-to-nerf-pigmen-from-nether-portals.patch rename to patches/server/0381-Add-option-to-nerf-pigmen-from-nether-portals.patch index a7f4c5548..3c280e4f9 100644 --- a/patches/server/0379-Add-option-to-nerf-pigmen-from-nether-portals.patch +++ b/patches/server/0381-Add-option-to-nerf-pigmen-from-nether-portals.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 154866506a33cf2185891cd5051d51de9e2e4584..5ce5cdb4f6c703fa93f808527d2bca706d748c70 100644 +index b6d680d6d6762125db180638ee43bf9ece4dc51a..c9b5f662b94e47a25949449af8ce42edc78917b1 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -443,6 +443,11 @@ public class PaperWorldConfig { +@@ -482,6 +482,11 @@ public class PaperWorldConfig { log("Hopper Move Item Events: " + (disableHopperMoveEvents ? "disabled" : "enabled")); } diff --git a/patches/server/0380-Make-the-GUI-graph-fancier.patch b/patches/server/0382-Make-the-GUI-graph-fancier.patch similarity index 100% rename from patches/server/0380-Make-the-GUI-graph-fancier.patch rename to patches/server/0382-Make-the-GUI-graph-fancier.patch diff --git a/patches/server/0381-add-hand-to-BlockMultiPlaceEvent.patch b/patches/server/0383-add-hand-to-BlockMultiPlaceEvent.patch similarity index 100% rename from patches/server/0381-add-hand-to-BlockMultiPlaceEvent.patch rename to patches/server/0383-add-hand-to-BlockMultiPlaceEvent.patch diff --git a/patches/server/0382-Prevent-teleporting-dead-entities.patch b/patches/server/0384-Prevent-teleporting-dead-entities.patch similarity index 100% rename from patches/server/0382-Prevent-teleporting-dead-entities.patch rename to patches/server/0384-Prevent-teleporting-dead-entities.patch diff --git a/patches/server/0383-Validate-tripwire-hook-placement-before-update.patch b/patches/server/0385-Validate-tripwire-hook-placement-before-update.patch similarity index 100% rename from patches/server/0383-Validate-tripwire-hook-placement-before-update.patch rename to patches/server/0385-Validate-tripwire-hook-placement-before-update.patch diff --git a/patches/server/0384-Add-option-to-allow-iron-golems-to-spawn-in-air.patch b/patches/server/0386-Add-option-to-allow-iron-golems-to-spawn-in-air.patch similarity index 95% rename from patches/server/0384-Add-option-to-allow-iron-golems-to-spawn-in-air.patch rename to patches/server/0386-Add-option-to-allow-iron-golems-to-spawn-in-air.patch index 692500127..b5cc0ac16 100644 --- a/patches/server/0384-Add-option-to-allow-iron-golems-to-spawn-in-air.patch +++ b/patches/server/0386-Add-option-to-allow-iron-golems-to-spawn-in-air.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add option to allow iron golems to spawn in air diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 5ce5cdb4f6c703fa93f808527d2bca706d748c70..fc1c65a4b3c3d5e52d967a3174d8373ddde95e4d 100644 +index c9b5f662b94e47a25949449af8ce42edc78917b1..12a2a05b400e314f48b234e160b27f5a883c2c0e 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -382,6 +382,11 @@ public class PaperWorldConfig { diff --git a/patches/server/0385-Configurable-chance-of-villager-zombie-infection.patch b/patches/server/0387-Configurable-chance-of-villager-zombie-infection.patch similarity index 94% rename from patches/server/0385-Configurable-chance-of-villager-zombie-infection.patch rename to patches/server/0387-Configurable-chance-of-villager-zombie-infection.patch index 6d58c9377..5070fa961 100644 --- a/patches/server/0385-Configurable-chance-of-villager-zombie-infection.patch +++ b/patches/server/0387-Configurable-chance-of-villager-zombie-infection.patch @@ -8,10 +8,10 @@ This allows you to solve an issue in vanilla behavior where: * On normal difficulty they will have a 50% of getting infected or dying. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index fc1c65a4b3c3d5e52d967a3174d8373ddde95e4d..0c9aa7fb4d42c63c920a002050941299e3847d95 100644 +index 12a2a05b400e314f48b234e160b27f5a883c2c0e..c5c866c97c22008c3ea2c2f2b125b367072af92d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -453,6 +453,11 @@ public class PaperWorldConfig { +@@ -492,6 +492,11 @@ public class PaperWorldConfig { nerfNetherPortalPigmen = getBoolean("game-mechanics.nerf-pigmen-from-nether-portals", nerfNetherPortalPigmen); } diff --git a/patches/server/0386-Optimise-Chunk-getFluid.patch b/patches/server/0388-Optimise-Chunk-getFluid.patch similarity index 100% rename from patches/server/0386-Optimise-Chunk-getFluid.patch rename to patches/server/0388-Optimise-Chunk-getFluid.patch diff --git a/patches/server/0387-Optimise-TickListServer-by-rewriting-it.patch b/patches/server/0389-Optimise-TickListServer-by-rewriting-it.patch similarity index 100% rename from patches/server/0387-Optimise-TickListServer-by-rewriting-it.patch rename to patches/server/0389-Optimise-TickListServer-by-rewriting-it.patch diff --git a/patches/server/0388-Pillager-patrol-spawn-settings-and-per-player-option.patch b/patches/server/0390-Pillager-patrol-spawn-settings-and-per-player-option.patch similarity index 97% rename from patches/server/0388-Pillager-patrol-spawn-settings-and-per-player-option.patch rename to patches/server/0390-Pillager-patrol-spawn-settings-and-per-player-option.patch index 09481b0d3..d187b654d 100644 --- a/patches/server/0388-Pillager-patrol-spawn-settings-and-per-player-option.patch +++ b/patches/server/0390-Pillager-patrol-spawn-settings-and-per-player-option.patch @@ -10,10 +10,10 @@ When not per player it will use the Vanilla mechanic of one delay per world and the world age for the start day. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0c9aa7fb4d42c63c920a002050941299e3847d95..11a8b71fb3c7ba24f6e4986d241328ad369407c4 100644 +index c5c866c97c22008c3ea2c2f2b125b367072af92d..c26f08f6fd53cd44e5679f19bd3fdaa04f60a437 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -430,10 +430,21 @@ public class PaperWorldConfig { +@@ -469,10 +469,21 @@ public class PaperWorldConfig { } public boolean disablePillagerPatrols = false; diff --git a/patches/server/0389-Remote-Connections-shouldn-t-hold-up-shutdown.patch b/patches/server/0391-Remote-Connections-shouldn-t-hold-up-shutdown.patch similarity index 100% rename from patches/server/0389-Remote-Connections-shouldn-t-hold-up-shutdown.patch rename to patches/server/0391-Remote-Connections-shouldn-t-hold-up-shutdown.patch diff --git a/patches/server/0390-Do-not-allow-bees-to-load-chunks-for-beehives.patch b/patches/server/0392-Do-not-allow-bees-to-load-chunks-for-beehives.patch similarity index 100% rename from patches/server/0390-Do-not-allow-bees-to-load-chunks-for-beehives.patch rename to patches/server/0392-Do-not-allow-bees-to-load-chunks-for-beehives.patch diff --git a/patches/server/0391-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch b/patches/server/0393-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch similarity index 94% rename from patches/server/0391-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch rename to patches/server/0393-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch index ade168b48..366bd6c27 100644 --- a/patches/server/0391-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch +++ b/patches/server/0393-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch @@ -7,10 +7,10 @@ Suspected case would be around the technique used in .stopRiding Stack will identify any causer of this and warn instead of crashing. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index ebcfe31c8395aa2bbcc9a9ac74d4c6e1f2e5d0f7..46976a0ef5098e6d794653078111a9dcc1a151d2 100644 +index e10ded850c770a6aaa5321693525296ee77bb7e0..aa671a25e458ab2f382b37fc1517c98ab99949fb 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1466,6 +1466,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1509,6 +1509,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public void addEntity(Entity entity) { org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot diff --git a/patches/server/0392-Optimize-Collision-to-not-load-chunks.patch b/patches/server/0394-Optimize-Collision-to-not-load-chunks.patch similarity index 100% rename from patches/server/0392-Optimize-Collision-to-not-load-chunks.patch rename to patches/server/0394-Optimize-Collision-to-not-load-chunks.patch diff --git a/patches/server/0393-Don-t-tick-dead-players.patch b/patches/server/0395-Don-t-tick-dead-players.patch similarity index 100% rename from patches/server/0393-Don-t-tick-dead-players.patch rename to patches/server/0395-Don-t-tick-dead-players.patch diff --git a/patches/server/0394-Dead-Player-s-shouldn-t-be-able-to-move.patch b/patches/server/0396-Dead-Player-s-shouldn-t-be-able-to-move.patch similarity index 100% rename from patches/server/0394-Dead-Player-s-shouldn-t-be-able-to-move.patch rename to patches/server/0396-Dead-Player-s-shouldn-t-be-able-to-move.patch diff --git a/patches/server/0395-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch b/patches/server/0397-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch similarity index 96% rename from patches/server/0395-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch rename to patches/server/0397-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch index 8c9691af9..706bb9dac 100644 --- a/patches/server/0395-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch +++ b/patches/server/0397-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch @@ -70,10 +70,10 @@ index 9c88426ab1275ee5fb6e28be8b213533dc4ab859..87c9a5c1b43f6010898d72136b5eb997 List allChunks = new ArrayList<>(visibleChunks.values()); List players = world.players; diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 46976a0ef5098e6d794653078111a9dcc1a151d2..1e366262306aedcd4b3236a6895d30fb35e3cc51 100644 +index aa671a25e458ab2f382b37fc1517c98ab99949fb..fbb58957c925fbefa623f7cf9856f2c427bd006d 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -107,9 +107,36 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -112,9 +112,36 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider private static final int MIN_VIEW_DISTANCE = 3; public static final int MAX_VIEW_DISTANCE = 33; public static final int MAX_CHUNK_DISTANCE = 33 + ChunkStatus.maxDistance(); @@ -112,7 +112,7 @@ index 46976a0ef5098e6d794653078111a9dcc1a151d2..1e366262306aedcd4b3236a6895d30fb private final Long2ObjectLinkedOpenHashMap pendingUnloads; public final LongSet entitiesInLevel; public final ServerLevel level; -@@ -232,7 +259,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -237,7 +264,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureManager structureManager, Executor executor, BlockableEventLoop mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier persistentStateManagerFactory, int viewDistance, boolean dsync) { super(new File(session.getDimensionPath(world.dimension()), "region"), dataFixer, dsync); @@ -121,7 +121,7 @@ index 46976a0ef5098e6d794653078111a9dcc1a151d2..1e366262306aedcd4b3236a6895d30fb this.pendingUnloads = new Long2ObjectLinkedOpenHashMap(); this.entitiesInLevel = new LongOpenHashSet(); this.toDrop = new LongOpenHashSet(); -@@ -371,9 +398,52 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -376,9 +403,52 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider return (ChunkHolder) this.updatingChunkMap.get(pos); } @@ -175,7 +175,7 @@ index 46976a0ef5098e6d794653078111a9dcc1a151d2..1e366262306aedcd4b3236a6895d30fb } protected IntSupplier getChunkQueueLevel(long pos) { -@@ -530,8 +600,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -535,8 +605,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } protected void saveAllChunks(boolean flush) { @@ -186,7 +186,7 @@ index 46976a0ef5098e6d794653078111a9dcc1a151d2..1e366262306aedcd4b3236a6895d30fb MutableBoolean mutableboolean = new MutableBoolean(); do { -@@ -562,7 +633,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -567,7 +638,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // this.i(); // Paper - nuke IOWorker ChunkMap.LOGGER.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", this.storageFolder.getName()); } else { @@ -195,7 +195,7 @@ index 46976a0ef5098e6d794653078111a9dcc1a151d2..1e366262306aedcd4b3236a6895d30fb ChunkAccess ichunkaccess = (ChunkAccess) playerchunk.getChunkToSave().getNow(null); // CraftBukkit - decompile error if (ichunkaccess instanceof ImposterProtoChunk || ichunkaccess instanceof LevelChunk) { -@@ -722,7 +793,20 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -727,7 +798,20 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider if (!this.modified) { return false; } else { @@ -217,7 +217,7 @@ index 46976a0ef5098e6d794653078111a9dcc1a151d2..1e366262306aedcd4b3236a6895d30fb this.modified = false; return true; } -@@ -1131,12 +1215,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1174,12 +1258,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } protected Iterable getChunks() { diff --git a/patches/server/0396-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch b/patches/server/0398-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch similarity index 100% rename from patches/server/0396-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch rename to patches/server/0398-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch diff --git a/patches/server/0397-Don-t-move-existing-players-to-world-spawn.patch b/patches/server/0399-Don-t-move-existing-players-to-world-spawn.patch similarity index 100% rename from patches/server/0397-Don-t-move-existing-players-to-world-spawn.patch rename to patches/server/0399-Don-t-move-existing-players-to-world-spawn.patch diff --git a/patches/server/0398-Add-tick-times-API-and-mspt-command.patch b/patches/server/0400-Add-tick-times-API-and-mspt-command.patch similarity index 100% rename from patches/server/0398-Add-tick-times-API-and-mspt-command.patch rename to patches/server/0400-Add-tick-times-API-and-mspt-command.patch diff --git a/patches/server/0399-Expose-MinecraftServer-isRunning.patch b/patches/server/0401-Expose-MinecraftServer-isRunning.patch similarity index 100% rename from patches/server/0399-Expose-MinecraftServer-isRunning.patch rename to patches/server/0401-Expose-MinecraftServer-isRunning.patch diff --git a/patches/server/0400-Add-Raw-Byte-ItemStack-Serialization.patch b/patches/server/0402-Add-Raw-Byte-ItemStack-Serialization.patch similarity index 100% rename from patches/server/0400-Add-Raw-Byte-ItemStack-Serialization.patch rename to patches/server/0402-Add-Raw-Byte-ItemStack-Serialization.patch diff --git a/patches/server/0401-Remove-streams-from-Mob-AI-System.patch b/patches/server/0403-Remove-streams-from-Mob-AI-System.patch similarity index 100% rename from patches/server/0401-Remove-streams-from-Mob-AI-System.patch rename to patches/server/0403-Remove-streams-from-Mob-AI-System.patch diff --git a/patches/server/0402-Async-command-map-building.patch b/patches/server/0404-Async-command-map-building.patch similarity index 100% rename from patches/server/0402-Async-command-map-building.patch rename to patches/server/0404-Async-command-map-building.patch diff --git a/patches/server/0403-Improved-Watchdog-Support.patch b/patches/server/0405-Improved-Watchdog-Support.patch similarity index 99% rename from patches/server/0403-Improved-Watchdog-Support.patch rename to patches/server/0405-Improved-Watchdog-Support.patch index 5a5afd404..a1771d1af 100644 --- a/patches/server/0403-Improved-Watchdog-Support.patch +++ b/patches/server/0405-Improved-Watchdog-Support.patch @@ -262,10 +262,10 @@ index 0511f1921193b78cbf4d8426136bf1f79746f955..e5f7f043cbdb28d85b8aa0eea7cbaeb5 @Override diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 1e366262306aedcd4b3236a6895d30fb35e3cc51..196c0722c15b169cecde139ddd75689298c80949 100644 +index fbb58957c925fbefa623f7cf9856f2c427bd006d..719671e363af86023faae1e41bd5cacdea235908 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -606,6 +606,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -611,6 +611,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider MutableBoolean mutableboolean = new MutableBoolean(); do { diff --git a/patches/server/0404-Optimize-Pathfinding.patch b/patches/server/0406-Optimize-Pathfinding.patch similarity index 100% rename from patches/server/0404-Optimize-Pathfinding.patch rename to patches/server/0406-Optimize-Pathfinding.patch diff --git a/patches/server/0405-Reduce-Either-Optional-allocation.patch b/patches/server/0407-Reduce-Either-Optional-allocation.patch similarity index 100% rename from patches/server/0405-Reduce-Either-Optional-allocation.patch rename to patches/server/0407-Reduce-Either-Optional-allocation.patch diff --git a/patches/server/0406-Remove-streams-from-PairedQueue.patch b/patches/server/0408-Remove-streams-from-PairedQueue.patch similarity index 100% rename from patches/server/0406-Remove-streams-from-PairedQueue.patch rename to patches/server/0408-Remove-streams-from-PairedQueue.patch diff --git a/patches/server/0407-Reduce-memory-footprint-of-NBTTagCompound.patch b/patches/server/0409-Reduce-memory-footprint-of-NBTTagCompound.patch similarity index 100% rename from patches/server/0407-Reduce-memory-footprint-of-NBTTagCompound.patch rename to patches/server/0409-Reduce-memory-footprint-of-NBTTagCompound.patch diff --git a/patches/server/0408-Prevent-opening-inventories-when-frozen.patch b/patches/server/0410-Prevent-opening-inventories-when-frozen.patch similarity index 100% rename from patches/server/0408-Prevent-opening-inventories-when-frozen.patch rename to patches/server/0410-Prevent-opening-inventories-when-frozen.patch diff --git a/patches/server/0409-Optimise-ArraySetSorted-removeIf.patch b/patches/server/0411-Optimise-ArraySetSorted-removeIf.patch similarity index 100% rename from patches/server/0409-Optimise-ArraySetSorted-removeIf.patch rename to patches/server/0411-Optimise-ArraySetSorted-removeIf.patch diff --git a/patches/server/0410-Don-t-run-entity-collision-code-if-not-needed.patch b/patches/server/0412-Don-t-run-entity-collision-code-if-not-needed.patch similarity index 100% rename from patches/server/0410-Don-t-run-entity-collision-code-if-not-needed.patch rename to patches/server/0412-Don-t-run-entity-collision-code-if-not-needed.patch diff --git a/patches/server/0411-Restrict-vanilla-teleport-command-to-valid-locations.patch b/patches/server/0413-Restrict-vanilla-teleport-command-to-valid-locations.patch similarity index 100% rename from patches/server/0411-Restrict-vanilla-teleport-command-to-valid-locations.patch rename to patches/server/0413-Restrict-vanilla-teleport-command-to-valid-locations.patch diff --git a/patches/server/0412-Implement-Player-Client-Options-API.patch b/patches/server/0414-Implement-Player-Client-Options-API.patch similarity index 100% rename from patches/server/0412-Implement-Player-Client-Options-API.patch rename to patches/server/0414-Implement-Player-Client-Options-API.patch diff --git a/patches/server/0413-Fix-Chunk-Post-Processing-deadlock-risk.patch b/patches/server/0415-Fix-Chunk-Post-Processing-deadlock-risk.patch similarity index 93% rename from patches/server/0413-Fix-Chunk-Post-Processing-deadlock-risk.patch rename to patches/server/0415-Fix-Chunk-Post-Processing-deadlock-risk.patch index 7d26e3a87..edeaef0e7 100644 --- a/patches/server/0413-Fix-Chunk-Post-Processing-deadlock-risk.patch +++ b/patches/server/0415-Fix-Chunk-Post-Processing-deadlock-risk.patch @@ -25,10 +25,10 @@ This successfully fixed a reoccurring and highly reproduceable crash for heightmaps. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 196c0722c15b169cecde139ddd75689298c80949..874b7d4947d452c64b7a2f37c3091ba7aed18c4d 100644 +index 719671e363af86023faae1e41bd5cacdea235908..c133b7784aa0ed496c08c6a4bb252e36faf173cb 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -190,6 +190,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -195,6 +195,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider }; // CraftBukkit end @@ -36,7 +36,7 @@ index 196c0722c15b169cecde139ddd75689298c80949..874b7d4947d452c64b7a2f37c3091ba7 // Paper start - distance maps private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>(); // Paper start - no-tick view distance -@@ -1049,7 +1050,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1092,7 +1093,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider return Either.left(chunk); }); }, (runnable) -> { diff --git a/patches/server/0414-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch b/patches/server/0416-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch similarity index 100% rename from patches/server/0414-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch rename to patches/server/0416-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch diff --git a/patches/server/0415-Broadcast-join-message-to-console.patch b/patches/server/0417-Broadcast-join-message-to-console.patch similarity index 100% rename from patches/server/0415-Broadcast-join-message-to-console.patch rename to patches/server/0417-Broadcast-join-message-to-console.patch diff --git a/patches/server/0416-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/patches/server/0418-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch similarity index 97% rename from patches/server/0416-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch rename to patches/server/0418-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index 80fc145d5..6d00bd91c 100644 --- a/patches/server/0416-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/patches/server/0418-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -28,10 +28,10 @@ receives a deterministic result, and should no longer require 1 tick delays anymore. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 874b7d4947d452c64b7a2f37c3091ba7aed18c4d..b64a3dd03a22542b070eae34f0eaa9b321dca4ec 100644 +index c133b7784aa0ed496c08c6a4bb252e36faf173cb..333c41812159df37c27b632686c836e6cd62885e 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1559,6 +1559,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1602,6 +1602,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider .printStackTrace(); return; } diff --git a/patches/server/0417-Load-Chunks-for-Login-Asynchronously.patch b/patches/server/0419-Load-Chunks-for-Login-Asynchronously.patch similarity index 100% rename from patches/server/0417-Load-Chunks-for-Login-Asynchronously.patch rename to patches/server/0419-Load-Chunks-for-Login-Asynchronously.patch diff --git a/patches/server/0418-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch b/patches/server/0420-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch similarity index 100% rename from patches/server/0418-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch rename to patches/server/0420-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch diff --git a/patches/server/0419-Add-PlayerAttackEntityCooldownResetEvent.patch b/patches/server/0421-Add-PlayerAttackEntityCooldownResetEvent.patch similarity index 100% rename from patches/server/0419-Add-PlayerAttackEntityCooldownResetEvent.patch rename to patches/server/0421-Add-PlayerAttackEntityCooldownResetEvent.patch diff --git a/patches/server/0420-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch b/patches/server/0422-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch similarity index 93% rename from patches/server/0420-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch rename to patches/server/0422-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch index 52c10cf5a..23018abe5 100644 --- a/patches/server/0420-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch +++ b/patches/server/0422-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch @@ -14,10 +14,10 @@ Use an ArrayDeque to store this Queue We make sure to also implement a pattern that is recursion safe too. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index b64a3dd03a22542b070eae34f0eaa9b321dca4ec..218a20e85c9b6d31bcdf5432f4ea9cf0c0d7b952 100644 +index 333c41812159df37c27b632686c836e6cd62885e..8c83a5ba2be36a113c3a7a694b075ac8bc070bd5 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -173,17 +173,29 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -178,17 +178,29 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public final CallbackExecutor callbackExecutor = new CallbackExecutor(); public static final class CallbackExecutor implements java.util.concurrent.Executor, Runnable { diff --git a/patches/server/0421-Don-t-fire-BlockFade-on-worldgen-threads.patch b/patches/server/0423-Don-t-fire-BlockFade-on-worldgen-threads.patch similarity index 100% rename from patches/server/0421-Don-t-fire-BlockFade-on-worldgen-threads.patch rename to patches/server/0423-Don-t-fire-BlockFade-on-worldgen-threads.patch diff --git a/patches/server/0422-Add-phantom-creative-and-insomniac-controls.patch b/patches/server/0424-Add-phantom-creative-and-insomniac-controls.patch similarity index 96% rename from patches/server/0422-Add-phantom-creative-and-insomniac-controls.patch rename to patches/server/0424-Add-phantom-creative-and-insomniac-controls.patch index f42301d63..0861cb5ae 100644 --- a/patches/server/0422-Add-phantom-creative-and-insomniac-controls.patch +++ b/patches/server/0424-Add-phantom-creative-and-insomniac-controls.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add phantom creative and insomniac controls diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 11a8b71fb3c7ba24f6e4986d241328ad369407c4..5fd9490f57109235d5eae0c0d51831646ee6cdc5 100644 +index c26f08f6fd53cd44e5679f19bd3fdaa04f60a437..4acfd9aa46aed545591a46afe3fa162bf710d5c9 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -474,6 +474,13 @@ public class PaperWorldConfig { +@@ -513,6 +513,13 @@ public class PaperWorldConfig { lightQueueSize = getInt("light-queue-size", lightQueueSize); } diff --git a/patches/server/0423-Fix-numerous-item-duplication-issues-and-teleport-is.patch b/patches/server/0425-Fix-numerous-item-duplication-issues-and-teleport-is.patch similarity index 100% rename from patches/server/0423-Fix-numerous-item-duplication-issues-and-teleport-is.patch rename to patches/server/0425-Fix-numerous-item-duplication-issues-and-teleport-is.patch diff --git a/patches/server/0424-Implement-Brigadier-Mojang-API.patch b/patches/server/0426-Implement-Brigadier-Mojang-API.patch similarity index 100% rename from patches/server/0424-Implement-Brigadier-Mojang-API.patch rename to patches/server/0426-Implement-Brigadier-Mojang-API.patch diff --git a/patches/server/0425-Villager-Restocks-API.patch b/patches/server/0427-Villager-Restocks-API.patch similarity index 100% rename from patches/server/0425-Villager-Restocks-API.patch rename to patches/server/0427-Villager-Restocks-API.patch diff --git a/patches/server/0426-Validate-PickItem-Packet-and-kick-for-invalid.patch b/patches/server/0428-Validate-PickItem-Packet-and-kick-for-invalid.patch similarity index 100% rename from patches/server/0426-Validate-PickItem-Packet-and-kick-for-invalid.patch rename to patches/server/0428-Validate-PickItem-Packet-and-kick-for-invalid.patch diff --git a/patches/server/0427-Expose-game-version.patch b/patches/server/0429-Expose-game-version.patch similarity index 100% rename from patches/server/0427-Expose-game-version.patch rename to patches/server/0429-Expose-game-version.patch diff --git a/patches/server/0428-Optimize-Voxel-Shape-Merging.patch b/patches/server/0430-Optimize-Voxel-Shape-Merging.patch similarity index 100% rename from patches/server/0428-Optimize-Voxel-Shape-Merging.patch rename to patches/server/0430-Optimize-Voxel-Shape-Merging.patch diff --git a/patches/server/0429-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/patches/server/0431-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch similarity index 100% rename from patches/server/0429-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch rename to patches/server/0431-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch diff --git a/patches/server/0430-Implement-Mob-Goal-API.patch b/patches/server/0432-Implement-Mob-Goal-API.patch similarity index 100% rename from patches/server/0430-Implement-Mob-Goal-API.patch rename to patches/server/0432-Implement-Mob-Goal-API.patch diff --git a/patches/server/0431-Use-distance-map-to-optimise-entity-tracker.patch b/patches/server/0433-Use-distance-map-to-optimise-entity-tracker.patch similarity index 96% rename from patches/server/0431-Use-distance-map-to-optimise-entity-tracker.patch rename to patches/server/0433-Use-distance-map-to-optimise-entity-tracker.patch index e5721178a..aee77cd70 100644 --- a/patches/server/0431-Use-distance-map-to-optimise-entity-tracker.patch +++ b/patches/server/0433-Use-distance-map-to-optimise-entity-tracker.patch @@ -18,10 +18,10 @@ index 11fd6d24ed0612e4df1a0493907178fb9c455d1c..d7023cb0974f6c28a0fb8a0a6e5a6600 return initialDistance; } diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 218a20e85c9b6d31bcdf5432f4ea9cf0c0d7b952..31eabc0260750ab1bf1618fcf666f10fb3e0a877 100644 +index 8c83a5ba2be36a113c3a7a694b075ac8bc070bd5..d309a80a3f8f6aadb9c8b7b84d2c4e2379334ef9 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -58,6 +58,7 @@ import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket; +@@ -63,6 +63,7 @@ import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket; import net.minecraft.network.protocol.game.ClientboundSetPassengersPacket; import net.minecraft.network.protocol.game.DebugPackets; import net.minecraft.server.MCUtil; @@ -29,7 +29,7 @@ index 218a20e85c9b6d31bcdf5432f4ea9cf0c0d7b952..31eabc0260750ab1bf1618fcf666f10f import net.minecraft.server.level.progress.ChunkProgressListener; import net.minecraft.server.network.ServerPlayerConnection; import net.minecraft.util.CsvOutput; -@@ -221,11 +222,33 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -226,11 +227,33 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerViewDistanceTickMap; public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerViewDistanceNoTickMap; // Paper end - no-tick view distance @@ -63,7 +63,7 @@ index 218a20e85c9b6d31bcdf5432f4ea9cf0c0d7b952..31eabc0260750ab1bf1618fcf666f10f // Paper start - no-tick view distance int effectiveTickViewDistance = this.getEffectiveViewDistance(); int effectiveNoTickViewDistance = Math.max(this.getEffectiveNoTickViewDistance(), effectiveTickViewDistance); -@@ -242,7 +265,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -247,7 +270,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } void removePlayerFromDistanceMaps(ServerPlayer player) { @@ -76,7 +76,7 @@ index 218a20e85c9b6d31bcdf5432f4ea9cf0c0d7b952..31eabc0260750ab1bf1618fcf666f10f // Paper start - no-tick view distance this.playerViewDistanceBroadcastMap.remove(player); this.playerViewDistanceTickMap.remove(player); -@@ -254,6 +281,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -259,6 +286,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider int chunkX = MCUtil.getChunkCoordinate(player.getX()); int chunkZ = MCUtil.getChunkCoordinate(player.getZ()); // Note: players need to be explicitly added to distance maps before they can be updated @@ -91,7 +91,7 @@ index 218a20e85c9b6d31bcdf5432f4ea9cf0c0d7b952..31eabc0260750ab1bf1618fcf666f10f // Paper start - no-tick view distance int effectiveTickViewDistance = this.getEffectiveViewDistance(); int effectiveNoTickViewDistance = Math.max(this.getEffectiveNoTickViewDistance(), effectiveTickViewDistance); -@@ -305,6 +340,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -310,6 +345,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.poiManager = new PoiManager(new File(this.storageFolder, "poi"), dataFixer, dsync, world); this.setViewDistance(viewDistance); this.playerMobDistanceMap = this.level.paperConfig.perPlayerMobSpawns ? new com.destroystokyo.paper.util.PlayerMobDistanceMap() : null; // Paper @@ -137,7 +137,7 @@ index 218a20e85c9b6d31bcdf5432f4ea9cf0c0d7b952..31eabc0260750ab1bf1618fcf666f10f // Paper start - no-tick view distance this.setNoTickViewDistance(this.level.paperConfig.noTickViewDistance); this.playerViewDistanceTickMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, -@@ -1423,17 +1497,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1466,17 +1540,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } public void move(ServerPlayer player) { @@ -156,7 +156,7 @@ index 218a20e85c9b6d31bcdf5432f4ea9cf0c0d7b952..31eabc0260750ab1bf1618fcf666f10f int i = SectionPos.blockToSectionCoord(player.getBlockX()); int j = SectionPos.blockToSectionCoord(player.getBlockZ()); -@@ -1588,7 +1652,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1631,7 +1695,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider entity.tracker = playerchunkmap_entitytracker; // Paper - Fast access to tracker this.entityMap.put(entity.getId(), playerchunkmap_entitytracker); @@ -165,7 +165,7 @@ index 218a20e85c9b6d31bcdf5432f4ea9cf0c0d7b952..31eabc0260750ab1bf1618fcf666f10f if (entity instanceof ServerPlayer) { ServerPlayer entityplayer = (ServerPlayer) entity; -@@ -1632,7 +1696,37 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1675,7 +1739,37 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider entity.tracker = null; // Paper - We're no longer tracked } @@ -203,7 +203,7 @@ index 218a20e85c9b6d31bcdf5432f4ea9cf0c0d7b952..31eabc0260750ab1bf1618fcf666f10f List list = Lists.newArrayList(); List list1 = this.level.players(); -@@ -1741,23 +1835,31 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially +@@ -1784,23 +1878,31 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially DebugPackets.sendPoiPacketsForChunk(this.level, chunk.getPos()); List list = Lists.newArrayList(); List list1 = Lists.newArrayList(); @@ -247,7 +247,7 @@ index 218a20e85c9b6d31bcdf5432f4ea9cf0c0d7b952..31eabc0260750ab1bf1618fcf666f10f Iterator iterator; Entity entity1; -@@ -1836,6 +1938,42 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially +@@ -1879,6 +1981,42 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially this.lastSectionPos = SectionPos.of(entity); } @@ -290,7 +290,7 @@ index 218a20e85c9b6d31bcdf5432f4ea9cf0c0d7b952..31eabc0260750ab1bf1618fcf666f10f public boolean equals(Object object) { return object instanceof ChunkMap.TrackedEntity ? ((ChunkMap.TrackedEntity) object).entity.getId() == this.entity.getId() : false; } -@@ -1921,7 +2059,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially +@@ -1964,7 +2102,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially int j = entity.getType().clientTrackingRange() * 16; j = org.spigotmc.TrackingRange.getEntityTrackingRange(entity, j); // Paper diff --git a/patches/server/0432-Optimize-isOutsideRange-to-use-distance-maps.patch b/patches/server/0434-Optimize-isOutsideRange-to-use-distance-maps.patch similarity index 97% rename from patches/server/0432-Optimize-isOutsideRange-to-use-distance-maps.patch rename to patches/server/0434-Optimize-isOutsideRange-to-use-distance-maps.patch index 68b095a32..f98f39f83 100644 --- a/patches/server/0432-Optimize-isOutsideRange-to-use-distance-maps.patch +++ b/patches/server/0434-Optimize-isOutsideRange-to-use-distance-maps.patch @@ -37,10 +37,10 @@ index 97faf7ece336928f22e518a14653b4fbc672d876..c2401b2ff0547335ddbbeb05c07b7455 // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 31eabc0260750ab1bf1618fcf666f10fb3e0a877..bb00445ecf50051cf3966ee10be645e2a0d2519e 100644 +index d309a80a3f8f6aadb9c8b7b84d2c4e2379334ef9..5617839ad26e2b349746ca82e00ba17c677ebeab 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -236,6 +236,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -241,6 +241,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider return MinecraftServer.getServer().applyTrackingRangeScale(vanilla); } // Paper end - use distance map to optimise tracker @@ -58,7 +58,7 @@ index 31eabc0260750ab1bf1618fcf666f10fb3e0a877..bb00445ecf50051cf3966ee10be645e2 void addPlayerToDistanceMaps(ServerPlayer player) { int chunkX = MCUtil.getChunkCoordinate(player.getX()); -@@ -249,6 +260,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -254,6 +265,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider trackMap.add(player, chunkX, chunkZ, Math.min(trackRange, this.getEffectiveViewDistance())); } // Paper end - use distance map to optimise entity tracker @@ -71,7 +71,7 @@ index 31eabc0260750ab1bf1618fcf666f10fb3e0a877..bb00445ecf50051cf3966ee10be645e2 // Paper start - no-tick view distance int effectiveTickViewDistance = this.getEffectiveViewDistance(); int effectiveNoTickViewDistance = Math.max(this.getEffectiveNoTickViewDistance(), effectiveTickViewDistance); -@@ -270,6 +287,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -275,6 +292,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.playerEntityTrackerTrackMaps[i].remove(player); } // Paper end - use distance map to optimise tracker @@ -82,7 +82,7 @@ index 31eabc0260750ab1bf1618fcf666f10fb3e0a877..bb00445ecf50051cf3966ee10be645e2 // Paper start - no-tick view distance this.playerViewDistanceBroadcastMap.remove(player); this.playerViewDistanceTickMap.remove(player); -@@ -289,6 +310,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -294,6 +315,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider trackMap.update(player, chunkX, chunkZ, Math.min(trackRange, this.getEffectiveViewDistance())); } // Paper end - use distance map to optimise entity tracker @@ -92,7 +92,7 @@ index 31eabc0260750ab1bf1618fcf666f10fb3e0a877..bb00445ecf50051cf3966ee10be645e2 // Paper start - no-tick view distance int effectiveTickViewDistance = this.getEffectiveViewDistance(); int effectiveNoTickViewDistance = Math.max(this.getEffectiveNoTickViewDistance(), effectiveTickViewDistance); -@@ -335,7 +359,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -340,7 +364,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.mainThreadMailbox = this.queueSorter.getProcessor(mailbox, false); this.mailboxLight = this.queueSorter.getProcessor(lightthreaded, false);// Paper this.lightEngine = new ThreadedLevelLightEngine(chunkProvider, this, this.level.dimensionType().hasSkyLight(), threadedmailbox1, this.queueSorter.getProcessor(threadedmailbox1, false)); @@ -101,7 +101,7 @@ index 31eabc0260750ab1bf1618fcf666f10fb3e0a877..bb00445ecf50051cf3966ee10be645e2 this.overworldDataStorage = persistentStateManagerFactory; this.poiManager = new PoiManager(new File(this.storageFolder, "poi"), dataFixer, dsync, world); this.setViewDistance(viewDistance); -@@ -379,6 +403,38 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -384,6 +408,38 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.playerEntityTrackerTrackMaps[ordinal] = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets); } // Paper end - use distance map to optimise entity tracker @@ -140,7 +140,7 @@ index 31eabc0260750ab1bf1618fcf666f10fb3e0a877..bb00445ecf50051cf3966ee10be645e2 // Paper start - no-tick view distance this.setNoTickViewDistance(this.level.paperConfig.noTickViewDistance); this.playerViewDistanceTickMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, -@@ -648,6 +704,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -653,6 +709,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } else { if (holder != null) { holder.setTicketLevel(level); @@ -148,7 +148,7 @@ index 31eabc0260750ab1bf1618fcf666f10fb3e0a877..bb00445ecf50051cf3966ee10be645e2 } if (holder != null) { -@@ -1433,29 +1490,50 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1476,29 +1533,50 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider return this.isOutsideOfRange(chunkPos, false); } diff --git a/patches/server/0433-Add-villager-reputation-API.patch b/patches/server/0435-Add-villager-reputation-API.patch similarity index 100% rename from patches/server/0433-Add-villager-reputation-API.patch rename to patches/server/0435-Add-villager-reputation-API.patch diff --git a/patches/server/0434-Option-for-maximum-exp-value-when-merging-orbs.patch b/patches/server/0436-Option-for-maximum-exp-value-when-merging-orbs.patch similarity index 97% rename from patches/server/0434-Option-for-maximum-exp-value-when-merging-orbs.patch rename to patches/server/0436-Option-for-maximum-exp-value-when-merging-orbs.patch index 80fea3882..88b30399e 100644 --- a/patches/server/0434-Option-for-maximum-exp-value-when-merging-orbs.patch +++ b/patches/server/0436-Option-for-maximum-exp-value-when-merging-orbs.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Option for maximum exp value when merging orbs diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 5fd9490f57109235d5eae0c0d51831646ee6cdc5..0fbddcb318e353b54c68dd543355be698e99c2d7 100644 +index 4acfd9aa46aed545591a46afe3fa162bf710d5c9..157d19c9e1d86922392a1542109312565abc7561 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -356,6 +356,12 @@ public class PaperWorldConfig { diff --git a/patches/server/0435-ExperienceOrbMergeEvent.patch b/patches/server/0437-ExperienceOrbMergeEvent.patch similarity index 100% rename from patches/server/0435-ExperienceOrbMergeEvent.patch rename to patches/server/0437-ExperienceOrbMergeEvent.patch diff --git a/patches/server/0436-Fix-PotionEffect-ignores-icon-flag.patch b/patches/server/0438-Fix-PotionEffect-ignores-icon-flag.patch similarity index 100% rename from patches/server/0436-Fix-PotionEffect-ignores-icon-flag.patch rename to patches/server/0438-Fix-PotionEffect-ignores-icon-flag.patch diff --git a/patches/server/0437-Optimize-brigadier-child-sorting-performance.patch b/patches/server/0439-Optimize-brigadier-child-sorting-performance.patch similarity index 100% rename from patches/server/0437-Optimize-brigadier-child-sorting-performance.patch rename to patches/server/0439-Optimize-brigadier-child-sorting-performance.patch diff --git a/patches/server/0438-Potential-bed-API.patch b/patches/server/0440-Potential-bed-API.patch similarity index 100% rename from patches/server/0438-Potential-bed-API.patch rename to patches/server/0440-Potential-bed-API.patch diff --git a/patches/server/0439-Wait-for-Async-Tasks-during-shutdown.patch b/patches/server/0441-Wait-for-Async-Tasks-during-shutdown.patch similarity index 100% rename from patches/server/0439-Wait-for-Async-Tasks-during-shutdown.patch rename to patches/server/0441-Wait-for-Async-Tasks-during-shutdown.patch diff --git a/patches/server/0440-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch b/patches/server/0442-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch similarity index 100% rename from patches/server/0440-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch rename to patches/server/0442-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch diff --git a/patches/server/0441-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch b/patches/server/0443-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch similarity index 100% rename from patches/server/0441-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch rename to patches/server/0443-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch diff --git a/patches/server/0442-Reduce-MutableInt-allocations-from-light-engine.patch b/patches/server/0444-Reduce-MutableInt-allocations-from-light-engine.patch similarity index 100% rename from patches/server/0442-Reduce-MutableInt-allocations-from-light-engine.patch rename to patches/server/0444-Reduce-MutableInt-allocations-from-light-engine.patch diff --git a/patches/server/0443-Reduce-allocation-of-Vec3D-by-entity-tracker.patch b/patches/server/0445-Reduce-allocation-of-Vec3D-by-entity-tracker.patch similarity index 96% rename from patches/server/0443-Reduce-allocation-of-Vec3D-by-entity-tracker.patch rename to patches/server/0445-Reduce-allocation-of-Vec3D-by-entity-tracker.patch index 60d4c2116..0038885ce 100644 --- a/patches/server/0443-Reduce-allocation-of-Vec3D-by-entity-tracker.patch +++ b/patches/server/0445-Reduce-allocation-of-Vec3D-by-entity-tracker.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Reduce allocation of Vec3D by entity tracker diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index bb00445ecf50051cf3966ee10be645e2a0d2519e..57b95c9e85d2341c00d54cacd71a8784cad3e5e7 100644 +index 5617839ad26e2b349746ca82e00ba17c677ebeab..b9049dd6e5f254289f20aefefaf68e2ef5adac1b 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -2101,9 +2101,14 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially +@@ -2144,9 +2144,14 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially public void updatePlayer(ServerPlayer player) { org.spigotmc.AsyncCatcher.catchOp("player tracker update"); // Spigot if (player != this.entity) { diff --git a/patches/server/0444-Ensure-safe-gateway-teleport.patch b/patches/server/0446-Ensure-safe-gateway-teleport.patch similarity index 100% rename from patches/server/0444-Ensure-safe-gateway-teleport.patch rename to patches/server/0446-Ensure-safe-gateway-teleport.patch diff --git a/patches/server/0445-Add-option-for-console-having-all-permissions.patch b/patches/server/0447-Add-option-for-console-having-all-permissions.patch similarity index 100% rename from patches/server/0445-Add-option-for-console-having-all-permissions.patch rename to patches/server/0447-Add-option-for-console-having-all-permissions.patch diff --git a/patches/server/0446-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch b/patches/server/0448-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch similarity index 100% rename from patches/server/0446-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch rename to patches/server/0448-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch diff --git a/patches/server/0447-Optimize-sending-packets-to-nearby-locations-sounds-.patch b/patches/server/0449-Optimize-sending-packets-to-nearby-locations-sounds-.patch similarity index 100% rename from patches/server/0447-Optimize-sending-packets-to-nearby-locations-sounds-.patch rename to patches/server/0449-Optimize-sending-packets-to-nearby-locations-sounds-.patch diff --git a/patches/server/0448-Fix-villager-trading-demand-MC-163962.patch b/patches/server/0450-Fix-villager-trading-demand-MC-163962.patch similarity index 100% rename from patches/server/0448-Fix-villager-trading-demand-MC-163962.patch rename to patches/server/0450-Fix-villager-trading-demand-MC-163962.patch diff --git a/patches/server/0449-Maps-shouldn-t-load-chunks.patch b/patches/server/0451-Maps-shouldn-t-load-chunks.patch similarity index 100% rename from patches/server/0449-Maps-shouldn-t-load-chunks.patch rename to patches/server/0451-Maps-shouldn-t-load-chunks.patch diff --git a/patches/server/0450-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch b/patches/server/0452-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch similarity index 100% rename from patches/server/0450-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch rename to patches/server/0452-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch diff --git a/patches/server/0451-Delay-Chunk-Unloads-based-on-Player-Movement.patch b/patches/server/0453-Delay-Chunk-Unloads-based-on-Player-Movement.patch similarity index 97% rename from patches/server/0451-Delay-Chunk-Unloads-based-on-Player-Movement.patch rename to patches/server/0453-Delay-Chunk-Unloads-based-on-Player-Movement.patch index f47b431bf..485789d86 100644 --- a/patches/server/0451-Delay-Chunk-Unloads-based-on-Player-Movement.patch +++ b/patches/server/0453-Delay-Chunk-Unloads-based-on-Player-Movement.patch @@ -17,10 +17,10 @@ This allows servers with smaller worlds who do less long distance exploring to s wasting cpu cycles on saving/unloading/reloading chunks repeatedly. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0fbddcb318e353b54c68dd543355be698e99c2d7..1bfa826d36a2e4b72a4b97fc6d4731fac8bf199f 100644 +index 157d19c9e1d86922392a1542109312565abc7561..2216fc05ef5f1c2f7e4dcab7bb20b9944838c5f4 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -492,6 +492,15 @@ public class PaperWorldConfig { +@@ -531,6 +531,15 @@ public class PaperWorldConfig { this.noTickViewDistance = this.getInt("viewdistances.no-tick-view-distance", -1); } diff --git a/patches/server/0452-Optimize-Bit-Operations-by-inlining.patch b/patches/server/0454-Optimize-Bit-Operations-by-inlining.patch similarity index 100% rename from patches/server/0452-Optimize-Bit-Operations-by-inlining.patch rename to patches/server/0454-Optimize-Bit-Operations-by-inlining.patch diff --git a/patches/server/0453-incremental-chunk-saving.patch b/patches/server/0455-incremental-chunk-saving.patch similarity index 96% rename from patches/server/0453-incremental-chunk-saving.patch rename to patches/server/0455-incremental-chunk-saving.patch index e48e3fc30..e114a9ace 100644 --- a/patches/server/0453-incremental-chunk-saving.patch +++ b/patches/server/0455-incremental-chunk-saving.patch @@ -5,7 +5,7 @@ Subject: [PATCH] incremental chunk saving diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 1bfa826d36a2e4b72a4b97fc6d4731fac8bf199f..a22abda177b0ffc9699fb23aaac8680261f385fe 100644 +index 2216fc05ef5f1c2f7e4dcab7bb20b9944838c5f4..66c8e729b1e01c0ecf7c7c58bda8e06f202a31fe 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -44,6 +44,21 @@ public class PaperWorldConfig { @@ -139,10 +139,10 @@ index c2401b2ff0547335ddbbeb05c07b74552c246fc9..c1db5cc45dbc7dd24a1ef4dbf88a8efb for (int i = 0; i < this.futures.length(); ++i) { CompletableFuture> completablefuture = (CompletableFuture) this.futures.get(i); diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 57b95c9e85d2341c00d54cacd71a8784cad3e5e7..89f73e8a7f5b429c89d051b44ea6c9cbecb97730 100644 +index b9049dd6e5f254289f20aefefaf68e2ef5adac1b..87ad15eaf8823021030e377078e18bbca4ac5e33 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -92,6 +92,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructureMana +@@ -97,6 +97,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructureMana import net.minecraft.world.level.storage.DimensionDataStorage; import net.minecraft.world.level.storage.LevelStorageSource; import net.minecraft.world.phys.Vec3; @@ -150,7 +150,7 @@ index 57b95c9e85d2341c00d54cacd71a8784cad3e5e7..89f73e8a7f5b429c89d051b44ea6c9cb import org.apache.commons.lang3.mutable.MutableBoolean; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -@@ -743,6 +744,64 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -748,6 +749,64 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } @@ -215,7 +215,7 @@ index 57b95c9e85d2341c00d54cacd71a8784cad3e5e7..89f73e8a7f5b429c89d051b44ea6c9cb protected void saveAllChunks(boolean flush) { Long2ObjectLinkedOpenHashMap visibleChunks = this.getVisibleChunks(); // Paper remove clone of visible Chunks unless saving off main thread (watchdog kill) if (flush) { -@@ -882,6 +941,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -887,6 +946,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider asyncSaveData, chunk); chunk.setUnsaved(false); @@ -223,7 +223,7 @@ index 57b95c9e85d2341c00d54cacd71a8784cad3e5e7..89f73e8a7f5b429c89d051b44ea6c9cb } // Paper end -@@ -904,6 +964,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -909,6 +969,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.level.unload(chunk); } @@ -231,7 +231,7 @@ index 57b95c9e85d2341c00d54cacd71a8784cad3e5e7..89f73e8a7f5b429c89d051b44ea6c9cb // Paper start - async chunk saving try { -@@ -1230,6 +1291,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1273,6 +1334,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider if (!chunk.isUnsaved()) { return false; } else { diff --git a/patches/server/0454-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/patches/server/0456-Add-Plugin-Tickets-to-API-Chunk-Methods.patch similarity index 100% rename from patches/server/0454-Add-Plugin-Tickets-to-API-Chunk-Methods.patch rename to patches/server/0456-Add-Plugin-Tickets-to-API-Chunk-Methods.patch diff --git a/patches/server/0455-Fix-missing-chunks-due-to-integer-overflow.patch b/patches/server/0457-Fix-missing-chunks-due-to-integer-overflow.patch similarity index 100% rename from patches/server/0455-Fix-missing-chunks-due-to-integer-overflow.patch rename to patches/server/0457-Fix-missing-chunks-due-to-integer-overflow.patch diff --git a/patches/server/0456-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch b/patches/server/0458-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch similarity index 100% rename from patches/server/0456-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch rename to patches/server/0458-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch diff --git a/patches/server/0457-Fix-piston-physics-inconsistency-MC-188840.patch b/patches/server/0459-Fix-piston-physics-inconsistency-MC-188840.patch similarity index 100% rename from patches/server/0457-Fix-piston-physics-inconsistency-MC-188840.patch rename to patches/server/0459-Fix-piston-physics-inconsistency-MC-188840.patch diff --git a/patches/server/0458-Fix-sand-duping.patch b/patches/server/0460-Fix-sand-duping.patch similarity index 100% rename from patches/server/0458-Fix-sand-duping.patch rename to patches/server/0460-Fix-sand-duping.patch diff --git a/patches/server/0459-Prevent-position-desync-in-playerconnection-causing-.patch b/patches/server/0461-Prevent-position-desync-in-playerconnection-causing-.patch similarity index 100% rename from patches/server/0459-Prevent-position-desync-in-playerconnection-causing-.patch rename to patches/server/0461-Prevent-position-desync-in-playerconnection-causing-.patch diff --git a/patches/server/0460-Inventory-getHolder-method-without-block-snapshot.patch b/patches/server/0462-Inventory-getHolder-method-without-block-snapshot.patch similarity index 100% rename from patches/server/0460-Inventory-getHolder-method-without-block-snapshot.patch rename to patches/server/0462-Inventory-getHolder-method-without-block-snapshot.patch diff --git a/patches/server/0461-Expose-Arrow-getItemStack.patch b/patches/server/0463-Expose-Arrow-getItemStack.patch similarity index 100% rename from patches/server/0461-Expose-Arrow-getItemStack.patch rename to patches/server/0463-Expose-Arrow-getItemStack.patch diff --git a/patches/server/0462-Add-and-implement-PlayerRecipeBookClickEvent.patch b/patches/server/0464-Add-and-implement-PlayerRecipeBookClickEvent.patch similarity index 100% rename from patches/server/0462-Add-and-implement-PlayerRecipeBookClickEvent.patch rename to patches/server/0464-Add-and-implement-PlayerRecipeBookClickEvent.patch diff --git a/patches/server/0463-Hide-sync-chunk-writes-behind-flag.patch b/patches/server/0465-Hide-sync-chunk-writes-behind-flag.patch similarity index 100% rename from patches/server/0463-Hide-sync-chunk-writes-behind-flag.patch rename to patches/server/0465-Hide-sync-chunk-writes-behind-flag.patch diff --git a/patches/server/0464-Add-permission-for-command-blocks.patch b/patches/server/0466-Add-permission-for-command-blocks.patch similarity index 100% rename from patches/server/0464-Add-permission-for-command-blocks.patch rename to patches/server/0466-Add-permission-for-command-blocks.patch diff --git a/patches/server/0465-Ensure-Entity-AABB-s-are-never-invalid.patch b/patches/server/0467-Ensure-Entity-AABB-s-are-never-invalid.patch similarity index 100% rename from patches/server/0465-Ensure-Entity-AABB-s-are-never-invalid.patch rename to patches/server/0467-Ensure-Entity-AABB-s-are-never-invalid.patch diff --git a/patches/server/0466-Optimize-WorldBorder-collision-checks-and-air.patch b/patches/server/0468-Optimize-WorldBorder-collision-checks-and-air.patch similarity index 100% rename from patches/server/0466-Optimize-WorldBorder-collision-checks-and-air.patch rename to patches/server/0468-Optimize-WorldBorder-collision-checks-and-air.patch diff --git a/patches/server/0467-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0469-Fix-Per-World-Difficulty-Remembering-Difficulty.patch similarity index 100% rename from patches/server/0467-Fix-Per-World-Difficulty-Remembering-Difficulty.patch rename to patches/server/0469-Fix-Per-World-Difficulty-Remembering-Difficulty.patch diff --git a/patches/server/0468-Paper-dumpitem-command.patch b/patches/server/0470-Paper-dumpitem-command.patch similarity index 100% rename from patches/server/0468-Paper-dumpitem-command.patch rename to patches/server/0470-Paper-dumpitem-command.patch diff --git a/patches/server/0469-Don-t-allow-null-UUID-s-for-chat.patch b/patches/server/0471-Don-t-allow-null-UUID-s-for-chat.patch similarity index 100% rename from patches/server/0469-Don-t-allow-null-UUID-s-for-chat.patch rename to patches/server/0471-Don-t-allow-null-UUID-s-for-chat.patch diff --git a/patches/server/0470-Improve-Legacy-Component-serialization-size.patch b/patches/server/0472-Improve-Legacy-Component-serialization-size.patch similarity index 100% rename from patches/server/0470-Improve-Legacy-Component-serialization-size.patch rename to patches/server/0472-Improve-Legacy-Component-serialization-size.patch diff --git a/patches/server/0471-Stop-copy-on-write-operations-for-updating-light-dat.patch b/patches/server/0473-Stop-copy-on-write-operations-for-updating-light-dat.patch similarity index 100% rename from patches/server/0471-Stop-copy-on-write-operations-for-updating-light-dat.patch rename to patches/server/0473-Stop-copy-on-write-operations-for-updating-light-dat.patch diff --git a/patches/server/0472-Support-old-UUID-format-for-NBT.patch b/patches/server/0474-Support-old-UUID-format-for-NBT.patch similarity index 100% rename from patches/server/0472-Support-old-UUID-format-for-NBT.patch rename to patches/server/0474-Support-old-UUID-format-for-NBT.patch diff --git a/patches/server/0473-Clean-up-duplicated-GameProfile-Properties.patch b/patches/server/0475-Clean-up-duplicated-GameProfile-Properties.patch similarity index 100% rename from patches/server/0473-Clean-up-duplicated-GameProfile-Properties.patch rename to patches/server/0475-Clean-up-duplicated-GameProfile-Properties.patch diff --git a/patches/server/0474-Convert-legacy-attributes-in-Item-Meta.patch b/patches/server/0476-Convert-legacy-attributes-in-Item-Meta.patch similarity index 100% rename from patches/server/0474-Convert-legacy-attributes-in-Item-Meta.patch rename to patches/server/0476-Convert-legacy-attributes-in-Item-Meta.patch diff --git a/patches/server/0475-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/patches/server/0477-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch similarity index 98% rename from patches/server/0475-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch rename to patches/server/0477-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index 97254f1f3..02b6c277e 100644 --- a/patches/server/0475-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/patches/server/0477-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -327,10 +327,10 @@ index c1db5cc45dbc7dd24a1ef4dbf88a8efb6c7f2d57..7a87258d1725348fe0c343540f642388 } diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 89f73e8a7f5b429c89d051b44ea6c9cbecb97730..08857bd5defc48eb2e91c1dc7c013a90443e9b7d 100644 +index 87ad15eaf8823021030e377078e18bbca4ac5e33..1e76f60ee5cbb579de0778170b6c84a4e3389d73 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -144,6 +144,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -149,6 +149,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public final ServerLevel level; private final ThreadedLevelLightEngine lightEngine; private final BlockableEventLoop mainThreadExecutor; @@ -338,7 +338,7 @@ index 89f73e8a7f5b429c89d051b44ea6c9cbecb97730..08857bd5defc48eb2e91c1dc7c013a90 public final ChunkGenerator generator; private final Supplier overworldDataStorage; public final Supplier getWorldPersistentDataSupplier() { return this.overworldDataStorage; } // Paper - OBFHELPER private final PoiManager poiManager; -@@ -182,6 +183,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -187,6 +188,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @Override public void execute(Runnable runnable) { @@ -346,7 +346,7 @@ index 89f73e8a7f5b429c89d051b44ea6c9cbecb97730..08857bd5defc48eb2e91c1dc7c013a90 if (this.queue == null) { this.queue = new java.util.ArrayDeque<>(); } -@@ -190,6 +192,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -195,6 +197,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @Override public void run() { @@ -354,7 +354,7 @@ index 89f73e8a7f5b429c89d051b44ea6c9cbecb97730..08857bd5defc48eb2e91c1dc7c013a90 if (this.queue == null) { return; } -@@ -346,6 +349,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -351,6 +354,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.level = world; this.generator = chunkGenerator; this.mainThreadExecutor = mainThreadExecutor; @@ -370,7 +370,7 @@ index 89f73e8a7f5b429c89d051b44ea6c9cbecb97730..08857bd5defc48eb2e91c1dc7c013a90 ProcessorMailbox threadedmailbox = ProcessorMailbox.create(executor, "worldgen"); Objects.requireNonNull(mainThreadExecutor); -@@ -441,6 +453,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -446,6 +458,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.playerViewDistanceTickMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, (ServerPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ, com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet newState) -> { @@ -378,7 +378,7 @@ index 89f73e8a7f5b429c89d051b44ea6c9cbecb97730..08857bd5defc48eb2e91c1dc7c013a90 if (newState.size() != 1) { return; } -@@ -459,7 +472,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -464,7 +477,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } ChunkPos chunkPos = new ChunkPos(rangeX, rangeZ); ChunkMap.this.level.getChunkSource().removeTicketAtLevel(TicketType.PLAYER, chunkPos, 31, chunkPos); // entity ticking level, TODO check on update @@ -391,7 +391,7 @@ index 89f73e8a7f5b429c89d051b44ea6c9cbecb97730..08857bd5defc48eb2e91c1dc7c013a90 this.playerViewDistanceNoTickMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets); this.playerViewDistanceBroadcastMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, (ServerPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ, -@@ -476,8 +493,116 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -481,8 +498,116 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider }); // Paper end - no-tick view distance } @@ -508,7 +508,7 @@ index 89f73e8a7f5b429c89d051b44ea6c9cbecb97730..08857bd5defc48eb2e91c1dc7c013a90 public void updatePlayerMobTypeMap(Entity entity) { if (!this.level.paperConfig.perPlayerMobSpawns) { return; -@@ -635,6 +760,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -640,6 +765,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider List>> list = Lists.newArrayList(); int j = centerChunk.x; int k = centerChunk.z; @@ -516,7 +516,7 @@ index 89f73e8a7f5b429c89d051b44ea6c9cbecb97730..08857bd5defc48eb2e91c1dc7c013a90 for (int l = -margin; l <= margin; ++l) { for (int i1 = -margin; i1 <= margin; ++i1) { -@@ -653,6 +779,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -658,6 +784,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider ChunkStatus chunkstatus = (ChunkStatus) distanceToStatus.apply(j1); CompletableFuture> completablefuture = playerchunk.getOrScheduleFuture(chunkstatus, this); @@ -531,7 +531,7 @@ index 89f73e8a7f5b429c89d051b44ea6c9cbecb97730..08857bd5defc48eb2e91c1dc7c013a90 list.add(completablefuture); } -@@ -1099,14 +1233,22 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1104,14 +1238,22 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider }; CompletableFuture chunkSaveFuture = this.level.asyncChunkTaskManager.getChunkSaveFuture(pos.x, pos.z); @@ -559,7 +559,7 @@ index 89f73e8a7f5b429c89d051b44ea6c9cbecb97730..08857bd5defc48eb2e91c1dc7c013a90 return ret; // Paper end } -@@ -1237,7 +1379,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1243,7 +1385,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider long i = playerchunk.getPos().toLong(); Objects.requireNonNull(playerchunk); diff --git a/patches/server/0476-Remove-some-streams-from-structures.patch b/patches/server/0478-Remove-some-streams-from-structures.patch similarity index 100% rename from patches/server/0476-Remove-some-streams-from-structures.patch rename to patches/server/0478-Remove-some-streams-from-structures.patch diff --git a/patches/server/0477-Remove-streams-from-classes-related-villager-gossip.patch b/patches/server/0479-Remove-streams-from-classes-related-villager-gossip.patch similarity index 100% rename from patches/server/0477-Remove-streams-from-classes-related-villager-gossip.patch rename to patches/server/0479-Remove-streams-from-classes-related-villager-gossip.patch diff --git a/patches/removed/1.17/0479-Optimize-NibbleArray-to-use-pooled-buffers.patch b/patches/server/0480-Optimize-NibbleArray-to-use-pooled-buffers.patch similarity index 58% rename from patches/removed/1.17/0479-Optimize-NibbleArray-to-use-pooled-buffers.patch rename to patches/server/0480-Optimize-NibbleArray-to-use-pooled-buffers.patch index 4fa0fd6f0..cb270fd96 100644 --- a/patches/removed/1.17/0479-Optimize-NibbleArray-to-use-pooled-buffers.patch +++ b/patches/server/0480-Optimize-NibbleArray-to-use-pooled-buffers.patch @@ -11,18 +11,16 @@ Uses lots of advanced new capabilities of the Paper codebase :) 1.17 update note: ClientboundLightUpdatePacket has has made changes which necessitate updating this patch 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 bc1b4cc2e0a4181bde5ac05ce0a20a651cb0c4c3..902f14e2e5ac5aa11b545a68ac69e9b0282df7f4 100644 +index 24d5a44cb81ec5f10bfcce002a193f4566de88fc..d8be2ad889f46491e50404916fb4ae0de5f42098 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLightUpdatePacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLightUpdatePacket.java -@@ -1,12 +1,16 @@ - package net.minecraft.network.protocol.game; +@@ -2,11 +2,14 @@ package net.minecraft.network.protocol.game; import com.google.common.collect.Lists; + import java.util.BitSet; +import io.netty.channel.ChannelFuture; // Paper -+ - import java.io.IOException; - import java.util.Iterator; import java.util.List; + import javax.annotation.Nullable; import net.minecraft.core.SectionPos; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.protocol.Packet; @@ -31,10 +29,10 @@ index bc1b4cc2e0a4181bde5ac05ce0a20a651cb0c4c3..902f14e2e5ac5aa11b545a68ac69e9b0 import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.LightLayer; import net.minecraft.world.level.chunk.DataLayer; -@@ -24,14 +28,43 @@ public class ClientboundLightUpdatePacket implements Packet blockUpdates; - private boolean trustEdges; - +@@ -22,6 +25,35 @@ public class ClientboundLightUpdatePacket implements Packet skyUpdates; + private final List blockUpdates; + private final boolean trustEdges; + // Paper start + java.lang.Runnable cleaner1; + java.lang.Runnable cleaner2; @@ -64,97 +62,49 @@ index bc1b4cc2e0a4181bde5ac05ce0a20a651cb0c4c3..902f14e2e5ac5aa11b545a68ac69e9b0 + } + + // Paper end - public ClientboundLightUpdatePacket() {} - public ClientboundLightUpdatePacket(ChunkPos chunkcoordintpair, LevelLightEngine lightengine, boolean flag) { - this.x = chunkcoordintpair.x; - this.z = chunkcoordintpair.z; - this.trustEdges = flag; + public ClientboundLightUpdatePacket(ChunkPos chunkPos, LevelLightEngine lightProvider, @Nullable BitSet bitSet, @Nullable BitSet bitSet2, boolean nonEdge) { + this.x = chunkPos.x; +@@ -31,8 +63,8 @@ public class ClientboundLightUpdatePacket implements Packet BYTE_2048 = new PooledObjects<>(() -> new byte[2048], maxPoolSize); ++ public static final com.destroystokyo.paper.util.pooled.PooledObjects BYTE_2048 = new com.destroystokyo.paper.util.pooled.PooledObjects<>(() -> new byte[2048], maxPoolSize); + public static void releaseBytes(byte[] bytes) { + if (bytes != null && bytes != EMPTY_NIBBLE && bytes.length == 2048) { + System.arraycopy(EMPTY_NIBBLE, 0, bytes, 0, 2048); + BYTE_2048.release(bytes); + } + } -+ + + public DataLayer markPoolSafe(byte[] bytes) { + if (bytes != EMPTY_NIBBLE) this.data = bytes; + return markPoolSafe(); @@ -186,30 +136,26 @@ index 2b798f4e556302f6f79d54182a309f4716a84f04..83e9d8bff9a31fe13a0e22445cd6eecb + public java.lang.Runnable cleaner; + private void registerCleaner() { + if (!poolSafe) { -+ cleaner = MCUtil.registerCleaner(this, this.data, DataLayer::releaseBytes); ++ cleaner = net.minecraft.server.MCUtil.registerCleaner(this, this.data, DataLayer::releaseBytes); + } else { -+ cleaner = MCUtil.once(() -> DataLayer.releaseBytes(this.data)); ++ cleaner = net.minecraft.server.MCUtil.once(() -> DataLayer.releaseBytes(this.data)); + } + } -+ // Paper end -+ @Nullable protected byte[] data; -+ - public DataLayer() {} - public DataLayer(byte[] abyte) { + public DataLayer(byte[] bytes) { + // Paper start -+ this(abyte, false); ++ this(bytes, false); + } -+ public DataLayer(byte[] abyte, boolean isSafe) { - this.data = abyte; ++ public DataLayer(byte[] bytes, boolean isSafe) { + this.data = bytes; + if (!isSafe) this.data = getCloneIfSet(); // Paper - clone for safety + registerCleaner(); + // Paper end - if (abyte.length != 2048) { - throw (IllegalArgumentException) Util.pauseInIde((Throwable) (new IllegalArgumentException("ChunkNibbleArrays should be 2048 bytes not: " + abyte.length))); + if (bytes.length != 2048) { + throw (IllegalArgumentException) Util.pauseInIde((Throwable) (new IllegalArgumentException("ChunkNibbleArrays should be 2048 bytes not: " + bytes.length))); } -@@ -46,7 +106,8 @@ public class DataLayer { +@@ -50,7 +104,8 @@ public class DataLayer { public void set(int index, int value) { // PAIL: private -> public if (this.data == null) { @@ -219,7 +165,7 @@ index 2b798f4e556302f6f79d54182a309f4716a84f04..83e9d8bff9a31fe13a0e22445cd6eecb } int k = this.getPosition(index); -@@ -68,14 +129,36 @@ public class DataLayer { +@@ -72,13 +127,33 @@ public class DataLayer { public byte[] getData() { if (this.data == null) { this.data = new byte[2048]; @@ -232,25 +178,22 @@ index 2b798f4e556302f6f79d54182a309f4716a84f04..83e9d8bff9a31fe13a0e22445cd6eecb + cleaner.run(); // release the previously pooled value + this.cleaner = null; + } -+ } + } + // Paper end -+ -+ return this.data; -+ } -+ -+ @Nonnull + + return this.data; + } + ++ @javax.annotation.Nonnull + public byte[] asBytesPoolSafe() { + if (this.data == null) { + this.data = BYTE_2048.acquire(); // Paper + registerCleaner(); // Paper - } - -+ //noinspection ConstantConditions - return this.data; - } ++ } ++ ++ return this.data; ++ } + // Paper end - - public DataLayer copy() { return this.copy(); } // Paper - OBFHELPER public DataLayer copy() { - return this.data == null ? new DataLayer() : new DataLayer((byte[]) this.data.clone()); + return this.data == null ? new DataLayer() : new DataLayer(this.data); // Paper - clone in ctor @@ -258,10 +201,10 @@ index 2b798f4e556302f6f79d54182a309f4716a84f04..83e9d8bff9a31fe13a0e22445cd6eecb public String toString() { 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 6c28a611b9b79c3322ab07883972c07b3bfc3073..1e58958c3d7b10da5a5f22fc9591d9183e53e3cc 100644 +index 1f95ac18990822a64f0bb2af947693c4b88cdf73..e1330caba0574c94e5343ea1e444b511edf07b05 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 -@@ -435,11 +435,11 @@ public class ChunkSerializer { +@@ -481,11 +481,11 @@ public class ChunkSerializer { } if (nibblearray != null && !nibblearray.isEmpty()) { @@ -276,70 +219,62 @@ index 6c28a611b9b79c3322ab07883972c07b3bfc3073..1e58958c3d7b10da5a5f22fc9591d918 nbttaglist.add(nbttagcompound2); diff --git a/src/main/java/net/minecraft/world/level/lighting/DataLayerStorageMap.java b/src/main/java/net/minecraft/world/level/lighting/DataLayerStorageMap.java -index 4c9041f1c1cb4b3ec114fbd0c5d4db50a6f2526d..54cca3b376e5ce02936edc8b9c17e67e17f07147 100644 +index f357a3473682c2d37a20fb862522c67b9979402a..52682471adc13dffc0383fc4abacbd3397f3bb10 100644 --- a/src/main/java/net/minecraft/world/level/lighting/DataLayerStorageMap.java +++ b/src/main/java/net/minecraft/world/level/lighting/DataLayerStorageMap.java -@@ -2,6 +2,7 @@ package net.minecraft.world.level.lighting; - - import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; - import javax.annotation.Nullable; -+import net.minecraft.server.MCUtil; - import net.minecraft.world.level.chunk.DataLayer; - - public abstract class DataLayerStorageMap> { -@@ -34,7 +35,9 @@ public abstract class DataLayerStorageMap> { +@@ -34,7 +34,9 @@ public abstract class DataLayerStorageMap> { public void copyDataLayer(long pos) { if (this.isVisible) { throw new IllegalStateException("writing to visible data"); } // Paper - avoid copying light data - this.data.queueUpdate(pos, ((DataLayer) this.data.getUpdating(pos)).copy()); // Paper - avoid copying light data + DataLayer updating = this.data.getUpdating(pos); // Paper - pool nibbles + this.data.queueUpdate(pos, new DataLayer().markPoolSafe(updating.getCloneIfSet())); // Paper - avoid copying light data - pool safe clone -+ if (updating.cleaner != null) MCUtil.scheduleTask(2, updating.cleaner, "Light Engine Release"); // Paper - delay clean incase anything holding ref was still using it ++ if (updating.cleaner != null) net.minecraft.server.MCUtil.scheduleTask(2, updating.cleaner, "Light Engine Release"); // Paper - delay clean incase anything holding ref was still using it this.clearCache(); } diff --git a/src/main/java/net/minecraft/world/level/lighting/FlatDataLayer.java b/src/main/java/net/minecraft/world/level/lighting/FlatDataLayer.java -index 9b95ae0ff193d7f52650f406c70e76e3f7e07e1c..c0d356ac4d54b952fe9ddaf5125b07177ac44d1f 100644 +index 0a65818e68605a3fa944c2de808ebc069f3f8007..cdc7d890841818f615aa09b6068cf98c3936e9a7 100644 --- a/src/main/java/net/minecraft/world/level/lighting/FlatDataLayer.java +++ b/src/main/java/net/minecraft/world/level/lighting/FlatDataLayer.java -@@ -10,7 +10,7 @@ public class FlatDataLayer extends DataLayer { +@@ -11,7 +11,7 @@ public class FlatDataLayer extends DataLayer { - public FlatDataLayer(DataLayer nibblearray, int i) { + public FlatDataLayer(DataLayer chunkNibbleArray, int offset) { super(128); -- System.arraycopy(nibblearray.getData(), i * 128, this.data, 0, 128); -+ System.arraycopy(nibblearray.getIfSet(), i * 128, this.data, 0, 128); // Paper +- System.arraycopy(chunkNibbleArray.getData(), offset * 128, this.data, 0, 128); ++ System.arraycopy(chunkNibbleArray.getIfSet(), offset * 128, this.data, 0, 128); // Paper } @Override -@@ -20,7 +20,7 @@ public class FlatDataLayer extends DataLayer { +@@ -21,7 +21,7 @@ public class FlatDataLayer extends DataLayer { @Override public byte[] getData() { -- byte[] abyte = new byte[2048]; -+ byte[] abyte = BYTE_2048.acquire(); // Paper +- byte[] bs = new byte[2048]; ++ byte[] bs = BYTE_2048.acquire(); // Paper - for (int i = 0; i < 16; ++i) { - System.arraycopy(this.data, 0, abyte, i * 128, 128); + for(int i = 0; i < 16; ++i) { + System.arraycopy(this.data, 0, bs, i * 128, 128); diff --git a/src/main/java/net/minecraft/world/level/lighting/LayerLightSectionStorage.java b/src/main/java/net/minecraft/world/level/lighting/LayerLightSectionStorage.java -index 177dae992d13674bb285a60b8427df9ea843dc99..5757bcfded35f112d52a7c81586850ba50e0d8dd 100644 +index cc9eb8273d5157fb649d84a3ec589b0b923b5bc9..fd1cdb6e2023713f947b9497c605cf6f4bae8994 100644 --- a/src/main/java/net/minecraft/world/level/lighting/LayerLightSectionStorage.java +++ b/src/main/java/net/minecraft/world/level/lighting/LayerLightSectionStorage.java -@@ -156,7 +156,7 @@ public abstract class LayerLightSectionStorage> - protected DataLayer createDataLayer(long sectionPos) { - DataLayer nibblearray = (DataLayer) this.queuedSections.get(sectionPos); +@@ -162,7 +162,7 @@ public abstract class LayerLightSectionStorage> -- return nibblearray != null ? nibblearray : new DataLayer(); -+ return nibblearray != null ? nibblearray : new DataLayer().markPoolSafe(); // Paper + protected DataLayer createDataLayer(long sectionPos) { + DataLayer dataLayer = this.queuedSections.get(sectionPos); +- return dataLayer != null ? dataLayer : new DataLayer(); ++ return dataLayer != null ? dataLayer : new DataLayer().markPoolSafe(); // Paper } protected void clearQueuedSectionBlocks(LayerLightEngine storage, long sectionPos) { -@@ -338,12 +338,12 @@ public abstract class LayerLightSectionStorage> +@@ -321,12 +321,12 @@ public abstract class LayerLightSectionStorage> - protected void queueSectionData(long sectionPos, @Nullable DataLayer array, boolean flag) { + protected void queueSectionData(long sectionPos, @Nullable DataLayer array, boolean bl) { if (array != null) { - this.queuedSections.put(sectionPos, array); + DataLayer remove = this.queuedSections.put(sectionPos, array); if (remove != null && remove.cleaner != null) remove.cleaner.run(); // Paper - clean up when removed - if (!flag) { + if (!bl) { this.untrustedSections.add(sectionPos); } } else { @@ -349,36 +284,36 @@ index 177dae992d13674bb285a60b8427df9ea843dc99..5757bcfded35f112d52a7c81586850ba } diff --git a/src/main/java/net/minecraft/world/level/lighting/SkyLightSectionStorage.java b/src/main/java/net/minecraft/world/level/lighting/SkyLightSectionStorage.java -index 410fcfa8c01b7e3d3e3829ebdb92a11badff16ea..88f168f9d4c29cfc93500227bf8a60de4b6e4d8a 100644 +index f6df52403a1068a0779e4ff8c2ce5dc06176e061..7dc194b4f04b2d59dcb100b0a3b2ca0132f832cf 100644 --- a/src/main/java/net/minecraft/world/level/lighting/SkyLightSectionStorage.java +++ b/src/main/java/net/minecraft/world/level/lighting/SkyLightSectionStorage.java -@@ -172,9 +172,9 @@ public class SkyLightSectionStorage extends LayerLightSectionStorage