From 7f3d2ff50330f6a703032cc8fe68cd05409d75b4 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 7 Dec 2022 20:22:28 +0100 Subject: [PATCH] Patching patched patches --- .../0305-Properly-resend-entities.patch | 0 patches/server/0014-Starlight.patch | 5 +- .../server/0233-AnvilDamageEvent.patch | 0 .../server/0234-Add-TNTPrimeEvent.patch | 8 +-- ...nd-make-tab-spam-limits-configurable.patch | 8 +-- .../server/0236-Fix-NBT-type-issues.patch | 10 +-- ...Remove-unnecessary-itemmeta-handling.patch | 6 +- ...ies-option-to-debug-dupe-uuid-issues.patch | 20 +++--- ...dd-Early-Warning-Feature-to-WatchDog.patch | 16 ++--- ...40-Use-ConcurrentHashMap-in-JsonList.patch | 4 +- ...41-Use-a-Queue-for-Queueing-Commands.patch | 6 +- ...ile-Entities-from-a-chunk-without-sn.patch | 6 +- ...ptimize-BlockPosition-helper-methods.patch | 4 +- ...default-mob-spawn-range-and-water-an.patch | 0 .../server/0245-Slime-Pathfinder-Events.patch | 22 +++---- ...le-speed-for-water-flowing-over-lava.patch | 0 ...247-Optimize-CraftBlockData-Creation.patch | 10 +-- .../server/0248-Optimize-MappedRegistry.patch | 26 ++++---- .../0249-Add-PhantomPreSpawnEvent.patch | 15 +++-- .../server/0250-Add-More-Creeper-API.patch | 4 +- .../0251-Inventory-removeItemAnySlot.patch | 8 +-- ...loadChunk-int-int-false-load-unconve.patch | 4 +- ...-ray-tracing-methods-to-LivingEntity.patch | 4 +- ...e-attack-cooldown-methods-for-Player.patch | 4 +- .../server/0255-Improve-death-events.patch | 40 +++++------ ...ow-chests-to-be-placed-with-NBT-data.patch | 4 +- .../server/0257-Mob-Pathfinding-API.patch | 0 ...-for-CanPlaceOn-and-CanDestroy-NBT-v.patch | 0 ...ent-chunk-loading-from-Fluid-Flowing.patch | 2 +- ...ent-Mob-AI-Rules-from-Loading-Chunks.patch | 0 ...wning-from-loading-generating-chunks.patch | 6 +- ...nt-furnace-cook-speed-multiplier-API.patch | 14 ++-- ...arseException-in-Entity-and-TE-names.patch | 10 +-- .../0264-Honor-EntityAgeable.ageLock.patch | 0 ...ble-connection-throttle-kick-message.patch | 0 .../0266-Hook-into-CB-plugin-rewrites.patch | 0 .../server/0267-PreSpawnerSpawnEvent.patch | 4 +- ...268-Add-LivingEntity-getTargetEntity.patch | 6 +- .../server/0269-Add-sun-related-API.patch | 4 +- .../server/0270-Turtle-API.patch | 6 +- ...tator-target-events-and-improve-impl.patch | 14 ++-- ...ther-worlds-for-shooter-of-projectil.patch | 4 +- .../server/0273-Add-more-Witch-API.patch | 0 ...owned-for-Villager-Aggression-Config.patch | 0 ...event-players-from-moving-into-unloa.patch | 10 +-- ...76-Reset-players-airTicks-on-respawn.patch | 4 +- ...-after-profile-lookups-if-not-needed.patch | 0 ...er-Thread-Pool-and-Thread-Priorities.patch | 6 +- .../0279-Optimize-World-Time-Updates.patch | 4 +- ...store-custom-InventoryHolder-support.patch | 6 +- .../0281-Use-Vanilla-Minecart-Speeds.patch | 4 +- .../0282-Fix-SpongeAbsortEvent-handling.patch | 0 ...t-allow-digging-into-unloaded-chunks.patch | 6 +- ...ault-permission-message-configurable.patch | 4 +- ...Prevent-rayTrace-from-loading-chunks.patch | 0 ...e-Large-Packets-disconnecting-client.patch | 2 +- ...entity-dismount-during-teleportation.patch | 22 +++---- .../server/0288-Add-more-Zombie-API.patch | 12 ++-- .../server/0289-Book-Size-Limits.patch | 4 +- .../0290-Add-PlayerConnectionCloseEvent.patch | 0 ...Prevent-Enderman-from-loading-chunks.patch | 6 +- ...-replace-OfflinePlayer-getLastPlayed.patch | 18 ++--- ...vehicle-tracking-issue-on-disconnect.patch | 4 +- ...-remove-from-being-called-on-Players.patch | 4 +- .../server/0295-BlockDestroyEvent.patch | 6 +- .../0296-Async-command-map-building.patch | 10 +-- .../0297-Implement-Brigadier-Mojang-API.patch | 24 +++---- ...om-Shapeless-Custom-Crafting-Recipes.patch | 4 +- .../0299-Limit-Client-Sign-length-more.patch | 6 +- ...ConvertSigns-boolean-every-sign-save.patch | 8 +-- ...-Manager-and-add-advanced-packet-sup.patch | 0 ...le-Oversized-Tile-Entities-in-chunks.patch | 2 +- ...oggleEvent-when-whitelist-is-toggled.patch | 4 +- .../0304-Entity-getEntitySpawnReason.patch | 22 +++---- .../0305-Fire-event-on-GS4-query.patch} | 0 ...06-Implement-PlayerPostRespawnEvent.patch} | 8 +-- ...for-pickupDelay-breaks-picking-up-i.patch} | 6 +- .../0308-Server-Tick-Events.patch} | 6 +- ...309-PlayerDeathEvent-getItemsToKeep.patch} | 6 +- ...Optimize-Captured-TileEntity-Lookup.patch} | 4 +- .../0311-Add-Heightmap-API.patch} | 4 +- .../0312-Mob-Spawner-API-Enhancements.patch} | 16 ++--- ...-to-changed-postToMainThread-method.patch} | 4 +- ...-item-frames-are-modified-MC-123450.patch} | 4 +- ...0315-Implement-CraftBlockSoundGroup.patch} | 4 +- ...e-Keep-Spawn-Loaded-range-per-world.patch} | 14 ++-- ...17-Allow-Saving-of-Oversized-Chunks.patch} | 6 +- ...18-Expose-the-internal-current-tick.patch} | 4 +- ...19-Fix-World-isChunkGenerated-calls.patch} | 14 ++-- ...te-location-if-we-failed-to-read-it.patch} | 0 ...l-Spawned-mobs-towards-natural-spaw.patch} | 4 +- ...urable-projectile-relative-velocity.patch} | 4 +- .../0323-offset-item-frame-ticking.patch} | 0 .../0324-Fix-MC-158900.patch} | 4 +- ...event-consuming-the-wrong-itemstack.patch} | 8 +-- ...6-Dont-send-unnecessary-sign-update.patch} | 4 +- ...-option-to-disable-pillager-patrols.patch} | 0 ...328-Flat-bedrock-generator-settings.patch} | 18 ++--- ...k-loads-when-villagers-try-to-find-.patch} | 4 +- ...656-Fix-Follow-Range-Initial-Target.patch} | 0 .../0331-Duplicate-UUID-Resolve-Option.patch} | 6 +- .../0332-Optimize-Hoppers.patch} | 10 +-- ...ayerDeathEvent-shouldDropExperience.patch} | 4 +- ...ading-chunks-checking-hive-position.patch} | 6 +- ...hunks-from-Hoppers-and-other-things.patch} | 0 ...ializing-mismatching-chunk-coordina.patch} | 6 +- ...timise-EntityGetter-getPlayerByUUID.patch} | 6 +- ...338-Fix-items-not-falling-correctly.patch} | 4 +- .../0339-Lag-compensate-eating.patch} | 14 ++-- ...ize-call-to-getFluid-for-explosions.patch} | 4 +- ...-in-stack-not-having-effects-when-d.patch} | 4 +- ...Add-effect-to-block-break-naturally.patch} | 6 +- .../0343-Entity-Activation-Range-2.0.patch} | 40 +++++------ .../0344-Increase-Light-Queue-Size.patch} | 4 +- .../0345-Anti-Xray.patch} | 66 +++++++++---------- ...ement-alternative-item-despawn-rate.patch} | 14 ++-- .../0347-Tracking-Range-Improvements.patch} | 4 +- ...-items-vanishing-through-end-portal.patch} | 4 +- ...ment-optional-per-player-mob-spawns.patch} | 44 ++++++------- ...et-gravity-in-void.-Fixes-MC-167279.patch} | 2 +- ...-getChunkAt-calls-for-loaded-chunks.patch} | 6 +- ...0352-Add-debug-for-sync-chunk-loads.patch} | 8 +-- ...3-Remove-garbage-Java-version-check.patch} | 2 +- .../0354-Add-ThrownEggHatchEvent.patch} | 2 +- .../0355-Entity-Jump-API.patch} | 8 +-- ...-to-nerf-pigmen-from-nether-portals.patch} | 10 +-- .../0357-Make-the-GUI-graph-fancier.patch} | 0 ...58-add-hand-to-BlockMultiPlaceEvent.patch} | 2 +- ...ipwire-hook-placement-before-update.patch} | 0 ...o-allow-iron-golems-to-spawn-in-air.patch} | 0 ...chance-of-villager-zombie-infection.patch} | 12 ++-- .../0362-Optimise-Chunk-getFluid.patch} | 2 +- ...rbose-world-setting-to-false-by-def.patch} | 0 ...Add-tick-times-API-and-mspt-command.patch} | 12 ++-- ...65-Expose-MinecraftServer-isRunning.patch} | 4 +- ...dd-Raw-Byte-ItemStack-Serialization.patch} | 4 +- ...pawn-settings-and-per-player-option.patch} | 4 +- ...nections-shouldn-t-hold-up-shutdown.patch} | 4 +- ...ow-bees-to-load-chunks-for-beehives.patch} | 6 +- ...PlayerChunkMap-adds-crashing-server.patch} | 10 +-- .../0371-Don-t-tick-dead-players.patch} | 4 +- ...-Player-s-shouldn-t-be-able-to-move.patch} | 4 +- ...timize-Collision-to-not-load-chunks.patch} | 6 +- ...ove-existing-players-to-world-spawn.patch} | 10 +-- ...alSelector-Goal.Flag-Set-operations.patch} | 12 ++-- .../0376-Improved-Watchdog-Support.patch} | 52 +++++++-------- .../0377-Optimize-Pathfinding.patch} | 4 +- ...8-Reduce-Either-Optional-allocation.patch} | 0 ...-memory-footprint-of-NBTTagCompound.patch} | 4 +- 149 files changed, 550 insertions(+), 542 deletions(-) rename patches/{unapplied/server => removed/1.19.3}/0305-Properly-resend-entities.patch (100%) rename patches/{unapplied => }/server/0233-AnvilDamageEvent.patch (100%) rename patches/{unapplied => }/server/0234-Add-TNTPrimeEvent.patch (95%) rename patches/{unapplied => }/server/0235-Break-up-and-make-tab-spam-limits-configurable.patch (92%) rename patches/{unapplied => }/server/0236-Fix-NBT-type-issues.patch (83%) rename patches/{unapplied => }/server/0237-Remove-unnecessary-itemmeta-handling.patch (85%) rename patches/{unapplied => }/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch (89%) rename patches/{unapplied => }/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch (93%) rename patches/{unapplied => }/server/0240-Use-ConcurrentHashMap-in-JsonList.patch (97%) rename patches/{unapplied => }/server/0241-Use-a-Queue-for-Queueing-Commands.patch (89%) rename patches/{unapplied => }/server/0242-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch (91%) rename patches/{unapplied => }/server/0243-Optimize-BlockPosition-helper-methods.patch (96%) rename patches/{unapplied => }/server/0244-Restore-vanilla-default-mob-spawn-range-and-water-an.patch (100%) rename patches/{unapplied => }/server/0245-Slime-Pathfinder-Events.patch (90%) rename patches/{unapplied => }/server/0246-Configurable-speed-for-water-flowing-over-lava.patch (100%) rename patches/{unapplied => }/server/0247-Optimize-CraftBlockData-Creation.patch (84%) rename patches/{unapplied => }/server/0248-Optimize-MappedRegistry.patch (74%) rename patches/{unapplied => }/server/0249-Add-PhantomPreSpawnEvent.patch (83%) rename patches/{unapplied => }/server/0250-Add-More-Creeper-API.patch (93%) rename patches/{unapplied => }/server/0251-Inventory-removeItemAnySlot.patch (88%) rename patches/{unapplied => }/server/0252-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch (87%) rename patches/{unapplied => }/server/0253-Add-ray-tracing-methods-to-LivingEntity.patch (96%) rename patches/{unapplied => }/server/0254-Expose-attack-cooldown-methods-for-Player.patch (86%) rename patches/{unapplied => }/server/0255-Improve-death-events.patch (92%) rename patches/{unapplied => }/server/0256-Allow-chests-to-be-placed-with-NBT-data.patch (91%) rename patches/{unapplied => }/server/0257-Mob-Pathfinding-API.patch (100%) rename patches/{unapplied => }/server/0258-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch (100%) rename patches/{unapplied => }/server/0259-Prevent-chunk-loading-from-Fluid-Flowing.patch (97%) rename patches/{unapplied => }/server/0260-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch (100%) rename patches/{unapplied => }/server/0261-Prevent-mob-spawning-from-loading-generating-chunks.patch (90%) rename patches/{unapplied => }/server/0262-Implement-furnace-cook-speed-multiplier-API.patch (94%) rename patches/{unapplied => }/server/0263-Catch-JsonParseException-in-Entity-and-TE-names.patch (93%) rename patches/{unapplied => }/server/0264-Honor-EntityAgeable.ageLock.patch (100%) rename patches/{unapplied => }/server/0265-Configurable-connection-throttle-kick-message.patch (100%) rename patches/{unapplied => }/server/0266-Hook-into-CB-plugin-rewrites.patch (100%) rename patches/{unapplied => }/server/0267-PreSpawnerSpawnEvent.patch (91%) rename patches/{unapplied => }/server/0268-Add-LivingEntity-getTargetEntity.patch (95%) rename patches/{unapplied => }/server/0269-Add-sun-related-API.patch (90%) rename patches/{unapplied => }/server/0270-Turtle-API.patch (96%) rename patches/{unapplied => }/server/0271-Call-player-spectator-target-events-and-improve-impl.patch (94%) rename patches/{unapplied => }/server/0272-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch (90%) rename patches/{unapplied => }/server/0273-Add-more-Witch-API.patch (100%) rename patches/{unapplied => }/server/0274-Check-Drowned-for-Villager-Aggression-Config.patch (100%) rename patches/{unapplied => }/server/0275-Add-option-to-prevent-players-from-moving-into-unloa.patch (93%) rename patches/{unapplied => }/server/0276-Reset-players-airTicks-on-respawn.patch (83%) rename patches/{unapplied => }/server/0277-Don-t-sleep-after-profile-lookups-if-not-needed.patch (100%) rename patches/{unapplied => }/server/0278-Improve-Server-Thread-Pool-and-Thread-Priorities.patch (94%) rename patches/{unapplied => }/server/0279-Optimize-World-Time-Updates.patch (94%) rename patches/{unapplied => }/server/0280-Restore-custom-InventoryHolder-support.patch (98%) rename patches/{unapplied => }/server/0281-Use-Vanilla-Minecart-Speeds.patch (87%) rename patches/{unapplied => }/server/0282-Fix-SpongeAbsortEvent-handling.patch (100%) rename patches/{unapplied => }/server/0283-Don-t-allow-digging-into-unloaded-chunks.patch (95%) rename patches/{unapplied => }/server/0284-Make-the-default-permission-message-configurable.patch (92%) rename patches/{unapplied => }/server/0285-Prevent-rayTrace-from-loading-chunks.patch (100%) rename patches/{unapplied => }/server/0286-Handle-Large-Packets-disconnecting-client.patch (98%) rename patches/{unapplied => }/server/0287-force-entity-dismount-during-teleportation.patch (87%) rename patches/{unapplied => }/server/0288-Add-more-Zombie-API.patch (90%) rename patches/{unapplied => }/server/0289-Book-Size-Limits.patch (94%) rename patches/{unapplied => }/server/0290-Add-PlayerConnectionCloseEvent.patch (100%) rename patches/{unapplied => }/server/0291-Prevent-Enderman-from-loading-chunks.patch (90%) rename patches/{unapplied => }/server/0292-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch (90%) rename patches/{unapplied => }/server/0293-Workaround-for-vehicle-tracking-issue-on-disconnect.patch (85%) rename patches/{unapplied => }/server/0294-Block-Entity-remove-from-being-called-on-Players.patch (90%) rename patches/{unapplied => }/server/0295-BlockDestroyEvent.patch (91%) rename patches/{unapplied => }/server/0296-Async-command-map-building.patch (90%) rename patches/{unapplied => }/server/0297-Implement-Brigadier-Mojang-API.patch (93%) rename patches/{unapplied => }/server/0298-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch (94%) rename patches/{unapplied => }/server/0299-Limit-Client-Sign-length-more.patch (92%) rename patches/{unapplied => }/server/0300-Don-t-check-ConvertSigns-boolean-every-sign-save.patch (78%) rename patches/{unapplied => }/server/0301-Optimize-Network-Manager-and-add-advanced-packet-sup.patch (100%) rename patches/{unapplied => }/server/0302-Handle-Oversized-Tile-Entities-in-chunks.patch (97%) rename patches/{unapplied => }/server/0303-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch (82%) rename patches/{unapplied => }/server/0304-Entity-getEntitySpawnReason.patch (87%) rename patches/{unapplied/server/0306-Fire-event-on-GS4-query.patch => server/0305-Fire-event-on-GS4-query.patch} (100%) rename patches/{unapplied/server/0307-Implement-PlayerPostRespawnEvent.patch => server/0306-Implement-PlayerPostRespawnEvent.patch} (86%) rename patches/{unapplied/server/0308-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch => server/0307-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch} (86%) rename patches/{unapplied/server/0309-Server-Tick-Events.patch => server/0308-Server-Tick-Events.patch} (85%) rename patches/{unapplied/server/0310-PlayerDeathEvent-getItemsToKeep.patch => server/0309-PlayerDeathEvent-getItemsToKeep.patch} (92%) rename patches/{unapplied/server/0311-Optimize-Captured-TileEntity-Lookup.patch => server/0310-Optimize-Captured-TileEntity-Lookup.patch} (90%) rename patches/{unapplied/server/0312-Add-Heightmap-API.patch => server/0311-Add-Heightmap-API.patch} (92%) rename patches/{unapplied/server/0313-Mob-Spawner-API-Enhancements.patch => server/0312-Mob-Spawner-API-Enhancements.patch} (89%) rename patches/{unapplied/server/0314-Fix-CB-call-to-changed-postToMainThread-method.patch => server/0313-Fix-CB-call-to-changed-postToMainThread-method.patch} (85%) rename patches/{unapplied/server/0315-Fix-sounds-when-item-frames-are-modified-MC-123450.patch => server/0314-Fix-sounds-when-item-frames-are-modified-MC-123450.patch} (85%) rename patches/{unapplied/server/0316-Implement-CraftBlockSoundGroup.patch => server/0315-Implement-CraftBlockSoundGroup.patch} (93%) rename patches/{unapplied/server/0317-Configurable-Keep-Spawn-Loaded-range-per-world.patch => server/0316-Configurable-Keep-Spawn-Loaded-range-per-world.patch} (95%) rename patches/{unapplied/server/0318-Allow-Saving-of-Oversized-Chunks.patch => server/0317-Allow-Saving-of-Oversized-Chunks.patch} (98%) rename patches/{unapplied/server/0319-Expose-the-internal-current-tick.patch => server/0318-Expose-the-internal-current-tick.patch} (83%) rename patches/{unapplied/server/0320-Fix-World-isChunkGenerated-calls.patch => server/0319-Fix-World-isChunkGenerated-calls.patch} (95%) rename patches/{unapplied/server/0321-Show-blockstate-location-if-we-failed-to-read-it.patch => server/0320-Show-blockstate-location-if-we-failed-to-read-it.patch} (100%) rename patches/{unapplied/server/0322-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch => server/0321-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch} (91%) rename patches/{unapplied/server/0323-Configurable-projectile-relative-velocity.patch => server/0322-Configurable-projectile-relative-velocity.patch} (93%) rename patches/{unapplied/server/0324-offset-item-frame-ticking.patch => server/0323-offset-item-frame-ticking.patch} (100%) rename patches/{unapplied/server/0325-Fix-MC-158900.patch => server/0324-Fix-MC-158900.patch} (90%) rename patches/{unapplied/server/0326-Prevent-consuming-the-wrong-itemstack.patch => server/0325-Prevent-consuming-the-wrong-itemstack.patch} (87%) rename patches/{unapplied/server/0327-Dont-send-unnecessary-sign-update.patch => server/0326-Dont-send-unnecessary-sign-update.patch} (87%) rename patches/{unapplied/server/0328-Add-option-to-disable-pillager-patrols.patch => server/0327-Add-option-to-disable-pillager-patrols.patch} (100%) rename patches/{unapplied/server/0329-Flat-bedrock-generator-settings.patch => server/0328-Flat-bedrock-generator-settings.patch} (95%) rename patches/{unapplied/server/0330-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch => server/0329-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch} (86%) rename patches/{unapplied/server/0331-MC-145656-Fix-Follow-Range-Initial-Target.patch => server/0330-MC-145656-Fix-Follow-Range-Initial-Target.patch} (100%) rename patches/{unapplied/server/0332-Duplicate-UUID-Resolve-Option.patch => server/0331-Duplicate-UUID-Resolve-Option.patch} (96%) rename patches/{unapplied/server/0333-Optimize-Hoppers.patch => server/0332-Optimize-Hoppers.patch} (98%) rename patches/{unapplied/server/0334-PlayerDeathEvent-shouldDropExperience.patch => server/0333-PlayerDeathEvent-shouldDropExperience.patch} (85%) rename patches/{unapplied/server/0335-Prevent-bees-loading-chunks-checking-hive-position.patch => server/0334-Prevent-bees-loading-chunks-checking-hive-position.patch} (81%) rename patches/{unapplied/server/0336-Don-t-load-Chunks-from-Hoppers-and-other-things.patch => server/0335-Don-t-load-Chunks-from-Hoppers-and-other-things.patch} (100%) rename patches/{unapplied/server/0337-Guard-against-serializing-mismatching-chunk-coordina.patch => server/0336-Guard-against-serializing-mismatching-chunk-coordina.patch} (94%) rename patches/{unapplied/server/0338-Optimise-EntityGetter-getPlayerByUUID.patch => server/0337-Optimise-EntityGetter-getPlayerByUUID.patch} (85%) rename patches/{unapplied/server/0339-Fix-items-not-falling-correctly.patch => server/0338-Fix-items-not-falling-correctly.patch} (93%) rename patches/{unapplied/server/0340-Lag-compensate-eating.patch => server/0339-Lag-compensate-eating.patch} (85%) rename patches/{unapplied/server/0341-Optimize-call-to-getFluid-for-explosions.patch => server/0340-Optimize-call-to-getFluid-for-explosions.patch} (87%) rename patches/{unapplied/server/0342-Fix-last-firework-in-stack-not-having-effects-when-d.patch => server/0341-Fix-last-firework-in-stack-not-having-effects-when-d.patch} (90%) rename patches/{unapplied/server/0343-Add-effect-to-block-break-naturally.patch => server/0342-Add-effect-to-block-break-naturally.patch} (88%) rename patches/{unapplied/server/0344-Entity-Activation-Range-2.0.patch => server/0343-Entity-Activation-Range-2.0.patch} (96%) rename patches/{unapplied/server/0345-Increase-Light-Queue-Size.patch => server/0344-Increase-Light-Queue-Size.patch} (89%) rename patches/{unapplied/server/0346-Anti-Xray.patch => server/0345-Anti-Xray.patch} (96%) rename patches/{unapplied/server/0347-Implement-alternative-item-despawn-rate.patch => server/0346-Implement-alternative-item-despawn-rate.patch} (87%) rename patches/{unapplied/server/0348-Tracking-Range-Improvements.patch => server/0347-Tracking-Range-Improvements.patch} (95%) rename patches/{unapplied/server/0349-Fix-items-vanishing-through-end-portal.patch => server/0348-Fix-items-vanishing-through-end-portal.patch} (89%) rename patches/{unapplied/server/0350-implement-optional-per-player-mob-spawns.patch => server/0349-implement-optional-per-player-mob-spawns.patch} (94%) rename patches/{unapplied/server/0351-Bees-get-gravity-in-void.-Fixes-MC-167279.patch => server/0350-Bees-get-gravity-in-void.-Fixes-MC-167279.patch} (94%) rename patches/{unapplied/server/0352-Optimise-getChunkAt-calls-for-loaded-chunks.patch => server/0351-Optimise-getChunkAt-calls-for-loaded-chunks.patch} (92%) rename patches/{unapplied/server/0353-Add-debug-for-sync-chunk-loads.patch => server/0352-Add-debug-for-sync-chunk-loads.patch} (97%) rename patches/{unapplied/server/0354-Remove-garbage-Java-version-check.patch => server/0353-Remove-garbage-Java-version-check.patch} (91%) rename patches/{unapplied/server/0355-Add-ThrownEggHatchEvent.patch => server/0354-Add-ThrownEggHatchEvent.patch} (94%) rename patches/{unapplied/server/0356-Entity-Jump-API.patch => server/0355-Entity-Jump-API.patch} (92%) rename patches/{unapplied/server/0357-Add-option-to-nerf-pigmen-from-nether-portals.patch => server/0356-Add-option-to-nerf-pigmen-from-nether-portals.patch} (86%) rename patches/{unapplied/server/0358-Make-the-GUI-graph-fancier.patch => server/0357-Make-the-GUI-graph-fancier.patch} (100%) rename patches/{unapplied/server/0359-add-hand-to-BlockMultiPlaceEvent.patch => server/0358-add-hand-to-BlockMultiPlaceEvent.patch} (93%) rename patches/{unapplied/server/0360-Validate-tripwire-hook-placement-before-update.patch => server/0359-Validate-tripwire-hook-placement-before-update.patch} (100%) rename patches/{unapplied/server/0361-Add-option-to-allow-iron-golems-to-spawn-in-air.patch => server/0360-Add-option-to-allow-iron-golems-to-spawn-in-air.patch} (100%) rename patches/{unapplied/server/0362-Configurable-chance-of-villager-zombie-infection.patch => server/0361-Configurable-chance-of-villager-zombie-infection.patch} (80%) rename patches/{unapplied/server/0363-Optimise-Chunk-getFluid.patch => server/0362-Optimise-Chunk-getFluid.patch} (96%) rename patches/{unapplied/server/0364-Set-spigots-verbose-world-setting-to-false-by-def.patch => server/0363-Set-spigots-verbose-world-setting-to-false-by-def.patch} (100%) rename patches/{unapplied/server/0365-Add-tick-times-API-and-mspt-command.patch => server/0364-Add-tick-times-API-and-mspt-command.patch} (94%) rename patches/{unapplied/server/0366-Expose-MinecraftServer-isRunning.patch => server/0365-Expose-MinecraftServer-isRunning.patch} (83%) rename patches/{unapplied/server/0367-Add-Raw-Byte-ItemStack-Serialization.patch => server/0366-Add-Raw-Byte-ItemStack-Serialization.patch} (94%) rename patches/{unapplied/server/0368-Pillager-patrol-spawn-settings-and-per-player-option.patch => server/0367-Pillager-patrol-spawn-settings-and-per-player-option.patch} (96%) rename patches/{unapplied/server/0369-Remote-Connections-shouldn-t-hold-up-shutdown.patch => server/0368-Remote-Connections-shouldn-t-hold-up-shutdown.patch} (86%) rename patches/{unapplied/server/0370-Do-not-allow-bees-to-load-chunks-for-beehives.patch => server/0369-Do-not-allow-bees-to-load-chunks-for-beehives.patch} (90%) rename patches/{unapplied/server/0371-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch => server/0370-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch} (87%) rename patches/{unapplied/server/0372-Don-t-tick-dead-players.patch => server/0371-Don-t-tick-dead-players.patch} (85%) rename patches/{unapplied/server/0373-Dead-Player-s-shouldn-t-be-able-to-move.patch => server/0372-Dead-Player-s-shouldn-t-be-able-to-move.patch} (84%) rename patches/{unapplied/server/0374-Optimize-Collision-to-not-load-chunks.patch => server/0373-Optimize-Collision-to-not-load-chunks.patch} (96%) rename patches/{unapplied/server/0375-Don-t-move-existing-players-to-world-spawn.patch => server/0374-Don-t-move-existing-players-to-world-spawn.patch} (85%) rename patches/{unapplied/server/0376-Optimize-GoalSelector-Goal.Flag-Set-operations.patch => server/0375-Optimize-GoalSelector-Goal.Flag-Set-operations.patch} (96%) rename patches/{unapplied/server/0377-Improved-Watchdog-Support.patch => server/0376-Improved-Watchdog-Support.patch} (94%) rename patches/{unapplied/server/0378-Optimize-Pathfinding.patch => server/0377-Optimize-Pathfinding.patch} (91%) rename patches/{unapplied/server/0379-Reduce-Either-Optional-allocation.patch => server/0378-Reduce-Either-Optional-allocation.patch} (100%) rename patches/{unapplied/server/0380-Reduce-memory-footprint-of-NBTTagCompound.patch => server/0379-Reduce-memory-footprint-of-NBTTagCompound.patch} (94%) diff --git a/patches/unapplied/server/0305-Properly-resend-entities.patch b/patches/removed/1.19.3/0305-Properly-resend-entities.patch similarity index 100% rename from patches/unapplied/server/0305-Properly-resend-entities.patch rename to patches/removed/1.19.3/0305-Properly-resend-entities.patch diff --git a/patches/server/0014-Starlight.patch b/patches/server/0014-Starlight.patch index a993536643..904b9a5ea0 100644 --- a/patches/server/0014-Starlight.patch +++ b/patches/server/0014-Starlight.patch @@ -5091,7 +5091,7 @@ index 92a64c49b1c7227a5b34488ea15d3d8adb0f9c80..0b67858f8d6689b34816f9556f3424af this.fluidTicks = fluidTickScheduler; } 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 6fdd5c92ab069896e3921faa042cbdb3c29d0538..942f8db571cf87d0e9614bdc7dd9525068cf1001 100644 +index 6fdd5c92ab069896e3921faa042cbdb3c29d0538..a3c14a470ac7055abd00ac6f4f1c02065a485d3b 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 @@ -84,6 +84,14 @@ public class ChunkSerializer { @@ -5120,8 +5120,7 @@ index 6fdd5c92ab069896e3921faa042cbdb3c29d0538..942f8db571cf87d0e9614bdc7dd95250 LevelChunkSection[] achunksection = new LevelChunkSection[i]; boolean flag1 = world.dimensionType().hasSkyLight(); ServerChunkCache chunkproviderserver = world.getChunkSource(); -- LevelLightEngine lightengine = chunkproviderserver.getLightEngine(); -+ LevelLightEngine lightengine = chunkproviderserver.getLightEngine();; + LevelLightEngine lightengine = chunkproviderserver.getLightEngine(); + // Paper start + ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] blockNibbles = ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(world); + ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] skyNibbles = ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(world); diff --git a/patches/unapplied/server/0233-AnvilDamageEvent.patch b/patches/server/0233-AnvilDamageEvent.patch similarity index 100% rename from patches/unapplied/server/0233-AnvilDamageEvent.patch rename to patches/server/0233-AnvilDamageEvent.patch diff --git a/patches/unapplied/server/0234-Add-TNTPrimeEvent.patch b/patches/server/0234-Add-TNTPrimeEvent.patch similarity index 95% rename from patches/unapplied/server/0234-Add-TNTPrimeEvent.patch rename to patches/server/0234-Add-TNTPrimeEvent.patch index 805a9b3806..f7c118e47d 100644 --- a/patches/unapplied/server/0234-Add-TNTPrimeEvent.patch +++ b/patches/server/0234-Add-TNTPrimeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add TNTPrimeEvent diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -index 6eada8313e468e4ea851094976ac98c11710fb45..3f854bea2e6be82c7ad12b4d13064de8baec55c7 100644 +index a889be9dd2a94b531a227ff69a5e761e103067be..d8c9beab9163820df949f6002bbb9224a044c6f3 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java @@ -532,6 +532,11 @@ public class EnderDragon extends Mob implements Enemy { @@ -21,7 +21,7 @@ index 6eada8313e468e4ea851094976ac98c11710fb45..3f854bea2e6be82c7ad12b4d13064de8 this.level.removeBlock(blockposition, false); diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java -index 037902b3addd34dfc6b751ca225373a06c2d6a89..69903bad7b3e143b73b20624c06909458564396c 100644 +index e725168ebce3d1b2548a1bc5baa612a6e718e337..7e48326b6dc847a84e0aff2d393cadf9bace7979 100644 --- a/src/main/java/net/minecraft/world/level/block/FireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java @@ -290,12 +290,19 @@ public class FireBlock extends BaseFireBlock { @@ -46,7 +46,7 @@ index 037902b3addd34dfc6b751ca225373a06c2d6a89..69903bad7b3e143b73b20624c0690945 } } diff --git a/src/main/java/net/minecraft/world/level/block/TntBlock.java b/src/main/java/net/minecraft/world/level/block/TntBlock.java -index 9fcad0eb55a4a91a89ab8bce1f22d91127a94fb2..dd0707bc0a9daf3cd5441a82e9d3502b53d2d0bf 100644 +index f5b685cb678f523c1c07d72b818ada93af64840a..ade39e877edbb07082bb2d87e00ae4bfb6ab1c8f 100644 --- a/src/main/java/net/minecraft/world/level/block/TntBlock.java +++ b/src/main/java/net/minecraft/world/level/block/TntBlock.java @@ -38,6 +38,11 @@ public class TntBlock extends Block { @@ -83,7 +83,7 @@ index 9fcad0eb55a4a91a89ab8bce1f22d91127a94fb2..dd0707bc0a9daf3cd5441a82e9d3502b + if(!new com.destroystokyo.paper.event.block.TNTPrimeEvent(tntBlock, com.destroystokyo.paper.event.block.TNTPrimeEvent.PrimeReason.EXPLOSION, source).callEvent()) + return; + // Paper end - PrimedTnt entitytntprimed = new PrimedTnt(world, (double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D, explosion.getSourceMob()); + PrimedTnt entitytntprimed = new PrimedTnt(world, (double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D, explosion.getIndirectSourceEntity()); int i = entitytntprimed.getFuse(); @@ -95,6 +111,11 @@ public class TntBlock extends Block { diff --git a/patches/unapplied/server/0235-Break-up-and-make-tab-spam-limits-configurable.patch b/patches/server/0235-Break-up-and-make-tab-spam-limits-configurable.patch similarity index 92% rename from patches/unapplied/server/0235-Break-up-and-make-tab-spam-limits-configurable.patch rename to patches/server/0235-Break-up-and-make-tab-spam-limits-configurable.patch index 51c37d3ccc..fd3ca17b01 100644 --- a/patches/unapplied/server/0235-Break-up-and-make-tab-spam-limits-configurable.patch +++ b/patches/server/0235-Break-up-and-make-tab-spam-limits-configurable.patch @@ -22,10 +22,10 @@ to take the burden of this into their own hand without having to rely on plugins doing unsafe things. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 4fd16cc84b9edbadbbc073494656aa1fadb0c275..c50d2b797be6a69bb632a7e88bf353d0a134e676 100644 +index 867478671d3223338bf01a36da0361a5ae1f38be..c5ad4d8a08f03a6f75241f4e4913d84bcb0fdf0b 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -262,6 +262,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -261,6 +261,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private long keepAliveChallenge; // CraftBukkit start - multithreaded fields private final AtomicInteger chatSpamTickCount = new AtomicInteger(); @@ -33,7 +33,7 @@ index 4fd16cc84b9edbadbbc073494656aa1fadb0c275..c50d2b797be6a69bb632a7e88bf353d0 // CraftBukkit end private int dropSpamTickCount; private double firstGoodX; -@@ -416,6 +417,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -409,6 +410,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.server.getProfiler().pop(); // CraftBukkit start for (int spam; (spam = this.chatSpamTickCount.get()) > 0 && !this.chatSpamTickCount.compareAndSet(spam, spam - 1); ) ; @@ -41,7 +41,7 @@ index 4fd16cc84b9edbadbbc073494656aa1fadb0c275..c50d2b797be6a69bb632a7e88bf353d0 /* Use thread-safe field access instead if (this.chatSpamTickCount > 0) { --this.chatSpamTickCount; -@@ -793,7 +795,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -785,7 +787,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) { // PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // Paper - run this async // CraftBukkit start diff --git a/patches/unapplied/server/0236-Fix-NBT-type-issues.patch b/patches/server/0236-Fix-NBT-type-issues.patch similarity index 83% rename from patches/unapplied/server/0236-Fix-NBT-type-issues.patch rename to patches/server/0236-Fix-NBT-type-issues.patch index b8f7a3afbb..dc5aa5f3c1 100644 --- a/patches/unapplied/server/0236-Fix-NBT-type-issues.patch +++ b/patches/server/0236-Fix-NBT-type-issues.patch @@ -8,10 +8,10 @@ Addresses two issues: - Allay duplication cooldown is saved and exposed as a long, but loaded as an int diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -index 2fead19c1c4b04f94999887b196ceaee025edd99..2d1228670696224452cb432e0279456d8c5fe710 100644 +index cc3c1d6b76f66cd0f511c5fd57ffa606eba0d387..cf5c7e8557b0084039a94ef881a36aa9e3f58daf 100644 --- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java +++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -@@ -286,7 +286,7 @@ public class ExperienceOrb extends Entity { +@@ -287,7 +287,7 @@ public class ExperienceOrb extends Entity { public void addAdditionalSaveData(CompoundTag nbt) { nbt.putShort("Health", (short) this.health); nbt.putShort("Age", (short) this.age); @@ -20,7 +20,7 @@ index 2fead19c1c4b04f94999887b196ceaee025edd99..2d1228670696224452cb432e0279456d nbt.putInt("Count", this.count); this.savePaperNBT(nbt); // Paper } -@@ -295,7 +295,7 @@ public class ExperienceOrb extends Entity { +@@ -296,7 +296,7 @@ public class ExperienceOrb extends Entity { public void readAdditionalSaveData(CompoundTag nbt) { this.health = nbt.getShort("Health"); this.age = nbt.getShort("Age"); @@ -30,10 +30,10 @@ index 2fead19c1c4b04f94999887b196ceaee025edd99..2d1228670696224452cb432e0279456d this.loadPaperNBT(nbt); // Paper } diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java -index 2d87b740e84435ef9bd3eee3d3e2af9f707a0826..1dcd0c494681b7665b6b86dbe20375afd8d2fad8 100644 +index fec05f88720fa09ed9361fd24f5abfa134013d6c..c0084b1f146a4697194c421519537e612ff737c0 100644 --- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java +++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java -@@ -484,7 +484,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier { +@@ -521,7 +521,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier { }); } diff --git a/patches/unapplied/server/0237-Remove-unnecessary-itemmeta-handling.patch b/patches/server/0237-Remove-unnecessary-itemmeta-handling.patch similarity index 85% rename from patches/unapplied/server/0237-Remove-unnecessary-itemmeta-handling.patch rename to patches/server/0237-Remove-unnecessary-itemmeta-handling.patch index 88a7a7fd0c..944c7dd125 100644 --- a/patches/unapplied/server/0237-Remove-unnecessary-itemmeta-handling.patch +++ b/patches/server/0237-Remove-unnecessary-itemmeta-handling.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove unnecessary itemmeta handling diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java -index 70631b3fe080320dfea0d1a4deb23e87448da250..35377576ed182814051c11f902e02e8e921e84e3 100644 +index 76914b08c17a62a117319d458a6693070fc46348..32ee4ed11aefd82dca2e3e78b3108f041fdc3695 100644 --- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java +++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java -@@ -579,7 +579,7 @@ public class FriendlyByteBuf extends ByteBuf { +@@ -641,7 +641,7 @@ public class FriendlyByteBuf extends ByteBuf { if (item.canBeDepleted() || item.shouldOverrideMultiplayerNbt()) { // Spigot start - filter stack = stack.copy(); @@ -17,7 +17,7 @@ index 70631b3fe080320dfea0d1a4deb23e87448da250..35377576ed182814051c11f902e02e8e // Spigot end nbttagcompound = stack.getTag(); } -@@ -600,7 +600,7 @@ public class FriendlyByteBuf extends ByteBuf { +@@ -662,7 +662,7 @@ public class FriendlyByteBuf extends ByteBuf { itemstack.setTag(this.readNbt()); // CraftBukkit start diff --git a/patches/unapplied/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/patches/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch similarity index 89% rename from patches/unapplied/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch rename to patches/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index 3b2452178e..2792d84ae8 100644 --- a/patches/unapplied/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/patches/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -8,10 +8,10 @@ Add -Ddebug.entities=true to your JVM flags to gain more information 1.17: Needs to be reworked for new entity storage system diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 236e0f8cc271d1ca1a2cb64e333d59de1cb953ea..2b14841c23c9d9f4a6fe82fb2779cd5ff79a96f6 100644 +index c6706c3d7841869134be89dd09ea723820d306a2..23bbd70dd2dd487caf972c2b1a6c85a1caa3fbcd 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -884,6 +884,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -896,6 +896,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } else { ChunkMap.TrackedEntity playerchunkmap_entitytracker = new ChunkMap.TrackedEntity(entity, i, j, entitytypes.trackDeltas()); @@ -19,7 +19,7 @@ index 236e0f8cc271d1ca1a2cb64e333d59de1cb953ea..2b14841c23c9d9f4a6fe82fb2779cd5f this.entityMap.put(entity.getId(), playerchunkmap_entitytracker); playerchunkmap_entitytracker.updatePlayers(this.level.players()); if (entity instanceof ServerPlayer) { -@@ -926,7 +927,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -938,7 +939,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider if (playerchunkmap_entitytracker1 != null) { playerchunkmap_entitytracker1.broadcastRemoved(); } @@ -29,10 +29,10 @@ index 236e0f8cc271d1ca1a2cb64e333d59de1cb953ea..2b14841c23c9d9f4a6fe82fb2779cd5f protected void tick() { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 9a17624d684394ee956848fe9f36750d5962c980..672f74f89a643ef82d391c521ca45a2beb51a46e 100644 +index c27ceaf1b9685f1433799d50bacc361db793c1d5..f2b20fe0770b519756342c7b900919c6a9d93bdb 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -216,6 +216,9 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -219,6 +219,9 @@ public class ServerLevel extends Level implements WorldGenLevel { public final LevelStorageSource.LevelStorageAccess convertable; public final UUID uuid; public boolean hasPhysicsEvent = true; // Paper @@ -42,7 +42,7 @@ index 9a17624d684394ee956848fe9f36750d5962c980..672f74f89a643ef82d391c521ca45a2b @Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI return this.chunkSource.getChunk(x, z, false); -@@ -1232,7 +1235,28 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1272,7 +1275,28 @@ public class ServerLevel extends Level implements WorldGenLevel { // CraftBukkit start private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot @@ -72,7 +72,7 @@ index 9a17624d684394ee956848fe9f36750d5962c980..672f74f89a643ef82d391c521ca45a2b return false; } else { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index f67480cc4ff05d23a16b63dbe986d0d96739496b..f174af45cd593d8f74205472e25db081b5289ee9 100644 +index ac6bd21798192c4c07737a2320c3626caebc7e22..b8257959acd2b38243fd259f367564080aff951e 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -235,6 +235,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -85,10 +85,10 @@ index f67480cc4ff05d23a16b63dbe986d0d96739496b..f174af45cd593d8f74205472e25db081 if (this.bukkitEntity == null) { this.bukkitEntity = CraftEntity.getEntity(this.level.getCraftServer(), this); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index f4249ee3259a95b9f079a75c78ccf96a14b99b0d..9ed8117afa4eb1ff9e7403d3ab92a9e6cb0fab73 100644 +index 808a025548fd390ef4d657c53eb9bf73e73dbc93..638a77d3ea65b509b9fcdd3c1e3ea0abe5b7566f 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -148,6 +148,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -147,6 +147,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public boolean pvpMode; public boolean keepSpawnInMemory = true; public org.bukkit.generator.ChunkGenerator generator; @@ -97,7 +97,7 @@ index f4249ee3259a95b9f079a75c78ccf96a14b99b0d..9ed8117afa4eb1ff9e7403d3ab92a9e6 public boolean preventPoiUpdated = false; // CraftBukkit - SPIGOT-5710 public boolean captureBlockStates = false; diff --git a/src/main/java/net/minecraft/world/level/entity/EntityLookup.java b/src/main/java/net/minecraft/world/level/entity/EntityLookup.java -index e6b9f812e521abd552e0c7dc0429d5a62f2bfc35..f4731d69946871768ecf16149a47d2ef1cb3e910 100644 +index 21a2800db22f287b9c6a8290326fdf3b94ae94b1..d45d832232be5017dde53816191c2b1830a0da32 100644 --- a/src/main/java/net/minecraft/world/level/entity/EntityLookup.java +++ b/src/main/java/net/minecraft/world/level/entity/EntityLookup.java @@ -34,6 +34,26 @@ public class EntityLookup { diff --git a/patches/unapplied/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch b/patches/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch similarity index 93% rename from patches/unapplied/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch rename to patches/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch index 3818082b90..5f69ea0c9a 100644 --- a/patches/unapplied/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/patches/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch @@ -9,10 +9,10 @@ thread dumps at an interval until the point of crash. This will help diagnose what was going on in that time before the crash. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3509785412395aec7d316fcf37d58fb7cb1a9e5f..25aac194eb486a5b8707aa0a655fd8259ad7409c 100644 +index 2b55df58684a19519335666858bc79de8067faf7..6026a2da9645a5f22aa18c74e35d8b76a3f29352 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1044,6 +1044,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop extends WritableRegistry { +@@ -36,14 +36,12 @@ public class MappedRegistry implements WritableRegistry { private static final Logger LOGGER = LogUtils.getLogger(); + final ResourceKey> key; private final ObjectList> byId = new ObjectArrayList<>(256); -- private final Object2IntMap toId = Util.make(new Object2IntOpenCustomHashMap<>(Util.identityStrategy()), (object2IntOpenCustomHashMap) -> { -- object2IntOpenCustomHashMap.defaultReturnValue(-1); +- private final Object2IntMap toId = Util.make(new Object2IntOpenCustomHashMap<>(Util.identityStrategy()), (map) -> { +- map.defaultReturnValue(-1); - }); - private final Map> byLocation = new HashMap<>(); - private final Map, Holder.Reference> byKey = new HashMap<>(); - private final Map> byValue = new IdentityHashMap<>(); - private final Map lifecycles = new IdentityHashMap<>(); +- private Lifecycle registryLifecycle; + private final it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap toId = new it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap(2048);// Paper - use bigger expected size to reduce collisions and direct intent for FastUtil to be identity map + private final Map> byLocation = new HashMap<>(2048); // Paper - use bigger expected size to reduce collisions + private final Map, Holder.Reference> byKey = new HashMap<>(2048); // Paper - use bigger expected size to reduce collisions + private final Map> byValue = new IdentityHashMap<>(2048); // Paper - use bigger expected size to reduce collisions + private final Map lifecycles = new IdentityHashMap<>(2048); // Paper - use bigger expected size to reduce collisions - private Lifecycle elementsLifecycle; ++ private Lifecycle elementsLifecycle; private volatile Map, HolderSet.Named> tags = new IdentityHashMap<>(); private boolean frozen; -@@ -63,6 +61,7 @@ public class MappedRegistry extends WritableRegistry { - this.intrusiveHolderCache = new IdentityHashMap<>(); - } - -+ this.toId.defaultReturnValue(-1); // Paper + @Nullable +@@ -88,6 +86,7 @@ public class MappedRegistry implements WritableRegistry { } - private List> holdersInOrder() { + public MappedRegistry(ResourceKey> key, Lifecycle lifecycle, boolean intrusive) { ++ this.toId.defaultReturnValue(-1); // Paper + Bootstrap.checkBootstrapCalled(() -> { + return "registry " + key; + }); diff --git a/patches/unapplied/server/0249-Add-PhantomPreSpawnEvent.patch b/patches/server/0249-Add-PhantomPreSpawnEvent.patch similarity index 83% rename from patches/unapplied/server/0249-Add-PhantomPreSpawnEvent.patch rename to patches/server/0249-Add-PhantomPreSpawnEvent.patch index 2f3dcd5f86..9a60219fcd 100644 --- a/patches/unapplied/server/0249-Add-PhantomPreSpawnEvent.patch +++ b/patches/server/0249-Add-PhantomPreSpawnEvent.patch @@ -48,7 +48,7 @@ index c068eddb08898681735e483df5b9c36f5fef3878..0e96e9d7e4d636f4222f60cec556663f CIRCLE, SWOOP; diff --git a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java -index 573490a7c95746c3d372d258b2e592241258f6cf..0dbb0c4d038379c6ffdae8528d98431e98faeb93 100644 +index 42d88ce2e15477482a814a79aefd4abfcbcb5462..900a66fc7eb817509df904b71ccc3bd3976f3b35 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java +++ b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java @@ -3,6 +3,7 @@ package net.minecraft.world.level.levelgen; @@ -59,7 +59,7 @@ index 573490a7c95746c3d372d258b2e592241258f6cf..0dbb0c4d038379c6ffdae8528d98431e import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.stats.ServerStatsCounter; -@@ -71,8 +72,17 @@ public class PhantomSpawner implements CustomSpawner { +@@ -71,9 +72,19 @@ public class PhantomSpawner implements CustomSpawner { int k = 1 + randomsource.nextInt(difficultydamagescaler.getDifficulty().getId() + 1); for (int l = 0; l < k; ++l) { @@ -73,11 +73,12 @@ index 573490a7c95746c3d372d258b2e592241258f6cf..0dbb0c4d038379c6ffdae8528d98431e + } + // Paper end Phantom entityphantom = (Phantom) EntityType.PHANTOM.create(world); -- -+ entityphantom.setSpawningEntity(entityhuman.getUUID()); // Paper - entityphantom.moveTo(blockposition1, 0.0F, 0.0F); - groupdataentity = entityphantom.finalizeSpawn(world, difficultydamagescaler, MobSpawnType.NATURAL, groupdataentity, (CompoundTag) null); - world.addFreshEntityWithPassengers(entityphantom, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit + + if (entityphantom != null) { ++ entityphantom.setSpawningEntity(entityhuman.getUUID()); // Paper + entityphantom.moveTo(blockposition1, 0.0F, 0.0F); + groupdataentity = entityphantom.finalizeSpawn(world, difficultydamagescaler, MobSpawnType.NATURAL, groupdataentity, (CompoundTag) null); + world.addFreshEntityWithPassengers(entityphantom, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java index f77b83bee6eb739220b55793a0807f0267cfc8a9..c9dab70b0b284fe1c1daafd3c1f5bd08b14fa35d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java diff --git a/patches/unapplied/server/0250-Add-More-Creeper-API.patch b/patches/server/0250-Add-More-Creeper-API.patch similarity index 93% rename from patches/unapplied/server/0250-Add-More-Creeper-API.patch rename to patches/server/0250-Add-More-Creeper-API.patch index 701306ca69..c302a6d27e 100644 --- a/patches/unapplied/server/0250-Add-More-Creeper-API.patch +++ b/patches/server/0250-Add-More-Creeper-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add More Creeper API diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java -index bc493838420a6857ebc86f84cabdc1b6e3e637a4..e0f71dc12cfc28710cacfbc372026f556dcab165 100644 +index 802a46ae9f18e0b58a7e0c38c18b367edd6b7a76..805e267090285d625dbeb75b06f8c5ad141a75a4 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java +++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java -@@ -133,7 +133,7 @@ public class Creeper extends Monster implements PowerableMob { +@@ -132,7 +132,7 @@ public class Creeper extends Monster implements PowerableMob { } if (nbt.getBoolean("ignited")) { diff --git a/patches/unapplied/server/0251-Inventory-removeItemAnySlot.patch b/patches/server/0251-Inventory-removeItemAnySlot.patch similarity index 88% rename from patches/unapplied/server/0251-Inventory-removeItemAnySlot.patch rename to patches/server/0251-Inventory-removeItemAnySlot.patch index 533e72fb45..227c1336c2 100644 --- a/patches/unapplied/server/0251-Inventory-removeItemAnySlot.patch +++ b/patches/server/0251-Inventory-removeItemAnySlot.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Inventory#removeItemAnySlot diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -index d76d70e7031a643f697a8ec13471450de2bca705..6ca8e76d1569f3f631275fea187e7110f09fc69e 100644 +index efa6b34261e3f4ad0d58a0c7d85df30f33a14d62..ce70a77ec6da41b59660f5923d30eaebf24c4cc2 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -@@ -223,10 +223,16 @@ public class CraftInventory implements Inventory { +@@ -224,10 +224,16 @@ public class CraftInventory implements Inventory { } private int first(ItemStack item, boolean withAmount) { @@ -26,7 +26,7 @@ index d76d70e7031a643f697a8ec13471450de2bca705..6ca8e76d1569f3f631275fea187e7110 for (int i = 0; i < inventory.length; i++) { if (inventory[i] == null) continue; -@@ -349,6 +355,17 @@ public class CraftInventory implements Inventory { +@@ -350,6 +356,17 @@ public class CraftInventory implements Inventory { @Override public HashMap removeItem(ItemStack... items) { @@ -44,7 +44,7 @@ index d76d70e7031a643f697a8ec13471450de2bca705..6ca8e76d1569f3f631275fea187e7110 Validate.notNull(items, "Items cannot be null"); HashMap leftover = new HashMap(); -@@ -359,7 +376,10 @@ public class CraftInventory implements Inventory { +@@ -360,7 +377,10 @@ public class CraftInventory implements Inventory { int toDelete = item.getAmount(); while (true) { diff --git a/patches/unapplied/server/0252-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch b/patches/server/0252-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch similarity index 87% rename from patches/unapplied/server/0252-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch rename to patches/server/0252-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch index 1c79a299ae..7bea892913 100644 --- a/patches/unapplied/server/0252-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch +++ b/patches/server/0252-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 0f15340a7757dd22c689649a4019a0991da33b2e..92f6f332cc11ec4b7a10ff61b5a034ab80854940 100644 +index b10f4e4bb39f4de1aba4f6949843fa3786cedc62..a21797af9f90235835919c395d2ea77a980b2768 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -392,7 +392,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -391,7 +391,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot diff --git a/patches/unapplied/server/0253-Add-ray-tracing-methods-to-LivingEntity.patch b/patches/server/0253-Add-ray-tracing-methods-to-LivingEntity.patch similarity index 96% rename from patches/unapplied/server/0253-Add-ray-tracing-methods-to-LivingEntity.patch rename to patches/server/0253-Add-ray-tracing-methods-to-LivingEntity.patch index a3a0146b7b..4921619900 100644 --- a/patches/unapplied/server/0253-Add-ray-tracing-methods-to-LivingEntity.patch +++ b/patches/server/0253-Add-ray-tracing-methods-to-LivingEntity.patch @@ -28,10 +28,10 @@ index b19850ae31f6c796cb3491dd5070d28e0ffd242c..30a5484d0209e7b99e81b70f654f5251 switch (enumDirection) { case DOWN: diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index cc7cf6a8b610c72b72ba128c086df61371f59c25..9c3bda51dda1a9acbc2ea53250c7aec64a3aaf03 100644 +index 677ba704c32e590f3298575b1cc060bb69414ca4..d825dd9a990f52e378755e86c02c6a35f3bb3659 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3747,6 +3747,23 @@ public abstract class LivingEntity extends Entity { +@@ -3772,6 +3772,23 @@ public abstract class LivingEntity extends Entity { } // Paper start diff --git a/patches/unapplied/server/0254-Expose-attack-cooldown-methods-for-Player.patch b/patches/server/0254-Expose-attack-cooldown-methods-for-Player.patch similarity index 86% rename from patches/unapplied/server/0254-Expose-attack-cooldown-methods-for-Player.patch rename to patches/server/0254-Expose-attack-cooldown-methods-for-Player.patch index 83097c5d73..998e4d0a3c 100644 --- a/patches/unapplied/server/0254-Expose-attack-cooldown-methods-for-Player.patch +++ b/patches/server/0254-Expose-attack-cooldown-methods-for-Player.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 58a1e433b0bd7c093c964a9dfcbb7287b5988af4..cea4285095979f0656821e897659c7b91d237e82 100644 +index e5b32af97f045f52c92dcd8f56af1508c54db490..8c528f32ef3a5e97ff14bd299a1f6e93b1a8a9af 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2589,6 +2589,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2591,6 +2591,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return this.adventure$pointers; } diff --git a/patches/unapplied/server/0255-Improve-death-events.patch b/patches/server/0255-Improve-death-events.patch similarity index 92% rename from patches/unapplied/server/0255-Improve-death-events.patch rename to patches/server/0255-Improve-death-events.patch index e1e1c1eea0..fc1a65f915 100644 --- a/patches/unapplied/server/0255-Improve-death-events.patch +++ b/patches/server/0255-Improve-death-events.patch @@ -23,10 +23,10 @@ public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sou public net.minecraft.world.entity.LivingEntity getSoundVolume()F diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index bc0c4c2284d08ca88d4664bb39c744b36a607dcd..6fa11d19b0a9858448fb22624c1d1a2fb228a3b4 100644 +index b3fa1f28405ddebdd616bcc31db42d73697f2d79..05e72945da26295fbc5f0d243ba48a8649244b3b 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -230,6 +230,10 @@ public class ServerPlayer extends Player { +@@ -235,6 +235,10 @@ public class ServerPlayer extends Player { public int latency; public boolean wonGame; private int containerUpdateDelay; // Paper @@ -37,7 +37,7 @@ index bc0c4c2284d08ca88d4664bb39c744b36a607dcd..6fa11d19b0a9858448fb22624c1d1a2f // CraftBukkit start public String displayName; -@@ -801,6 +805,15 @@ public class ServerPlayer extends Player { +@@ -823,6 +827,15 @@ public class ServerPlayer extends Player { String deathmessage = defaultMessage.getString(); this.keepLevel = keepInventory; // SPIGOT-2222: pre-set keepLevel org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, PaperAdventure.asAdventure(defaultMessage), defaultMessage.getString(), keepInventory); // Paper - Adventure @@ -53,7 +53,7 @@ index bc0c4c2284d08ca88d4664bb39c744b36a607dcd..6fa11d19b0a9858448fb22624c1d1a2f // SPIGOT-943 - only call if they have an inventory open if (this.containerMenu != this.inventoryMenu) { -@@ -946,8 +959,17 @@ public class ServerPlayer extends Player { +@@ -968,8 +981,17 @@ public class ServerPlayer extends Player { } } } @@ -74,10 +74,10 @@ index bc0c4c2284d08ca88d4664bb39c744b36a607dcd..6fa11d19b0a9858448fb22624c1d1a2f } } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 9c3bda51dda1a9acbc2ea53250c7aec64a3aaf03..4291de1b9d6634bfdb2f6fda51426a32057f081e 100644 +index d825dd9a990f52e378755e86c02c6a35f3bb3659..785d5196c7e6de95e0507c959352ba57fb50d1c4 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -262,6 +262,7 @@ public abstract class LivingEntity extends Entity { +@@ -263,6 +263,7 @@ public abstract class LivingEntity extends Entity { public Set collidableExemptions = new HashSet<>(); public boolean bukkitPickUpLoot; public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper @@ -85,7 +85,7 @@ index 9c3bda51dda1a9acbc2ea53250c7aec64a3aaf03..4291de1b9d6634bfdb2f6fda51426a32 @Override public float getBukkitYaw() { -@@ -1465,13 +1466,12 @@ public abstract class LivingEntity extends Entity { +@@ -1466,13 +1467,12 @@ public abstract class LivingEntity extends Entity { if (knockbackCancelled) this.level.broadcastEntityEvent(this, (byte) 2); // Paper - Disable explosion knockback if (this.isDeadOrDying()) { if (!this.checkTotemDeathProtection(source)) { @@ -103,7 +103,7 @@ index 9c3bda51dda1a9acbc2ea53250c7aec64a3aaf03..4291de1b9d6634bfdb2f6fda51426a32 } } else if (flag1) { this.playHurtSound(source); -@@ -1623,7 +1623,7 @@ public abstract class LivingEntity extends Entity { +@@ -1624,7 +1624,7 @@ public abstract class LivingEntity extends Entity { if (!this.isRemoved() && !this.dead) { Entity entity = damageSource.getEntity(); LivingEntity entityliving = this.getKillCredit(); @@ -112,7 +112,7 @@ index 9c3bda51dda1a9acbc2ea53250c7aec64a3aaf03..4291de1b9d6634bfdb2f6fda51426a32 if (this.deathScore >= 0 && entityliving != null) { entityliving.awardKillScore(this, this.deathScore, damageSource); } -@@ -1635,20 +1635,53 @@ public abstract class LivingEntity extends Entity { +@@ -1636,20 +1636,53 @@ public abstract class LivingEntity extends Entity { if (!this.level.isClientSide && this.hasCustomName()) { if (org.spigotmc.SpigotConfig.logNamedDeaths) LivingEntity.LOGGER.info("Named entity {} died: {}", this, this.getCombatTracker().getDeathMessage().getString()); // Spigot } @@ -172,7 +172,7 @@ index 9c3bda51dda1a9acbc2ea53250c7aec64a3aaf03..4291de1b9d6634bfdb2f6fda51426a32 } } -@@ -1656,7 +1689,7 @@ public abstract class LivingEntity extends Entity { +@@ -1657,7 +1690,7 @@ public abstract class LivingEntity extends Entity { if (!this.level.isClientSide) { boolean flag = false; @@ -181,7 +181,7 @@ index 9c3bda51dda1a9acbc2ea53250c7aec64a3aaf03..4291de1b9d6634bfdb2f6fda51426a32 if (this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { BlockPos blockposition = this.blockPosition(); BlockState iblockdata = Blocks.WITHER_ROSE.defaultBlockState(); -@@ -1685,7 +1718,11 @@ public abstract class LivingEntity extends Entity { +@@ -1686,7 +1719,11 @@ public abstract class LivingEntity extends Entity { } } @@ -194,7 +194,7 @@ index 9c3bda51dda1a9acbc2ea53250c7aec64a3aaf03..4291de1b9d6634bfdb2f6fda51426a32 Entity entity = source.getEntity(); int i; -@@ -1700,18 +1737,27 @@ public abstract class LivingEntity extends Entity { +@@ -1701,18 +1738,27 @@ public abstract class LivingEntity extends Entity { this.dropEquipment(); // CraftBukkit - from below if (this.shouldDropLoot() && this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { this.dropFromLootTable(source, flag); @@ -224,10 +224,10 @@ index 9c3bda51dda1a9acbc2ea53250c7aec64a3aaf03..4291de1b9d6634bfdb2f6fda51426a32 // CraftBukkit start public int getExpReward() { diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index debc0cd9a71002878c0f68409b936e14c4a4dfda..836f42126eca9bc2c8e41940ecac18a0e0123818 100644 +index 6f728231a7b326e605d6ddb8e4cd6f0f0aec820b..f61a4409ebb5ed89e5a5cfe0488498a52faa2346 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -1018,7 +1018,13 @@ public abstract class Mob extends LivingEntity { +@@ -1036,7 +1036,13 @@ public abstract class Mob extends LivingEntity { } this.spawnAtLocation(itemstack); @@ -242,10 +242,10 @@ index debc0cd9a71002878c0f68409b936e14c4a4dfda..836f42126eca9bc2c8e41940ecac18a0 } diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java -index fb3b42611d8386b110ea079094d5d50fefceac1a..8f294f10aca2df007830b12da0506f7614206a89 100644 +index dd124ccbdc7efe0e41b3a04abddcb328cac44948..f4cfefd72704b3423392ffeb57e78c5d6410ff6f 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Fox.java +++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java -@@ -700,15 +700,25 @@ public class Fox extends Animal { +@@ -705,15 +705,25 @@ public class Fox extends Animal implements VariantHolder { } @Override @@ -275,7 +275,7 @@ index fb3b42611d8386b110ea079094d5d50fefceac1a..8f294f10aca2df007830b12da0506f76 public static boolean isPathClear(Fox fox, LivingEntity chasedEntity) { diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java -index c47884bab387647d99ed842b46f1c078ef9b6995..a3f3e06679cef10f50346e9cc6672ec91c6f04a6 100644 +index 65dd844b9b38730a819158e1023c4abd829b52bb..170411b42aeef69c796d1409b59c3eb69f78c710 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java @@ -69,11 +69,19 @@ public abstract class AbstractChestedHorse extends AbstractHorse { @@ -314,10 +314,10 @@ index f70f75867a8f03d42f240a0d007d2221269f2fdb..e463ae13ce6f65675c2b6d553ecf91db this.gameEvent(GameEvent.ENTITY_DIE); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index cea4285095979f0656821e897659c7b91d237e82..0e9538a433e8ef721f29cc7b9f8fac914b876956 100644 +index 8c528f32ef3a5e97ff14bd299a1f6e93b1a8a9af..15da4358e46547fa979dd5023ec6eb5d1358bcb5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2153,7 +2153,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2155,7 +2155,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void sendHealthUpdate() { @@ -334,7 +334,7 @@ index cea4285095979f0656821e897659c7b91d237e82..0e9538a433e8ef721f29cc7b9f8fac91 public void injectScaledMaxHealth(Collection collection, boolean force) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index f16ab4b673f79a8f2b50caa2eefd7e55474ef28b..b86ba1b6e49128f50d3940708ec3b59580cbfde8 100644 +index 99b5db683591b42cf6c88dcd6b9a4aa0cf769ce4..2dfade8cc1e5e7e774d876d1e60c692aca0ef739 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -806,9 +806,16 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0256-Allow-chests-to-be-placed-with-NBT-data.patch b/patches/server/0256-Allow-chests-to-be-placed-with-NBT-data.patch similarity index 91% rename from patches/unapplied/server/0256-Allow-chests-to-be-placed-with-NBT-data.patch rename to patches/server/0256-Allow-chests-to-be-placed-with-NBT-data.patch index aa9442422d..b0af2dcb09 100644 --- a/patches/unapplied/server/0256-Allow-chests-to-be-placed-with-NBT-data.patch +++ b/patches/server/0256-Allow-chests-to-be-placed-with-NBT-data.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow chests to be placed with NBT data diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 7b61f9c45b9e23562bd5cf448df319ba9e1e091a..b4fbe1f393e2c348bc0120bf6c55d57d61011787 100644 +index 504a56fb2f2901c67ed22b9f0a57eb8db10ca4df..7d1e41272d05a8cb8d1adbcd2e9bc00f1a6f95fe 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -360,6 +360,7 @@ public final class ItemStack { +@@ -368,6 +368,7 @@ public final class ItemStack { enuminteractionresult = InteractionResult.FAIL; // cancel placement // PAIL: Remove this when MC-99075 fixed placeEvent.getPlayer().updateInventory(); diff --git a/patches/unapplied/server/0257-Mob-Pathfinding-API.patch b/patches/server/0257-Mob-Pathfinding-API.patch similarity index 100% rename from patches/unapplied/server/0257-Mob-Pathfinding-API.patch rename to patches/server/0257-Mob-Pathfinding-API.patch diff --git a/patches/unapplied/server/0258-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch b/patches/server/0258-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch similarity index 100% rename from patches/unapplied/server/0258-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch rename to patches/server/0258-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch diff --git a/patches/unapplied/server/0259-Prevent-chunk-loading-from-Fluid-Flowing.patch b/patches/server/0259-Prevent-chunk-loading-from-Fluid-Flowing.patch similarity index 97% rename from patches/unapplied/server/0259-Prevent-chunk-loading-from-Fluid-Flowing.patch rename to patches/server/0259-Prevent-chunk-loading-from-Fluid-Flowing.patch index 8e59eff59d..707aec42a4 100644 --- a/patches/unapplied/server/0259-Prevent-chunk-loading-from-Fluid-Flowing.patch +++ b/patches/server/0259-Prevent-chunk-loading-from-Fluid-Flowing.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent chunk loading from Fluid Flowing diff --git a/src/main/java/net/minecraft/world/level/material/FlowingFluid.java b/src/main/java/net/minecraft/world/level/material/FlowingFluid.java -index 89296667d2ad76a706a3f5b817f3ad8c207cac2d..02be7c3d104fe3b3a2772201f5ebdfb6d16e9b49 100644 +index 6f6358b3b24686cd8995cd71b6f7209b4227fc48..fb0784c8a4950776bd270bec3c80a8c5856c2655 100644 --- a/src/main/java/net/minecraft/world/level/material/FlowingFluid.java +++ b/src/main/java/net/minecraft/world/level/material/FlowingFluid.java @@ -174,7 +174,8 @@ public abstract class FlowingFluid extends Fluid { diff --git a/patches/unapplied/server/0260-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch b/patches/server/0260-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch similarity index 100% rename from patches/unapplied/server/0260-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch rename to patches/server/0260-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch diff --git a/patches/unapplied/server/0261-Prevent-mob-spawning-from-loading-generating-chunks.patch b/patches/server/0261-Prevent-mob-spawning-from-loading-generating-chunks.patch similarity index 90% rename from patches/unapplied/server/0261-Prevent-mob-spawning-from-loading-generating-chunks.patch rename to patches/server/0261-Prevent-mob-spawning-from-loading-generating-chunks.patch index 38583279c2..eb99a2e487 100644 --- a/patches/unapplied/server/0261-Prevent-mob-spawning-from-loading-generating-chunks.patch +++ b/patches/server/0261-Prevent-mob-spawning-from-loading-generating-chunks.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Prevent mob spawning from loading/generating chunks also prevents if out of world border bounds diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index 6bc6c827a96e3fb7d7d9ca15e866d428d31a3e1f..243ed4b0fbc11b23883aa653e6efc31310c250f1 100644 +index 608be2b8bfff1b89855fc0bd181430d3a29a4cbb..c3d6b904f1310c93a3d5c1e5e3fab2f3476f5a48 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -@@ -169,9 +169,9 @@ public final class NaturalSpawner { +@@ -170,9 +170,9 @@ public final class NaturalSpawner { StructureManager structuremanager = world.structureManager(); ChunkGenerator chunkgenerator = world.getChunkSource().getGenerator(); int i = pos.getY(); @@ -21,7 +21,7 @@ index 6bc6c827a96e3fb7d7d9ca15e866d428d31a3e1f..243ed4b0fbc11b23883aa653e6efc313 BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos(); int j = 0; int k = 0; -@@ -200,7 +200,7 @@ public final class NaturalSpawner { +@@ -201,7 +201,7 @@ public final class NaturalSpawner { if (entityhuman != null) { double d2 = entityhuman.distanceToSqr(d0, (double) i, d1); diff --git a/patches/unapplied/server/0262-Implement-furnace-cook-speed-multiplier-API.patch b/patches/server/0262-Implement-furnace-cook-speed-multiplier-API.patch similarity index 94% rename from patches/unapplied/server/0262-Implement-furnace-cook-speed-multiplier-API.patch rename to patches/server/0262-Implement-furnace-cook-speed-multiplier-API.patch index ef1f41e68e..e5bcd76e59 100644 --- a/patches/unapplied/server/0262-Implement-furnace-cook-speed-multiplier-API.patch +++ b/patches/server/0262-Implement-furnace-cook-speed-multiplier-API.patch @@ -11,7 +11,7 @@ to the nearest Integer when updating its current cook time. Modified by: Eric Su diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -index bbccb2f97ee88fe43af4eec30fbb2ecea1ebb1b4..d3a9b42fd4fa487e0acb1c95d57f78ccfbefbdff 100644 +index 8137682be60eb617738f7b257780a49182ef970c..196c99a2802c0bcaf93be287c404fc4f0f23eadd 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java @@ -76,11 +76,13 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit @@ -36,7 +36,7 @@ index bbccb2f97ee88fe43af4eec30fbb2ecea1ebb1b4..d3a9b42fd4fa487e0acb1c95d57f78cc } public static Map getFuel() { -@@ -285,6 +288,11 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit +@@ -279,6 +282,11 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit this.recipesUsed.put(new ResourceLocation(s), nbttagcompound1.getInt(s)); } @@ -48,7 +48,7 @@ index bbccb2f97ee88fe43af4eec30fbb2ecea1ebb1b4..d3a9b42fd4fa487e0acb1c95d57f78cc } @Override -@@ -293,6 +301,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit +@@ -287,6 +295,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit nbt.putShort("BurnTime", (short) this.litTime); nbt.putShort("CookTime", (short) this.cookingProgress); nbt.putShort("CookTimeTotal", (short) this.cookingTotalTime); @@ -56,7 +56,7 @@ index bbccb2f97ee88fe43af4eec30fbb2ecea1ebb1b4..d3a9b42fd4fa487e0acb1c95d57f78cc ContainerHelper.saveAllItems(nbt, this.items); CompoundTag nbttagcompound1 = new CompoundTag(); -@@ -364,7 +373,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit +@@ -358,7 +367,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit CraftItemStack source = CraftItemStack.asCraftMirror(blockEntity.items.get(0)); CookingRecipe recipe = (CookingRecipe) irecipe.toBukkitRecipe(); @@ -65,7 +65,7 @@ index bbccb2f97ee88fe43af4eec30fbb2ecea1ebb1b4..d3a9b42fd4fa487e0acb1c95d57f78cc world.getCraftServer().getPluginManager().callEvent(event); blockEntity.cookingTotalTime = event.getTotalCookTime(); -@@ -372,9 +381,9 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit +@@ -366,9 +375,9 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit // CraftBukkit end ++blockEntity.cookingProgress; @@ -77,7 +77,7 @@ index bbccb2f97ee88fe43af4eec30fbb2ecea1ebb1b4..d3a9b42fd4fa487e0acb1c95d57f78cc if (AbstractFurnaceBlockEntity.burn(blockEntity.level, blockEntity.worldPosition, irecipe, blockEntity.items, i)) { // CraftBukkit blockEntity.setRecipeUsed(irecipe); } -@@ -474,9 +483,13 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit +@@ -468,9 +477,13 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit } } @@ -93,7 +93,7 @@ index bbccb2f97ee88fe43af4eec30fbb2ecea1ebb1b4..d3a9b42fd4fa487e0acb1c95d57f78cc public static boolean isFuel(ItemStack stack) { return AbstractFurnaceBlockEntity.getFuel().containsKey(stack.getItem()); -@@ -545,7 +558,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit +@@ -539,7 +552,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit } if (slot == 0 && !flag) { diff --git a/patches/unapplied/server/0263-Catch-JsonParseException-in-Entity-and-TE-names.patch b/patches/server/0263-Catch-JsonParseException-in-Entity-and-TE-names.patch similarity index 93% rename from patches/unapplied/server/0263-Catch-JsonParseException-in-Entity-and-TE-names.patch rename to patches/server/0263-Catch-JsonParseException-in-Entity-and-TE-names.patch index f411144934..7040790f62 100644 --- a/patches/unapplied/server/0263-Catch-JsonParseException-in-Entity-and-TE-names.patch +++ b/patches/server/0263-Catch-JsonParseException-in-Entity-and-TE-names.patch @@ -61,7 +61,7 @@ index a0728e95251e8110bcecd00512c7a266fe120794..7dac559fd35e7ba646b84bb283150013 if (nbt.contains("TrackOutput", 1)) { diff --git a/src/main/java/net/minecraft/world/level/block/entity/BannerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BannerBlockEntity.java -index 601cf7b9aa4b3483a2134a2db0d617ed8938ea48..cef6a9795b289b791db29f9018585e5912634b39 100644 +index 6b983e3e867bdd8cdffaf4575bbf67ad96b57ec7..66e2137f9379e885294f2b9f67f7e35296792770 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BannerBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BannerBlockEntity.java @@ -98,7 +98,7 @@ public class BannerBlockEntity extends BlockEntity implements Nameable { @@ -74,10 +74,10 @@ index 601cf7b9aa4b3483a2134a2db0d617ed8938ea48..cef6a9795b289b791db29f9018585e59 this.itemPatterns = nbt.getList("Patterns", 10); diff --git a/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java -index a34ae15cd4048bda965fd1449c75f3bd8f0e530b..f1b5a7e29d2a94c18c0d06b066b8cfbccabbc0a1 100644 +index 084e26de66c8204cb9aaad51bad3270228889ea3..a782994e2e53f2c4212c2d59ce740ebf00a826b0 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java -@@ -30,7 +30,7 @@ public abstract class BaseContainerBlockEntity extends BlockEntity implements Co +@@ -31,7 +31,7 @@ public abstract class BaseContainerBlockEntity extends BlockEntity implements Co super.load(nbt); this.lockKey = LockCode.fromTag(nbt); if (nbt.contains("CustomName", 8)) { @@ -87,10 +87,10 @@ index a34ae15cd4048bda965fd1449c75f3bd8f0e530b..f1b5a7e29d2a94c18c0d06b066b8cfbc } diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index 0c699c08ef85ca3339ada5c869b571581092a11d..12bb07ba7bcb37a26c0492e045b42289bfec70db 100644 +index 3a17c143de499d81109ae7d6e9fe18718139c5b7..04c2872e2a492adef5aec98289a8cf2af6611757 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -@@ -365,7 +365,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -367,7 +367,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name this.levels = nbt.getInt("Levels"); // SPIGOT-5053, use where available // CraftBukkit end if (nbt.contains("CustomName", 8)) { diff --git a/patches/unapplied/server/0264-Honor-EntityAgeable.ageLock.patch b/patches/server/0264-Honor-EntityAgeable.ageLock.patch similarity index 100% rename from patches/unapplied/server/0264-Honor-EntityAgeable.ageLock.patch rename to patches/server/0264-Honor-EntityAgeable.ageLock.patch diff --git a/patches/unapplied/server/0265-Configurable-connection-throttle-kick-message.patch b/patches/server/0265-Configurable-connection-throttle-kick-message.patch similarity index 100% rename from patches/unapplied/server/0265-Configurable-connection-throttle-kick-message.patch rename to patches/server/0265-Configurable-connection-throttle-kick-message.patch diff --git a/patches/unapplied/server/0266-Hook-into-CB-plugin-rewrites.patch b/patches/server/0266-Hook-into-CB-plugin-rewrites.patch similarity index 100% rename from patches/unapplied/server/0266-Hook-into-CB-plugin-rewrites.patch rename to patches/server/0266-Hook-into-CB-plugin-rewrites.patch diff --git a/patches/unapplied/server/0267-PreSpawnerSpawnEvent.patch b/patches/server/0267-PreSpawnerSpawnEvent.patch similarity index 91% rename from patches/unapplied/server/0267-PreSpawnerSpawnEvent.patch rename to patches/server/0267-PreSpawnerSpawnEvent.patch index 9330973872..72f2f7c8ff 100644 --- a/patches/unapplied/server/0267-PreSpawnerSpawnEvent.patch +++ b/patches/server/0267-PreSpawnerSpawnEvent.patch @@ -9,10 +9,10 @@ SpawnerSpawnEvent gets called instead of the CreatureSpawnEvent for spawners. diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java -index 2022224d2c5da60687474c5666e2bac207bf3f59..9a02dbecd02ffac91a3cb66d988125454b39caf6 100644 +index 23cecd12f064f70d314393971312d881cace043a..a985364e5dd4a592e282ad16f0555f842a1d5048 100644 --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java -@@ -130,11 +130,11 @@ public abstract class BaseSpawner { +@@ -134,11 +134,11 @@ public abstract class BaseSpawner { org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(key); if (type != null) { diff --git a/patches/unapplied/server/0268-Add-LivingEntity-getTargetEntity.patch b/patches/server/0268-Add-LivingEntity-getTargetEntity.patch similarity index 95% rename from patches/unapplied/server/0268-Add-LivingEntity-getTargetEntity.patch rename to patches/server/0268-Add-LivingEntity-getTargetEntity.patch index f45d260379..330741ce64 100644 --- a/patches/unapplied/server/0268-Add-LivingEntity-getTargetEntity.patch +++ b/patches/server/0268-Add-LivingEntity-getTargetEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 4291de1b9d6634bfdb2f6fda51426a32057f081e..09c8da5da1557e09af3350b3ac95fc204c590065 100644 +index 785d5196c7e6de95e0507c959352ba57fb50d1c4..2c804ef89d910f706c449b4ce540ed1be3ac242a 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -116,6 +116,7 @@ import net.minecraft.world.level.storage.loot.LootTable; +@@ -117,6 +117,7 @@ import net.minecraft.world.level.storage.loot.LootTable; import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets; import net.minecraft.world.level.storage.loot.parameters.LootContextParams; import net.minecraft.world.phys.AABB; @@ -16,7 +16,7 @@ index 4291de1b9d6634bfdb2f6fda51426a32057f081e..09c8da5da1557e09af3350b3ac95fc20 import net.minecraft.world.phys.HitResult; import net.minecraft.world.phys.Vec3; import net.minecraft.world.scores.PlayerTeam; -@@ -3810,6 +3811,38 @@ public abstract class LivingEntity extends Entity { +@@ -3835,6 +3836,38 @@ public abstract class LivingEntity extends Entity { return level.clip(raytrace); } diff --git a/patches/unapplied/server/0269-Add-sun-related-API.patch b/patches/server/0269-Add-sun-related-API.patch similarity index 90% rename from patches/unapplied/server/0269-Add-sun-related-API.patch rename to patches/server/0269-Add-sun-related-API.patch index 50417ae96e..3b9ff0bb75 100644 --- a/patches/unapplied/server/0269-Add-sun-related-API.patch +++ b/patches/server/0269-Add-sun-related-API.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Add sun related API public net.minecraft.world.entity.Mob isSunBurnTick()Z diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 92f6f332cc11ec4b7a10ff61b5a034ab80854940..ec3ea01033e2c6f2904d4f0a4b0e08bd12b713f7 100644 +index a21797af9f90235835919c395d2ea77a980b2768..00cfc9abb31c7fada8a7e4a99850d5c9f5b71c96 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -679,6 +679,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -678,6 +678,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { } } diff --git a/patches/unapplied/server/0270-Turtle-API.patch b/patches/server/0270-Turtle-API.patch similarity index 96% rename from patches/unapplied/server/0270-Turtle-API.patch rename to patches/server/0270-Turtle-API.patch index bf750a83cb..2240894a89 100644 --- a/patches/unapplied/server/0270-Turtle-API.patch +++ b/patches/server/0270-Turtle-API.patch @@ -25,10 +25,10 @@ index e3983370c09e3e3445c4557fcca50dd25f29cba0..6efba52c2e5d7811ee329ed22c1c76f7 private final int searchRange; private final int verticalSearchRange; diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java -index 37125ffe47fcd5fe93ab62ad8a46e8188f362436..0cea2eacfe3264a9b3500dc3a6a19d21d74d54e9 100644 +index ab4e8ff5fe4f53bfda1d7b152aa89e6772bc3a16..30663713e198bfe40b95c48524b71ea65f39965e 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java +++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java -@@ -480,14 +480,17 @@ public class Turtle extends Animal { +@@ -482,14 +482,17 @@ public class Turtle extends Animal { if (!this.turtle.isInWater() && this.isReachedTarget()) { if (this.turtle.layEggCounter < 1) { @@ -49,7 +49,7 @@ index 37125ffe47fcd5fe93ab62ad8a46e8188f362436..0cea2eacfe3264a9b3500dc3a6a19d21 } // CraftBukkit end this.turtle.setHasEgg(false); -@@ -555,7 +558,7 @@ public class Turtle extends Animal { +@@ -557,7 +560,7 @@ public class Turtle extends Animal { @Override public boolean canUse() { diff --git a/patches/unapplied/server/0271-Call-player-spectator-target-events-and-improve-impl.patch b/patches/server/0271-Call-player-spectator-target-events-and-improve-impl.patch similarity index 94% rename from patches/unapplied/server/0271-Call-player-spectator-target-events-and-improve-impl.patch rename to patches/server/0271-Call-player-spectator-target-events-and-improve-impl.patch index 862c5c74ca..691257a062 100644 --- a/patches/unapplied/server/0271-Call-player-spectator-target-events-and-improve-impl.patch +++ b/patches/server/0271-Call-player-spectator-target-events-and-improve-impl.patch @@ -19,10 +19,10 @@ spectate the target entity. Co-authored-by: Spottedleaf diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 6fa11d19b0a9858448fb22624c1d1a2fb228a3b4..942081c458f597d7a0ff7b3478b4b1bf93e8b30d 100644 +index 05e72945da26295fbc5f0d243ba48a8649244b3b..572dc30729a4511dcc7002434017edf8b0ce5a89 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1884,14 +1884,58 @@ public class ServerPlayer extends Player { +@@ -1908,15 +1908,59 @@ public class ServerPlayer extends Player { } public void setCamera(@Nullable Entity entity) { @@ -33,10 +33,11 @@ index 6fa11d19b0a9858448fb22624c1d1a2fb228a3b4..942081c458f597d7a0ff7b3478b4b1bf - if (entity1 != this.camera) { - this.connection.send(new ClientboundSetCameraPacket(this.camera)); - this.connection.teleport(this.camera.getX(), this.camera.getY(), this.camera.getZ(), this.getYRot(), this.getXRot(), TeleportCause.SPECTATE); // CraftBukkit +- this.connection.resetPosition(); + if (entity == null) { + entity = this; -+ } -+ + } + + if (entity1 == entity) return; // new spec target is the current spec target + + if (entity == this) { @@ -63,8 +64,8 @@ index 6fa11d19b0a9858448fb22624c1d1a2fb228a3b4..942081c458f597d7a0ff7b3478b4b1bf + MinecraftServer.LOGGER.debug("Blocking frozen player " + this + " from spectating entity " + entity); + return; + } - } - ++ } ++ + this.camera = entity; // only set after validating state + + if (entity != this) { @@ -81,6 +82,7 @@ index 6fa11d19b0a9858448fb22624c1d1a2fb228a3b4..942081c458f597d7a0ff7b3478b4b1bf + this.connection.teleport(this.camera.getX(), this.camera.getY(), this.camera.getZ(), this.getYRot(), this.getXRot(), TeleportCause.SPECTATE); // CraftBukkit + } + this.connection.send(new ClientboundSetCameraPacket(entity)); ++ this.connection.resetPosition(); + // Paper end } diff --git a/patches/unapplied/server/0272-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch b/patches/server/0272-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch similarity index 90% rename from patches/unapplied/server/0272-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch rename to patches/server/0272-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch index 06567d4f8c..6b8c4ac1f9 100644 --- a/patches/unapplied/server/0272-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch +++ b/patches/server/0272-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch @@ -11,10 +11,10 @@ If the projectile fails to find the shooter in the current world, check other worlds. diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index 7f787cd1fcdc71091973441844db6b7499417587..9379e887af9c15119bbb158dec88a016e649fb7c 100644 +index 11cfe63c101f5d76d3481a3163dbaec22685ccce..b0caf14a196cd8c3a02d8e931a08857173ffb4da 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -@@ -57,6 +57,18 @@ public abstract class Projectile extends Entity { +@@ -58,6 +58,18 @@ public abstract class Projectile extends Entity { return this.cachedOwner; } else if (this.ownerUUID != null && this.level instanceof ServerLevel) { this.cachedOwner = ((ServerLevel) this.level).getEntity(this.ownerUUID); diff --git a/patches/unapplied/server/0273-Add-more-Witch-API.patch b/patches/server/0273-Add-more-Witch-API.patch similarity index 100% rename from patches/unapplied/server/0273-Add-more-Witch-API.patch rename to patches/server/0273-Add-more-Witch-API.patch diff --git a/patches/unapplied/server/0274-Check-Drowned-for-Villager-Aggression-Config.patch b/patches/server/0274-Check-Drowned-for-Villager-Aggression-Config.patch similarity index 100% rename from patches/unapplied/server/0274-Check-Drowned-for-Villager-Aggression-Config.patch rename to patches/server/0274-Check-Drowned-for-Villager-Aggression-Config.patch diff --git a/patches/unapplied/server/0275-Add-option-to-prevent-players-from-moving-into-unloa.patch b/patches/server/0275-Add-option-to-prevent-players-from-moving-into-unloa.patch similarity index 93% rename from patches/unapplied/server/0275-Add-option-to-prevent-players-from-moving-into-unloa.patch rename to patches/server/0275-Add-option-to-prevent-players-from-moving-into-unloa.patch index 04fb67c054..595d71acf8 100644 --- a/patches/unapplied/server/0275-Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/patches/server/0275-Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c50d2b797be6a69bb632a7e88bf353d0a134e676..ed2af4174191dc7f167e8f44edf8f9a894cbc398 100644 +index c5ad4d8a08f03a6f75241f4e4913d84bcb0fdf0b..9843684ab5cf21bfc4fe30f3528dc75475b4dcd1 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -571,9 +571,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -563,9 +563,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic double d0 = entity.getX(); double d1 = entity.getY(); double d2 = entity.getZ(); @@ -22,7 +22,7 @@ index c50d2b797be6a69bb632a7e88bf353d0a134e676..ed2af4174191dc7f167e8f44edf8f9a8 float f = Mth.wrapDegrees(packet.getYRot()); float f1 = Mth.wrapDegrees(packet.getXRot()); double d6 = d3 - this.vehicleFirstGoodX; -@@ -608,6 +608,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -600,6 +600,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } speed *= 2f; // TODO: Get the speed of the vehicle instead of the player @@ -39,7 +39,7 @@ index c50d2b797be6a69bb632a7e88bf353d0a134e676..ed2af4174191dc7f167e8f44edf8f9a8 if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) { // CraftBukkit end ServerGamePacketListenerImpl.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", new Object[]{entity.getName().getString(), this.player.getName().getString(), d6, d7, d8}); -@@ -1257,9 +1267,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1249,9 +1259,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.allowedPlayerTicks = 20; // CraftBukkit } else { this.awaitingTeleportTime = this.tickCount; @@ -52,7 +52,7 @@ index c50d2b797be6a69bb632a7e88bf353d0a134e676..ed2af4174191dc7f167e8f44edf8f9a8 float f = Mth.wrapDegrees(packet.getYRot(this.player.getYRot())); float f1 = Mth.wrapDegrees(packet.getXRot(this.player.getXRot())); -@@ -1315,6 +1325,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1307,6 +1317,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } else { speed = this.player.getAbilities().walkingSpeed * 10f; } diff --git a/patches/unapplied/server/0276-Reset-players-airTicks-on-respawn.patch b/patches/server/0276-Reset-players-airTicks-on-respawn.patch similarity index 83% rename from patches/unapplied/server/0276-Reset-players-airTicks-on-respawn.patch rename to patches/server/0276-Reset-players-airTicks-on-respawn.patch index 62d4f9200f..34f1b4bbfb 100644 --- a/patches/unapplied/server/0276-Reset-players-airTicks-on-respawn.patch +++ b/patches/server/0276-Reset-players-airTicks-on-respawn.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Reset players airTicks on respawn diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 942081c458f597d7a0ff7b3478b4b1bf93e8b30d..2f2def50a4dde2a949176da1030773e59521fb9a 100644 +index 572dc30729a4511dcc7002434017edf8b0ce5a89..15d4ad53cca71272e491bea31d83e8c8e697dac0 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -2297,6 +2297,7 @@ public class ServerPlayer extends Player { +@@ -2337,6 +2337,7 @@ public class ServerPlayer extends Player { this.setHealth(this.getMaxHealth()); this.stopUsingItem(); // CraftBukkit - SPIGOT-6682: Clear active item on reset diff --git a/patches/unapplied/server/0277-Don-t-sleep-after-profile-lookups-if-not-needed.patch b/patches/server/0277-Don-t-sleep-after-profile-lookups-if-not-needed.patch similarity index 100% rename from patches/unapplied/server/0277-Don-t-sleep-after-profile-lookups-if-not-needed.patch rename to patches/server/0277-Don-t-sleep-after-profile-lookups-if-not-needed.patch diff --git a/patches/unapplied/server/0278-Improve-Server-Thread-Pool-and-Thread-Priorities.patch b/patches/server/0278-Improve-Server-Thread-Pool-and-Thread-Priorities.patch similarity index 94% rename from patches/unapplied/server/0278-Improve-Server-Thread-Pool-and-Thread-Priorities.patch rename to patches/server/0278-Improve-Server-Thread-Pool-and-Thread-Priorities.patch index 84393327d5..eea41e9ee0 100644 --- a/patches/unapplied/server/0278-Improve-Server-Thread-Pool-and-Thread-Priorities.patch +++ b/patches/server/0278-Improve-Server-Thread-Pool-and-Thread-Priorities.patch @@ -35,7 +35,7 @@ index 0000000000000000000000000000000000000000..b60f59cf5cc8eb84a6055b7861857dec + } +} diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java -index 336a26733b5bf73455f8ec10347c1e08b8e866f7..0773447354542925826369625f21e26aa30ebff4 100644 +index c085ed233eb4d1f2100ec23a77447ef799ecdf1f..8120739e2a7c4c86ecb7058f08bd8179d3a943b8 100644 --- a/src/main/java/net/minecraft/Util.java +++ b/src/main/java/net/minecraft/Util.java @@ -79,8 +79,8 @@ public class Util { @@ -81,10 +81,10 @@ index 336a26733b5bf73455f8ec10347c1e08b8e866f7..0773447354542925826369625f21e26a return executorService; } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 25aac194eb486a5b8707aa0a655fd8259ad7409c..6afa9ab5cb864ff286341582d6d70648d8a86efb 100644 +index 6026a2da9645a5f22aa18c74e35d8b76a3f29352..45f3035be38571088edf293070b8d84b19a4101a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -306,6 +306,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop type, Level world) { super(type, world); -@@ -262,6 +263,12 @@ public class Zombie extends Monster { +@@ -263,6 +264,12 @@ public class Zombie extends Monster { super.aiStep(); } @@ -31,7 +31,7 @@ index d3ca0706e8dc3160d2100d23788dd3d501b29215..a8caf1a776deea8684d37406af11ab72 public void startUnderWaterConversion(int ticksUntilWaterConversion) { this.lastTick = MinecraftServer.currentTick; // CraftBukkit this.conversionTime = ticksUntilWaterConversion; -@@ -291,9 +298,15 @@ public class Zombie extends Monster { +@@ -292,9 +299,15 @@ public class Zombie extends Monster { } public boolean isSunSensitive() { @@ -48,7 +48,7 @@ index d3ca0706e8dc3160d2100d23788dd3d501b29215..a8caf1a776deea8684d37406af11ab72 @Override public boolean hurt(DamageSource source, float amount) { if (!super.hurt(source, amount)) { -@@ -413,6 +426,7 @@ public class Zombie extends Monster { +@@ -414,6 +427,7 @@ public class Zombie extends Monster { nbt.putBoolean("CanBreakDoors", this.canBreakDoors()); nbt.putInt("InWaterTime", this.isInWater() ? this.inWaterTime : -1); nbt.putInt("DrownedConversionTime", this.isUnderWaterConverting() ? this.conversionTime : -1); @@ -56,7 +56,7 @@ index d3ca0706e8dc3160d2100d23788dd3d501b29215..a8caf1a776deea8684d37406af11ab72 } @Override -@@ -424,6 +438,11 @@ public class Zombie extends Monster { +@@ -425,6 +439,11 @@ public class Zombie extends Monster { if (nbt.contains("DrownedConversionTime", 99) && nbt.getInt("DrownedConversionTime") > -1) { this.startUnderWaterConversion(nbt.getInt("DrownedConversionTime")); } diff --git a/patches/unapplied/server/0289-Book-Size-Limits.patch b/patches/server/0289-Book-Size-Limits.patch similarity index 94% rename from patches/unapplied/server/0289-Book-Size-Limits.patch rename to patches/server/0289-Book-Size-Limits.patch index 93b2919b83..ed7939a3d2 100644 --- a/patches/unapplied/server/0289-Book-Size-Limits.patch +++ b/patches/server/0289-Book-Size-Limits.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Book Size Limits Puts some limits on the size of books. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 4a9c4799ec25820b8ecf6c7e44675b95ba02734c..d372d019e714a040d5ae05ed8653b4541717cd61 100644 +index 133c6637be1abf3f9b4aa4f73f22b7d64b0438a2..60c9b8d45ae4884883fce1b402bf9ed2906aff79 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1124,6 +1124,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1116,6 +1116,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleEditBook(ServerboundEditBookPacket packet) { diff --git a/patches/unapplied/server/0290-Add-PlayerConnectionCloseEvent.patch b/patches/server/0290-Add-PlayerConnectionCloseEvent.patch similarity index 100% rename from patches/unapplied/server/0290-Add-PlayerConnectionCloseEvent.patch rename to patches/server/0290-Add-PlayerConnectionCloseEvent.patch diff --git a/patches/unapplied/server/0291-Prevent-Enderman-from-loading-chunks.patch b/patches/server/0291-Prevent-Enderman-from-loading-chunks.patch similarity index 90% rename from patches/unapplied/server/0291-Prevent-Enderman-from-loading-chunks.patch rename to patches/server/0291-Prevent-Enderman-from-loading-chunks.patch index 0eadb94123..d38857d1a8 100644 --- a/patches/unapplied/server/0291-Prevent-Enderman-from-loading-chunks.patch +++ b/patches/server/0291-Prevent-Enderman-from-loading-chunks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent Enderman from loading chunks diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java -index 78a8e5905759d975bb4941b5416fb95ea8c74df5..e0e32528ed9f2f494b5ee2079c3167021f2e84c4 100644 +index 4fcd5e1e0641474beeaa834adce73ba10065e34e..1d8cf9b765f9c55feeb26e4ba4aa969be142dc3f 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java +++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java -@@ -493,7 +493,8 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -509,7 +509,8 @@ public class EnderMan extends Monster implements NeutralMob { int j = Mth.floor(this.enderman.getY() + randomsource.nextDouble() * 2.0D); int k = Mth.floor(this.enderman.getZ() - 1.0D + randomsource.nextDouble() * 2.0D); BlockPos blockposition = new BlockPos(i, j, k); @@ -18,7 +18,7 @@ index 78a8e5905759d975bb4941b5416fb95ea8c74df5..e0e32528ed9f2f494b5ee2079c316702 BlockPos blockposition1 = blockposition.below(); BlockState iblockdata1 = world.getBlockState(blockposition1); BlockState iblockdata2 = this.enderman.getCarriedBlock(); -@@ -539,7 +540,8 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -555,7 +556,8 @@ public class EnderMan extends Monster implements NeutralMob { int j = Mth.floor(this.enderman.getY() + randomsource.nextDouble() * 3.0D); int k = Mth.floor(this.enderman.getZ() - 2.0D + randomsource.nextDouble() * 4.0D); BlockPos blockposition = new BlockPos(i, j, k); diff --git a/patches/unapplied/server/0292-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/patches/server/0292-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch similarity index 90% rename from patches/unapplied/server/0292-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch rename to patches/server/0292-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index 4f6ffef384..55f8800ee8 100644 --- a/patches/unapplied/server/0292-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/patches/server/0292-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch @@ -16,10 +16,10 @@ intent to remove) and replace it with two new methods, clearly named and documented as to their purpose. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index c9aae32186b72723e879ffab50d73ade5a665a64..2f6fbceac68e173f3ba3d887407e44b22bfbc5de 100644 +index c7fe091d13349348b7288c0aa8bdde046dc47fa4..8aac8dd53b171f05559fb233d47bf1c9e5815a03 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -230,6 +230,7 @@ public class ServerPlayer extends Player { +@@ -235,6 +235,7 @@ public class ServerPlayer extends Player { public int latency; public boolean wonGame; private int containerUpdateDelay; // Paper @@ -28,10 +28,10 @@ index c9aae32186b72723e879ffab50d73ade5a665a64..2f6fbceac68e173f3ba3d887407e44b2 public boolean queueHealthUpdatePacket = false; public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket; diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index b71d20841285350d0dfad8d59537f9fcc7a7e44c..4da6c770ff4953b81c4694c665d453ca7d3e532b 100644 +index 52708bcdc046cc0a7f3798bfef06e49a6215acfd..43ab48c7f11592c6f0c82243a1d88f48ef175aae 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -179,6 +179,7 @@ public abstract class PlayerList { +@@ -185,6 +185,7 @@ public abstract class PlayerList { public void placeNewPlayer(Connection connection, ServerPlayer player) { player.isRealPlayer = true; // Paper @@ -106,10 +106,10 @@ index e7442952ef1f03969949014492a7ddc6d0796ba5..d7823d7dc88cfba6f6ac9dae220e03de public Location getLastDeathLocation() { if (this.getData().contains("LastDeathLocation", 10)) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0e9538a433e8ef721f29cc7b9f8fac914b876956..e31de5e408b01c2e67d2feec4020796fa74b24d8 100644 +index 15da4358e46547fa979dd5023ec6eb5d1358bcb5..7e4cdc2ff30bd85e2ddd271f7b0a531100fdce36 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -174,6 +174,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -176,6 +176,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private String resourcePackHash; private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit @@ -117,7 +117,7 @@ index 0e9538a433e8ef721f29cc7b9f8fac914b876956..e31de5e408b01c2e67d2feec4020796f // Paper end public CraftPlayer(CraftServer server, ServerPlayer entity) { -@@ -1765,6 +1766,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1767,6 +1768,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.firstPlayed = firstPlayed; } @@ -136,7 +136,7 @@ index 0e9538a433e8ef721f29cc7b9f8fac914b876956..e31de5e408b01c2e67d2feec4020796f public void readExtraData(CompoundTag nbttagcompound) { this.hasPlayedBefore = true; if (nbttagcompound.contains("bukkit")) { -@@ -1787,6 +1800,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1789,6 +1802,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setExtraData(CompoundTag nbttagcompound) { @@ -145,7 +145,7 @@ index 0e9538a433e8ef721f29cc7b9f8fac914b876956..e31de5e408b01c2e67d2feec4020796f if (!nbttagcompound.contains("bukkit")) { nbttagcompound.put("bukkit", new CompoundTag()); } -@@ -1801,6 +1816,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1803,6 +1818,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { data.putLong("firstPlayed", this.getFirstPlayed()); data.putLong("lastPlayed", System.currentTimeMillis()); data.putString("lastKnownName", handle.getScoreboardName()); diff --git a/patches/unapplied/server/0293-Workaround-for-vehicle-tracking-issue-on-disconnect.patch b/patches/server/0293-Workaround-for-vehicle-tracking-issue-on-disconnect.patch similarity index 85% rename from patches/unapplied/server/0293-Workaround-for-vehicle-tracking-issue-on-disconnect.patch rename to patches/server/0293-Workaround-for-vehicle-tracking-issue-on-disconnect.patch index 645c55b945..75eb434a84 100644 --- a/patches/unapplied/server/0293-Workaround-for-vehicle-tracking-issue-on-disconnect.patch +++ b/patches/server/0293-Workaround-for-vehicle-tracking-issue-on-disconnect.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Workaround for vehicle tracking issue on disconnect diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 2f6fbceac68e173f3ba3d887407e44b22bfbc5de..f6b28eece6dc4f8d1b483ed2bfb6c9504d625bc8 100644 +index 8aac8dd53b171f05559fb233d47bf1c9e5815a03..6092167b282a99799c27937dfa1bef424a7e2a9e 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1586,6 +1586,13 @@ public class ServerPlayer extends Player { +@@ -1609,6 +1609,13 @@ public class ServerPlayer extends Player { public void disconnect() { this.disconnected = true; this.ejectPassengers(); diff --git a/patches/unapplied/server/0294-Block-Entity-remove-from-being-called-on-Players.patch b/patches/server/0294-Block-Entity-remove-from-being-called-on-Players.patch similarity index 90% rename from patches/unapplied/server/0294-Block-Entity-remove-from-being-called-on-Players.patch rename to patches/server/0294-Block-Entity-remove-from-being-called-on-Players.patch index 485c11dffb..199e77cd48 100644 --- a/patches/unapplied/server/0294-Block-Entity-remove-from-being-called-on-Players.patch +++ b/patches/server/0294-Block-Entity-remove-from-being-called-on-Players.patch @@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to be unintentional in the few cases we've seen so far. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e31de5e408b01c2e67d2feec4020796fa74b24d8..cdc4ef88c8369b3bd1c607ff5301fc1b04ec4582 100644 +index 7e4cdc2ff30bd85e2ddd271f7b0a531100fdce36..b9e484ec8173be94fae307830e87a9205e56a11e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2636,6 +2636,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2638,6 +2638,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void resetCooldown() { getHandle().resetAttackStrengthTicker(); } diff --git a/patches/unapplied/server/0295-BlockDestroyEvent.patch b/patches/server/0295-BlockDestroyEvent.patch similarity index 91% rename from patches/unapplied/server/0295-BlockDestroyEvent.patch rename to patches/server/0295-BlockDestroyEvent.patch index f4735fc41c..cfe9c0658b 100644 --- a/patches/unapplied/server/0295-BlockDestroyEvent.patch +++ b/patches/server/0295-BlockDestroyEvent.patch @@ -11,10 +11,10 @@ floating in the air. This can replace many uses of BlockPhysicsEvent diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 9ed8117afa4eb1ff9e7403d3ab92a9e6cb0fab73..699df824d2e9fe8b6f6a1ccc8ae7c818c84204cb 100644 +index 638a77d3ea65b509b9fcdd3c1e3ea0abe5b7566f..35838b3c858f8dd3c3cb59fe1c4cc8d1d878ff83 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -28,6 +28,7 @@ import net.minecraft.nbt.CompoundTag; +@@ -29,6 +29,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.protocol.Packet; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; @@ -22,7 +22,7 @@ index 9ed8117afa4eb1ff9e7403d3ab92a9e6cb0fab73..699df824d2e9fe8b6f6a1ccc8ae7c818 import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ChunkHolder; import net.minecraft.server.level.ServerLevel; -@@ -583,8 +584,21 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -582,8 +583,21 @@ public abstract class Level implements LevelAccessor, AutoCloseable { return false; } else { FluidState fluid = this.getFluidState(pos); diff --git a/patches/unapplied/server/0296-Async-command-map-building.patch b/patches/server/0296-Async-command-map-building.patch similarity index 90% rename from patches/unapplied/server/0296-Async-command-map-building.patch rename to patches/server/0296-Async-command-map-building.patch index 70212cf994..c326cc955a 100644 --- a/patches/unapplied/server/0296-Async-command-map-building.patch +++ b/patches/server/0296-Async-command-map-building.patch @@ -9,10 +9,10 @@ commands if the server is restarting. Using the default async pool caused issues due to the shutdown logic generally being much later. diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index 2bf67468a6c745bc6243c65210477ba129bfcb07..c4315531f93f4ed68b4621157b02572886e1ed30 100644 +index 9eaa7ad424252ea2e033d6041a14bf1ef7dd9fde..6e931aa7220180336b64fbb3b4090df278fca0fa 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -360,6 +360,24 @@ public class Commands { +@@ -368,6 +368,24 @@ public class Commands { if ( org.spigotmc.SpigotConfig.tabComplete < 0 ) return; // Spigot // CraftBukkit start // Register Vanilla commands into builtRoot as before @@ -37,7 +37,7 @@ index 2bf67468a6c745bc6243c65210477ba129bfcb07..c4315531f93f4ed68b4621157b025728 Map, CommandNode> map = Maps.newIdentityHashMap(); // Use identity to prevent aliasing issues RootCommandNode vanillaRoot = new RootCommandNode(); -@@ -377,7 +395,14 @@ public class Commands { +@@ -385,7 +403,14 @@ public class Commands { for (CommandNode node : rootcommandnode.getChildren()) { bukkit.add(node.getName()); } @@ -53,10 +53,10 @@ index 2bf67468a6c745bc6243c65210477ba129bfcb07..c4315531f93f4ed68b4621157b025728 event.getPlayer().getServer().getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1dcc7d93038cd0be45ba871c23225395e4751df4..ddd7f78314275e054a1437b633458d8564ef28ca 100644 +index f9007905422f7a6eac7c78fd5bdb17cb4da96712..1685f92acdf63decc6cd6b37957ca61212b43bbc 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -889,6 +889,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { runSync(player, bukkit, rootcommandnode); }); -@@ -403,6 +404,7 @@ public class Commands { +@@ -411,6 +412,7 @@ public class Commands { private void runSync(ServerPlayer player, Collection bukkit, RootCommandNode rootcommandnode) { // Paper end - Async command map building @@ -118,7 +118,7 @@ index c4315531f93f4ed68b4621157b02572886e1ed30..b141d251eedd31bd115342b878afd68d PlayerCommandSendEvent event = new PlayerCommandSendEvent(player.getBukkitEntity(), new LinkedHashSet<>(bukkit)); event.getPlayer().getServer().getPluginManager().callEvent(event); -@@ -421,6 +423,11 @@ public class Commands { +@@ -429,6 +431,11 @@ public class Commands { while (iterator.hasNext()) { CommandNode commandnode2 = (CommandNode) iterator.next(); @@ -131,10 +131,10 @@ index c4315531f93f4ed68b4621157b02572886e1ed30..b141d251eedd31bd115342b878afd68d if (commandnode2.canUse(source)) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index d372d019e714a040d5ae05ed8653b4541717cd61..c959941b6ba5d9ed8e6ce88ff3902afc4c97d139 100644 +index 60c9b8d45ae4884883fce1b402bf9ed2906aff79..428f300a33589910eae058b77bb7aa611f2578e7 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -836,8 +836,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -828,8 +828,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic ParseResults parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack()); this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> { @@ -149,7 +149,7 @@ index d372d019e714a040d5ae05ed8653b4541717cd61..c959941b6ba5d9ed8e6ce88ff3902afc }); }); } -@@ -852,7 +856,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -844,7 +848,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic builder.suggest(completion.suggestion(), PaperAdventure.asVanilla(completion.tooltip())); } }); diff --git a/patches/unapplied/server/0298-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch b/patches/server/0298-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch similarity index 94% rename from patches/unapplied/server/0298-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch rename to patches/server/0298-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch index 903ba48692..7c7963c4c2 100644 --- a/patches/unapplied/server/0298-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch +++ b/patches/server/0298-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch @@ -10,10 +10,10 @@ This made the Bukkit RecipeChoice API not work for Shapeless. This reimplements vanilla logic using the same test logic as Shaped diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java -index 56835129a63ed22677b7bbd9576c4bdcc8bf5ac7..ffe5476d8ed15ee4384b679c341688787205ce59 100644 +index dc4d3034b193562c70a929f0af9420a1e6728f13..e7c06d98532160499f2610f69de27e30a326b16f 100644 --- a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java +++ b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java -@@ -76,16 +76,49 @@ public class ShapelessRecipe implements CraftingRecipe { +@@ -84,16 +84,49 @@ public class ShapelessRecipe implements CraftingRecipe { StackedContents autorecipestackmanager = new StackedContents(); int i = 0; diff --git a/patches/unapplied/server/0299-Limit-Client-Sign-length-more.patch b/patches/server/0299-Limit-Client-Sign-length-more.patch similarity index 92% rename from patches/unapplied/server/0299-Limit-Client-Sign-length-more.patch rename to patches/server/0299-Limit-Client-Sign-length-more.patch index 6ed7b8a95c..5822014fb8 100644 --- a/patches/unapplied/server/0299-Limit-Client-Sign-length-more.patch +++ b/patches/server/0299-Limit-Client-Sign-length-more.patch @@ -22,18 +22,18 @@ it only impacts data sent from the client. Set -DPaper.maxSignLength=XX to change limit or -1 to disable diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c959941b6ba5d9ed8e6ce88ff3902afc4c97d139..20f67746bd0ab2008a7d433abe6b312cd9b13932 100644 +index 428f300a33589910eae058b77bb7aa611f2578e7..a1e75d2c44e854fd7976caa58c8beb618f92e0a0 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -296,6 +296,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - private final LastSeenMessagesValidator lastSeenMessagesValidator; + private final MessageSignatureCache messageSignatureCache; private final FutureChain chatMessageChain; private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit + private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80); // Paper public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) { this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH); -@@ -3296,7 +3297,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3176,7 +3177,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleSignUpdate(ServerboundSignUpdatePacket packet) { diff --git a/patches/unapplied/server/0300-Don-t-check-ConvertSigns-boolean-every-sign-save.patch b/patches/server/0300-Don-t-check-ConvertSigns-boolean-every-sign-save.patch similarity index 78% rename from patches/unapplied/server/0300-Don-t-check-ConvertSigns-boolean-every-sign-save.patch rename to patches/server/0300-Don-t-check-ConvertSigns-boolean-every-sign-save.patch index 0d3af0b6f8..75d4b58525 100644 --- a/patches/unapplied/server/0300-Don-t-check-ConvertSigns-boolean-every-sign-save.patch +++ b/patches/server/0300-Don-t-check-ConvertSigns-boolean-every-sign-save.patch @@ -7,18 +7,18 @@ property lookups arent super cheap. they synchronize, validate and check security managers. diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java -index 39bd98b9496e4a27fd69a2de7c83c40689017ebc..831db5ee21938d71e99bf9d17b92a6ca15531740 100644 +index 149728fa6371b4d8b0afaae769aacac27401ea03..aca2da47651a76f3e5593d71c500d749d92ccc3b 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java -@@ -25,6 +25,7 @@ import net.minecraft.world.phys.Vec2; +@@ -26,6 +26,7 @@ import net.minecraft.world.phys.Vec2; import net.minecraft.world.phys.Vec3; public class SignBlockEntity extends BlockEntity implements CommandSource { // CraftBukkit - implements + private static final boolean CONVERT_LEGACY_SIGNS = Boolean.getBoolean("convertLegacySigns"); // Paper public static final int LINES = 4; - private static final String[] RAW_TEXT_FIELD_NAMES = new String[]{"Text1", "Text2", "Text3", "Text4"}; -@@ -65,7 +66,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C + private static final int MAX_TEXT_LINE_WIDTH = 90; +@@ -84,7 +85,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C } // CraftBukkit start diff --git a/patches/unapplied/server/0301-Optimize-Network-Manager-and-add-advanced-packet-sup.patch b/patches/server/0301-Optimize-Network-Manager-and-add-advanced-packet-sup.patch similarity index 100% rename from patches/unapplied/server/0301-Optimize-Network-Manager-and-add-advanced-packet-sup.patch rename to patches/server/0301-Optimize-Network-Manager-and-add-advanced-packet-sup.patch diff --git a/patches/unapplied/server/0302-Handle-Oversized-Tile-Entities-in-chunks.patch b/patches/server/0302-Handle-Oversized-Tile-Entities-in-chunks.patch similarity index 97% rename from patches/unapplied/server/0302-Handle-Oversized-Tile-Entities-in-chunks.patch rename to patches/server/0302-Handle-Oversized-Tile-Entities-in-chunks.patch index bcaddcfede..9e46199694 100644 --- a/patches/unapplied/server/0302-Handle-Oversized-Tile-Entities-in-chunks.patch +++ b/patches/server/0302-Handle-Oversized-Tile-Entities-in-chunks.patch @@ -9,7 +9,7 @@ creating too large of a packet to sed. Co authored by Spottedleaf diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java -index fef3507dbaeb963ba4132ab7beb26d22ec39d425..568ac283baf40e2a89f5b002ffd899eba8008ef2 100644 +index f47eeb70661661610ef1a96dd9da67785825c126..0ef3e9b472e35bd2572b04722781abf7d4a1094b 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java @@ -24,6 +24,14 @@ public class ClientboundLevelChunkPacketData { diff --git a/patches/unapplied/server/0303-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/patches/server/0303-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch similarity index 82% rename from patches/unapplied/server/0303-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch rename to patches/server/0303-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch index 687e67e5e9..0dfbeca486 100644 --- a/patches/unapplied/server/0303-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch +++ b/patches/server/0303-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 4da6c770ff4953b81c4694c665d453ca7d3e532b..8b586272b0f05a12607aa138596ecd5f1e86d0b7 100644 +index 43ab48c7f11592c6f0c82243a1d88f48ef175aae..bd880228aaaefb2299b09ce91a58b2da1f04d953 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -1129,6 +1129,7 @@ public abstract class PlayerList { +@@ -1139,6 +1139,7 @@ public abstract class PlayerList { } public void setUsingWhiteList(boolean whitelistEnabled) { diff --git a/patches/unapplied/server/0304-Entity-getEntitySpawnReason.patch b/patches/server/0304-Entity-getEntitySpawnReason.patch similarity index 87% rename from patches/unapplied/server/0304-Entity-getEntitySpawnReason.patch rename to patches/server/0304-Entity-getEntitySpawnReason.patch index 80d66b4ac6..e83aa0a2f3 100644 --- a/patches/unapplied/server/0304-Entity-getEntitySpawnReason.patch +++ b/patches/server/0304-Entity-getEntitySpawnReason.patch @@ -10,10 +10,10 @@ persistenting Living Entity, SPAWNER for spawners, or DEFAULT since data was not stored. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 672f74f89a643ef82d391c521ca45a2beb51a46e..6337d159d2ad0daa70361ee6bad5fc3eb62fa8d3 100644 +index f2b20fe0770b519756342c7b900919c6a9d93bdb..6ca2ea98531d28602905f0e68d368d0015a46dcd 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1250,6 +1250,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1290,6 +1290,7 @@ public class ServerLevel extends Level implements WorldGenLevel { return true; } // Paper end @@ -22,10 +22,10 @@ index 672f74f89a643ef82d391c521ca45a2beb51a46e..6337d159d2ad0daa70361ee6bad5fc3e // Paper start if (DEBUG_ENTITIES) { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 8b586272b0f05a12607aa138596ecd5f1e86d0b7..fe359cfdc42a86e26a890252ba994ca1fe7726ea 100644 +index bd880228aaaefb2299b09ce91a58b2da1f04d953..01cfa93571effead5498e766f6c7e254a5b13479 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -348,7 +348,7 @@ public abstract class PlayerList { +@@ -356,7 +356,7 @@ public abstract class PlayerList { // CraftBukkit start ServerLevel finalWorldServer = worldserver1; Entity entity = EntityType.loadEntityRecursive(nbttagcompound1.getCompound("Entity"), finalWorldServer, (entity1) -> { @@ -35,7 +35,7 @@ index 8b586272b0f05a12607aa138596ecd5f1e86d0b7..fe359cfdc42a86e26a890252ba994ca1 }); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index fb67f1d76d683694db13b29bab1d69606b414950..d83fc656e70612bbfa93f5ef2cc1161103915004 100644 +index d664b8691a8248a035cbe1b12a353f633980ea7b..15625d54c32530eae73d6360ef68ffd1ddf752b0 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -74,6 +74,8 @@ import net.minecraft.world.InteractionHand; @@ -55,7 +55,7 @@ index fb67f1d76d683694db13b29bab1d69606b414950..d83fc656e70612bbfa93f5ef2cc11611 public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper private CraftEntity bukkitEntity; -@@ -2023,6 +2026,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2038,6 +2041,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ())); } @@ -65,7 +65,7 @@ index fb67f1d76d683694db13b29bab1d69606b414950..d83fc656e70612bbfa93f5ef2cc11611 // Save entity's from mob spawner status if (spawnedViaMobSpawner) { nbt.putBoolean("Paper.FromMobSpawner", true); -@@ -2168,6 +2174,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2183,6 +2189,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status @@ -93,10 +93,10 @@ index fb67f1d76d683694db13b29bab1d69606b414950..d83fc656e70612bbfa93f5ef2cc11611 } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java -index 9a02dbecd02ffac91a3cb66d988125454b39caf6..67046bad0cfcc8c12bc17edb35b527fc987dddf7 100644 +index a985364e5dd4a592e282ad16f0555f842a1d5048..2ae7b8d1129a3549c5ba6fe03455b0b0683c9c31 100644 --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java -@@ -181,6 +181,7 @@ public abstract class BaseSpawner { +@@ -185,6 +185,7 @@ public abstract class BaseSpawner { // Spigot End } entity.spawnedViaMobSpawner = true; // Paper @@ -105,10 +105,10 @@ index 9a02dbecd02ffac91a3cb66d988125454b39caf6..67046bad0cfcc8c12bc17edb35b527fc // Spigot Start if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 2a4f26c5bae66121c5c21d7f1013b3b7753608a4..3bda8128c2956d817677e28ff87c9c5ed61c8bd2 100644 +index 9ba0135932571c815fec15d2caccc789d3af3464..e900c64b8b07dc9cf47cc565e60df6781ca95756 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1266,5 +1266,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1268,5 +1268,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public boolean fromMobSpawner() { return getHandle().spawnedViaMobSpawner; } diff --git a/patches/unapplied/server/0306-Fire-event-on-GS4-query.patch b/patches/server/0305-Fire-event-on-GS4-query.patch similarity index 100% rename from patches/unapplied/server/0306-Fire-event-on-GS4-query.patch rename to patches/server/0305-Fire-event-on-GS4-query.patch diff --git a/patches/unapplied/server/0307-Implement-PlayerPostRespawnEvent.patch b/patches/server/0306-Implement-PlayerPostRespawnEvent.patch similarity index 86% rename from patches/unapplied/server/0307-Implement-PlayerPostRespawnEvent.patch rename to patches/server/0306-Implement-PlayerPostRespawnEvent.patch index b769a9c729..81b6221a0f 100644 --- a/patches/unapplied/server/0307-Implement-PlayerPostRespawnEvent.patch +++ b/patches/server/0306-Implement-PlayerPostRespawnEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerPostRespawnEvent diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index fe359cfdc42a86e26a890252ba994ca1fe7726ea..f77bbe5ebd3fd93ec6cf92a049b585178c7583d8 100644 +index 01cfa93571effead5498e766f6c7e254a5b13479..8e8a4ab377e3d42ba2927745aa903861549de10e 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -728,9 +728,14 @@ public abstract class PlayerList { +@@ -736,9 +736,14 @@ public abstract class PlayerList { boolean flag2 = false; @@ -24,7 +24,7 @@ index fe359cfdc42a86e26a890252ba994ca1fe7726ea..f77bbe5ebd3fd93ec6cf92a049b58517 ServerLevel worldserver1 = this.server.getLevel(entityplayer.getRespawnDimension()); if (worldserver1 != null) { Optional optional; -@@ -782,6 +787,7 @@ public abstract class PlayerList { +@@ -790,6 +795,7 @@ public abstract class PlayerList { location = respawnEvent.getRespawnLocation(); if (!flag) entityplayer.reset(); // SPIGOT-4785 @@ -32,7 +32,7 @@ index fe359cfdc42a86e26a890252ba994ca1fe7726ea..f77bbe5ebd3fd93ec6cf92a049b58517 } else { location.setWorld(worldserver.getWorld()); } -@@ -839,6 +845,13 @@ public abstract class PlayerList { +@@ -849,6 +855,13 @@ public abstract class PlayerList { if (entityplayer.connection.isDisconnected()) { this.save(entityplayer); } diff --git a/patches/unapplied/server/0308-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch b/patches/server/0307-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch similarity index 86% rename from patches/unapplied/server/0308-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch rename to patches/server/0307-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch index 94aa72db11..9dee89a71a 100644 --- a/patches/unapplied/server/0308-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch +++ b/patches/server/0307-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch @@ -6,10 +6,10 @@ Subject: [PATCH] don't go below 0 for pickupDelay, breaks picking up items vanilla checks for == 0 diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index 6ecab1dd5932c4c346cde987cb9463b00a32d385..95dc82a0a9bd8a3fa9c704696e7b3dc48bf4d6a0 100644 +index 42b056d58146991b86de0690fce595716ee5455b..02bd99934066b35a3f4fd59370cdabf0640ee218 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -114,6 +114,7 @@ public class ItemEntity extends Entity { +@@ -112,6 +112,7 @@ public class ItemEntity extends Entity { // CraftBukkit start - Use wall time for pickup and despawn timers int elapsedTicks = MinecraftServer.currentTick - this.lastTick; if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks; @@ -17,7 +17,7 @@ index 6ecab1dd5932c4c346cde987cb9463b00a32d385..95dc82a0a9bd8a3fa9c704696e7b3dc4 if (this.age != -32768) this.age += elapsedTicks; this.lastTick = MinecraftServer.currentTick; // CraftBukkit end -@@ -200,6 +201,7 @@ public class ItemEntity extends Entity { +@@ -198,6 +199,7 @@ public class ItemEntity extends Entity { // CraftBukkit start - Use wall time for pickup and despawn timers int elapsedTicks = MinecraftServer.currentTick - this.lastTick; if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks; diff --git a/patches/unapplied/server/0309-Server-Tick-Events.patch b/patches/server/0308-Server-Tick-Events.patch similarity index 85% rename from patches/unapplied/server/0309-Server-Tick-Events.patch rename to patches/server/0308-Server-Tick-Events.patch index 427db9a827..b79a81acd2 100644 --- a/patches/unapplied/server/0309-Server-Tick-Events.patch +++ b/patches/server/0308-Server-Tick-Events.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Server Tick Events Fires event at start and end of a server tick diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ddd7f78314275e054a1437b633458d8564ef28ca..412380f4bfe8a2d50090904124242e8b2c7bfa1b 100644 +index 1685f92acdf63decc6cd6b37957ca61212b43bbc..e56a03b04e510a510d9deb2a013900241471ac0f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1302,6 +1302,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop> readChunk(ChunkPos chunkPos) { @@ -28,7 +28,7 @@ index 6089512fbae4254f8c8c5266373e2539f479918b..fc50e8a4ae4fd7328276300b585f7b09 } // CraftBukkit start -@@ -670,6 +674,63 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -682,6 +686,63 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // CraftBukkit end } @@ -144,7 +144,7 @@ index 584985272a02eb5b61a22cf2404fbd97a55a3358..cda87a66fe80bf910f629c64e36c1fec 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 5a25664a15643ff148db47caad4f53376b55168e..7bfb0716964af5ee300150d500c97e8f90c849d4 100644 +index 8f729134d8f024678f3f5927059791e28ccb5b90..b294ef87fb93e7f4651dc04128124f297575860d 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 @@ -249,6 +249,7 @@ public class RegionFileStorage implements AutoCloseable { @@ -156,10 +156,10 @@ index 5a25664a15643ff148db47caad4f53376b55168e..7bfb0716964af5ee300150d500c97e8f } catch (Throwable throwable) { if (dataoutputstream != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index f3235c80c6eecdeade88ddafaf39c52beadda684..7ff5943949aea15d7b8a48f01ce8e8cb98c78532 100644 +index 31a4424670bbf631845ab0ec61e523d4aeea20f6..cef2d2494268c968dc8d26f9d5d0ee68a4ad465c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -299,9 +299,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -298,9 +298,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean isChunkGenerated(int x, int z) { @@ -185,7 +185,7 @@ index f3235c80c6eecdeade88ddafaf39c52beadda684..7ff5943949aea15d7b8a48f01ce8e8cb throw new RuntimeException(ex); } } -@@ -415,20 +429,48 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -414,20 +428,48 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot diff --git a/patches/unapplied/server/0321-Show-blockstate-location-if-we-failed-to-read-it.patch b/patches/server/0320-Show-blockstate-location-if-we-failed-to-read-it.patch similarity index 100% rename from patches/unapplied/server/0321-Show-blockstate-location-if-we-failed-to-read-it.patch rename to patches/server/0320-Show-blockstate-location-if-we-failed-to-read-it.patch diff --git a/patches/unapplied/server/0322-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/patches/server/0321-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch similarity index 91% rename from patches/unapplied/server/0322-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch rename to patches/server/0321-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch index c07ef44529..7cd63eeb62 100644 --- a/patches/unapplied/server/0322-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch +++ b/patches/server/0321-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch @@ -17,10 +17,10 @@ This should fully solve all of the issues around it so that only natural influences natural spawns. diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index 243ed4b0fbc11b23883aa653e6efc31310c250f1..2d39b7204a5d3967e2fbbd288eb5ff6bf4e324ce 100644 +index c3d6b904f1310c93a3d5c1e5e3fab2f3476f5a48..29dac07176eb99517c9cddbe012636908c3603fe 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -@@ -87,6 +87,13 @@ public final class NaturalSpawner { +@@ -88,6 +88,13 @@ public final class NaturalSpawner { MobCategory enumcreaturetype = entity.getType().getCategory(); if (enumcreaturetype != MobCategory.MISC) { diff --git a/patches/unapplied/server/0323-Configurable-projectile-relative-velocity.patch b/patches/server/0322-Configurable-projectile-relative-velocity.patch similarity index 93% rename from patches/unapplied/server/0323-Configurable-projectile-relative-velocity.patch rename to patches/server/0322-Configurable-projectile-relative-velocity.patch index c2d8580ed1..d45a3392aa 100644 --- a/patches/unapplied/server/0323-Configurable-projectile-relative-velocity.patch +++ b/patches/server/0322-Configurable-projectile-relative-velocity.patch @@ -25,10 +25,10 @@ P3) Solutions for 1) and especially 2) might not be future-proof, while this server-internal fix makes this change future-proof. diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index 9379e887af9c15119bbb158dec88a016e649fb7c..68f3131eb5d3c725279796effff083345edbaec9 100644 +index b0caf14a196cd8c3a02d8e931a08857173ffb4da..3eb33d83b9cfa6ac87876a6343c88ac992b60374 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -@@ -161,7 +161,7 @@ public abstract class Projectile extends Entity { +@@ -162,7 +162,7 @@ public abstract class Projectile extends Entity { this.shoot((double) f5, (double) f6, (double) f7, speed, divergence); Vec3 vec3d = shooter.getDeltaMovement(); diff --git a/patches/unapplied/server/0324-offset-item-frame-ticking.patch b/patches/server/0323-offset-item-frame-ticking.patch similarity index 100% rename from patches/unapplied/server/0324-offset-item-frame-ticking.patch rename to patches/server/0323-offset-item-frame-ticking.patch diff --git a/patches/unapplied/server/0325-Fix-MC-158900.patch b/patches/server/0324-Fix-MC-158900.patch similarity index 90% rename from patches/unapplied/server/0325-Fix-MC-158900.patch rename to patches/server/0324-Fix-MC-158900.patch index 99ce9bf5b1..ebc4ab80a7 100644 --- a/patches/unapplied/server/0325-Fix-MC-158900.patch +++ b/patches/server/0324-Fix-MC-158900.patch @@ -7,10 +7,10 @@ The problem was we were checking isExpired() on the entry, but if it was expired at that point, then it would be null. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index f77bbe5ebd3fd93ec6cf92a049b585178c7583d8..d1da13e361c4898420e9d6ab8a9c48cb29ae65bf 100644 +index 8e8a4ab377e3d42ba2927745aa903861549de10e..4b1a900ce1531526b91b01217f291bc10526956b 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -612,8 +612,10 @@ public abstract class PlayerList { +@@ -620,8 +620,10 @@ public abstract class PlayerList { Player player = entity.getBukkitEntity(); PlayerLoginEvent event = new PlayerLoginEvent(player, loginlistener.connection.hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.connection.getRawAddress()).getAddress()); diff --git a/patches/unapplied/server/0326-Prevent-consuming-the-wrong-itemstack.patch b/patches/server/0325-Prevent-consuming-the-wrong-itemstack.patch similarity index 87% rename from patches/unapplied/server/0326-Prevent-consuming-the-wrong-itemstack.patch rename to patches/server/0325-Prevent-consuming-the-wrong-itemstack.patch index 2a5cf6dd78..e2db164e6f 100644 --- a/patches/unapplied/server/0326-Prevent-consuming-the-wrong-itemstack.patch +++ b/patches/server/0325-Prevent-consuming-the-wrong-itemstack.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index b601cfb1795334e284f3396f2175b8b716458ac0..35b5671e3bf0b14a073431095bf464f9ebfae843 100644 +index 3ff18ddb1d4b36fcfd97c9b29f2ecdcb4958916e..399c34b2837f2b54b452c866c524c51ba813fcc0 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3624,9 +3624,14 @@ public abstract class LivingEntity extends Entity { +@@ -3649,9 +3649,14 @@ public abstract class LivingEntity extends Entity { } public void startUsingItem(InteractionHand hand) { @@ -24,7 +24,7 @@ index b601cfb1795334e284f3396f2175b8b716458ac0..35b5671e3bf0b14a073431095bf464f9 this.useItem = itemstack; this.useItemRemaining = itemstack.getUseDuration(); if (!this.level.isClientSide) { -@@ -3706,6 +3711,7 @@ public abstract class LivingEntity extends Entity { +@@ -3731,6 +3736,7 @@ public abstract class LivingEntity extends Entity { this.releaseUsingItem(); } else { if (!this.useItem.isEmpty() && this.isUsingItem()) { @@ -32,7 +32,7 @@ index b601cfb1795334e284f3396f2175b8b716458ac0..35b5671e3bf0b14a073431095bf464f9 this.triggerItemUseEffects(this.useItem, 16); // CraftBukkit start - fire PlayerItemConsumeEvent ItemStack itemstack; -@@ -3741,8 +3747,8 @@ public abstract class LivingEntity extends Entity { +@@ -3766,8 +3772,8 @@ public abstract class LivingEntity extends Entity { } this.stopUsingItem(); diff --git a/patches/unapplied/server/0327-Dont-send-unnecessary-sign-update.patch b/patches/server/0326-Dont-send-unnecessary-sign-update.patch similarity index 87% rename from patches/unapplied/server/0327-Dont-send-unnecessary-sign-update.patch rename to patches/server/0326-Dont-send-unnecessary-sign-update.patch index 8e44002424..30d5d85b26 100644 --- a/patches/unapplied/server/0327-Dont-send-unnecessary-sign-update.patch +++ b/patches/server/0326-Dont-send-unnecessary-sign-update.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Dont send unnecessary sign update diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 34a961446cd9a940c540fa3cb9d008b2d3ff232e..c40da6e0f5da3a6663aba74720c530713b94650b 100644 +index 00316713c4f3d444a85b69f222d0b620974c5a27..c6ad5963540b5f51776ba52eefdf7d5be3475906 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3342,6 +3342,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3214,6 +3214,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (!tileentitysign.isEditable() || !this.player.getUUID().equals(tileentitysign.getPlayerWhoMayEdit())) { ServerGamePacketListenerImpl.LOGGER.warn("Player {} just tried to change non-editable sign", this.player.getName().getString()); diff --git a/patches/unapplied/server/0328-Add-option-to-disable-pillager-patrols.patch b/patches/server/0327-Add-option-to-disable-pillager-patrols.patch similarity index 100% rename from patches/unapplied/server/0328-Add-option-to-disable-pillager-patrols.patch rename to patches/server/0327-Add-option-to-disable-pillager-patrols.patch diff --git a/patches/unapplied/server/0329-Flat-bedrock-generator-settings.patch b/patches/server/0328-Flat-bedrock-generator-settings.patch similarity index 95% rename from patches/unapplied/server/0329-Flat-bedrock-generator-settings.patch rename to patches/server/0328-Flat-bedrock-generator-settings.patch index ea7148d934..2270d8900b 100644 --- a/patches/unapplied/server/0329-Flat-bedrock-generator-settings.patch +++ b/patches/server/0328-Flat-bedrock-generator-settings.patch @@ -114,31 +114,31 @@ index 06e1774dfbb667aca69bc30c9675ed472cb5728c..1d5bc86516df3781aea894c3afd34042 public static SurfaceRules.RuleSource end() { diff --git a/src/main/java/net/minecraft/server/Bootstrap.java b/src/main/java/net/minecraft/server/Bootstrap.java -index c5822637e48fad4ca4e8cf210431b5eafbf5abb1..0ece775ca7e63184f79fcdd1aa7ed5c16fc9bc9e 100644 +index 0d3a8f576c037886ccdd6068ce953c4ce010ae2f..bf3fa6454477041898ca00a6341db83a06a52d6f 100644 --- a/src/main/java/net/minecraft/server/Bootstrap.java +++ b/src/main/java/net/minecraft/server/Bootstrap.java -@@ -75,6 +75,7 @@ public class Bootstrap { - EntitySelectorOptions.bootStrap(); +@@ -70,6 +70,7 @@ public class Bootstrap { DispenseItemBehavior.bootStrap(); CauldronInteraction.bootStrap(); -+ Registry.register(net.minecraft.core.Registry.CONDITION, new net.minecraft.resources.ResourceLocation("paper", "bedrock_condition_source"), net.minecraft.data.worldgen.SurfaceRuleData.PaperBedrockConditionSource.CODEC.codec()); // Paper - register custom flat bedrock thing. TODO is this the best place to do this? - Registry.freezeBuiltins(); + BuiltInRegistries.bootStrap(); ++ net.minecraft.core.Registry.register(net.minecraft.core.registries.BuiltInRegistries.MATERIAL_CONDITION, new net.minecraft.resources.ResourceLocation("paper", "bedrock_condition_source"), net.minecraft.data.worldgen.SurfaceRuleData.PaperBedrockConditionSource.CODEC.codec()); // Paper - register custom flat bedrock thing. TODO is this the best place to do this? Bootstrap.wrapStreams(); } + // CraftBukkit start - easier than fixing the decompile diff --git a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java -index 298ea7c5776c4476dbb69e68debbd50376d14165..cf87490a446285132daaf9d90154ac6d477a62fe 100644 +index cdc87f14e5d6336856c74d5089e50ae5ebad9923..6b84633bf6956406d2e2c5dd32fa358f41ccc890 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java +++ b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java -@@ -210,7 +210,7 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator { +@@ -207,7 +207,7 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator { @Override public void buildSurface(WorldGenRegion region, StructureManager structures, RandomState noiseConfig, ChunkAccess chunk) { if (!SharedConstants.debugVoidTerrain(chunk.getPos())) { - WorldGenerationContext worldgenerationcontext = new WorldGenerationContext(this, region); + WorldGenerationContext worldgenerationcontext = new WorldGenerationContext(this, region, region.getMinecraftWorld()); // Paper - this.buildSurface(chunk, worldgenerationcontext, noiseConfig, structures, region.getBiomeManager(), region.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), Blender.of(region)); + this.buildSurface(chunk, worldgenerationcontext, noiseConfig, structures, region.getBiomeManager(), region.registryAccess().registryOrThrow(Registries.BIOME), Blender.of(region)); } -@@ -238,7 +238,7 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator { +@@ -235,7 +235,7 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator { return this.createNoiseChunk(ichunkaccess1, structureAccessor, Blender.of(chunkRegion), noiseConfig); }); Aquifer aquifer = noisechunk.aquifer(); diff --git a/patches/unapplied/server/0330-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch b/patches/server/0329-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch similarity index 86% rename from patches/unapplied/server/0330-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch rename to patches/server/0329-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch index ea3c47b7b2..7e151eb18d 100644 --- a/patches/unapplied/server/0330-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch +++ b/patches/server/0329-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent sync chunk loads when villagers try to find beds diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/SleepInBed.java b/src/main/java/net/minecraft/world/entity/ai/behavior/SleepInBed.java -index d7c6064710a04a8ecb5b429567467bd497f826a3..4da7f9af12c9bbc3403cdfd4245bd13f011ed89c 100644 +index 9012a6347b2f061e88c42d3c237c4b465883e941..6b2b34cb129f807af8042e26a5e180d18e195459 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/SleepInBed.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/SleepInBed.java -@@ -41,7 +41,8 @@ public class SleepInBed extends Behavior { +@@ -43,7 +43,8 @@ public class SleepInBed extends Behavior { } } diff --git a/patches/unapplied/server/0331-MC-145656-Fix-Follow-Range-Initial-Target.patch b/patches/server/0330-MC-145656-Fix-Follow-Range-Initial-Target.patch similarity index 100% rename from patches/unapplied/server/0331-MC-145656-Fix-Follow-Range-Initial-Target.patch rename to patches/server/0330-MC-145656-Fix-Follow-Range-Initial-Target.patch diff --git a/patches/unapplied/server/0332-Duplicate-UUID-Resolve-Option.patch b/patches/server/0331-Duplicate-UUID-Resolve-Option.patch similarity index 96% rename from patches/unapplied/server/0332-Duplicate-UUID-Resolve-Option.patch rename to patches/server/0331-Duplicate-UUID-Resolve-Option.patch index 65e9a0f3b4..1e11ee3a84 100644 --- a/patches/unapplied/server/0332-Duplicate-UUID-Resolve-Option.patch +++ b/patches/server/0331-Duplicate-UUID-Resolve-Option.patch @@ -56,10 +56,10 @@ index 0dc94dec1317b3f86d38074c6cbe41ab828cab1d..0e45a340ae534caf676b7f9d0adcbcee public static void onChunkHolderCreate(final ServerLevel level, final ChunkHolder holder) { diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index fc50e8a4ae4fd7328276300b585f7b0924e7531f..48cc42222c5c7fb91e440028f847c51dc5517fce 100644 +index 7c9b73136b4fc5fda96317001eb8a32245b9768a..512e8ace73635e5494ec09bee29148617d45b460 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -522,6 +522,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -534,6 +534,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider entity.discard(); needsRemoval = true; } @@ -67,7 +67,7 @@ index fc50e8a4ae4fd7328276300b585f7b0924e7531f..48cc42222c5c7fb91e440028f847c51d return !needsRemoval; })); // CraftBukkit end -@@ -533,6 +534,49 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -545,6 +546,49 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider throw new UnsupportedOperationException(); // Paper - rewrite chunk system } diff --git a/patches/unapplied/server/0333-Optimize-Hoppers.patch b/patches/server/0332-Optimize-Hoppers.patch similarity index 98% rename from patches/unapplied/server/0333-Optimize-Hoppers.patch rename to patches/server/0332-Optimize-Hoppers.patch index 03b9c5e950..ddb64fa503 100644 --- a/patches/unapplied/server/0333-Optimize-Hoppers.patch +++ b/patches/server/0332-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/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1a21f7e590aaeca131256dd7079b9546710ca9ad..eeb794d96ac8cbe36b788d390e638192182a21c8 100644 +index 41376a0aaa2da34ec3194d38c59a4ea2f353bd64..ea1ad3dad6bc9c7603d5dd0bdaec0d4563e90f16 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1405,6 +1405,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper @@ -25,10 +25,10 @@ index 1a21f7e590aaeca131256dd7079b9546710ca9ad..eeb794d96ac8cbe36b788d390e638192 this.profiler.push(() -> { return worldserver + " " + worldserver.dimension().location(); diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index b4fbe1f393e2c348bc0120bf6c55d57d61011787..2650deb381bae30593128fc003c042f42110802c 100644 +index 7d1e41272d05a8cb8d1adbcd2e9bc00f1a6f95fe..29c605ff88956435752412847734992fe6bcd55d 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -625,11 +625,12 @@ public final class ItemStack { +@@ -633,11 +633,12 @@ public final class ItemStack { return this.getItem().interactLivingEntity(this, user, entity, hand); } @@ -45,7 +45,7 @@ index b4fbe1f393e2c348bc0120bf6c55d57d61011787..2650deb381bae30593128fc003c042f4 itemstack.setPopTime(this.getPopTime()); if (this.tag != null) { diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index 06beb18e5e1950aeb6cb427876fcc4c5ea95adb2..b0174aedb7358af1e80278e2f5f13e00c35ab3c6 100644 +index 5768ff2c3e15c038d132c7ad391332fb36251871..be98a87edbe62cfcf5c1b6f6cd1d8e31b546c144 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java @@ -26,6 +26,7 @@ import co.aikar.timings.MinecraftTimings; // Paper diff --git a/patches/unapplied/server/0334-PlayerDeathEvent-shouldDropExperience.patch b/patches/server/0333-PlayerDeathEvent-shouldDropExperience.patch similarity index 85% rename from patches/unapplied/server/0334-PlayerDeathEvent-shouldDropExperience.patch rename to patches/server/0333-PlayerDeathEvent-shouldDropExperience.patch index 9bd7a18bef..e77ab4925b 100644 --- a/patches/unapplied/server/0334-PlayerDeathEvent-shouldDropExperience.patch +++ b/patches/server/0333-PlayerDeathEvent-shouldDropExperience.patch @@ -5,10 +5,10 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 7609ab90b8c870876bbaf927df635e2579abbdb7..fc05217186d0af6cb758a189f4287ac812625cd4 100644 +index 5eafbf1fd9b0f54819c9b2d99803c07a1708ce02..ecb81ad7ab281eaad7d5b3f9dc30082595824408 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -896,7 +896,7 @@ public class ServerPlayer extends Player { +@@ -918,7 +918,7 @@ public class ServerPlayer extends Player { this.tellNeutralMobsThatIDied(); } // SPIGOT-5478 must be called manually now diff --git a/patches/unapplied/server/0335-Prevent-bees-loading-chunks-checking-hive-position.patch b/patches/server/0334-Prevent-bees-loading-chunks-checking-hive-position.patch similarity index 81% rename from patches/unapplied/server/0335-Prevent-bees-loading-chunks-checking-hive-position.patch rename to patches/server/0334-Prevent-bees-loading-chunks-checking-hive-position.patch index 0724ac87d3..7ade870a16 100644 --- a/patches/unapplied/server/0335-Prevent-bees-loading-chunks-checking-hive-position.patch +++ b/patches/server/0334-Prevent-bees-loading-chunks-checking-hive-position.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Prevent bees loading chunks checking hive position diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java -index 599cf33fe766539deba246feb724943dbefa2aab..c5069740e922dc6028ba98f2fe9edac216780a19 100644 +index f1e43449eca998e83eca1b53f479918b7b4faf25..aea3872c89493f68d31186877a1ea981a0c0df6d 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Bee.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java -@@ -496,6 +496,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { - if (!this.hasHive()) { +@@ -498,6 +498,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { + } else if (this.isTooFarAway(this.hivePos)) { return false; } else { + if (level.getChunkIfLoadedImmediately(hivePos.getX() >> 4, hivePos.getZ() >> 4) == null) return true; // Paper - just assume the hive is still there, no need to load the chunk(s) diff --git a/patches/unapplied/server/0336-Don-t-load-Chunks-from-Hoppers-and-other-things.patch b/patches/server/0335-Don-t-load-Chunks-from-Hoppers-and-other-things.patch similarity index 100% rename from patches/unapplied/server/0336-Don-t-load-Chunks-from-Hoppers-and-other-things.patch rename to patches/server/0335-Don-t-load-Chunks-from-Hoppers-and-other-things.patch diff --git a/patches/unapplied/server/0337-Guard-against-serializing-mismatching-chunk-coordina.patch b/patches/server/0336-Guard-against-serializing-mismatching-chunk-coordina.patch similarity index 94% rename from patches/unapplied/server/0337-Guard-against-serializing-mismatching-chunk-coordina.patch rename to patches/server/0336-Guard-against-serializing-mismatching-chunk-coordina.patch index da583926f5..490513878a 100644 --- a/patches/unapplied/server/0337-Guard-against-serializing-mismatching-chunk-coordina.patch +++ b/patches/server/0336-Guard-against-serializing-mismatching-chunk-coordina.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Guard against serializing mismatching chunk coordinate Should help if something dumb happens 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 d0b7533b8ed16f062a4ed2f1389b79c3d0929fe1..648719a58e62105064ac6b51c6f5e7867ff0b7a9 100644 +index b8cf01fbfc3293bf78b1094a90da3594fa2067b4..b8f5ad1130b125f71a1feb1083120fb700b9bea1 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 -@@ -92,6 +92,18 @@ public class ChunkSerializer { +@@ -94,6 +94,18 @@ public class ChunkSerializer { public ChunkSerializer() {} @@ -28,7 +28,7 @@ index d0b7533b8ed16f062a4ed2f1389b79c3d0929fe1..648719a58e62105064ac6b51c6f5e786 // Paper start public static final class InProgressChunkHolder { -@@ -117,7 +129,7 @@ public class ChunkSerializer { +@@ -119,7 +131,7 @@ public class ChunkSerializer { public static InProgressChunkHolder loadChunk(ServerLevel world, PoiManager poiStorage, ChunkPos chunkPos, CompoundTag nbt, boolean distinguish) { java.util.ArrayDeque tasksToExecuteOnMain = new java.util.ArrayDeque<>(); // Paper end diff --git a/patches/unapplied/server/0338-Optimise-EntityGetter-getPlayerByUUID.patch b/patches/server/0337-Optimise-EntityGetter-getPlayerByUUID.patch similarity index 85% rename from patches/unapplied/server/0338-Optimise-EntityGetter-getPlayerByUUID.patch rename to patches/server/0337-Optimise-EntityGetter-getPlayerByUUID.patch index 379285a1a0..8105dcf3fc 100644 --- a/patches/unapplied/server/0338-Optimise-EntityGetter-getPlayerByUUID.patch +++ b/patches/server/0337-Optimise-EntityGetter-getPlayerByUUID.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Optimise EntityGetter#getPlayerByUUID Use the PlayerList map instead of iterating over all players diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 72d3af43afd1b71d92a4d0673795835c6a3a07d0..c38229f3844328e8e5a0d84e64a0867bafadc5dc 100644 +index 0635f84d062872a9a6e38a9ba3fe71026661e651..79f09d83e10e3d357cfe1537ab7cdde8b494d9d2 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -423,6 +423,15 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -426,6 +426,15 @@ public class ServerLevel extends Level implements WorldGenLevel { } // Paper end - rewrite chunk system @@ -24,4 +24,4 @@ index 72d3af43afd1b71d92a4d0673795835c6a3a07d0..c38229f3844328e8e5a0d84e64a0867b + // Add env and gen to constructor, IWorldDataServer -> WorldDataServer public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { - // Holder holder = worlddimension.typeHolder(); // CraftBukkit - decompile error + // Holder holder = worlddimension.type(); // CraftBukkit - decompile error diff --git a/patches/unapplied/server/0339-Fix-items-not-falling-correctly.patch b/patches/server/0338-Fix-items-not-falling-correctly.patch similarity index 93% rename from patches/unapplied/server/0339-Fix-items-not-falling-correctly.patch rename to patches/server/0338-Fix-items-not-falling-correctly.patch index 559c7d740b..439e413ba7 100644 --- a/patches/unapplied/server/0339-Fix-items-not-falling-correctly.patch +++ b/patches/server/0338-Fix-items-not-falling-correctly.patch @@ -15,10 +15,10 @@ This patch resolves the conflict by offsetting checking Spigot's entity activation range check from an item's move method. diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index 95dc82a0a9bd8a3fa9c704696e7b3dc48bf4d6a0..ebcf58fe51d1fd0cb8a0f5a84cdd349f29c9442e 100644 +index 02bd99934066b35a3f4fd59370cdabf0640ee218..477c9358a09067ace4d0fe3f519148feb4c7a335 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -142,7 +142,7 @@ public class ItemEntity extends Entity { +@@ -140,7 +140,7 @@ public class ItemEntity extends Entity { } } diff --git a/patches/unapplied/server/0340-Lag-compensate-eating.patch b/patches/server/0339-Lag-compensate-eating.patch similarity index 85% rename from patches/unapplied/server/0340-Lag-compensate-eating.patch rename to patches/server/0339-Lag-compensate-eating.patch index aa9f516739..5226762366 100644 --- a/patches/unapplied/server/0340-Lag-compensate-eating.patch +++ b/patches/server/0339-Lag-compensate-eating.patch @@ -7,10 +7,10 @@ When the server is lagging, players will wait longer when eating. Change to also use a time check instead if it passes. diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 35b5671e3bf0b14a073431095bf464f9ebfae843..9e76df6ac643eb7696a11c0c3bfc45a82e0e0ce4 100644 +index 399c34b2837f2b54b452c866c524c51ba813fcc0..840fb46729b940b6d4d7adb4d0545b5a8508e11b 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3567,6 +3567,11 @@ public abstract class LivingEntity extends Entity { +@@ -3592,6 +3592,11 @@ public abstract class LivingEntity extends Entity { return ((Byte) this.entityData.get(LivingEntity.DATA_LIVING_ENTITY_FLAGS) & 2) > 0 ? InteractionHand.OFF_HAND : InteractionHand.MAIN_HAND; } @@ -21,8 +21,8 @@ index 35b5671e3bf0b14a073431095bf464f9ebfae843..9e76df6ac643eb7696a11c0c3bfc45a8 + private void updatingUsingItem() { if (this.isUsingItem()) { - if (ItemStack.isSameIgnoreDurability(this.getItemInHand(this.getUsedItemHand()), this.useItem)) { -@@ -3584,8 +3589,12 @@ public abstract class LivingEntity extends Entity { + if (ItemStack.isSame(this.getItemInHand(this.getUsedItemHand()), this.useItem)) { +@@ -3609,8 +3614,12 @@ public abstract class LivingEntity extends Entity { if (this.shouldTriggerItemUseEffects()) { this.triggerItemUseEffects(stack, 5); } @@ -37,7 +37,7 @@ index 35b5671e3bf0b14a073431095bf464f9ebfae843..9e76df6ac643eb7696a11c0c3bfc45a8 this.completeUsingItem(); } -@@ -3633,7 +3642,10 @@ public abstract class LivingEntity extends Entity { +@@ -3658,7 +3667,10 @@ public abstract class LivingEntity extends Entity { if (!itemstack.isEmpty() && !this.isUsingItem() || forceUpdate) { // Paper use override flag this.useItem = itemstack; @@ -49,7 +49,7 @@ index 35b5671e3bf0b14a073431095bf464f9ebfae843..9e76df6ac643eb7696a11c0c3bfc45a8 if (!this.level.isClientSide) { this.setLivingEntityFlag(1, true); this.setLivingEntityFlag(2, hand == InteractionHand.OFF_HAND); -@@ -3658,7 +3670,10 @@ public abstract class LivingEntity extends Entity { +@@ -3683,7 +3695,10 @@ public abstract class LivingEntity extends Entity { } } else if (!this.isUsingItem() && !this.useItem.isEmpty()) { this.useItem = ItemStack.EMPTY; @@ -61,7 +61,7 @@ index 35b5671e3bf0b14a073431095bf464f9ebfae843..9e76df6ac643eb7696a11c0c3bfc45a8 } } -@@ -3792,7 +3807,10 @@ public abstract class LivingEntity extends Entity { +@@ -3817,7 +3832,10 @@ public abstract class LivingEntity extends Entity { } this.useItem = ItemStack.EMPTY; diff --git a/patches/unapplied/server/0341-Optimize-call-to-getFluid-for-explosions.patch b/patches/server/0340-Optimize-call-to-getFluid-for-explosions.patch similarity index 87% rename from patches/unapplied/server/0341-Optimize-call-to-getFluid-for-explosions.patch rename to patches/server/0340-Optimize-call-to-getFluid-for-explosions.patch index 952f1fc45d..0d341fc2ce 100644 --- a/patches/unapplied/server/0341-Optimize-call-to-getFluid-for-explosions.patch +++ b/patches/server/0340-Optimize-call-to-getFluid-for-explosions.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimize call to getFluid for explosions diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index af9645a3ef9dab1134977b30937f15fa3fa27a95..38bb502e9f1272020a23a3ef8ebb0cb1a5a251ef 100644 +index 9f7a35e00b5edca6b2d99d3ed60cde8e1aeac4eb..2dc93845749951cd51a19fd9ee515cebcba5d731 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java -@@ -172,7 +172,7 @@ public class Explosion { +@@ -168,7 +168,7 @@ public class Explosion { for (float f1 = 0.3F; f > 0.0F; f -= 0.22500001F) { BlockPos blockposition = new BlockPos(d4, d5, d6); BlockState iblockdata = this.level.getBlockState(blockposition); diff --git a/patches/unapplied/server/0342-Fix-last-firework-in-stack-not-having-effects-when-d.patch b/patches/server/0341-Fix-last-firework-in-stack-not-having-effects-when-d.patch similarity index 90% rename from patches/unapplied/server/0342-Fix-last-firework-in-stack-not-having-effects-when-d.patch rename to patches/server/0341-Fix-last-firework-in-stack-not-having-effects-when-d.patch index 448854642c..116f0f4358 100644 --- a/patches/unapplied/server/0342-Fix-last-firework-in-stack-not-having-effects-when-d.patch +++ b/patches/server/0341-Fix-last-firework-in-stack-not-having-effects-when-d.patch @@ -9,10 +9,10 @@ dispensed. The resulting item would have size == 0 and therefore be convertered to air, hence why the effects disappeared. diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java -index 6219b89cf04febe0a8ceb93b4212827c297cf7aa..15fc100e468e68cbb0c43363c0eb25dc2ef8c6e0 100644 +index 1a36fa2afcd53a0021135abbe0d0df4af557eed8..7132f1c304824feb80733f01b9554092e425f0bb 100644 --- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java -@@ -510,7 +510,7 @@ public interface DispenseItemBehavior { +@@ -511,7 +511,7 @@ public interface DispenseItemBehavior { } itemstack1 = CraftItemStack.asNMSCopy(event.getItem()); diff --git a/patches/unapplied/server/0343-Add-effect-to-block-break-naturally.patch b/patches/server/0342-Add-effect-to-block-break-naturally.patch similarity index 88% rename from patches/unapplied/server/0343-Add-effect-to-block-break-naturally.patch rename to patches/server/0342-Add-effect-to-block-break-naturally.patch index b911824bb1..89bf132208 100644 --- a/patches/unapplied/server/0343-Add-effect-to-block-break-naturally.patch +++ b/patches/server/0342-Add-effect-to-block-break-naturally.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add effect to block break naturally diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 4ae3c0b2c240f01a1fcea0b02616e91e057a297a..ea3358905dcd39a1a855d98570457c65dcd7513d 100644 +index 2e3b675dca8cec906d533141e158e5db6ae87042..7e97b09376b1e9000511f56f3406dba550ba2612 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -475,6 +475,18 @@ public class CraftBlock implements Block { +@@ -477,6 +477,18 @@ public class CraftBlock implements Block { @Override public boolean breakNaturally(ItemStack item) { @@ -27,7 +27,7 @@ index 4ae3c0b2c240f01a1fcea0b02616e91e057a297a..ea3358905dcd39a1a855d98570457c65 // Order matters here, need to drop before setting to air so skulls can get their data net.minecraft.world.level.block.state.BlockState iblockdata = this.getNMS(); net.minecraft.world.level.block.Block block = iblockdata.getBlock(); -@@ -484,6 +496,7 @@ public class CraftBlock implements Block { +@@ -486,6 +498,7 @@ public class CraftBlock implements Block { // Modelled off EntityHuman#hasBlock if (block != Blocks.AIR && (item == null || !iblockdata.requiresCorrectToolForDrops() || nmsItem.isCorrectToolForDrops(iblockdata))) { net.minecraft.world.level.block.Block.dropResources(iblockdata, this.world.getMinecraftWorld(), position, this.world.getBlockEntity(position), null, nmsItem); diff --git a/patches/unapplied/server/0344-Entity-Activation-Range-2.0.patch b/patches/server/0343-Entity-Activation-Range-2.0.patch similarity index 96% rename from patches/unapplied/server/0344-Entity-Activation-Range-2.0.patch rename to patches/server/0343-Entity-Activation-Range-2.0.patch index eca25da847..eda263bddd 100644 --- a/patches/unapplied/server/0344-Entity-Activation-Range-2.0.patch +++ b/patches/server/0343-Entity-Activation-Range-2.0.patch @@ -18,7 +18,7 @@ public net.minecraft.world.entity.Entity isInsidePortal public net.minecraft.world.entity.LivingEntity jumping diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index c38229f3844328e8e5a0d84e64a0867bafadc5dc..9b321475a9b944f8af58f2e2b2b22c81a8757a2e 100644 +index 79f09d83e10e3d357cfe1537ab7cdde8b494d9d2..6a4759a5ec5802f7203febf157c7d6dcf6dce535 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -2,7 +2,6 @@ package net.minecraft.server.level; @@ -29,7 +29,7 @@ index c38229f3844328e8e5a0d84e64a0867bafadc5dc..9b321475a9b944f8af58f2e2b2b22c81 import com.google.common.collect.Lists; import com.mojang.datafixers.DataFixer; import com.mojang.datafixers.util.Pair; -@@ -1027,17 +1026,17 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1048,17 +1047,17 @@ public class ServerLevel extends Level implements WorldGenLevel { ++TimingHistory.entityTicks; // Paper - timings // Spigot start co.aikar.timings.Timing timer; // Paper @@ -51,8 +51,8 @@ index c38229f3844328e8e5a0d84e64a0867bafadc5dc..9b321475a9b944f8af58f2e2b2b22c81 try { // Paper end - timings entity.setOldPosAndRot(); -@@ -1048,9 +1047,13 @@ public class ServerLevel extends Level implements WorldGenLevel { - return Registry.ENTITY_TYPE.getKey(entity.getType()).toString(); +@@ -1069,9 +1068,13 @@ public class ServerLevel extends Level implements WorldGenLevel { + return BuiltInRegistries.ENTITY_TYPE.getKey(entity.getType()).toString(); }); gameprofilerfiller.incrementCounter("tickNonPassenger"); + if (isActive) { // Paper - EAR 2 @@ -65,7 +65,7 @@ index c38229f3844328e8e5a0d84e64a0867bafadc5dc..9b321475a9b944f8af58f2e2b2b22c81 Iterator iterator = entity.getPassengers().iterator(); while (iterator.hasNext()) { -@@ -1058,13 +1061,18 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1079,13 +1082,18 @@ public class ServerLevel extends Level implements WorldGenLevel { this.tickPassenger(entity, entity1); } @@ -85,8 +85,8 @@ index c38229f3844328e8e5a0d84e64a0867bafadc5dc..9b321475a9b944f8af58f2e2b2b22c81 passenger.setOldPosAndRot(); ++passenger.tickCount; ProfilerFiller gameprofilerfiller = this.getProfiler(); -@@ -1073,8 +1081,17 @@ public class ServerLevel extends Level implements WorldGenLevel { - return Registry.ENTITY_TYPE.getKey(passenger.getType()).toString(); +@@ -1094,8 +1102,17 @@ public class ServerLevel extends Level implements WorldGenLevel { + return BuiltInRegistries.ENTITY_TYPE.getKey(passenger.getType()).toString(); }); gameprofilerfiller.incrementCounter("tickPassenger"); + // Paper start - EAR 2 @@ -103,7 +103,7 @@ index c38229f3844328e8e5a0d84e64a0867bafadc5dc..9b321475a9b944f8af58f2e2b2b22c81 gameprofilerfiller.pop(); Iterator iterator = passenger.getPassengers().iterator(); -@@ -1084,6 +1101,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1105,6 +1122,7 @@ public class ServerLevel extends Level implements WorldGenLevel { this.tickPassenger(passenger, entity2); } @@ -112,7 +112,7 @@ index c38229f3844328e8e5a0d84e64a0867bafadc5dc..9b321475a9b944f8af58f2e2b2b22c81 } else { passenger.stopRiding(); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index d83fc656e70612bbfa93f5ef2cc1161103915004..c453a7df75d4486bf0123bc4932c441a707998b0 100644 +index 15625d54c32530eae73d6360ef68ffd1ddf752b0..35cfe934493a7425e415d58834d4016b4ea31e3b 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -384,6 +384,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -148,7 +148,7 @@ index d83fc656e70612bbfa93f5ef2cc1161103915004..c453a7df75d4486bf0123bc4932c441a movement = this.maybeBackOffFromEdge(movement, movementType); Vec3 vec3d1 = this.collide(movement); diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 836f42126eca9bc2c8e41940ecac18a0e0123818..b9db51b07ba3b867d80a48e5106c2b38ea0b72ee 100644 +index f61a4409ebb5ed89e5a5cfe0488498a52faa2346..7caae84b23ba0803458b4497a116e0b8cee26a89 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java @@ -210,6 +210,19 @@ public abstract class Mob extends LivingEntity { @@ -172,7 +172,7 @@ index 836f42126eca9bc2c8e41940ecac18a0e0123818..b9db51b07ba3b867d80a48e5106c2b38 if (this.isPassenger() && this.getVehicle() instanceof Mob) { Mob entityinsentient = (Mob) this.getVehicle(); diff --git a/src/main/java/net/minecraft/world/entity/PathfinderMob.java b/src/main/java/net/minecraft/world/entity/PathfinderMob.java -index 2df5b50be11297941d13ec9d17001f488af11750..3db309e709cd72e3aae184ff2f8b1a7b98f2c7a8 100644 +index 6ae3f5cd42dfd424fc3741957995f47ad5ec8941..bffec7fdf49994f702ea4c378237dac0983d0a19 100644 --- a/src/main/java/net/minecraft/world/entity/PathfinderMob.java +++ b/src/main/java/net/minecraft/world/entity/PathfinderMob.java @@ -19,6 +19,7 @@ public abstract class PathfinderMob extends Mob { @@ -184,10 +184,10 @@ index 2df5b50be11297941d13ec9d17001f488af11750..3db309e709cd72e3aae184ff2f8b1a7b public float getWalkTargetValue(BlockPos pos) { return this.getWalkTargetValue(pos, this.level); diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java -index fa792958b852f70b32f011817aa0b8dd812355a5..5f2d4f63e3371de7bee64c58c6e7b810403134b5 100644 +index 07c1ca01c38d5d7d0a95ad5004b5df9f4a222935..e5995d0db5dcfba59a873ff439601894fdacd556 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java -@@ -32,6 +32,7 @@ public class GoalSelector { +@@ -33,6 +33,7 @@ public class GoalSelector { private final EnumSet disabledFlags = EnumSet.noneOf(Goal.Flag.class); private int tickCount; private int newGoalRate = 3; @@ -195,8 +195,8 @@ index fa792958b852f70b32f011817aa0b8dd812355a5..5f2d4f63e3371de7bee64c58c6e7b810 public GoalSelector(Supplier profiler) { this.profiler = profiler; -@@ -46,6 +47,20 @@ public class GoalSelector { - this.availableGoals.clear(); +@@ -49,6 +50,20 @@ public class GoalSelector { + }); } + // Paper start @@ -252,7 +252,7 @@ index 6efba52c2e5d7811ee329ed22c1c76f75d7ddbe1..26bf383caea68834c654b25653ced901 } } diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java -index f957c0aca36b7228ac3a33ca04c948b1d10642d1..39fc94b1e1555fd6706391223dd2783139b16016 100644 +index bc778aadb2604756b783d4d024e3154576ab3236..214c7947705eda61454b70cbc4bf37bc54dd26e8 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java @@ -225,17 +225,29 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -345,10 +345,10 @@ index 3f8990d15bd6815db0ccb924e621dfcc3220e0e0..70f1916185b79bbb9f033f4ef8119d7b + } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 7ba3e9a2f974cd469d256dbfbdbfcb05b644c1ba..46f8bf8a0f97c83824248c0d39681430807bd0ca 100644 +index 9b3a86710d5ac63afee9293f0c2cb1e443c98020..6f5fa7a2db798419a60206bc714e72b49b6a79e8 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -158,6 +158,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -157,6 +157,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public Map capturedTileEntities = new HashMap<>(); public List captureDrops; public final it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap ticksPerSpawnCategory = new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>(); @@ -362,10 +362,10 @@ index 7ba3e9a2f974cd469d256dbfbdbfcb05b644c1ba..46f8bf8a0f97c83824248c0d39681430 public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot // Paper start diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java -index e4fbd8701fc93ea89efc580d519359f554bf6468..1bcaed2abd1118804a362d6852e4a29d3064aa14 100644 +index 2f5f8e084c30bf654a19582e0b7baa9cde1b99b5..4f7b12d8f213d43f4ef5538b7e05809a1a106cbd 100644 --- a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java -@@ -140,6 +140,10 @@ public class PistonMovingBlockEntity extends BlockEntity { +@@ -143,6 +143,10 @@ public class PistonMovingBlockEntity extends BlockEntity { } entity.setDeltaMovement(e, g, h); diff --git a/patches/unapplied/server/0345-Increase-Light-Queue-Size.patch b/patches/server/0344-Increase-Light-Queue-Size.patch similarity index 89% rename from patches/unapplied/server/0345-Increase-Light-Queue-Size.patch rename to patches/server/0344-Increase-Light-Queue-Size.patch index 7a7ea902da..8857921723 100644 --- a/patches/unapplied/server/0345-Increase-Light-Queue-Size.patch +++ b/patches/server/0344-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/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index eeb794d96ac8cbe36b788d390e638192182a21c8..ba99b3ffef6d5c46c3bb0b0de99a042ae000c196 100644 +index ea1ad3dad6bc9c7603d5dd0bdaec0d4563e90f16..867e7186764057507f6f92b52ea6afc4d08774b4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -780,7 +780,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop list = Lists.newArrayList(); List list1 = Lists.newArrayList(); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 9b321475a9b944f8af58f2e2b2b22c81a8757a2e..1133928654269d3b9b794513b39526fe0accc3c3 100644 +index 6a4759a5ec5802f7203febf157c7d6dcf6dce535..a94c43386b372cdff0b207bebbf8d5b29b5fd022 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -435,7 +435,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -438,7 +438,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { - // Holder holder = worlddimension.typeHolder(); // CraftBukkit - decompile error + // Holder holder = worlddimension.type(); // CraftBukkit - decompile error // Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error -- super(iworlddataserver, resourcekey, worlddimension.typeHolder(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig))); // Paper -+ super(iworlddataserver, resourcekey, worlddimension.typeHolder(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig)), executor); // Paper - Async-Anti-Xray - Pass executor +- super(iworlddataserver, resourcekey, worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig))); // Paper ++ super(iworlddataserver, resourcekey, worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig)), executor); // Paper - Async-Anti-Xray - Pass executor this.pvpMode = minecraftserver.isPvpAllowed(); this.convertable = convertable_conversionsession; this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile()); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 3fadf6b46cc722ad81cf810c0761cf717e9f9b78..af00442931f9f6cf878bd61137c2f29fc7c8d0b1 100644 +index 514c045883060e4a22f748176091d3b236c2a7fd..aee5144bdc5bd9f7b07ce3b72331bcfd42663ec9 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -49,7 +49,7 @@ import org.bukkit.event.player.PlayerInteractEvent; @@ -1114,10 +1114,10 @@ index 3fadf6b46cc722ad81cf810c0761cf717e9f9b78..af00442931f9f6cf878bd61137c2f29f public void destroyAndAck(BlockPos pos, int sequence, String reason) { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 46f8bf8a0f97c83824248c0d39681430807bd0ca..7e03e88dc7196d757ffcc6cdc2ca15c96abcc2a0 100644 +index 6f5fa7a2db798419a60206bc714e72b49b6a79e8..63036914ff4f7b52bb1880cc4514ed4da11ff163 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -173,6 +173,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -172,6 +172,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } // Paper end @@ -1125,7 +1125,7 @@ index 46f8bf8a0f97c83824248c0d39681430807bd0ca..7e03e88dc7196d757ffcc6cdc2ca15c9 public final co.aikar.timings.WorldTimingsHandler timings; // Paper public static BlockPos lastPhysicsProblem; // Spigot private org.spigotmc.TickLimiter entityLimiter; -@@ -191,7 +192,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -190,7 +191,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public abstract ResourceKey getTypeKey(); @@ -1134,7 +1134,7 @@ index 46f8bf8a0f97c83824248c0d39681430807bd0ca..7e03e88dc7196d757ffcc6cdc2ca15c9 this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper this.generator = gen; -@@ -275,6 +276,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -274,6 +275,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { this.keepSpawnInMemory = this.paperConfig().spawn.keepSpawnLoaded; // Paper this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime); this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); @@ -1142,7 +1142,7 @@ index 46f8bf8a0f97c83824248c0d39681430807bd0ca..7e03e88dc7196d757ffcc6cdc2ca15c9 } // Paper start -@@ -455,6 +457,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -454,6 +456,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // CraftBukkit end BlockState iblockdata1 = chunk.setBlockState(pos, state, (flags & 64) != 0, (flags & 1024) == 0); // CraftBukkit custom NO_PLACE flag @@ -1151,7 +1151,7 @@ index 46f8bf8a0f97c83824248c0d39681430807bd0ca..7e03e88dc7196d757ffcc6cdc2ca15c9 if (iblockdata1 == null) { // CraftBukkit start - remove blockstate if failed (or the same) diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java -index 41e61e6c128f22224665af3f07cd11d69a43062b..54e57791f6220325d05939decae46dc4d91d1906 100644 +index 508c2fff8d8e0c6f37b6c4e3b72ba772c2ab2ee5..e254b2d04e4fc1dc76c26f61ea38aeb27755143f 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java @@ -140,17 +140,19 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom @@ -1178,15 +1178,15 @@ index 41e61e6c128f22224665af3f07cd11d69a43062b..54e57791f6220325d05939decae46dc4 } 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 3a613d3fb6240a504724ba42b9aadaa0881b3ac1..afc443f36b26e9493fa0a530891b2edd7f3f6703 100644 +index ef0be4f5ce7f07e38dea9eb356e049bd121c82dd..7b28537fda4187036b15ecc04f68ac1c9bf5f67f 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -93,7 +93,7 @@ public class LevelChunk extends ChunkAccess { } public LevelChunk(Level world, ChunkPos pos, UpgradeData upgradeData, LevelChunkTicks blockTickScheduler, LevelChunkTicks fluidTickScheduler, long inhabitedTime, @Nullable LevelChunkSection[] sectionArrayInitializer, @Nullable LevelChunk.PostLoadProcessor entityLoader, @Nullable BlendingData blendingData) { -- super(pos, upgradeData, world, world.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), inhabitedTime, sectionArrayInitializer, blendingData); -+ super(pos, upgradeData, world, net.minecraft.server.MinecraftServer.getServer().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), inhabitedTime, sectionArrayInitializer, blendingData); // Paper - Anti-Xray - The world isn't ready yet, use server singleton for registry +- super(pos, upgradeData, world, world.registryAccess().registryOrThrow(Registries.BIOME)), inhabitedTime, sectionArrayInitializer, blendingData); ++ super(pos, upgradeData, world, net.minecraft.server.MinecraftServer.getServer().registryAccess().registryOrThrow(Registries.BIOME), inhabitedTime, sectionArrayInitializer, blendingData); // Paper - Anti-Xray - The world isn't ready yet, use server singleton for registry // Paper start - rewrite light engine this.setBlockNibbles(ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(world)); this.setSkyNibbles(ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(world)); @@ -1229,7 +1229,7 @@ index ae37e97e52557b48f129cc02eeea395378a48444..785fbcf9bafcdec1c5be213de3d85126 public int getSerializedSize() { diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java -index 33eecdac9d844af2f70aad97c4788b138dab8896..8f5114b6d64461866140b6d2ced3f838a1228851 100644 +index e310b018004c8d7edbfec877f06671d17f7e47fd..510bbdc5b79736fca2f116a980e71f85b65cf9bc 100644 --- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java +++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java @@ -29,6 +29,7 @@ public class PalettedContainer implements PaletteResize, PalettedContainer @@ -1457,10 +1457,10 @@ index 9a2bf744abd8916d492e901be889223591bac3fd..a27fce0f1af9776a713bf1b5277869ed int getSerializedSize(); 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 648719a58e62105064ac6b51c6f5e7867ff0b7a9..89c367f542aee35ba9f596d678bfeb5412c1697d 100644 +index b8f5ad1130b125f71a1feb1083120fb700b9bea1..f6d1eac46c619831e146c62a9c08d3305c63c7bc 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 -@@ -69,7 +69,7 @@ import org.slf4j.Logger; +@@ -71,7 +71,7 @@ import org.slf4j.Logger; public class ChunkSerializer { @@ -1469,7 +1469,7 @@ index 648719a58e62105064ac6b51c6f5e7867ff0b7a9..89c367f542aee35ba9f596d678bfeb54 private static final Logger LOGGER = LogUtils.getLogger(); private static final String TAG_UPGRADE_DATA = "UpgradeData"; private static final String BLOCK_TICKS_TAG = "block_ticks"; -@@ -164,16 +164,20 @@ public class ChunkSerializer { +@@ -166,16 +166,20 @@ public class ChunkSerializer { if (k >= 0 && k < achunksection.length) { Logger logger; PalettedContainer datapaletteblock; @@ -1492,7 +1492,7 @@ index 648719a58e62105064ac6b51c6f5e7867ff0b7a9..89c367f542aee35ba9f596d678bfeb54 } PalettedContainer object; // CraftBukkit - read/write -@@ -186,7 +190,7 @@ public class ChunkSerializer { +@@ -188,7 +192,7 @@ public class ChunkSerializer { Objects.requireNonNull(logger); object = ((DataResult>>) dataresult).getOrThrow(false, logger::error); // CraftBukkit - decompile error } else { @@ -1501,7 +1501,7 @@ index 648719a58e62105064ac6b51c6f5e7867ff0b7a9..89c367f542aee35ba9f596d678bfeb54 } LevelChunkSection chunksection = new LevelChunkSection(b0, datapaletteblock, (PalettedContainer) object); // CraftBukkit - read/write -@@ -440,7 +444,7 @@ public class ChunkSerializer { +@@ -446,7 +450,7 @@ public class ChunkSerializer { // CraftBukkit start - read/write private static Codec>> makeBiomeCodecRW(Registry iregistry) { @@ -1511,10 +1511,10 @@ index 648719a58e62105064ac6b51c6f5e7867ff0b7a9..89c367f542aee35ba9f596d678bfeb54 // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index 1827fdc551095ab411d6b43b94106273f53386c8..7f23c69e7d6232190a2c75cbc79e1ea56971e8fb 100644 +index 6772b7e6ebded67f656dfb1af99e4d516aca67c5..1ac0778fba70ba9f09487c76e086b5a873c6c12a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -@@ -54,7 +54,7 @@ public class CraftChunk implements Chunk { +@@ -55,7 +55,7 @@ public class CraftChunk implements Chunk { private final ServerLevel worldServer; private final int x; private final int z; @@ -1524,23 +1524,23 @@ index 1827fdc551095ab411d6b43b94106273f53386c8..7f23c69e7d6232190a2c75cbc79e1ea5 public CraftChunk(net.minecraft.world.level.chunk.LevelChunk chunk) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c8979c8f51cf07824fc2780c5daccc30922bbd80..bb930f03af4c649eba0dbde356ad098023070832 100644 +index 9b5d3dbf302a44d6ed774c8397117e7a6231b2f9..b8e2b34973ea980e527a2064d10b21a42ad7f376 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2235,7 +2235,7 @@ public final class CraftServer implements Server { +@@ -2259,7 +2259,7 @@ public final class CraftServer implements Server { public ChunkGenerator.ChunkData createChunkData(World world) { Validate.notNull(world, "World cannot be null"); ServerLevel handle = ((CraftWorld) world).getHandle(); -- return new OldCraftChunkData(world.getMinHeight(), world.getMaxHeight(), handle.registryAccess().registryOrThrow(net.minecraft.core.Registry.BIOME_REGISTRY)); -+ return new OldCraftChunkData(world.getMinHeight(), world.getMaxHeight(), handle.registryAccess().registryOrThrow(net.minecraft.core.Registry.BIOME_REGISTRY), world); // Paper - Anti-Xray - Add parameters +- return new OldCraftChunkData(world.getMinHeight(), world.getMaxHeight(), handle.registryAccess().registryOrThrow(Registries.BIOME)); ++ return new OldCraftChunkData(world.getMinHeight(), world.getMaxHeight(), handle.registryAccess().registryOrThrow(Registries.BIOME), world); // Paper - Anti-Xray - Add parameters } @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 7ff5943949aea15d7b8a48f01ce8e8cb98c78532..c3703933598ee96d856a18dcc0932061959c9791 100644 +index cef2d2494268c968dc8d26f9d5d0ee68a4ad465c..3f7b277cd931a60d348802114ee2a1af02c479e0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -410,11 +410,16 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -409,11 +409,16 @@ public class CraftWorld extends CraftRegionAccessor implements World { List playersInRange = playerChunk.playerProvider.getPlayers(playerChunk.getPos(), false); if (playersInRange.isEmpty()) return true; // Paper - rewrite player chunk loader diff --git a/patches/unapplied/server/0347-Implement-alternative-item-despawn-rate.patch b/patches/server/0346-Implement-alternative-item-despawn-rate.patch similarity index 87% rename from patches/unapplied/server/0347-Implement-alternative-item-despawn-rate.patch rename to patches/server/0346-Implement-alternative-item-despawn-rate.patch index db8d53f699..ba008ba445 100644 --- a/patches/unapplied/server/0347-Implement-alternative-item-despawn-rate.patch +++ b/patches/server/0346-Implement-alternative-item-despawn-rate.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Implement alternative item-despawn-rate Co-authored-by: Noah van der Aa diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index ebcf58fe51d1fd0cb8a0f5a84cdd349f29c9442e..7e293167e73238f42fc213ee29d89aa775cf9e60 100644 +index 477c9358a09067ace4d0fe3f519148feb4c7a335..1dc7f3963069313de6b969c44bdd21272483f7be 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -54,6 +54,7 @@ public class ItemEntity extends Entity { +@@ -52,6 +52,7 @@ public class ItemEntity extends Entity { public final float bobOffs; private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit public boolean canMobPickup = true; // Paper @@ -17,7 +17,7 @@ index ebcf58fe51d1fd0cb8a0f5a84cdd349f29c9442e..7e293167e73238f42fc213ee29d89aa7 public ItemEntity(EntityType type, Level world) { super(type, world); -@@ -182,7 +183,7 @@ public class ItemEntity extends Entity { +@@ -180,7 +181,7 @@ public class ItemEntity extends Entity { } } @@ -26,7 +26,7 @@ index ebcf58fe51d1fd0cb8a0f5a84cdd349f29c9442e..7e293167e73238f42fc213ee29d89aa7 // CraftBukkit start - fire ItemDespawnEvent if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { this.age = 0; -@@ -206,7 +207,7 @@ public class ItemEntity extends Entity { +@@ -204,7 +205,7 @@ public class ItemEntity extends Entity { this.lastTick = MinecraftServer.currentTick; // CraftBukkit end @@ -35,7 +35,7 @@ index ebcf58fe51d1fd0cb8a0f5a84cdd349f29c9442e..7e293167e73238f42fc213ee29d89aa7 // CraftBukkit start - fire ItemDespawnEvent if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { this.age = 0; -@@ -257,7 +258,7 @@ public class ItemEntity extends Entity { +@@ -255,7 +256,7 @@ public class ItemEntity extends Entity { private boolean isMergable() { ItemStack itemstack = this.getItem(); @@ -44,7 +44,7 @@ index ebcf58fe51d1fd0cb8a0f5a84cdd349f29c9442e..7e293167e73238f42fc213ee29d89aa7 } private void tryToMerge(ItemEntity other) { -@@ -501,6 +502,7 @@ public class ItemEntity extends Entity { +@@ -499,6 +500,7 @@ public class ItemEntity extends Entity { com.google.common.base.Preconditions.checkArgument(!stack.isEmpty(), "Cannot drop air"); // CraftBukkit this.getEntityData().set(ItemEntity.DATA_ITEM, stack); this.getEntityData().markDirty(ItemEntity.DATA_ITEM); // CraftBukkit - SPIGOT-4591, must mark dirty @@ -52,7 +52,7 @@ index ebcf58fe51d1fd0cb8a0f5a84cdd349f29c9442e..7e293167e73238f42fc213ee29d89aa7 } @Override -@@ -564,7 +566,7 @@ public class ItemEntity extends Entity { +@@ -562,7 +564,7 @@ public class ItemEntity extends Entity { public void makeFakeItem() { this.setNeverPickUp(); diff --git a/patches/unapplied/server/0348-Tracking-Range-Improvements.patch b/patches/server/0347-Tracking-Range-Improvements.patch similarity index 95% rename from patches/unapplied/server/0348-Tracking-Range-Improvements.patch rename to patches/server/0347-Tracking-Range-Improvements.patch index 5c60cc1077..593a29348e 100644 --- a/patches/unapplied/server/0348-Tracking-Range-Improvements.patch +++ b/patches/server/0347-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 63d480e7c50bed3d5b00b09f789522ff9ea18776..1fe0e34df2f837515acfba9bbddeb3717d41fe80 100644 +index f264c550917ca1337c27863db23003e4fda4d0b9..5ecd6a2027f6c0f11d10ca63cd63f0663f05347c 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1285,6 +1285,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1322,6 +1322,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); int j = entity.getType().clientTrackingRange() * 16; diff --git a/patches/unapplied/server/0349-Fix-items-vanishing-through-end-portal.patch b/patches/server/0348-Fix-items-vanishing-through-end-portal.patch similarity index 89% rename from patches/unapplied/server/0349-Fix-items-vanishing-through-end-portal.patch rename to patches/server/0348-Fix-items-vanishing-through-end-portal.patch index cb858bcbf0..6f789c046e 100644 --- a/patches/unapplied/server/0349-Fix-items-vanishing-through-end-portal.patch +++ b/patches/server/0348-Fix-items-vanishing-through-end-portal.patch @@ -13,10 +13,10 @@ Quickly loading the exact world spawn chunk before searching the heightmap resolves the issue without having to load all spawn chunks. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index c453a7df75d4486bf0123bc4932c441a707998b0..e707f3afe4cded677ab8d712e38063de2b5be90d 100644 +index 35cfe934493a7425e415d58834d4016b4ea31e3b..4709b3577aa83607da97fdbcd8c2b7d662fb0118 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3175,6 +3175,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3201,6 +3201,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (flag1) { blockposition1 = ServerLevel.END_SPAWN_POINT; } else { diff --git a/patches/unapplied/server/0350-implement-optional-per-player-mob-spawns.patch b/patches/server/0349-implement-optional-per-player-mob-spawns.patch similarity index 94% rename from patches/unapplied/server/0350-implement-optional-per-player-mob-spawns.patch rename to patches/server/0349-implement-optional-per-player-mob-spawns.patch index 7e992d4477..5bfea8aa86 100644 --- a/patches/unapplied/server/0350-implement-optional-per-player-mob-spawns.patch +++ b/patches/server/0349-implement-optional-per-player-mob-spawns.patch @@ -252,10 +252,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 1fe0e34df2f837515acfba9bbddeb3717d41fe80..6250615dbdb58e8d4e3937b2152b41751122dd56 100644 +index 5ecd6a2027f6c0f11d10ca63cd63f0663f05347c..543b42a6f527cb93611781867b5d7c2c63fc6b54 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -145,6 +145,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -149,6 +149,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider private final Long2LongMap chunkSaveCooldowns; private final Queue unloadQueue; int viewDistance; @@ -263,7 +263,7 @@ index 1fe0e34df2f837515acfba9bbddeb3717d41fe80..6250615dbdb58e8d4e3937b2152b4175 // Paper - rewrite chunk system -@@ -157,11 +158,21 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -161,11 +162,21 @@ 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 @@ -285,7 +285,7 @@ index 1fe0e34df2f837515acfba9bbddeb3717d41fe80..6250615dbdb58e8d4e3937b2152b4175 } void updateMaps(ServerPlayer player) { -@@ -169,6 +180,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -173,6 +184,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider int chunkZ = MCUtil.getChunkCoordinate(player.getZ()); // Note: players need to be explicitly added to distance maps before they can be updated this.playerChunkManager.updatePlayer(player); // Paper - replace chunk loader @@ -297,7 +297,7 @@ index 1fe0e34df2f837515acfba9bbddeb3717d41fe80..6250615dbdb58e8d4e3937b2152b4175 } // Paper end // Paper start -@@ -250,6 +266,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -258,6 +274,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.dataRegionManager = new io.papermc.paper.chunk.SingleThreadChunkRegionManager(this.level, 2, (1.0 / 3.0), 1, 6, "Data", DataRegionData::new, DataRegionSectionData::new); this.regionManagers.add(this.dataRegionManager); // Paper end @@ -305,7 +305,7 @@ index 1fe0e34df2f837515acfba9bbddeb3717d41fe80..6250615dbdb58e8d4e3937b2152b4175 } protected ChunkGenerator generator() { -@@ -271,6 +288,31 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -283,6 +300,31 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider }); } @@ -338,10 +338,10 @@ index 1fe0e34df2f837515acfba9bbddeb3717d41fe80..6250615dbdb58e8d4e3937b2152b4175 double d0 = (double) SectionPos.sectionToBlockCoord(pos.x, 8); double d1 = (double) SectionPos.sectionToBlockCoord(pos.z, 8); diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 302667d7b6dca8528e7107255feaeb6d6f837cf3..46dfb4df27226263c7adacc13d0c99c422f90ac6 100644 +index c021733342c09adb04ce3f675209543f84ac4bda..d137aa95f670aab516e9e08272f33b2125b282c6 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -692,7 +692,18 @@ public class ServerChunkCache extends ChunkSource { +@@ -693,7 +693,18 @@ public class ServerChunkCache extends ChunkSource { gameprofilerfiller.push("naturalSpawnCount"); this.level.timings.countNaturalMobs.startTiming(); // Paper - timings int l = this.distanceManager.getNaturalSpawnChunkCount(); @@ -362,10 +362,10 @@ index 302667d7b6dca8528e7107255feaeb6d6f837cf3..46dfb4df27226263c7adacc13d0c99c4 this.lastSpawnState = spawnercreature_d; diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index fc05217186d0af6cb758a189f4287ac812625cd4..ef03173f9399c6047985e4ed85ce6ef480d75cdf 100644 +index ecb81ad7ab281eaad7d5b3f9dc30082595824408..33fee57bcd3d82bed27f5e42e2e0f4b0299a1790 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -235,6 +235,11 @@ public class ServerPlayer extends Player { +@@ -240,6 +240,11 @@ public class ServerPlayer extends Player { public boolean queueHealthUpdatePacket = false; public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket; // Paper end @@ -377,7 +377,7 @@ index fc05217186d0af6cb758a189f4287ac812625cd4..ef03173f9399c6047985e4ed85ce6ef4 // CraftBukkit start public String displayName; -@@ -326,6 +331,7 @@ public class ServerPlayer extends Player { +@@ -331,6 +336,7 @@ public class ServerPlayer extends Player { this.adventure$displayName = net.kyori.adventure.text.Component.text(this.getScoreboardName()); // Paper this.bukkitPickUpLoot = true; this.maxHealthCache = this.getMaxHealth(); @@ -386,10 +386,10 @@ index fc05217186d0af6cb758a189f4287ac812625cd4..ef03173f9399c6047985e4ed85ce6ef4 // Yes, this doesn't match Vanilla, but it's the best we can do for now. diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index 2d39b7204a5d3967e2fbbd288eb5ff6bf4e324ce..b031dece541d2765f9488a5ffcb0d339c38ccc9e 100644 +index 29dac07176eb99517c9cddbe012636908c3603fe..bf3fb416d36a19958033cdbf5cc313556fa0201b 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -@@ -69,6 +69,12 @@ public final class NaturalSpawner { +@@ -70,6 +70,12 @@ public final class NaturalSpawner { private NaturalSpawner() {} public static NaturalSpawner.SpawnState createState(int spawningChunkCount, Iterable entities, NaturalSpawner.ChunkGetter chunkSource, LocalMobCapCalculator densityCapper) { @@ -402,7 +402,7 @@ index 2d39b7204a5d3967e2fbbd288eb5ff6bf4e324ce..b031dece541d2765f9488a5ffcb0d339 PotentialCalculator spawnercreatureprobabilities = new PotentialCalculator(); Object2IntOpenHashMap object2intopenhashmap = new Object2IntOpenHashMap(); Iterator iterator = entities.iterator(); -@@ -103,11 +109,16 @@ public final class NaturalSpawner { +@@ -104,11 +110,16 @@ public final class NaturalSpawner { spawnercreatureprobabilities.addCharge(entity.blockPosition(), biomesettingsmobs_b.getCharge()); } @@ -420,7 +420,7 @@ index 2d39b7204a5d3967e2fbbd288eb5ff6bf4e324ce..b031dece541d2765f9488a5ffcb0d339 }); } } -@@ -142,13 +153,37 @@ public final class NaturalSpawner { +@@ -143,13 +154,37 @@ public final class NaturalSpawner { continue; } @@ -460,7 +460,7 @@ index 2d39b7204a5d3967e2fbbd288eb5ff6bf4e324ce..b031dece541d2765f9488a5ffcb0d339 } } -@@ -157,11 +192,17 @@ public final class NaturalSpawner { +@@ -158,11 +193,17 @@ public final class NaturalSpawner { } public static void spawnCategoryForChunk(MobCategory group, ServerLevel world, LevelChunk chunk, NaturalSpawner.SpawnPredicate checker, NaturalSpawner.AfterSpawnCallback runner) { @@ -479,7 +479,7 @@ index 2d39b7204a5d3967e2fbbd288eb5ff6bf4e324ce..b031dece541d2765f9488a5ffcb0d339 } @VisibleForDebug -@@ -172,15 +213,21 @@ public final class NaturalSpawner { +@@ -173,15 +214,21 @@ public final class NaturalSpawner { }); } @@ -502,7 +502,7 @@ index 2d39b7204a5d3967e2fbbd288eb5ff6bf4e324ce..b031dece541d2765f9488a5ffcb0d339 int k = 0; while (k < 3) { -@@ -222,14 +269,14 @@ public final class NaturalSpawner { +@@ -223,14 +270,14 @@ public final class NaturalSpawner { // Paper start Boolean doSpawning = isValidSpawnPostitionForType(world, group, structuremanager, chunkgenerator, biomesettingsmobs_c, blockposition_mutableblockposition, d2); if (doSpawning == null) { @@ -519,7 +519,7 @@ index 2d39b7204a5d3967e2fbbd288eb5ff6bf4e324ce..b031dece541d2765f9488a5ffcb0d339 } entityinsentient.moveTo(d0, (double) i, d1, world.random.nextFloat() * 360.0F, 0.0F); -@@ -242,10 +289,15 @@ public final class NaturalSpawner { +@@ -243,10 +290,15 @@ public final class NaturalSpawner { ++j; ++k1; runner.run(entityinsentient, chunk); @@ -537,7 +537,7 @@ index 2d39b7204a5d3967e2fbbd288eb5ff6bf4e324ce..b031dece541d2765f9488a5ffcb0d339 } if (entityinsentient.isMaxGroupSizeReached(k1)) { -@@ -267,6 +319,7 @@ public final class NaturalSpawner { +@@ -268,6 +320,7 @@ public final class NaturalSpawner { } } @@ -545,7 +545,7 @@ index 2d39b7204a5d3967e2fbbd288eb5ff6bf4e324ce..b031dece541d2765f9488a5ffcb0d339 } private static boolean isRightDistanceToPlayerAndSpawnPoint(ServerLevel world, ChunkAccess chunk, BlockPos.MutableBlockPos pos, double squaredDistance) { -@@ -552,7 +605,7 @@ public final class NaturalSpawner { +@@ -558,7 +611,7 @@ public final class NaturalSpawner { MobCategory enumcreaturetype = entitytypes.getCategory(); this.mobCategoryCounts.addTo(enumcreaturetype, 1); @@ -554,7 +554,7 @@ index 2d39b7204a5d3967e2fbbd288eb5ff6bf4e324ce..b031dece541d2765f9488a5ffcb0d339 } public int getSpawnableChunkCount() { -@@ -568,6 +621,7 @@ public final class NaturalSpawner { +@@ -574,6 +627,7 @@ public final class NaturalSpawner { int i = limit * this.spawnableChunkCount / NaturalSpawner.MAGIC_NUMBER; // CraftBukkit end diff --git a/patches/unapplied/server/0351-Bees-get-gravity-in-void.-Fixes-MC-167279.patch b/patches/server/0350-Bees-get-gravity-in-void.-Fixes-MC-167279.patch similarity index 94% rename from patches/unapplied/server/0351-Bees-get-gravity-in-void.-Fixes-MC-167279.patch rename to patches/server/0350-Bees-get-gravity-in-void.-Fixes-MC-167279.patch index a662ea4a03..9bff6d5b05 100644 --- a/patches/unapplied/server/0351-Bees-get-gravity-in-void.-Fixes-MC-167279.patch +++ b/patches/server/0350-Bees-get-gravity-in-void.-Fixes-MC-167279.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Bees get gravity in void. Fixes MC-167279 diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java -index c5069740e922dc6028ba98f2fe9edac216780a19..6efa135bb149e1dbe05d1b8c4af82bd38b4aa37c 100644 +index aea3872c89493f68d31186877a1ea981a0c0df6d..f3ce802bdb2eb7a5d570716bb9fd314d011c2617 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Bee.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java @@ -143,7 +143,22 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { diff --git a/patches/unapplied/server/0352-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/patches/server/0351-Optimise-getChunkAt-calls-for-loaded-chunks.patch similarity index 92% rename from patches/unapplied/server/0352-Optimise-getChunkAt-calls-for-loaded-chunks.patch rename to patches/server/0351-Optimise-getChunkAt-calls-for-loaded-chunks.patch index 691681e731..8bd19e91e1 100644 --- a/patches/unapplied/server/0352-Optimise-getChunkAt-calls-for-loaded-chunks.patch +++ b/patches/server/0351-Optimise-getChunkAt-calls-for-loaded-chunks.patch @@ -7,10 +7,10 @@ bypass the need to get a player chunk, then get the either, then unwrap it... diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 46dfb4df27226263c7adacc13d0c99c422f90ac6..78c009d0345fdcfc1a0ec719f3b25028524a284d 100644 +index d137aa95f670aab516e9e08272f33b2125b282c6..f838a921a08981bac0d0c0a68e334ba06d11cb18 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -420,6 +420,12 @@ public class ServerChunkCache extends ChunkSource { +@@ -421,6 +421,12 @@ public class ServerChunkCache extends ChunkSource { return this.getChunk(x, z, leastStatus, create); }, this.mainThreadProcessor).join(); } else { @@ -23,7 +23,7 @@ index 46dfb4df27226263c7adacc13d0c99c422f90ac6..78c009d0345fdcfc1a0ec719f3b25028 ProfilerFiller gameprofilerfiller = this.level.getProfiler(); gameprofilerfiller.incrementCounter("getChunk"); -@@ -463,39 +469,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -464,39 +470,7 @@ public class ServerChunkCache extends ChunkSource { if (!io.papermc.paper.util.TickThread.isTickThread()) { // Paper - rewrite chunk system return null; } else { diff --git a/patches/unapplied/server/0353-Add-debug-for-sync-chunk-loads.patch b/patches/server/0352-Add-debug-for-sync-chunk-loads.patch similarity index 97% rename from patches/unapplied/server/0353-Add-debug-for-sync-chunk-loads.patch rename to patches/server/0352-Add-debug-for-sync-chunk-loads.patch index 258cd8f0ea..039de5d5a0 100644 --- a/patches/unapplied/server/0353-Add-debug-for-sync-chunk-loads.patch +++ b/patches/server/0352-Add-debug-for-sync-chunk-loads.patch @@ -308,10 +308,10 @@ index 0000000000000000000000000000000000000000..a73e35e7c71c1337c2846010b3ccd687 + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 78c009d0345fdcfc1a0ec719f3b25028524a284d..f0ab91b93dabd0c77a8537e40c8b504200b261fd 100644 +index f838a921a08981bac0d0c0a68e334ba06d11cb18..665e088cb0b73f6a0c62f29c56da462bab7c927e 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -444,6 +444,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -445,6 +445,7 @@ public class ServerChunkCache extends ChunkSource { // Paper start - async chunk io/loading io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.pushChunkWait(this.level, x1, z1); // Paper - rewrite chunk system // Paper end @@ -320,10 +320,10 @@ index 78c009d0345fdcfc1a0ec719f3b25028524a284d..f0ab91b93dabd0c77a8537e40c8b5042 chunkproviderserver_b.managedBlock(completablefuture::isDone); io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.popChunkWait(); // Paper - async chunk debug // Paper - rewrite chunk system diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 1133928654269d3b9b794513b39526fe0accc3c3..d30885b0b85d78a312c142460e5d342fdbeada79 100644 +index a94c43386b372cdff0b207bebbf8d5b29b5fd022..a2bba2678a56c5ea197e8b18c4a96e0833121fbe 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -421,6 +421,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -424,6 +424,12 @@ public class ServerLevel extends Level implements WorldGenLevel { return this.entityLookup; } // Paper end - rewrite chunk system diff --git a/patches/unapplied/server/0354-Remove-garbage-Java-version-check.patch b/patches/server/0353-Remove-garbage-Java-version-check.patch similarity index 91% rename from patches/unapplied/server/0354-Remove-garbage-Java-version-check.patch rename to patches/server/0353-Remove-garbage-Java-version-check.patch index f2867bfa7d..7c9466a2ac 100644 --- a/patches/unapplied/server/0354-Remove-garbage-Java-version-check.patch +++ b/patches/server/0353-Remove-garbage-Java-version-check.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove garbage Java version check diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index d7d2618bed5188c6e6cc4db6669f3842d0bfff0c..08e74f41516a545a2371a7418d995ab288831834 100644 +index d4f6d7fee1012adaef516f283ef8d12b5804af46..0e59dd7c30159856a72be04c56a7031ace5dd738 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -196,10 +196,6 @@ public class Main { diff --git a/patches/unapplied/server/0355-Add-ThrownEggHatchEvent.patch b/patches/server/0354-Add-ThrownEggHatchEvent.patch similarity index 94% rename from patches/unapplied/server/0355-Add-ThrownEggHatchEvent.patch rename to patches/server/0354-Add-ThrownEggHatchEvent.patch index c026427598..2391d75540 100644 --- a/patches/unapplied/server/0355-Add-ThrownEggHatchEvent.patch +++ b/patches/server/0354-Add-ThrownEggHatchEvent.patch @@ -7,7 +7,7 @@ Adds a new event similar to PlayerEggThrowEvent, but without the Player requirem (dispensers can throw eggs to hatch them, too). diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java -index 4e083dcd07e5975c7379035e72ac2f3469e919fd..77941e3981e49cf5662b3e3c86a9c419080b17c8 100644 +index 9ec976ab52c1ebe717317f99f1ccf3062bb66278..bdddec9510d84c8940b6116ede389bcac3680ab1 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java @@ -77,6 +77,14 @@ public class ThrownEgg extends ThrowableItemProjectile { diff --git a/patches/unapplied/server/0356-Entity-Jump-API.patch b/patches/server/0355-Entity-Jump-API.patch similarity index 92% rename from patches/unapplied/server/0356-Entity-Jump-API.patch rename to patches/server/0355-Entity-Jump-API.patch index b1f8ebb90a..ed8d4a7a81 100644 --- a/patches/unapplied/server/0356-Entity-Jump-API.patch +++ b/patches/server/0355-Entity-Jump-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity Jump API diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 9e76df6ac643eb7696a11c0c3bfc45a82e0e0ce4..fc498652272cb4990668b3ac05d5aa1f0b627a67 100644 +index 840fb46729b940b6d4d7adb4d0545b5a8508e11b..37b1354edb2974e82eaa5c859f58c588df70c575 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3243,8 +3243,10 @@ public abstract class LivingEntity extends Entity { +@@ -3264,8 +3264,10 @@ public abstract class LivingEntity extends Entity { } else if (this.isInLava() && (!this.onGround || d7 > d8)) { this.jumpInLiquid(FluidTags.LAVA); } else if ((this.onGround || flag && d7 <= d8) && this.noJumpDelay == 0) { @@ -20,10 +20,10 @@ index 9e76df6ac643eb7696a11c0c3bfc45a82e0e0ce4..fc498652272cb4990668b3ac05d5aa1f } else { this.noJumpDelay = 0; diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java -index dbcf70dacf99b61c0147b43edd6a374b31809733..9c07e3f5554b3b9cf2a2c4d9239a72342567d7f1 100644 +index e98849c103e7409f70e73a30c6713c644155b284..2db5d8a937c841718e7b568c215109c39775d82c 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Panda.java +++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java -@@ -515,7 +515,9 @@ public class Panda extends Animal { +@@ -521,7 +521,9 @@ public class Panda extends Animal { Panda entitypanda = (Panda) iterator.next(); if (!entitypanda.isBaby() && entitypanda.onGround && !entitypanda.isInWater() && entitypanda.canPerformAction()) { diff --git a/patches/unapplied/server/0357-Add-option-to-nerf-pigmen-from-nether-portals.patch b/patches/server/0356-Add-option-to-nerf-pigmen-from-nether-portals.patch similarity index 86% rename from patches/unapplied/server/0357-Add-option-to-nerf-pigmen-from-nether-portals.patch rename to patches/server/0356-Add-option-to-nerf-pigmen-from-nether-portals.patch index 33a214747c..d6bfee1548 100644 --- a/patches/unapplied/server/0357-Add-option-to-nerf-pigmen-from-nether-portals.patch +++ b/patches/server/0356-Add-option-to-nerf-pigmen-from-nether-portals.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index e707f3afe4cded677ab8d712e38063de2b5be90d..e3075bbf737905c3a61ce900fc525d4ed9484b79 100644 +index 4709b3577aa83607da97fdbcd8c2b7d662fb0118..f0c7c31c2646c2b26a3f98e5b5c822712696d960 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -386,6 +386,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -16,7 +16,7 @@ index e707f3afe4cded677ab8d712e38063de2b5be90d..e3075bbf737905c3a61ce900fc525d4e protected int numCollisions = 0; // Paper public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one @javax.annotation.Nullable -@@ -2044,6 +2045,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2059,6 +2060,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (spawnedViaMobSpawner) { nbt.putBoolean("Paper.FromMobSpawner", true); } @@ -26,7 +26,7 @@ index e707f3afe4cded677ab8d712e38063de2b5be90d..e3075bbf737905c3a61ce900fc525d4e // Paper end return nbt; } catch (Throwable throwable) { -@@ -2185,6 +2189,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2200,6 +2204,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status @@ -35,10 +35,10 @@ index e707f3afe4cded677ab8d712e38063de2b5be90d..e3075bbf737905c3a61ce900fc525d4e String spawnReasonName = nbt.getString("Paper.SpawnReason"); try { diff --git a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java -index 33078e2199c8eb0ce012a72eeb4421df12817b84..8c97cae63b4b373f1d67e797b9fe1064b5205da5 100644 +index eb444932203620f6681002a1346ccf45866e6a4e..a423aff5fde3f42c8b8aecb74fe0022c4d2dbe81 100644 --- a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java +++ b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java -@@ -66,6 +66,8 @@ public class NetherPortalBlock extends Block { +@@ -63,6 +63,8 @@ public class NetherPortalBlock extends Block { if (entity != null) { entity.setPortalCooldown(); diff --git a/patches/unapplied/server/0358-Make-the-GUI-graph-fancier.patch b/patches/server/0357-Make-the-GUI-graph-fancier.patch similarity index 100% rename from patches/unapplied/server/0358-Make-the-GUI-graph-fancier.patch rename to patches/server/0357-Make-the-GUI-graph-fancier.patch diff --git a/patches/unapplied/server/0359-add-hand-to-BlockMultiPlaceEvent.patch b/patches/server/0358-add-hand-to-BlockMultiPlaceEvent.patch similarity index 93% rename from patches/unapplied/server/0359-add-hand-to-BlockMultiPlaceEvent.patch rename to patches/server/0358-add-hand-to-BlockMultiPlaceEvent.patch index 7f64696d43..c5a7825249 100644 --- a/patches/unapplied/server/0359-add-hand-to-BlockMultiPlaceEvent.patch +++ b/patches/server/0358-add-hand-to-BlockMultiPlaceEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] add hand to BlockMultiPlaceEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index b86ba1b6e49128f50d3940708ec3b59580cbfde8..118d7068700bbd4aeaf766ee8d3984b474c6bf9a 100644 +index 2dfade8cc1e5e7e774d876d1e60c692aca0ef739..b35dd78b08b15842e87182de9afef6c49c249366 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -348,13 +348,18 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0360-Validate-tripwire-hook-placement-before-update.patch b/patches/server/0359-Validate-tripwire-hook-placement-before-update.patch similarity index 100% rename from patches/unapplied/server/0360-Validate-tripwire-hook-placement-before-update.patch rename to patches/server/0359-Validate-tripwire-hook-placement-before-update.patch diff --git a/patches/unapplied/server/0361-Add-option-to-allow-iron-golems-to-spawn-in-air.patch b/patches/server/0360-Add-option-to-allow-iron-golems-to-spawn-in-air.patch similarity index 100% rename from patches/unapplied/server/0361-Add-option-to-allow-iron-golems-to-spawn-in-air.patch rename to patches/server/0360-Add-option-to-allow-iron-golems-to-spawn-in-air.patch diff --git a/patches/unapplied/server/0362-Configurable-chance-of-villager-zombie-infection.patch b/patches/server/0361-Configurable-chance-of-villager-zombie-infection.patch similarity index 80% rename from patches/unapplied/server/0362-Configurable-chance-of-villager-zombie-infection.patch rename to patches/server/0361-Configurable-chance-of-villager-zombie-infection.patch index 59ae31aad7..5accd0d36d 100644 --- a/patches/unapplied/server/0362-Configurable-chance-of-villager-zombie-infection.patch +++ b/patches/server/0361-Configurable-chance-of-villager-zombie-infection.patch @@ -8,14 +8,16 @@ 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/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -index a8caf1a776deea8684d37406af11ab72c114b07d..473782e8b6a760aec492fa28270a7eb05a484e78 100644 +index f0bad2264df3a4b4631d66dad46ec03470a206ee..23fe7c324b8faca954dbef1a5703db6a8763edf6 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -@@ -450,10 +450,14 @@ public class Zombie extends Monster { +@@ -451,12 +451,16 @@ public class Zombie extends Monster { public boolean wasKilled(ServerLevel world, LivingEntity other) { boolean flag = super.wasKilled(world, other); - if ((world.getDifficulty() == Difficulty.NORMAL || world.getDifficulty() == Difficulty.HARD) && other instanceof Villager) { +- Villager entityvillager = (Villager) other; +- - if (world.getDifficulty() != Difficulty.HARD && this.random.nextBoolean()) { + // Paper start + if (level.paperConfig().entities.behavior.zombieVillagerInfectionChance != 0.0 && (level.paperConfig().entities.behavior.zombieVillagerInfectionChance != -1.0 || world.getDifficulty() == Difficulty.NORMAL || world.getDifficulty() == Difficulty.HARD) && other instanceof Villager) { @@ -25,6 +27,8 @@ index a8caf1a776deea8684d37406af11ab72c114b07d..473782e8b6a760aec492fa28270a7eb0 + if (level.paperConfig().entities.behavior.zombieVillagerInfectionChance != -1.0 && (this.random.nextDouble() * 100.0) > level.paperConfig().entities.behavior.zombieVillagerInfectionChance) { + return flag; + } // Paper end - - Villager entityvillager = (Villager) other; ++ ++ Villager entityvillager = (Villager) other; // CraftBukkit start + flag = Zombie.zombifyVillager(world, entityvillager, this.blockPosition(), this.isSilent(), CreatureSpawnEvent.SpawnReason.INFECTION) == null; + } diff --git a/patches/unapplied/server/0363-Optimise-Chunk-getFluid.patch b/patches/server/0362-Optimise-Chunk-getFluid.patch similarity index 96% rename from patches/unapplied/server/0363-Optimise-Chunk-getFluid.patch rename to patches/server/0362-Optimise-Chunk-getFluid.patch index d28aa20cc0..9fcd81829c 100644 --- a/patches/unapplied/server/0363-Optimise-Chunk-getFluid.patch +++ b/patches/server/0362-Optimise-Chunk-getFluid.patch @@ -8,7 +8,7 @@ faster on its own, however removing the try catch makes it easier to inline due to code size 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 afc443f36b26e9493fa0a530891b2edd7f3f6703..797d9d0d81f026479dda1ab4d72793025272a0f7 100644 +index 7b28537fda4187036b15ecc04f68ac1c9bf5f67f..1c618cfb63561f4557f8ec71254b6397eb9cc485 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -427,18 +427,20 @@ public class LevelChunk extends ChunkAccess { diff --git a/patches/unapplied/server/0364-Set-spigots-verbose-world-setting-to-false-by-def.patch b/patches/server/0363-Set-spigots-verbose-world-setting-to-false-by-def.patch similarity index 100% rename from patches/unapplied/server/0364-Set-spigots-verbose-world-setting-to-false-by-def.patch rename to patches/server/0363-Set-spigots-verbose-world-setting-to-false-by-def.patch diff --git a/patches/unapplied/server/0365-Add-tick-times-API-and-mspt-command.patch b/patches/server/0364-Add-tick-times-API-and-mspt-command.patch similarity index 94% rename from patches/unapplied/server/0365-Add-tick-times-API-and-mspt-command.patch rename to patches/server/0364-Add-tick-times-API-and-mspt-command.patch index c5d896f42e..a186311293 100644 --- a/patches/unapplied/server/0365-Add-tick-times-API-and-mspt-command.patch +++ b/patches/server/0364-Add-tick-times-API-and-mspt-command.patch @@ -125,10 +125,10 @@ index 6a00f3d38da8107825ab1d405f337fd077b09f72..d31b5ed47cffc61c90c926a0cd2005b7 public static void registerCommands(final MinecraftServer server) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ba99b3ffef6d5c46c3bb0b0de99a042ae000c196..564acfd222aaf111025d7e2c6b79438159d31686 100644 +index 867e7186764057507f6f92b52ea6afc4d08774b4..8ea5d3cb180b403f68d95ad6428dcad91b88ba2c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -237,6 +237,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop entitytypes = entity.getType(); int i = entitytypes.clientTrackingRange() * 16; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index d30885b0b85d78a312c142460e5d342fdbeada79..ceab806cf008f8c9306283c86a92164176f8f1c5 100644 +index a2bba2678a56c5ea197e8b18c4a96e0833121fbe..8646b9b07bc61ec1ee11b4053c67119c8ae20459 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2345,7 +2345,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2326,7 +2326,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public void onTrackingStart(Entity entity) { org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot @@ -37,7 +37,7 @@ index d30885b0b85d78a312c142460e5d342fdbeada79..ceab806cf008f8c9306283c86a921641 if (entity instanceof ServerPlayer) { ServerPlayer entityplayer = (ServerPlayer) entity; -@@ -2379,6 +2379,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2360,6 +2360,7 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.updateDynamicGameEventListener(DynamicGameEventListener::add); entity.valid = true; // CraftBukkit diff --git a/patches/unapplied/server/0372-Don-t-tick-dead-players.patch b/patches/server/0371-Don-t-tick-dead-players.patch similarity index 85% rename from patches/unapplied/server/0372-Don-t-tick-dead-players.patch rename to patches/server/0371-Don-t-tick-dead-players.patch index abaee20fe7..f33f0cd629 100644 --- a/patches/unapplied/server/0372-Don-t-tick-dead-players.patch +++ b/patches/server/0371-Don-t-tick-dead-players.patch @@ -7,10 +7,10 @@ Causes sync chunk loads and who knows what all else. This is safe because Spectators are skipped in unloaded chunks too in vanilla. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index d13785144365bf69c072213a2672d408a3f0be5f..1a34d1b75698960cd48f2632cafdca5f52e10d49 100644 +index a43d7c3de254f47f1b460604d0b5c0d4fd6f5d6e..8bb61bf4f27ad9dac6d129dc7f8154eb2e608d82 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -653,7 +653,7 @@ public class ServerPlayer extends Player { +@@ -675,7 +675,7 @@ public class ServerPlayer extends Player { public void doTick() { try { diff --git a/patches/unapplied/server/0373-Dead-Player-s-shouldn-t-be-able-to-move.patch b/patches/server/0372-Dead-Player-s-shouldn-t-be-able-to-move.patch similarity index 84% rename from patches/unapplied/server/0373-Dead-Player-s-shouldn-t-be-able-to-move.patch rename to patches/server/0372-Dead-Player-s-shouldn-t-be-able-to-move.patch index 9229c28766..48076cac63 100644 --- a/patches/unapplied/server/0373-Dead-Player-s-shouldn-t-be-able-to-move.patch +++ b/patches/server/0372-Dead-Player-s-shouldn-t-be-able-to-move.patch @@ -7,10 +7,10 @@ This fixes a lot of game state issues where packets were delayed for processing due to 1.15's new queue but processed while dead. diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index bd1da2cf2c6717d26b4bba0a1a96e0bbb89cc22e..8f9a5589e430c31de29d23d6c27757dd33e8bb86 100644 +index ba8b6d3fbc10eb9f02d3409eb2038827c47ca14d..3563f5d893fb650892ca7231767d505b7a17c8c0 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1172,7 +1172,7 @@ public abstract class Player extends LivingEntity { +@@ -1154,7 +1154,7 @@ public abstract class Player extends LivingEntity { @Override protected boolean isImmobile() { diff --git a/patches/unapplied/server/0374-Optimize-Collision-to-not-load-chunks.patch b/patches/server/0373-Optimize-Collision-to-not-load-chunks.patch similarity index 96% rename from patches/unapplied/server/0374-Optimize-Collision-to-not-load-chunks.patch rename to patches/server/0373-Optimize-Collision-to-not-load-chunks.patch index 1e82b8229e..b3c9eb774d 100644 --- a/patches/unapplied/server/0374-Optimize-Collision-to-not-load-chunks.patch +++ b/patches/server/0373-Optimize-Collision-to-not-load-chunks.patch @@ -14,10 +14,10 @@ movement will load only the chunk the player enters anyways and avoids loading massive amounts of surrounding chunks due to large AABB lookups. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index d1da13e361c4898420e9d6ab8a9c48cb29ae65bf..e5ee52c702ab4d50309c7f1ff1639755db1c4846 100644 +index 4b1a900ce1531526b91b01217f291bc10526956b..a5e485742b10419a031b3cc48591a0bbbcab4fb5 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -797,6 +797,7 @@ public abstract class PlayerList { +@@ -805,6 +805,7 @@ public abstract class PlayerList { entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); // CraftBukkit end @@ -26,7 +26,7 @@ index d1da13e361c4898420e9d6ab8a9c48cb29ae65bf..e5ee52c702ab4d50309c7f1ff1639755 entityplayer1.setPos(entityplayer1.getX(), entityplayer1.getY() + 1.0D, entityplayer1.getZ()); } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index e3075bbf737905c3a61ce900fc525d4ed9484b79..5de420c0a2f0881abb03c16b2621d081ef7ad4fd 100644 +index f0c7c31c2646c2b26a3f98e5b5c822712696d960..fada693b270d0954f6bbc5965fb3af82a8bd524e 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -236,6 +236,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { diff --git a/patches/unapplied/server/0375-Don-t-move-existing-players-to-world-spawn.patch b/patches/server/0374-Don-t-move-existing-players-to-world-spawn.patch similarity index 85% rename from patches/unapplied/server/0375-Don-t-move-existing-players-to-world-spawn.patch rename to patches/server/0374-Don-t-move-existing-players-to-world-spawn.patch index a74a4163a7..2a6ce8dd99 100644 --- a/patches/unapplied/server/0375-Don-t-move-existing-players-to-world-spawn.patch +++ b/patches/server/0374-Don-t-move-existing-players-to-world-spawn.patch @@ -13,10 +13,10 @@ By skipping this, we avoid potential for a large spike on server start. public net.minecraft.server.level.ServerPlayer fudgeSpawnLocation(Lnet/minecraft/server/level/ServerLevel;)V diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 1a34d1b75698960cd48f2632cafdca5f52e10d49..84bcabdd92cefe16f7bf5270e1d2989dd7d010d7 100644 +index 8bb61bf4f27ad9dac6d129dc7f8154eb2e608d82..300658b41ed77c5f9403c260b6cdc62f3a323a35 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -323,7 +323,7 @@ public class ServerPlayer extends Player { +@@ -328,7 +328,7 @@ public class ServerPlayer extends Player { this.stats = server.getPlayerList().getPlayerStats(this); this.advancements = server.getPlayerList().getPlayerAdvancements(this); this.maxUpStep = 1.0F; @@ -25,7 +25,7 @@ index 1a34d1b75698960cd48f2632cafdca5f52e10d49..84bcabdd92cefe16f7bf5270e1d2989d this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper -@@ -541,7 +541,7 @@ public class ServerPlayer extends Player { +@@ -562,7 +562,7 @@ public class ServerPlayer extends Player { position = Vec3.atCenterOf(((ServerLevel) world).getSharedSpawnPos()); } this.level = world; @@ -35,10 +35,10 @@ index 1a34d1b75698960cd48f2632cafdca5f52e10d49..84bcabdd92cefe16f7bf5270e1d2989d this.gameMode.setLevel((ServerLevel) world); } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index e5ee52c702ab4d50309c7f1ff1639755db1c4846..55985d21fd89a753e0e10004bb01295655ac43d3 100644 +index a5e485742b10419a031b3cc48591a0bbbcab4fb5..ba0df02c2b3387b7e7698e59ce3021f1019b9a8a 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -216,6 +216,8 @@ public abstract class PlayerList { +@@ -222,6 +222,8 @@ public abstract class PlayerList { worldserver1 = worldserver; } diff --git a/patches/unapplied/server/0376-Optimize-GoalSelector-Goal.Flag-Set-operations.patch b/patches/server/0375-Optimize-GoalSelector-Goal.Flag-Set-operations.patch similarity index 96% rename from patches/unapplied/server/0376-Optimize-GoalSelector-Goal.Flag-Set-operations.patch rename to patches/server/0375-Optimize-GoalSelector-Goal.Flag-Set-operations.patch index fc6f22c473..70dff6f0dc 100644 --- a/patches/unapplied/server/0376-Optimize-GoalSelector-Goal.Flag-Set-operations.patch +++ b/patches/server/0375-Optimize-GoalSelector-Goal.Flag-Set-operations.patch @@ -47,10 +47,10 @@ index 6667ecc4b7eded4e20a415cef1e1b1179e6710b8..4379b9948f1eecfe6fd7dea98e298ad5 protected int adjustedTickDelay(int ticks) { diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java -index 5f2d4f63e3371de7bee64c58c6e7b810403134b5..1805aacd982dae8d971cfad0ead23c161badb095 100644 +index e5995d0db5dcfba59a873ff439601894fdacd556..b738ee2d3801fadfd09313f05ae24593e56b0ec6 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java -@@ -29,10 +29,12 @@ public class GoalSelector { +@@ -30,10 +30,12 @@ public class GoalSelector { private final Map lockedFlags = new EnumMap<>(Goal.Flag.class); private final Set availableGoals = Sets.newLinkedHashSet(); private final Supplier profiler; @@ -64,7 +64,7 @@ index 5f2d4f63e3371de7bee64c58c6e7b810403134b5..1805aacd982dae8d971cfad0ead23c16 public GoalSelector(Supplier profiler) { this.profiler = profiler; -@@ -62,26 +64,32 @@ public class GoalSelector { +@@ -65,26 +67,32 @@ public class GoalSelector { } // Paper end public void removeGoal(Goal goal) { @@ -111,7 +111,7 @@ index 5f2d4f63e3371de7bee64c58c6e7b810403134b5..1805aacd982dae8d971cfad0ead23c16 if (!goalsByControl.getOrDefault(flag, NO_GOAL).canBeReplacedBy(goal)) { return false; } -@@ -95,7 +103,7 @@ public class GoalSelector { +@@ -98,7 +106,7 @@ public class GoalSelector { profilerFiller.push("goalCleanup"); for(WrappedGoal wrappedGoal : this.availableGoals) { @@ -120,7 +120,7 @@ index 5f2d4f63e3371de7bee64c58c6e7b810403134b5..1805aacd982dae8d971cfad0ead23c16 wrappedGoal.stop(); } } -@@ -113,8 +121,14 @@ public class GoalSelector { +@@ -116,8 +124,14 @@ public class GoalSelector { profilerFiller.push("goalUpdate"); for(WrappedGoal wrappedGoal2 : this.availableGoals) { @@ -137,7 +137,7 @@ index 5f2d4f63e3371de7bee64c58c6e7b810403134b5..1805aacd982dae8d971cfad0ead23c16 WrappedGoal wrappedGoal3 = this.lockedFlags.getOrDefault(flag, NO_GOAL); wrappedGoal3.stop(); this.lockedFlags.put(flag, wrappedGoal2); -@@ -154,11 +168,11 @@ public class GoalSelector { +@@ -157,11 +171,11 @@ public class GoalSelector { } public void disableControlFlag(Goal.Flag control) { diff --git a/patches/unapplied/server/0377-Improved-Watchdog-Support.patch b/patches/server/0376-Improved-Watchdog-Support.patch similarity index 94% rename from patches/unapplied/server/0377-Improved-Watchdog-Support.patch rename to patches/server/0376-Improved-Watchdog-Support.patch index 42375eb822..18a36f5752 100644 --- a/patches/unapplied/server/0377-Improved-Watchdog-Support.patch +++ b/patches/server/0376-Improved-Watchdog-Support.patch @@ -71,10 +71,10 @@ index 336795dff742b7c6957fbd3476aff31d25a5e659..30a58229aa6dac5039511d0c0df5f291 cause = cause.getCause(); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 564acfd222aaf111025d7e2c6b79438159d31686..c5ecf010fff3af1c9b4ebf24ca80fb6b19afccfc 100644 +index 8ea5d3cb180b403f68d95ad6428dcad91b88ba2c..e09ed2ebd1c2a837978c804ced0fe6e79018b588 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -284,7 +284,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; public Commands vanillaCommandDispatcher; @@ -83,7 +83,7 @@ index 564acfd222aaf111025d7e2c6b79438159d31686..c5ecf010fff3af1c9b4ebf24ca80fb6b // CraftBukkit end // Spigot start public static final int TPS = 20; -@@ -295,6 +295,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop S spin(Function serverFactory) { AtomicReference atomicreference = new AtomicReference(); Thread thread = new io.papermc.paper.util.TickThread(() -> { // Paper - rewrite chunk system -@@ -877,6 +880,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop