From 00dec09758cb97b3907e1ce288d5b84256287ce7 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 7 Dec 2022 21:16:54 +0100 Subject: [PATCH] Patching patched patched patches --- .../server/Add-API-for-quit-reason.patch | 6 +- ...Add-API-for-resetting-a-single-score.patch | 0 ...essage-to-PlayerAdvancementDoneEvent.patch | 0 .../server/Add-BellRevealRaiderEvent.patch | 0 .../server/Add-BellRingEvent.patch | 0 .../server/Add-Block-isValidTool.patch | 0 .../server/Add-BlockBreakBlockEvent.patch | 2 +- ...Add-Channel-initialization-listeners.patch | 0 .../server/Add-Destroy-Speed-API.patch | 0 .../Add-ElderGuardianAppearanceEvent.patch | 0 ...Add-EntityBlockStorage-clearEntities.patch | 0 .../server/Add-EntityInsideBlockEvent.patch | 4 +- .../server/Add-EntityLoadCrossbowEvent.patch | 0 .../Add-ItemFactory-getSpawnEgg-API.patch | 0 .../Add-LivingEntity-clearActiveItem.patch | 0 .../server/Add-Mob-lookAt-API.patch | 0 ...-OBSTRUCTED-reason-to-BedEnterResult.patch | 0 .../server/Add-PaperRegistry.patch | 12 +-- ...PlayerAttackEntityCooldownResetEvent.patch | 0 .../server/Add-PlayerItemCooldownEvent.patch | 0 .../server/Add-PlayerKickEvent-causes.patch | 75 ++++++++++----- .../server/Add-PlayerSetSpawnEvent.patch | 0 .../server/Add-PlayerShearBlockEvent.patch | 2 +- ...erTradeEvent-and-PlayerPurchaseEvent.patch | 26 ++--- ...-Plugin-Tickets-to-API-Chunk-Methods.patch | 0 .../server/Add-PrepareResultEvent.patch | 2 +- .../Add-PufferFishStateChangeEvent.patch | 0 .../Add-Raw-Byte-Entity-Serialization.patch | 0 .../server/Add-StructuresLocateEvent.patch | 19 +++- .../server/Add-System.out-err-catcher.patch | 0 .../Add-Unix-domain-socket-support.patch | 0 ...ing-Trader-spawn-rate-config-options.patch | 0 ...a-bunch-of-missing-forceDrop-toggles.patch | 0 ...n-in-sunlight-API-for-Phantoms-and-S.patch | 0 ...al-open-container-api-to-HumanEntity.patch | 0 ...implement-PlayerRecipeBookClickEvent.patch | 0 .../Add-back-EntityPortalExitEvent.patch | 0 .../server/Add-basic-Datapack-API.patch | 0 .../server/Add-bypass-host-check.patch | 0 ...cause-to-Weather-ThunderChangeEvents.patch | 0 ...g-for-mobs-immune-to-default-effects.patch | 0 .../server/Add-critical-damage-API.patch | 4 +- ...Leash-variable-to-EntityUnleashEvent.patch | 0 .../server/Add-entity-liquid-API.patch | 0 ...nment-variable-to-disable-server-gui.patch | 0 ...lternative-constructor-for-Rotations.patch | 0 ...ainThreadExecutor-to-BukkitScheduler.patch | 0 .../Add-getOfflinePlayerIfCached-String.patch | 0 .../server/Add-ignore-discounts-API.patch | 0 ...Collidable-methods-to-various-places.patch | 0 ...o-find-targets-for-lightning-strikes.patch | 0 .../Add-methods-to-get-translation-keys.patch | 0 ...keLighting-call-to-World-spigot-stri.patch | 0 ...d-missing-team-sidebar-display-slots.patch | 0 .../server/Add-moon-phase-API.patch | 0 .../server/Add-more-Evoker-API.patch | 0 .../server/Add-more-LimitedRegion-API.patch | 0 .../server/Add-more-WanderingTrader-API.patch | 0 .../server/Add-more-advancement-API.patch | 0 ...n-for-console-having-all-permissions.patch | 0 ...n-to-fix-items-merging-through-walls.patch | 0 .../Add-permission-for-command-blocks.patch | 0 ...ntom-creative-and-insomniac-controls.patch | 0 ...yPickupItemAnimation-to-LivingEntity.patch | 0 ...-address-to-AsyncPlayerPreLoginEvent.patch | 2 +- .../server/Add-recipe-to-cook-events.patch | 10 +- .../server/Add-sendOpLevel-API.patch | 0 .../server/Add-setMaxPlayers-API.patch | 4 +- ...pport-for-hex-color-codes-in-console.patch | 0 ...le-for-always-placing-the-dragon-egg.patch | 0 .../server/Add-villager-reputation-API.patch | 8 +- .../server/Add-worldborder-events.patch | 0 ...Add-zombie-targets-turtle-egg-config.patch | 0 .../server/Added-EntityDamageItemEvent.patch | 0 .../Added-PlayerBedFailEnterEvent.patch | 0 .../server/Added-PlayerDeepSleepEvent.patch | 0 .../Added-PlayerLecternPageChangeEvent.patch | 0 .../Added-PlayerLoomPatternSelectEvent.patch | 0 ...d-PlayerStonecutterRecipeSelectEvent.patch | 0 .../Added-ServerResourcesReloadedEvent.patch | 6 +- .../Added-WorldGameRuleChangeEvent.patch | 0 ...ing-of-PlayerChangeBeaconEffectEvent.patch | 0 ...d-missing-default-perms-for-commands.patch | 0 ...ld-settings-for-mobs-picking-up-loot.patch | 0 .../Additional-Block-Material-API-s.patch | 0 .../server/Adds-PlayerArmSwingEvent.patch | 0 patches/server/Adventure.patch | 13 ++- ...w-adding-items-to-BlockDropItemEvent.patch | 0 ...mob-spawner-spawn-egg-transformation.patch | 0 ...riting-of-comments-to-server.propert.patch | 0 ...-using-signs-inside-spawn-protection.patch | 10 +- .../Attributes-API-for-item-defaults.patch | 0 ...ling-up-when-item-stack-is-empty-in-.patch | 0 .../Beacon-API-custom-effect-ranges.patch | 12 +-- .../server/Brand-support.patch | 2 +- .../server/Buffer-joins-to-world.patch | 0 ...taFixerUpper-Rewrite-Rules-on-demand.patch | 0 .../server/Cache-block-data-strings.patch | 0 .../server/Cache-burn-durations.patch | 0 ...target-without-changing-other-things.patch | 0 ...up-duplicated-GameProfile-Properties.patch | 0 .../Clear-bucket-NBT-after-dispense.patch | 0 ...-should-not-bypass-cramming-gamerule.patch | 18 ++-- ...n-for-requiring-a-player-participant.patch | 2 +- ...g-option-for-Piglins-guarding-chests.patch | 0 ...onfigurable-door-breaking-difficulty.patch | 0 ...tem-frame-map-cursor-update-interval.patch | 0 .../Configurable-max-leash-distance.patch | 0 ...nvert-legacy-attributes-in-Item-Meta.patch | 0 ...ate-HoverEvent-from-ItemStack-Entity.patch | 0 ...ktraces-in-log-messages-crash-report.patch | 4 +- ...m-invalid-ingredient-lists-in-Villag.patch | 0 ...erver-load-chunks-from-newer-version.patch | 0 ...-logic-for-inventories-on-chunk-unlo.patch | 2 +- ...n-t-apply-cramming-damage-to-players.patch | 0 ...k-for-portal-on-world-gen-entity-add.patch | 0 ...layer-is-attempted-to-be-removed-fro.patch | 0 ...t-fire-BlockFade-on-worldgen-threads.patch | 0 ...ignore-result-of-PlayerEditBookEvent.patch | 0 .../server/Don-t-require-FACING-data.patch | 0 ...-entity-collision-code-if-not-needed.patch | 43 +++++++++ ...ed-item-when-player-has-disconnected.patch | 0 .../Eigencraft-redstone-implementation.patch | 0 ...pty-commands-shall-not-be-dispatched.patch | 0 ...tab-completions-for-brigadier-comman.patch | 0 ...sure-Entity-AABB-s-are-never-invalid.patch | 0 ...der-respects-game-and-entity-rules-f.patch | 0 ...nect-for-book-edit-is-called-on-main.patch | 0 .../server/Ensure-safe-gateway-teleport.patch | 0 .../server/Entity-isTicking.patch | 0 .../Entity-load-save-limit-per-chunk.patch | 2 +- .../server/EntityMoveEvent.patch | 0 .../server/Expand-world-key-API.patch | 6 +- .../server/ExperienceOrbMergeEvent.patch | 0 .../Expose-LivingEntity-hurt-direction.patch | 0 .../server/Expose-Tracked-Players.patch | 0 .../server/Expose-game-version.patch | 0 .../server/Expose-protocol-version.patch | 0 ...y-Counter-to-allow-plugins-to-use-va.patch | 0 .../server/Expose-world-spawn-angle.patch | 0 ...p-capture-to-capture-all-items-added.patch | 0 ...ataPlayer-leak-due-from-quitting-ear.patch | 0 ...x-Concurrency-issue-in-ShufflingList.patch | 14 +-- .../server/Fix-CraftPotionBrewer-cache.patch | 0 ...er-runTaskTimerAsynchronously-Plugin.patch | 0 ...x-CraftSound-backwards-compatibility.patch | 2 +- .../server/Fix-CraftTeam-null-check.patch | 0 ...ortation-and-cancel-velocity-if-tele.patch | 0 ...g-Broken-behavior-of-PlayerJoinEvent.patch | 6 +- ...Fix-Not-a-string-Map-Conversion-spam.patch | 0 ...ld-Difficulty-Remembering-Difficulty.patch | 2 +- ...r-spawnParticle-x-y-z-precision-loss.patch | 0 ...yerBucketEmptyEvent-result-itemstack.patch | 0 ...PlayerDropItemEvent-using-wrong-item.patch | 0 ...ItemConsumeEvent-cancelling-properly.patch | 0 .../Fix-PotionEffect-ignores-icon-flag.patch | 0 ...SplashEvent-for-water-splash-potions.patch | 30 +++--- ...4-Bukkit-world-container-is-not-used.patch | 0 ...-5885-Unable-to-disable-advancements.patch | 0 .../server/Fix-SPIGOT-5989.patch | 0 ...geEvent-not-firing-for-all-use-cases.patch | 0 ...wn-acting-as-a-bed-respawn-from-the-.patch | 0 ...x-and-optimise-world-force-upgrading.patch | 18 ++-- ...ix-arrows-never-despawning-MC-125757.patch | 0 ...position-losing-precision-millions-o.patch | 0 ...x-checkReach-check-for-Shulker-boxes.patch | 0 ...ix-client-lag-on-advancement-loading.patch | 0 ...from-signs-not-firing-command-events.patch | 0 ...ing-zombie-villager-discount-exploit.patch | 0 .../Fix-dangerous-end-portal-logic.patch | 0 ...-non-whitelisted-player-when-white-l.patch | 0 ...r-large-move-vectors-crashing-server.patch | 0 .../server/Fix-harming-potion-dupe.patch | 0 ...rs-not-working-in-some-kick-messages.patch | 2 +- ...ncorrect-message-for-outdated-client.patch | 0 ...ncy-issue-with-empty-map-items-in-CB.patch | 0 ...-event-not-being-called-in-adventure.patch | 10 +- .../Fix-invulnerable-end-crystals.patch | 12 +-- .../Fix-issues-with-mob-conversion.patch | 0 ...tem-locations-dropped-from-campfires.patch | 14 +-- ...ssing-chunks-due-to-integer-overflow.patch | 0 .../Fix-nerfed-slime-when-splitting.patch | 10 +- ...m-duplication-issues-and-teleport-is.patch | 0 ...ston-physics-inconsistency-MC-188840.patch | 0 ...istake-in-CB-NBT-int-deserialization.patch | 0 ...-of-Block-applyBoneMeal-always-being.patch | 0 .../server/Fix-sand-duping.patch | 0 ...Fix-some-rails-connecting-improperly.patch | 0 .../server/Fix-test-not-bootstrapping.patch | 0 .../server/Fix-villager-boat-exploit.patch | 0 ...ix-villager-trading-demand-MC-163962.patch | 0 .../Fixed-TileEntityBell-memory-leak.patch | 0 ...k-event-leave-message-not-being-sent.patch | 4 +- .../Get-entity-default-attributes.patch | 0 .../{unapplied => }/server/Goat-ram-API.patch | 0 .../server/Guardian-beam-workaround.patch | 0 .../Hide-sync-chunk-writes-behind-flag.patch | 0 ...PI-to-expose-exact-interaction-point.patch | 0 ...-get-Material-from-Boats-and-Minecar.patch | 0 .../Implement-BlockPreDispenseEvent.patch | 0 .../server/Implement-Mob-Goal-API.patch | 0 .../Implement-Player-Client-Options-API.patch | 0 ...ement-PlayerFlowerPotManipulateEvent.patch | 0 .../server/Implement-TargetHitEvent.patch | 0 ...s-to-convert-between-Component-and-B.patch | 0 ...Implemented-BlockFailedDispenseEvent.patch | 0 .../server/Improve-Arrow-API.patch | 0 ...-Legacy-Component-serialization-size.patch | 0 .../server/Improve-ServerGUI.patch | 0 .../Improve-boat-collision-performance.patch | 10 +- .../Inline-shift-direction-fields.patch | 0 ...eacon-activation-deactivation-events.patch | 4 +- .../server/Inventory-close.patch | 0 ...Holder-method-without-block-snapshot.patch | 0 .../server/Item-Rarity-API.patch | 0 .../server/Item-no-age-no-player-pickup.patch | 0 .../server/ItemStack-repair-check-API.patch | 0 ...-track-plugin-scoreboards-by-default.patch | 0 .../server/Left-handed-API.patch | 0 .../Limit-item-frame-cursors-on-maps.patch | 0 .../server/Limit-recipe-packets.patch | 0 .../server/Line-Of-Sight-Changes.patch | 0 ...Load-Chunks-for-Login-Asynchronously.patch | 6 +- .../MC-4-Fix-item-position-desync.patch | 13 +-- .../Make-EntityUnleashEvent-cancellable.patch | 0 ...ers-respect-inventory-max-stack-size.patch | 0 .../Make-item-validations-configurable.patch | 0 .../Make-schedule-command-per-world.patch | 0 .../server/Maps-shouldn-t-load-chunks.patch | 14 +-- ...ipes-should-return-an-immutable-list.patch | 0 .../server/Missing-Entity-Behavior-API.patch | 11 ++- .../server/More-CommandBlock-API.patch | 0 .../server/More-Enchantment-API.patch | 0 .../server/More-Lidded-Block-API.patch | 0 .../server/More-World-API.patch | 0 .../server/More-lightning-API.patch | 0 ...pawn-point-if-spawn-in-unloaded-worl.patch | 0 ...ove-range-check-for-block-placing-up.patch | 20 ++-- .../server/Optimise-getType-calls.patch | 2 +- ...e-Biome-Mob-Lookups-for-Mob-Spawning.patch | 0 .../Optimize-Bit-Operations-by-inlining.patch | 0 .../Optimize-Dynamic-get-Missing-Keys.patch | 0 ...ze-NetworkManager-Exception-Handling.patch | 0 ...der-Remove-Streams-Optimized-collect.patch | 0 .../server/Optimize-Voxel-Shape-Merging.patch | 0 ...erCloseEnoughForSpawning-to-use-dist.patch | 6 +- ...-brigadier-child-sorting-performance.patch | 0 ...mize-entity-tracker-passenger-checks.patch | 0 ...ptimize-indirect-passenger-iteration.patch | 0 ...ancement-data-player-iteration-to-be.patch | 0 ...-maximum-exp-value-when-merging-orbs.patch | 0 ...prevent-NBT-copy-in-smithing-recipes.patch | 0 .../server/Paper-dumpitem-command.patch | 0 .../Player-Chunk-Load-Unload-Events.patch | 0 .../server/Player-elytra-boost-API.patch | 0 ...CreateEvent-needs-to-know-its-entity.patch | 6 +- .../server/Potential-bed-API.patch | 0 ...-AFK-kick-while-watching-end-credits.patch | 0 ...-grindstones-from-overstacking-items.patch | 0 ...-headless-pistons-from-being-created.patch | 0 ...vent-opening-inventories-when-frozen.patch | 0 ...-desync-in-playerconnection-causing-.patch | 0 .../Prevent-teleporting-dead-entities.patch | 0 ...and-End-Portal-Frames-from-being-des.patch | 6 +- ...nd-timings-for-sensors-and-behaviors.patch | 14 +-- ...bleInt-allocations-from-light-engine.patch | 0 ...llocation-of-Vec3D-by-entity-tracker.patch | 6 +- ...blockpos-allocation-from-pathfinding.patch | 0 ...ileHitEvent-call-when-fireballs-dead.patch | 0 .../Remove-some-streams-from-structures.patch | 0 .../server/Remove-stale-POIs.patch | 0 .../Remove-streams-from-SensorNearest.patch | 0 ...from-classes-related-villager-gossip.patch | 26 +++-- ...Reset-Ender-Crystals-on-Dragon-Spawn.patch | 12 +-- ...-shield-blocking-on-dimension-change.patch | 0 ...ace-order-when-capturing-blockstates.patch | 0 ...onent-with-empty-text-instead-of-thr.patch | 0 ...s-to-contain-the-source-jars-in-stac.patch | 0 ...mmands-if-tab-completion-is-disabled.patch | 0 .../Set-area-affect-cloud-rotation.patch | 0 ...-per-thread-native-byte-buffer-cache.patch | 0 ...prove-performance-of-the-end-generat.patch | 0 ...awn-player-in-correct-world-on-login.patch | 0 .../{unapplied => }/server/Stinger-API.patch | 0 ...te-operations-for-updating-light-dat.patch | 0 .../Support-components-in-ItemMeta.patch | 0 .../Support-old-UUID-format-for-NBT.patch | 0 ...ttedContainer-instead-of-ThreadingDe.patch | 0 ...-Vanilla-Command-permission-checking.patch | 0 ...per-exception-on-empty-JsonList-file.patch | 0 .../Toggle-for-removing-existing-dragon.patch | 0 ...pdate-itemstack-legacy-name-and-lore.patch | 0 ...tance-map-to-optimise-entity-tracker.patch | 0 ...etChunkIfLoadedImmediately-in-places.patch | 22 +++-- ...ookup-for-Treasure-Maps-Fixes-lag-fr.patch | 0 ...PickItem-Packet-and-kick-for-invalid.patch | 0 .../Vanilla-command-permission-fixes.patch | 0 .../server/Villager-Restocks-API.patch | 0 .../server/Villager-resetOffers.patch | 0 ...Wait-for-Async-Tasks-during-shutdown.patch | 0 .../server/Zombie-API-breaking-doors.patch | 0 .../server/add-DragonEggFormEvent.patch | 0 ...d-RespawnFlags-to-PlayerRespawnEvent.patch | 0 .../add-consumeFuel-to-FurnaceBurnEvent.patch | 0 ...t-set-drop-chance-to-EntityEquipment.patch | 0 .../add-isDeeplySleeping-to-HumanEntity.patch | 0 .../server/add-per-world-spawn-limits.patch | 0 .../server/added-PlayerNameEntityEvent.patch | 0 ...disable-pathfinding-updates-on-block.patch | 0 ...ditions-to-PlayerGameModeChangeEvent.patch | 5 +- ...opy-TESign-isEditable-from-snapshots.patch | 2 +- ...fix-PigZombieAngerEvent-cancellation.patch | 4 +- ...fix-PlayerItemHeldEvent-firing-twice.patch | 0 .../fix-converting-txt-to-json-file.patch | 0 ...fix-dead-slime-setSize-invincibility.patch | 0 ...telist-use-configurable-kick-message.patch | 0 .../incremental-chunk-and-player-saving.patch | 0 ...-entity-allow-attribute-registration.patch | 2 +- .../server/misc-debugging-dumps.patch | 6 +- ...sure-plate-EntityInteractEvent-for-i.patch | 0 .../Don-t-allow-null-UUID-s-for-chat.patch | 23 ----- ...-entity-collision-code-if-not-needed.patch | 43 --------- ...argetLivingEntityEvent-for-1.16-mobs.patch | 59 ------------ ...inig-for-some-hot-IBlockData-methods.patch | 96 ------------------- ...Timer-for-Wandering-Traders-spawned-.patch | 58 ----------- 325 files changed, 362 insertions(+), 534 deletions(-) rename patches/{unapplied => }/server/Add-API-for-quit-reason.patch (97%) rename patches/{unapplied => }/server/Add-API-for-resetting-a-single-score.patch (100%) rename patches/{unapplied => }/server/Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch (100%) rename patches/{unapplied => }/server/Add-BellRevealRaiderEvent.patch (100%) rename patches/{unapplied => }/server/Add-BellRingEvent.patch (100%) rename patches/{unapplied => }/server/Add-Block-isValidTool.patch (100%) rename patches/{unapplied => }/server/Add-BlockBreakBlockEvent.patch (98%) rename patches/{unapplied => }/server/Add-Channel-initialization-listeners.patch (100%) rename patches/{unapplied => }/server/Add-Destroy-Speed-API.patch (100%) rename patches/{unapplied => }/server/Add-ElderGuardianAppearanceEvent.patch (100%) rename patches/{unapplied => }/server/Add-EntityBlockStorage-clearEntities.patch (100%) rename patches/{unapplied => }/server/Add-EntityInsideBlockEvent.patch (99%) rename patches/{unapplied => }/server/Add-EntityLoadCrossbowEvent.patch (100%) rename patches/{unapplied => }/server/Add-ItemFactory-getSpawnEgg-API.patch (100%) rename patches/{unapplied => }/server/Add-LivingEntity-clearActiveItem.patch (100%) rename patches/{unapplied => }/server/Add-Mob-lookAt-API.patch (100%) rename patches/{unapplied => }/server/Add-OBSTRUCTED-reason-to-BedEnterResult.patch (100%) rename patches/{unapplied => }/server/Add-PaperRegistry.patch (94%) rename patches/{unapplied => }/server/Add-PlayerAttackEntityCooldownResetEvent.patch (100%) rename patches/{unapplied => }/server/Add-PlayerItemCooldownEvent.patch (100%) rename patches/{unapplied => }/server/Add-PlayerKickEvent-causes.patch (94%) rename patches/{unapplied => }/server/Add-PlayerSetSpawnEvent.patch (100%) rename patches/{unapplied => }/server/Add-PlayerShearBlockEvent.patch (98%) rename patches/{unapplied => }/server/Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch (94%) rename patches/{unapplied => }/server/Add-Plugin-Tickets-to-API-Chunk-Methods.patch (100%) rename patches/{unapplied => }/server/Add-PrepareResultEvent.patch (99%) rename patches/{unapplied => }/server/Add-PufferFishStateChangeEvent.patch (100%) rename patches/{unapplied => }/server/Add-Raw-Byte-Entity-Serialization.patch (100%) rename patches/{unapplied => }/server/Add-StructuresLocateEvent.patch (89%) rename patches/{unapplied => }/server/Add-System.out-err-catcher.patch (100%) rename patches/{unapplied => }/server/Add-Unix-domain-socket-support.patch (100%) rename patches/{unapplied => }/server/Add-Wandering-Trader-spawn-rate-config-options.patch (100%) rename patches/{unapplied => }/server/Add-a-bunch-of-missing-forceDrop-toggles.patch (100%) rename patches/{unapplied => }/server/Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch (100%) rename patches/{unapplied => }/server/Add-additional-open-container-api-to-HumanEntity.patch (100%) rename patches/{unapplied => }/server/Add-and-implement-PlayerRecipeBookClickEvent.patch (100%) rename patches/{unapplied => }/server/Add-back-EntityPortalExitEvent.patch (100%) rename patches/{unapplied => }/server/Add-basic-Datapack-API.patch (100%) rename patches/{unapplied => }/server/Add-bypass-host-check.patch (100%) rename patches/{unapplied => }/server/Add-cause-to-Weather-ThunderChangeEvents.patch (100%) rename patches/{unapplied => }/server/Add-config-for-mobs-immune-to-default-effects.patch (100%) rename patches/{unapplied => }/server/Add-critical-damage-API.patch (98%) rename patches/{unapplied => }/server/Add-dropLeash-variable-to-EntityUnleashEvent.patch (100%) rename patches/{unapplied => }/server/Add-entity-liquid-API.patch (100%) rename patches/{unapplied => }/server/Add-environment-variable-to-disable-server-gui.patch (100%) rename patches/{unapplied => }/server/Add-fast-alternative-constructor-for-Rotations.patch (100%) rename patches/{unapplied => }/server/Add-getMainThreadExecutor-to-BukkitScheduler.patch (100%) rename patches/{unapplied => }/server/Add-getOfflinePlayerIfCached-String.patch (100%) rename patches/{unapplied => }/server/Add-ignore-discounts-API.patch (100%) rename patches/{unapplied => }/server/Add-isCollidable-methods-to-various-places.patch (100%) rename patches/{unapplied => }/server/Add-methods-to-find-targets-for-lightning-strikes.patch (100%) rename patches/{unapplied => }/server/Add-methods-to-get-translation-keys.patch (100%) rename patches/{unapplied => }/server/Add-missing-strikeLighting-call-to-World-spigot-stri.patch (100%) rename patches/{unapplied => }/server/Add-missing-team-sidebar-display-slots.patch (100%) rename patches/{unapplied => }/server/Add-moon-phase-API.patch (100%) rename patches/{unapplied => }/server/Add-more-Evoker-API.patch (100%) rename patches/{unapplied => }/server/Add-more-LimitedRegion-API.patch (100%) rename patches/{unapplied => }/server/Add-more-WanderingTrader-API.patch (100%) rename patches/{unapplied => }/server/Add-more-advancement-API.patch (100%) rename patches/{unapplied => }/server/Add-option-for-console-having-all-permissions.patch (100%) rename patches/{unapplied => }/server/Add-option-to-fix-items-merging-through-walls.patch (100%) rename patches/{unapplied => }/server/Add-permission-for-command-blocks.patch (100%) rename patches/{unapplied => }/server/Add-phantom-creative-and-insomniac-controls.patch (100%) rename patches/{unapplied => }/server/Add-playPickupItemAnimation-to-LivingEntity.patch (100%) rename patches/{unapplied => }/server/Add-raw-address-to-AsyncPlayerPreLoginEvent.patch (98%) rename patches/{unapplied => }/server/Add-recipe-to-cook-events.patch (86%) rename patches/{unapplied => }/server/Add-sendOpLevel-API.patch (100%) rename patches/{unapplied => }/server/Add-setMaxPlayers-API.patch (92%) rename patches/{unapplied => }/server/Add-support-for-hex-color-codes-in-console.patch (100%) rename patches/{unapplied => }/server/Add-toggle-for-always-placing-the-dragon-egg.patch (100%) rename patches/{unapplied => }/server/Add-villager-reputation-API.patch (95%) rename patches/{unapplied => }/server/Add-worldborder-events.patch (100%) rename patches/{unapplied => }/server/Add-zombie-targets-turtle-egg-config.patch (100%) rename patches/{unapplied => }/server/Added-EntityDamageItemEvent.patch (100%) rename patches/{unapplied => }/server/Added-PlayerBedFailEnterEvent.patch (100%) rename patches/{unapplied => }/server/Added-PlayerDeepSleepEvent.patch (100%) rename patches/{unapplied => }/server/Added-PlayerLecternPageChangeEvent.patch (100%) rename patches/{unapplied => }/server/Added-PlayerLoomPatternSelectEvent.patch (100%) rename patches/{unapplied => }/server/Added-PlayerStonecutterRecipeSelectEvent.patch (100%) rename patches/{unapplied => }/server/Added-ServerResourcesReloadedEvent.patch (94%) rename patches/{unapplied => }/server/Added-WorldGameRuleChangeEvent.patch (100%) rename patches/{unapplied => }/server/Added-firing-of-PlayerChangeBeaconEffectEvent.patch (100%) rename patches/{unapplied => }/server/Added-missing-default-perms-for-commands.patch (100%) rename patches/{unapplied => }/server/Added-world-settings-for-mobs-picking-up-loot.patch (100%) rename patches/{unapplied => }/server/Additional-Block-Material-API-s.patch (100%) rename patches/{unapplied => }/server/Adds-PlayerArmSwingEvent.patch (100%) rename patches/{unapplied => }/server/Allow-adding-items-to-BlockDropItemEvent.patch (100%) rename patches/{unapplied => }/server/Allow-disabling-mob-spawner-spawn-egg-transformation.patch (100%) rename patches/{unapplied => }/server/Allow-skipping-writing-of-comments-to-server.propert.patch (100%) rename patches/{unapplied => }/server/Allow-using-signs-inside-spawn-protection.patch (64%) rename patches/{unapplied => }/server/Attributes-API-for-item-defaults.patch (100%) rename patches/{unapplied => }/server/Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch (100%) rename patches/{unapplied => }/server/Beacon-API-custom-effect-ranges.patch (97%) rename patches/{unapplied => }/server/Brand-support.patch (98%) rename patches/{unapplied => }/server/Buffer-joins-to-world.patch (100%) rename patches/{unapplied => }/server/Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch (100%) rename patches/{unapplied => }/server/Cache-block-data-strings.patch (100%) rename patches/{unapplied => }/server/Cache-burn-durations.patch (100%) rename patches/{unapplied => }/server/Change-EnderEye-target-without-changing-other-things.patch (100%) rename patches/{unapplied => }/server/Clean-up-duplicated-GameProfile-Properties.patch (100%) rename patches/{unapplied => }/server/Clear-bucket-NBT-after-dispense.patch (100%) rename patches/{unapplied => }/server/Climbing-should-not-bypass-cramming-gamerule.patch (91%) rename patches/{unapplied => }/server/Collision-option-for-requiring-a-player-participant.patch (97%) rename patches/{unapplied => }/server/Config-option-for-Piglins-guarding-chests.patch (100%) rename patches/{unapplied => }/server/Configurable-door-breaking-difficulty.patch (100%) rename patches/{unapplied => }/server/Configurable-item-frame-map-cursor-update-interval.patch (100%) rename patches/{unapplied => }/server/Configurable-max-leash-distance.patch (100%) rename patches/{unapplied => }/server/Convert-legacy-attributes-in-Item-Meta.patch (100%) rename patches/{unapplied => }/server/Create-HoverEvent-from-ItemStack-Entity.patch (100%) rename patches/{unapplied => }/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch (99%) rename patches/{unapplied => }/server/Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch (100%) rename patches/{unapplied => }/server/Do-not-let-the-server-load-chunks-from-newer-version.patch (100%) rename patches/{unapplied => }/server/Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch (98%) rename patches/{unapplied => }/server/Don-t-apply-cramming-damage-to-players.patch (100%) rename patches/{unapplied => }/server/Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch (100%) rename patches/{unapplied => }/server/Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch (100%) rename patches/{unapplied => }/server/Don-t-fire-BlockFade-on-worldgen-threads.patch (100%) rename patches/{unapplied => }/server/Don-t-ignore-result-of-PlayerEditBookEvent.patch (100%) rename patches/{unapplied => }/server/Don-t-require-FACING-data.patch (100%) create mode 100644 patches/server/Don-t-run-entity-collision-code-if-not-needed.patch rename patches/{unapplied => }/server/Drop-carried-item-when-player-has-disconnected.patch (100%) rename patches/{unapplied => }/server/Eigencraft-redstone-implementation.patch (100%) rename patches/{unapplied => }/server/Empty-commands-shall-not-be-dispatched.patch (100%) rename patches/{unapplied => }/server/Enhance-console-tab-completions-for-brigadier-comman.patch (100%) rename patches/{unapplied => }/server/Ensure-Entity-AABB-s-are-never-invalid.patch (100%) rename patches/{unapplied => }/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch (100%) rename patches/{unapplied => }/server/Ensure-disconnect-for-book-edit-is-called-on-main.patch (100%) rename patches/{unapplied => }/server/Ensure-safe-gateway-teleport.patch (100%) rename patches/{unapplied => }/server/Entity-isTicking.patch (100%) rename patches/{unapplied => }/server/Entity-load-save-limit-per-chunk.patch (99%) rename patches/{unapplied => }/server/EntityMoveEvent.patch (100%) rename patches/{unapplied => }/server/Expand-world-key-API.patch (88%) rename patches/{unapplied => }/server/ExperienceOrbMergeEvent.patch (100%) rename patches/{unapplied => }/server/Expose-LivingEntity-hurt-direction.patch (100%) rename patches/{unapplied => }/server/Expose-Tracked-Players.patch (100%) rename patches/{unapplied => }/server/Expose-game-version.patch (100%) rename patches/{unapplied => }/server/Expose-protocol-version.patch (100%) rename patches/{unapplied => }/server/Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch (100%) rename patches/{unapplied => }/server/Expose-world-spawn-angle.patch (100%) rename patches/{unapplied => }/server/Extend-block-drop-capture-to-capture-all-items-added.patch (100%) rename patches/{unapplied => }/server/Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch (100%) rename patches/{unapplied => }/server/Fix-Concurrency-issue-in-ShufflingList.patch (85%) rename patches/{unapplied => }/server/Fix-CraftPotionBrewer-cache.patch (100%) rename patches/{unapplied => }/server/Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch (100%) rename patches/{unapplied => }/server/Fix-CraftSound-backwards-compatibility.patch (92%) rename patches/{unapplied => }/server/Fix-CraftTeam-null-check.patch (100%) rename patches/{unapplied => }/server/Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch (100%) rename patches/{unapplied => }/server/Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch (91%) rename patches/{unapplied => }/server/Fix-Not-a-string-Map-Conversion-spam.patch (100%) rename patches/{unapplied => }/server/Fix-Per-World-Difficulty-Remembering-Difficulty.patch (99%) rename patches/{unapplied => }/server/Fix-Player-spawnParticle-x-y-z-precision-loss.patch (100%) rename patches/{unapplied => }/server/Fix-PlayerBucketEmptyEvent-result-itemstack.patch (100%) rename patches/{unapplied => }/server/Fix-PlayerDropItemEvent-using-wrong-item.patch (100%) rename patches/{unapplied => }/server/Fix-PlayerItemConsumeEvent-cancelling-properly.patch (100%) rename patches/{unapplied => }/server/Fix-PotionEffect-ignores-icon-flag.patch (100%) rename patches/{unapplied => }/server/Fix-PotionSplashEvent-for-water-splash-potions.patch (79%) rename patches/{unapplied => }/server/Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch (100%) rename patches/{unapplied => }/server/Fix-SPIGOT-5885-Unable-to-disable-advancements.patch (100%) rename patches/{unapplied => }/server/Fix-SPIGOT-5989.patch (100%) rename patches/{unapplied => }/server/Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch (100%) rename patches/{unapplied => }/server/Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch (100%) rename patches/{unapplied => }/server/Fix-and-optimise-world-force-upgrading.patch (97%) rename patches/{unapplied => }/server/Fix-arrows-never-despawning-MC-125757.patch (100%) rename patches/{unapplied => }/server/Fix-block-drops-position-losing-precision-millions-o.patch (100%) rename patches/{unapplied => }/server/Fix-checkReach-check-for-Shulker-boxes.patch (100%) rename patches/{unapplied => }/server/Fix-client-lag-on-advancement-loading.patch (100%) rename patches/{unapplied => }/server/Fix-commands-from-signs-not-firing-command-events.patch (100%) rename patches/{unapplied => }/server/Fix-curing-zombie-villager-discount-exploit.patch (100%) rename patches/{unapplied => }/server/Fix-dangerous-end-portal-logic.patch (100%) rename patches/{unapplied => }/server/Fix-deop-kicking-non-whitelisted-player-when-white-l.patch (100%) rename patches/{unapplied => }/server/Fix-for-large-move-vectors-crashing-server.patch (100%) rename patches/{unapplied => }/server/Fix-harming-potion-dupe.patch (100%) rename patches/{unapplied => }/server/Fix-hex-colors-not-working-in-some-kick-messages.patch (99%) rename patches/{unapplied => }/server/Fix-incorrect-message-for-outdated-client.patch (100%) rename patches/{unapplied => }/server/Fix-incosistency-issue-with-empty-map-items-in-CB.patch (100%) rename patches/{unapplied => }/server/Fix-interact-event-not-being-called-in-adventure.patch (81%) rename patches/{unapplied => }/server/Fix-invulnerable-end-crystals.patch (86%) rename patches/{unapplied => }/server/Fix-issues-with-mob-conversion.patch (100%) rename patches/{unapplied => }/server/Fix-item-locations-dropped-from-campfires.patch (71%) rename patches/{unapplied => }/server/Fix-missing-chunks-due-to-integer-overflow.patch (100%) rename patches/{unapplied => }/server/Fix-nerfed-slime-when-splitting.patch (71%) rename patches/{unapplied => }/server/Fix-numerous-item-duplication-issues-and-teleport-is.patch (100%) rename patches/{unapplied => }/server/Fix-piston-physics-inconsistency-MC-188840.patch (100%) rename patches/{unapplied => }/server/Fix-regex-mistake-in-CB-NBT-int-deserialization.patch (100%) rename patches/{unapplied => }/server/Fix-return-value-of-Block-applyBoneMeal-always-being.patch (100%) rename patches/{unapplied => }/server/Fix-sand-duping.patch (100%) rename patches/{unapplied => }/server/Fix-some-rails-connecting-improperly.patch (100%) rename patches/{unapplied => }/server/Fix-test-not-bootstrapping.patch (100%) rename patches/{unapplied => }/server/Fix-villager-boat-exploit.patch (100%) rename patches/{unapplied => }/server/Fix-villager-trading-demand-MC-163962.patch (100%) rename patches/{unapplied => }/server/Fixed-TileEntityBell-memory-leak.patch (100%) rename patches/{unapplied => }/server/Fixes-kick-event-leave-message-not-being-sent.patch (97%) rename patches/{unapplied => }/server/Get-entity-default-attributes.patch (100%) rename patches/{unapplied => }/server/Goat-ram-API.patch (100%) rename patches/{unapplied => }/server/Guardian-beam-workaround.patch (100%) rename patches/{unapplied => }/server/Hide-sync-chunk-writes-behind-flag.patch (100%) rename patches/{unapplied => }/server/Implement-API-to-expose-exact-interaction-point.patch (100%) rename patches/{unapplied => }/server/Implement-API-to-get-Material-from-Boats-and-Minecar.patch (100%) rename patches/{unapplied => }/server/Implement-BlockPreDispenseEvent.patch (100%) rename patches/{unapplied => }/server/Implement-Mob-Goal-API.patch (100%) rename patches/{unapplied => }/server/Implement-Player-Client-Options-API.patch (100%) rename patches/{unapplied => }/server/Implement-PlayerFlowerPotManipulateEvent.patch (100%) rename patches/{unapplied => }/server/Implement-TargetHitEvent.patch (100%) rename patches/{unapplied => }/server/Implement-methods-to-convert-between-Component-and-B.patch (100%) rename patches/{unapplied => }/server/Implemented-BlockFailedDispenseEvent.patch (100%) rename patches/{unapplied => }/server/Improve-Arrow-API.patch (100%) rename patches/{unapplied => }/server/Improve-Legacy-Component-serialization-size.patch (100%) rename patches/{unapplied => }/server/Improve-ServerGUI.patch (100%) rename patches/{unapplied => }/server/Improve-boat-collision-performance.patch (93%) rename patches/{unapplied => }/server/Inline-shift-direction-fields.patch (100%) rename patches/{unapplied => }/server/Introduce-beacon-activation-deactivation-events.patch (96%) rename patches/{unapplied => }/server/Inventory-close.patch (100%) rename patches/{unapplied => }/server/Inventory-getHolder-method-without-block-snapshot.patch (100%) rename patches/{unapplied => }/server/Item-Rarity-API.patch (100%) rename patches/{unapplied => }/server/Item-no-age-no-player-pickup.patch (100%) rename patches/{unapplied => }/server/ItemStack-repair-check-API.patch (100%) rename patches/{unapplied => }/server/Lazily-track-plugin-scoreboards-by-default.patch (100%) rename patches/{unapplied => }/server/Left-handed-API.patch (100%) rename patches/{unapplied => }/server/Limit-item-frame-cursors-on-maps.patch (100%) rename patches/{unapplied => }/server/Limit-recipe-packets.patch (100%) rename patches/{unapplied => }/server/Line-Of-Sight-Changes.patch (100%) rename patches/{unapplied => }/server/Load-Chunks-for-Login-Asynchronously.patch (98%) rename patches/{unapplied => }/server/MC-4-Fix-item-position-desync.patch (85%) rename patches/{unapplied => }/server/Make-EntityUnleashEvent-cancellable.patch (100%) rename patches/{unapplied => }/server/Make-hoppers-respect-inventory-max-stack-size.patch (100%) rename patches/{unapplied => }/server/Make-item-validations-configurable.patch (100%) rename patches/{unapplied => }/server/Make-schedule-command-per-world.patch (100%) rename patches/{unapplied => }/server/Maps-shouldn-t-load-chunks.patch (73%) rename patches/{unapplied => }/server/Merchant-getRecipes-should-return-an-immutable-list.patch (100%) rename patches/{unapplied => }/server/Missing-Entity-Behavior-API.patch (99%) rename patches/{unapplied => }/server/More-CommandBlock-API.patch (100%) rename patches/{unapplied => }/server/More-Enchantment-API.patch (100%) rename patches/{unapplied => }/server/More-Lidded-Block-API.patch (100%) rename patches/{unapplied => }/server/More-World-API.patch (100%) rename patches/{unapplied => }/server/More-lightning-API.patch (100%) rename patches/{unapplied => }/server/Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch (100%) rename patches/{unapplied => }/server/Move-range-check-for-block-placing-up.patch (56%) rename patches/{unapplied => }/server/Optimise-getType-calls.patch (97%) rename patches/{unapplied => }/server/Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch (100%) rename patches/{unapplied => }/server/Optimize-Bit-Operations-by-inlining.patch (100%) rename patches/{unapplied => }/server/Optimize-Dynamic-get-Missing-Keys.patch (100%) rename patches/{unapplied => }/server/Optimize-NetworkManager-Exception-Handling.patch (100%) rename patches/{unapplied => }/server/Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch (100%) rename patches/{unapplied => }/server/Optimize-Voxel-Shape-Merging.patch (100%) rename patches/{unapplied => }/server/Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch (99%) rename patches/{unapplied => }/server/Optimize-brigadier-child-sorting-performance.patch (100%) rename patches/{unapplied => }/server/Optimize-entity-tracker-passenger-checks.patch (100%) rename patches/{unapplied => }/server/Optimize-indirect-passenger-iteration.patch (100%) rename patches/{unapplied => }/server/Optimize-the-advancement-data-player-iteration-to-be.patch (100%) rename patches/{unapplied => }/server/Option-for-maximum-exp-value-when-merging-orbs.patch (100%) rename patches/{unapplied => }/server/Option-to-prevent-NBT-copy-in-smithing-recipes.patch (100%) rename patches/{unapplied => }/server/Paper-dumpitem-command.patch (100%) rename patches/{unapplied => }/server/Player-Chunk-Load-Unload-Events.patch (100%) rename patches/{unapplied => }/server/Player-elytra-boost-API.patch (100%) rename patches/{unapplied => }/server/PortalCreateEvent-needs-to-know-its-entity.patch (97%) rename patches/{unapplied => }/server/Potential-bed-API.patch (100%) rename patches/{unapplied => }/server/Prevent-AFK-kick-while-watching-end-credits.patch (100%) rename patches/{unapplied => }/server/Prevent-grindstones-from-overstacking-items.patch (100%) rename patches/{unapplied => }/server/Prevent-headless-pistons-from-being-created.patch (100%) rename patches/{unapplied => }/server/Prevent-opening-inventories-when-frozen.patch (100%) rename patches/{unapplied => }/server/Prevent-position-desync-in-playerconnection-causing-.patch (100%) rename patches/{unapplied => }/server/Prevent-teleporting-dead-entities.patch (100%) rename patches/{unapplied => }/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch (97%) rename patches/{unapplied => }/server/Rate-options-and-timings-for-sensors-and-behaviors.patch (97%) rename patches/{unapplied => }/server/Reduce-MutableInt-allocations-from-light-engine.patch (100%) rename patches/{unapplied => }/server/Reduce-allocation-of-Vec3D-by-entity-tracker.patch (96%) rename patches/{unapplied => }/server/Reduce-blockpos-allocation-from-pathfinding.patch (100%) rename patches/{unapplied => }/server/Remove-ProjectileHitEvent-call-when-fireballs-dead.patch (100%) rename patches/{unapplied => }/server/Remove-some-streams-from-structures.patch (100%) rename patches/{unapplied => }/server/Remove-stale-POIs.patch (100%) rename patches/{unapplied => }/server/Remove-streams-from-SensorNearest.patch (100%) rename patches/{unapplied => }/server/Remove-streams-from-classes-related-villager-gossip.patch (73%) rename patches/{unapplied => }/server/Reset-Ender-Crystals-on-Dragon-Spawn.patch (77%) rename patches/{unapplied => }/server/Reset-shield-blocking-on-dimension-change.patch (100%) rename patches/{unapplied => }/server/Retain-block-place-order-when-capturing-blockstates.patch (100%) rename patches/{unapplied => }/server/Return-chat-component-with-empty-text-instead-of-thr.patch (100%) rename patches/{unapplied => }/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch (100%) rename patches/{unapplied => }/server/Send-empty-commands-if-tab-completion-is-disabled.patch (100%) rename patches/{unapplied => }/server/Set-area-affect-cloud-rotation.patch (100%) rename patches/{unapplied => }/server/Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch (100%) rename patches/{unapplied => }/server/Significantly-improve-performance-of-the-end-generat.patch (100%) rename patches/{unapplied => }/server/Spawn-player-in-correct-world-on-login.patch (100%) rename patches/{unapplied => }/server/Stinger-API.patch (100%) rename patches/{unapplied => }/server/Stop-copy-on-write-operations-for-updating-light-dat.patch (100%) rename patches/{unapplied => }/server/Support-components-in-ItemMeta.patch (100%) rename patches/{unapplied => }/server/Support-old-UUID-format-for-NBT.patch (100%) rename patches/{unapplied => }/server/Synchronize-PalettedContainer-instead-of-ThreadingDe.patch (100%) rename patches/{unapplied => }/server/Thread-Safe-Vanilla-Command-permission-checking.patch (100%) rename patches/{unapplied => }/server/Throw-proper-exception-on-empty-JsonList-file.patch (100%) rename patches/{unapplied => }/server/Toggle-for-removing-existing-dragon.patch (100%) rename patches/{unapplied => }/server/Update-itemstack-legacy-name-and-lore.patch (100%) rename patches/{unapplied => }/server/Use-distance-map-to-optimise-entity-tracker.patch (100%) rename patches/{unapplied => }/server/Use-getChunkIfLoadedImmediately-in-places.patch (79%) rename patches/{unapplied => }/server/Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch (100%) rename patches/{unapplied => }/server/Validate-PickItem-Packet-and-kick-for-invalid.patch (100%) rename patches/{unapplied => }/server/Vanilla-command-permission-fixes.patch (100%) rename patches/{unapplied => }/server/Villager-Restocks-API.patch (100%) rename patches/{unapplied => }/server/Villager-resetOffers.patch (100%) rename patches/{unapplied => }/server/Wait-for-Async-Tasks-during-shutdown.patch (100%) rename patches/{unapplied => }/server/Zombie-API-breaking-doors.patch (100%) rename patches/{unapplied => }/server/add-DragonEggFormEvent.patch (100%) rename patches/{unapplied => }/server/add-RespawnFlags-to-PlayerRespawnEvent.patch (100%) rename patches/{unapplied => }/server/add-consumeFuel-to-FurnaceBurnEvent.patch (100%) rename patches/{unapplied => }/server/add-get-set-drop-chance-to-EntityEquipment.patch (100%) rename patches/{unapplied => }/server/add-isDeeplySleeping-to-HumanEntity.patch (100%) rename patches/{unapplied => }/server/add-per-world-spawn-limits.patch (100%) rename patches/{unapplied => }/server/added-PlayerNameEntityEvent.patch (100%) rename patches/{unapplied => }/server/added-option-to-disable-pathfinding-updates-on-block.patch (100%) rename patches/{unapplied => }/server/additions-to-PlayerGameModeChangeEvent.patch (96%) rename patches/{unapplied => }/server/copy-TESign-isEditable-from-snapshots.patch (89%) rename patches/{unapplied => }/server/fix-PigZombieAngerEvent-cancellation.patch (93%) rename patches/{unapplied => }/server/fix-PlayerItemHeldEvent-firing-twice.patch (100%) rename patches/{unapplied => }/server/fix-converting-txt-to-json-file.patch (100%) rename patches/{unapplied => }/server/fix-dead-slime-setSize-invincibility.patch (100%) rename patches/{unapplied => }/server/forced-whitelist-use-configurable-kick-message.patch (100%) rename patches/{unapplied => }/server/incremental-chunk-and-player-saving.patch (100%) rename patches/{unapplied => }/server/living-entity-allow-attribute-registration.patch (96%) rename patches/{unapplied => }/server/misc-debugging-dumps.patch (97%) rename patches/{unapplied => }/server/stop-firing-pressure-plate-EntityInteractEvent-for-i.patch (100%) delete mode 100644 patches/unapplied/server/Don-t-allow-null-UUID-s-for-chat.patch delete mode 100644 patches/unapplied/server/Don-t-run-entity-collision-code-if-not-needed.patch delete mode 100644 patches/unapplied/server/Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch delete mode 100644 patches/unapplied/server/Improve-inlinig-for-some-hot-IBlockData-methods.patch delete mode 100644 patches/unapplied/server/Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch diff --git a/patches/unapplied/server/Add-API-for-quit-reason.patch b/patches/server/Add-API-for-quit-reason.patch similarity index 97% rename from patches/unapplied/server/Add-API-for-quit-reason.patch rename to patches/server/Add-API-for-quit-reason.patch index 6e14736474..edbd552881 100644 --- a/patches/unapplied/server/Add-API-for-quit-reason.patch +++ b/patches/server/Add-API-for-quit-reason.patch @@ -29,13 +29,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -0,0 +0,0 @@ public class ServerPlayer extends Player { - public boolean isRealPlayer; // Paper public double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper + public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper + public org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - there are a lot of changes to do if we change all methods leading to the event - public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, @Nullable ProfilePublicKey publicKey) { - super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile, publicKey); + public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile) { + super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/patches/unapplied/server/Add-API-for-resetting-a-single-score.patch b/patches/server/Add-API-for-resetting-a-single-score.patch similarity index 100% rename from patches/unapplied/server/Add-API-for-resetting-a-single-score.patch rename to patches/server/Add-API-for-resetting-a-single-score.patch diff --git a/patches/unapplied/server/Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch b/patches/server/Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch similarity index 100% rename from patches/unapplied/server/Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch rename to patches/server/Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch diff --git a/patches/unapplied/server/Add-BellRevealRaiderEvent.patch b/patches/server/Add-BellRevealRaiderEvent.patch similarity index 100% rename from patches/unapplied/server/Add-BellRevealRaiderEvent.patch rename to patches/server/Add-BellRevealRaiderEvent.patch diff --git a/patches/unapplied/server/Add-BellRingEvent.patch b/patches/server/Add-BellRingEvent.patch similarity index 100% rename from patches/unapplied/server/Add-BellRingEvent.patch rename to patches/server/Add-BellRingEvent.patch diff --git a/patches/unapplied/server/Add-Block-isValidTool.patch b/patches/server/Add-Block-isValidTool.patch similarity index 100% rename from patches/unapplied/server/Add-Block-isValidTool.patch rename to patches/server/Add-Block-isValidTool.patch diff --git a/patches/unapplied/server/Add-BlockBreakBlockEvent.patch b/patches/server/Add-BlockBreakBlockEvent.patch similarity index 98% rename from patches/unapplied/server/Add-BlockBreakBlockEvent.patch rename to patches/server/Add-BlockBreakBlockEvent.patch index a69674fc5e..4b5f50938b 100644 --- a/patches/unapplied/server/Add-BlockBreakBlockEvent.patch +++ b/patches/server/Add-BlockBreakBlockEvent.patch @@ -71,7 +71,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/level/material/WaterFluid.java +++ b/src/main/java/net/minecraft/world/level/material/WaterFluid.java @@ -0,0 +0,0 @@ public abstract class WaterFluid extends FlowingFluid { - return true; + return world.getGameRules().getBoolean(GameRules.RULE_WATER_SOURCE_CONVERSION); } + // Paper start diff --git a/patches/unapplied/server/Add-Channel-initialization-listeners.patch b/patches/server/Add-Channel-initialization-listeners.patch similarity index 100% rename from patches/unapplied/server/Add-Channel-initialization-listeners.patch rename to patches/server/Add-Channel-initialization-listeners.patch diff --git a/patches/unapplied/server/Add-Destroy-Speed-API.patch b/patches/server/Add-Destroy-Speed-API.patch similarity index 100% rename from patches/unapplied/server/Add-Destroy-Speed-API.patch rename to patches/server/Add-Destroy-Speed-API.patch diff --git a/patches/unapplied/server/Add-ElderGuardianAppearanceEvent.patch b/patches/server/Add-ElderGuardianAppearanceEvent.patch similarity index 100% rename from patches/unapplied/server/Add-ElderGuardianAppearanceEvent.patch rename to patches/server/Add-ElderGuardianAppearanceEvent.patch diff --git a/patches/unapplied/server/Add-EntityBlockStorage-clearEntities.patch b/patches/server/Add-EntityBlockStorage-clearEntities.patch similarity index 100% rename from patches/unapplied/server/Add-EntityBlockStorage-clearEntities.patch rename to patches/server/Add-EntityBlockStorage-clearEntities.patch diff --git a/patches/unapplied/server/Add-EntityInsideBlockEvent.patch b/patches/server/Add-EntityInsideBlockEvent.patch similarity index 99% rename from patches/unapplied/server/Add-EntityInsideBlockEvent.patch rename to patches/server/Add-EntityInsideBlockEvent.patch index c361553914..5abbaf9672 100644 --- a/patches/unapplied/server/Add-EntityInsideBlockEvent.patch +++ b/patches/server/Add-EntityInsideBlockEvent.patch @@ -56,12 +56,12 @@ diff --git a/src/main/java/net/minecraft/world/level/block/ButtonBlock.java b/sr index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/block/ButtonBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ButtonBlock.java -@@ -0,0 +0,0 @@ public abstract class ButtonBlock extends FaceAttachedHorizontalDirectionalBlock +@@ -0,0 +0,0 @@ public class ButtonBlock extends FaceAttachedHorizontalDirectionalBlock { @Override public void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - if (!world.isClientSide && this.sensitive && !(Boolean) state.getValue(ButtonBlock.POWERED)) { + if (!world.isClientSide && this.arrowsCanPress && !(Boolean) state.getValue(ButtonBlock.POWERED)) { this.checkPressed(state, world, pos); } diff --git a/src/main/java/net/minecraft/world/level/block/CactusBlock.java b/src/main/java/net/minecraft/world/level/block/CactusBlock.java diff --git a/patches/unapplied/server/Add-EntityLoadCrossbowEvent.patch b/patches/server/Add-EntityLoadCrossbowEvent.patch similarity index 100% rename from patches/unapplied/server/Add-EntityLoadCrossbowEvent.patch rename to patches/server/Add-EntityLoadCrossbowEvent.patch diff --git a/patches/unapplied/server/Add-ItemFactory-getSpawnEgg-API.patch b/patches/server/Add-ItemFactory-getSpawnEgg-API.patch similarity index 100% rename from patches/unapplied/server/Add-ItemFactory-getSpawnEgg-API.patch rename to patches/server/Add-ItemFactory-getSpawnEgg-API.patch diff --git a/patches/unapplied/server/Add-LivingEntity-clearActiveItem.patch b/patches/server/Add-LivingEntity-clearActiveItem.patch similarity index 100% rename from patches/unapplied/server/Add-LivingEntity-clearActiveItem.patch rename to patches/server/Add-LivingEntity-clearActiveItem.patch diff --git a/patches/unapplied/server/Add-Mob-lookAt-API.patch b/patches/server/Add-Mob-lookAt-API.patch similarity index 100% rename from patches/unapplied/server/Add-Mob-lookAt-API.patch rename to patches/server/Add-Mob-lookAt-API.patch diff --git a/patches/unapplied/server/Add-OBSTRUCTED-reason-to-BedEnterResult.patch b/patches/server/Add-OBSTRUCTED-reason-to-BedEnterResult.patch similarity index 100% rename from patches/unapplied/server/Add-OBSTRUCTED-reason-to-BedEnterResult.patch rename to patches/server/Add-OBSTRUCTED-reason-to-BedEnterResult.patch diff --git a/patches/unapplied/server/Add-PaperRegistry.patch b/patches/server/Add-PaperRegistry.patch similarity index 94% rename from patches/unapplied/server/Add-PaperRegistry.patch rename to patches/server/Add-PaperRegistry.patch index 2bad1231e2..5b49788730 100644 --- a/patches/unapplied/server/Add-PaperRegistry.patch +++ b/patches/server/Add-PaperRegistry.patch @@ -197,8 +197,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop layers = RegistryLayer.createRegistryAccess(); + layers = WorldLoader.loadAndReplaceLayer(resourceManager, layers, RegistryLayer.WORLDGEN, RegistryDataLoader.WORLDGEN_REGISTRIES); + REGISTRY_CUSTOM = layers.compositeAccess().freeze(); + // Paper start + try { + java.lang.reflect.Field field = io.papermc.paper.registry.PaperRegistry.class.getDeclaredField("REGISTRY_ACCESS"); @@ -238,5 +238,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // Paper end // Register vanilla pack - DATA_PACK = ReloadableServerResources.loadResources(resourceManager, REGISTRY_CUSTOM, Commands.CommandSelection.DEDICATED, 0, MoreExecutors.directExecutor(), MoreExecutors.directExecutor()).join(); + DATA_PACK = ReloadableServerResources.loadResources(resourceManager, REGISTRY_CUSTOM, FeatureFlags.REGISTRY.allFlags(), Commands.CommandSelection.DEDICATED, 0, MoreExecutors.directExecutor(), MoreExecutors.directExecutor()).join(); // Bind tags diff --git a/patches/unapplied/server/Add-PlayerAttackEntityCooldownResetEvent.patch b/patches/server/Add-PlayerAttackEntityCooldownResetEvent.patch similarity index 100% rename from patches/unapplied/server/Add-PlayerAttackEntityCooldownResetEvent.patch rename to patches/server/Add-PlayerAttackEntityCooldownResetEvent.patch diff --git a/patches/unapplied/server/Add-PlayerItemCooldownEvent.patch b/patches/server/Add-PlayerItemCooldownEvent.patch similarity index 100% rename from patches/unapplied/server/Add-PlayerItemCooldownEvent.patch rename to patches/server/Add-PlayerItemCooldownEvent.patch diff --git a/patches/unapplied/server/Add-PlayerKickEvent-causes.patch b/patches/server/Add-PlayerKickEvent-causes.patch similarity index 94% rename from patches/unapplied/server/Add-PlayerKickEvent-causes.patch rename to patches/server/Add-PlayerKickEvent-causes.patch index 4b0c8423dd..0573283e79 100644 --- a/patches/unapplied/server/Add-PlayerKickEvent-causes.patch +++ b/patches/server/Add-PlayerKickEvent-causes.patch @@ -95,7 +95,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this.disconnect(Component.translatable("multiplayer.disconnect.idling"), org.bukkit.event.player.PlayerKickEvent.Cause.IDLING); // Paper - kick event cause } - this.chatPreviewThrottler.tick(); + } @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return this.server.isSingleplayerOwner(this.player.getGameProfile()); } @@ -115,13 +115,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public void disconnect(final Component reason) { - this.disconnect(PaperAdventure.asAdventure(reason)); + this.disconnect(PaperAdventure.asAdventure(reason), org.bukkit.event.player.PlayerKickEvent.Cause.UNKNOWN); -+ } -+ -+ public void disconnect(final Component reason, PlayerKickEvent.Cause cause) { -+ this.disconnect(PaperAdventure.asAdventure(reason), cause); } - public void disconnect(net.kyori.adventure.text.Component reason) { ++ public void disconnect(final Component reason, PlayerKickEvent.Cause cause) { ++ this.disconnect(PaperAdventure.asAdventure(reason), cause); ++ } ++ + public void disconnect(net.kyori.adventure.text.Component reason, org.bukkit.event.player.PlayerKickEvent.Cause cause) { // Paper end // CraftBukkit start - fire PlayerKickEvent @@ -247,8 +247,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - this.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters")); + this.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_CHARACTERS); // Paper - add cause } else { - if (this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages())) { - // this.server.submit(() -> { // CraftBukkit - async chat + Optional optional = this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages()); + @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleChatCommand(ServerboundChatCommandPacket packet) { @@ -256,26 +256,50 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - this.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters")); + this.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_CHARACTERS); // Paper } else { - if (this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages())) { - this.server.submit(() -> { + Optional optional = this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages()); + @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - private boolean tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { + private Optional tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { if (!this.updateChatOrder(timestamp)) { ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'", this.player.getName().getString(), message); - this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat")); -+ this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event cause - return false; ++ this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event ca + return Optional.empty(); } else if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales this.send(new ClientboundSystemChatPacket(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED), false)); @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - } + this.detectRateSpam(s); // Spigot + } - if (!message.verify(chatsender)) { -- this.disconnect(Component.translatable("multiplayer.disconnect.unsigned_chat")); ++<<<<<<< HEAD ++======= ++ private boolean verifyChatMessage(PlayerChatMessage message) { ++ ChatSender chatsender = this.player.asChatSender(); ++ ProfilePublicKey profilepublickey = chatsender.profilePublicKey(); ++ ++ if (profilepublickey != null) { ++ if (profilepublickey.data().hasExpired()) { ++ this.player.sendSystemMessage(Component.translatable("chat.disabled.expiredProfileKey").withStyle(ChatFormatting.RED)); ++ return false; ++ } ++ ++ if (!message.verify(chatsender)) { + this.disconnect(Component.translatable("multiplayer.disconnect.unsigned_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.UNSIGNED_CHAT); // Paper - kick event cause - return false; - } - } ++ return false; ++ } ++ } ++ ++ if (message.hasExpiredServer(Instant.now())) { ++ ServerGamePacketListenerImpl.LOGGER.warn("{} sent expired chat: '{}'. Is the client/server system time unsynchronized?", this.player.getName().getString(), message.signedContent().plain()); ++ } ++ ++ return true; ++ } ++ ++>>>>>>> Add PlayerKickEvent causes + // Spigot start - spam exclusions + private void detectRateSpam(String s) { + // CraftBukkit start - replaced with thread safe throttle @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // this.chatSpamTickCount += 20; if (this.chatSpamTickCount.addAndGet(20) > 200 && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { @@ -286,11 +310,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + } - private void handleValidationFailure(Set reasons) { - ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message from {}, reasons: {}", this.player.getName().getString(), reasons.stream().map(LastSeenMessagesValidator.ErrorCondition::message).collect(Collectors.joining(","))); -- this.disconnect(Component.translatable("multiplayer.disconnect.chat_validation_failed")); + } ++<<<<<<< HEAD ++======= ++ ++ } ++ ++ private void handleValidationFailure(Set reasons) { ++ ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message from {}, reasons: {}", this.player.getName().getString(), reasons.stream().map(LastSeenMessagesValidator.ErrorCondition::message).collect(Collectors.joining(","))); + this.disconnect(Component.translatable("multiplayer.disconnect.chat_validation_failed"), org.bukkit.event.player.PlayerKickEvent.Cause.CHAT_VALIDATION_FAILED); // Paper - kick event cause ++>>>>>>> Add PlayerKickEvent causes } @Override @@ -313,8 +344,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } // Spigot End @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + // CraftBukkit end } - // CraftBukkit end } else { - ServerGamePacketListenerImpl.this.disconnect(Component.translatable("multiplayer.disconnect.invalid_entity_attacked")); + ServerGamePacketListenerImpl.this.disconnect(Component.translatable("multiplayer.disconnect.invalid_entity_attacked"), org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_ENTITY_ATTACKED); // Paper - add cause diff --git a/patches/unapplied/server/Add-PlayerSetSpawnEvent.patch b/patches/server/Add-PlayerSetSpawnEvent.patch similarity index 100% rename from patches/unapplied/server/Add-PlayerSetSpawnEvent.patch rename to patches/server/Add-PlayerSetSpawnEvent.patch diff --git a/patches/unapplied/server/Add-PlayerShearBlockEvent.patch b/patches/server/Add-PlayerShearBlockEvent.patch similarity index 98% rename from patches/unapplied/server/Add-PlayerShearBlockEvent.patch rename to patches/server/Add-PlayerShearBlockEvent.patch index bdf1df8b3a..7dd6f14880 100644 --- a/patches/unapplied/server/Add-PlayerShearBlockEvent.patch +++ b/patches/server/Add-PlayerShearBlockEvent.patch @@ -28,7 +28,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return InteractionResult.PASS; + } + // Paper end - world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BEEHIVE_SHEAR, SoundSource.NEUTRAL, 1.0F, 1.0F); + world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BEEHIVE_SHEAR, SoundSource.BLOCKS, 1.0F, 1.0F); - BeehiveBlock.dropHoneycomb(world, pos); + // Paper start - Add PlayerShearBlockEvent + for (org.bukkit.inventory.ItemStack itemDrop : event.getDrops()) { diff --git a/patches/unapplied/server/Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch b/patches/server/Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch similarity index 94% rename from patches/unapplied/server/Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch rename to patches/server/Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch index 50bb1c33b0..1f7520dd74 100644 --- a/patches/unapplied/server/Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch +++ b/patches/server/Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch @@ -124,44 +124,44 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class MerchantMenu extends AbstractContainerMenu { itemstack = itemstack1.copy(); - if (index == 2) { + if (slot == 2) { - if (!this.moveItemStackTo(itemstack1, 3, 39, true)) { + if (!this.moveItemStackTo(itemstack1, 3, 39, true, true)) { // Paper return ItemStack.EMPTY; } -- slot.onQuickCraft(itemstack1, itemstack); +- slot1.onQuickCraft(itemstack1, itemstack); - this.playTradeSound(); -+ // slot.onQuickCraft(itemstack1, itemstack); // Paper - moved to after the non-check moveItemStackTo call ++ // slot1.onQuickCraft(itemstack1, itemstack); // Paper - moved to after the non-check moveItemStackTo call + // this.playTradeSound(); - } else if (index != 0 && index != 1) { - if (index >= 3 && index < 30) { + } else if (slot != 0 && slot != 1) { + if (slot >= 3 && slot < 30) { if (!this.moveItemStackTo(itemstack1, 30, 39, false)) { @@ -0,0 +0,0 @@ public class MerchantMenu extends AbstractContainerMenu { return ItemStack.EMPTY; } -+ if (index != 2) { // Paper - moved down for slot 2 ++ if (slot != 2) { // Paper - moved down for slot 2 if (itemstack1.isEmpty()) { - slot.set(ItemStack.EMPTY); + slot1.set(ItemStack.EMPTY); } else { @@ -0,0 +0,0 @@ public class MerchantMenu extends AbstractContainerMenu { } - slot.onTake(player, itemstack1); + slot1.onTake(player, itemstack1); + } // Paper start - handle slot 2 -+ if (index == 2) { // is merchant result slot -+ slot.onTake(player, itemstack1); ++ if (slot == 2) { // is merchant result slot ++ slot1.onTake(player, itemstack1); + if (itemstack1.isEmpty()) { -+ slot.set(ItemStack.EMPTY); ++ slot1.set(ItemStack.EMPTY); + return ItemStack.EMPTY; + } + + this.moveItemStackTo(itemstack1, 3, 39, true, false); // This should always succeed because it's checked above + -+ slot.onQuickCraft(itemstack1, itemstack); ++ slot1.onQuickCraft(itemstack1, itemstack); + this.playTradeSound(); -+ slot.set(ItemStack.EMPTY); // itemstack1 should ALWAYS be empty ++ slot1.set(ItemStack.EMPTY); // itemstack1 should ALWAYS be empty + } + // Paper end } diff --git a/patches/unapplied/server/Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/patches/server/Add-Plugin-Tickets-to-API-Chunk-Methods.patch similarity index 100% rename from patches/unapplied/server/Add-Plugin-Tickets-to-API-Chunk-Methods.patch rename to patches/server/Add-Plugin-Tickets-to-API-Chunk-Methods.patch diff --git a/patches/unapplied/server/Add-PrepareResultEvent.patch b/patches/server/Add-PrepareResultEvent.patch similarity index 99% rename from patches/unapplied/server/Add-PrepareResultEvent.patch rename to patches/server/Add-PrepareResultEvent.patch index cf863b72c4..e8d8a1dd91 100644 --- a/patches/unapplied/server/Add-PrepareResultEvent.patch +++ b/patches/server/Add-PrepareResultEvent.patch @@ -74,7 +74,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/inventory/SmithingMenu.java +++ b/src/main/java/net/minecraft/world/inventory/SmithingMenu.java @@ -0,0 +0,0 @@ public class SmithingMenu extends ItemCombinerMenu { - // CraftBukkit end + } } + org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareResultEvent(this, RESULT_SLOT); // Paper diff --git a/patches/unapplied/server/Add-PufferFishStateChangeEvent.patch b/patches/server/Add-PufferFishStateChangeEvent.patch similarity index 100% rename from patches/unapplied/server/Add-PufferFishStateChangeEvent.patch rename to patches/server/Add-PufferFishStateChangeEvent.patch diff --git a/patches/unapplied/server/Add-Raw-Byte-Entity-Serialization.patch b/patches/server/Add-Raw-Byte-Entity-Serialization.patch similarity index 100% rename from patches/unapplied/server/Add-Raw-Byte-Entity-Serialization.patch rename to patches/server/Add-Raw-Byte-Entity-Serialization.patch diff --git a/patches/unapplied/server/Add-StructuresLocateEvent.patch b/patches/server/Add-StructuresLocateEvent.patch similarity index 89% rename from patches/unapplied/server/Add-StructuresLocateEvent.patch rename to patches/server/Add-StructuresLocateEvent.patch index 69dad626c0..ecc5f24d75 100644 --- a/patches/unapplied/server/Add-StructuresLocateEvent.patch +++ b/patches/server/Add-StructuresLocateEvent.patch @@ -99,16 +99,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + structures = HolderSet.direct(paperRegistry::getMinecraftHolder, event.getConfiguredStructures()); + } + // Paper end + ChunkGeneratorStructureState chunkgeneratorstructurestate = world.getChunkSource().getGeneratorState(); Map>> map = new Object2ObjectArrayMap(); Iterator iterator = structures.iterator(); - diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/Structure.java b/src/main/java/net/minecraft/world/level/levelgen/structure/Structure.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/structure/Structure.java +++ b/src/main/java/net/minecraft/world/level/levelgen/structure/Structure.java @@ -0,0 +0,0 @@ public abstract class Structure { - public static final Codec DIRECT_CODEC = Registry.STRUCTURE_TYPES.byNameCodec().dispatch(Structure::type, StructureType::codec); - public static final Codec> CODEC = RegistryFileCodec.create(Registry.STRUCTURE_REGISTRY, DIRECT_CODEC); + public static final Codec DIRECT_CODEC = BuiltInRegistries.STRUCTURE_TYPE.byNameCodec().dispatch(Structure::type, StructureType::codec); + public static final Codec> CODEC = RegistryFileCodec.create(Registries.STRUCTURE, DIRECT_CODEC); protected final Structure.StructureSettings settings; + static { io.papermc.paper.world.structure.PaperConfiguredStructure.init(); } // Paper @@ -212,3 +212,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + System.setOut(out); + } +} +diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java ++++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java +@@ -0,0 +0,0 @@ public abstract class AbstractTestingBase { + REGISTRY_CUSTOM = layers.compositeAccess().freeze(); + // Paper start + try { +- java.lang.reflect.Field field = io.papermc.paper.registry.PaperRegistry.class.getDeclaredField("REGISTRY_ACCESS"); ++ java.lang.reflect.Field field = io.papermc.paper.registry.PaperRegistry.class.getDeclaredField("REGISTRgY_ACCESS"); + field.trySetAccessible(); + field.set(null, com.google.common.base.Suppliers.ofInstance(REGISTRY_CUSTOM)); + } catch (ReflectiveOperationException ex) { diff --git a/patches/unapplied/server/Add-System.out-err-catcher.patch b/patches/server/Add-System.out-err-catcher.patch similarity index 100% rename from patches/unapplied/server/Add-System.out-err-catcher.patch rename to patches/server/Add-System.out-err-catcher.patch diff --git a/patches/unapplied/server/Add-Unix-domain-socket-support.patch b/patches/server/Add-Unix-domain-socket-support.patch similarity index 100% rename from patches/unapplied/server/Add-Unix-domain-socket-support.patch rename to patches/server/Add-Unix-domain-socket-support.patch diff --git a/patches/unapplied/server/Add-Wandering-Trader-spawn-rate-config-options.patch b/patches/server/Add-Wandering-Trader-spawn-rate-config-options.patch similarity index 100% rename from patches/unapplied/server/Add-Wandering-Trader-spawn-rate-config-options.patch rename to patches/server/Add-Wandering-Trader-spawn-rate-config-options.patch diff --git a/patches/unapplied/server/Add-a-bunch-of-missing-forceDrop-toggles.patch b/patches/server/Add-a-bunch-of-missing-forceDrop-toggles.patch similarity index 100% rename from patches/unapplied/server/Add-a-bunch-of-missing-forceDrop-toggles.patch rename to patches/server/Add-a-bunch-of-missing-forceDrop-toggles.patch diff --git a/patches/unapplied/server/Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch b/patches/server/Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch similarity index 100% rename from patches/unapplied/server/Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch rename to patches/server/Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch diff --git a/patches/unapplied/server/Add-additional-open-container-api-to-HumanEntity.patch b/patches/server/Add-additional-open-container-api-to-HumanEntity.patch similarity index 100% rename from patches/unapplied/server/Add-additional-open-container-api-to-HumanEntity.patch rename to patches/server/Add-additional-open-container-api-to-HumanEntity.patch diff --git a/patches/unapplied/server/Add-and-implement-PlayerRecipeBookClickEvent.patch b/patches/server/Add-and-implement-PlayerRecipeBookClickEvent.patch similarity index 100% rename from patches/unapplied/server/Add-and-implement-PlayerRecipeBookClickEvent.patch rename to patches/server/Add-and-implement-PlayerRecipeBookClickEvent.patch diff --git a/patches/unapplied/server/Add-back-EntityPortalExitEvent.patch b/patches/server/Add-back-EntityPortalExitEvent.patch similarity index 100% rename from patches/unapplied/server/Add-back-EntityPortalExitEvent.patch rename to patches/server/Add-back-EntityPortalExitEvent.patch diff --git a/patches/unapplied/server/Add-basic-Datapack-API.patch b/patches/server/Add-basic-Datapack-API.patch similarity index 100% rename from patches/unapplied/server/Add-basic-Datapack-API.patch rename to patches/server/Add-basic-Datapack-API.patch diff --git a/patches/unapplied/server/Add-bypass-host-check.patch b/patches/server/Add-bypass-host-check.patch similarity index 100% rename from patches/unapplied/server/Add-bypass-host-check.patch rename to patches/server/Add-bypass-host-check.patch diff --git a/patches/unapplied/server/Add-cause-to-Weather-ThunderChangeEvents.patch b/patches/server/Add-cause-to-Weather-ThunderChangeEvents.patch similarity index 100% rename from patches/unapplied/server/Add-cause-to-Weather-ThunderChangeEvents.patch rename to patches/server/Add-cause-to-Weather-ThunderChangeEvents.patch diff --git a/patches/unapplied/server/Add-config-for-mobs-immune-to-default-effects.patch b/patches/server/Add-config-for-mobs-immune-to-default-effects.patch similarity index 100% rename from patches/unapplied/server/Add-config-for-mobs-immune-to-default-effects.patch rename to patches/server/Add-config-for-mobs-immune-to-default-effects.patch diff --git a/patches/unapplied/server/Add-critical-damage-API.patch b/patches/server/Add-critical-damage-API.patch similarity index 98% rename from patches/unapplied/server/Add-critical-damage-API.patch rename to patches/server/Add-critical-damage-API.patch index fcb5dba2d4..bdd44387f1 100644 --- a/patches/unapplied/server/Add-critical-damage-API.patch +++ b/patches/server/Add-critical-damage-API.patch @@ -26,8 +26,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // Paper end - public static DamageSource sting(LivingEntity attacker) { - return new EntityDamageSource("sting", attacker); + public static DamageSource fallingBlock(Entity attacker) { + return (new EntityDamageSource("fallingBlock", attacker)).damageHelmet(); 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java diff --git a/patches/unapplied/server/Add-dropLeash-variable-to-EntityUnleashEvent.patch b/patches/server/Add-dropLeash-variable-to-EntityUnleashEvent.patch similarity index 100% rename from patches/unapplied/server/Add-dropLeash-variable-to-EntityUnleashEvent.patch rename to patches/server/Add-dropLeash-variable-to-EntityUnleashEvent.patch diff --git a/patches/unapplied/server/Add-entity-liquid-API.patch b/patches/server/Add-entity-liquid-API.patch similarity index 100% rename from patches/unapplied/server/Add-entity-liquid-API.patch rename to patches/server/Add-entity-liquid-API.patch diff --git a/patches/unapplied/server/Add-environment-variable-to-disable-server-gui.patch b/patches/server/Add-environment-variable-to-disable-server-gui.patch similarity index 100% rename from patches/unapplied/server/Add-environment-variable-to-disable-server-gui.patch rename to patches/server/Add-environment-variable-to-disable-server-gui.patch diff --git a/patches/unapplied/server/Add-fast-alternative-constructor-for-Rotations.patch b/patches/server/Add-fast-alternative-constructor-for-Rotations.patch similarity index 100% rename from patches/unapplied/server/Add-fast-alternative-constructor-for-Rotations.patch rename to patches/server/Add-fast-alternative-constructor-for-Rotations.patch diff --git a/patches/unapplied/server/Add-getMainThreadExecutor-to-BukkitScheduler.patch b/patches/server/Add-getMainThreadExecutor-to-BukkitScheduler.patch similarity index 100% rename from patches/unapplied/server/Add-getMainThreadExecutor-to-BukkitScheduler.patch rename to patches/server/Add-getMainThreadExecutor-to-BukkitScheduler.patch diff --git a/patches/unapplied/server/Add-getOfflinePlayerIfCached-String.patch b/patches/server/Add-getOfflinePlayerIfCached-String.patch similarity index 100% rename from patches/unapplied/server/Add-getOfflinePlayerIfCached-String.patch rename to patches/server/Add-getOfflinePlayerIfCached-String.patch diff --git a/patches/unapplied/server/Add-ignore-discounts-API.patch b/patches/server/Add-ignore-discounts-API.patch similarity index 100% rename from patches/unapplied/server/Add-ignore-discounts-API.patch rename to patches/server/Add-ignore-discounts-API.patch diff --git a/patches/unapplied/server/Add-isCollidable-methods-to-various-places.patch b/patches/server/Add-isCollidable-methods-to-various-places.patch similarity index 100% rename from patches/unapplied/server/Add-isCollidable-methods-to-various-places.patch rename to patches/server/Add-isCollidable-methods-to-various-places.patch diff --git a/patches/unapplied/server/Add-methods-to-find-targets-for-lightning-strikes.patch b/patches/server/Add-methods-to-find-targets-for-lightning-strikes.patch similarity index 100% rename from patches/unapplied/server/Add-methods-to-find-targets-for-lightning-strikes.patch rename to patches/server/Add-methods-to-find-targets-for-lightning-strikes.patch diff --git a/patches/unapplied/server/Add-methods-to-get-translation-keys.patch b/patches/server/Add-methods-to-get-translation-keys.patch similarity index 100% rename from patches/unapplied/server/Add-methods-to-get-translation-keys.patch rename to patches/server/Add-methods-to-get-translation-keys.patch diff --git a/patches/unapplied/server/Add-missing-strikeLighting-call-to-World-spigot-stri.patch b/patches/server/Add-missing-strikeLighting-call-to-World-spigot-stri.patch similarity index 100% rename from patches/unapplied/server/Add-missing-strikeLighting-call-to-World-spigot-stri.patch rename to patches/server/Add-missing-strikeLighting-call-to-World-spigot-stri.patch diff --git a/patches/unapplied/server/Add-missing-team-sidebar-display-slots.patch b/patches/server/Add-missing-team-sidebar-display-slots.patch similarity index 100% rename from patches/unapplied/server/Add-missing-team-sidebar-display-slots.patch rename to patches/server/Add-missing-team-sidebar-display-slots.patch diff --git a/patches/unapplied/server/Add-moon-phase-API.patch b/patches/server/Add-moon-phase-API.patch similarity index 100% rename from patches/unapplied/server/Add-moon-phase-API.patch rename to patches/server/Add-moon-phase-API.patch diff --git a/patches/unapplied/server/Add-more-Evoker-API.patch b/patches/server/Add-more-Evoker-API.patch similarity index 100% rename from patches/unapplied/server/Add-more-Evoker-API.patch rename to patches/server/Add-more-Evoker-API.patch diff --git a/patches/unapplied/server/Add-more-LimitedRegion-API.patch b/patches/server/Add-more-LimitedRegion-API.patch similarity index 100% rename from patches/unapplied/server/Add-more-LimitedRegion-API.patch rename to patches/server/Add-more-LimitedRegion-API.patch diff --git a/patches/unapplied/server/Add-more-WanderingTrader-API.patch b/patches/server/Add-more-WanderingTrader-API.patch similarity index 100% rename from patches/unapplied/server/Add-more-WanderingTrader-API.patch rename to patches/server/Add-more-WanderingTrader-API.patch diff --git a/patches/unapplied/server/Add-more-advancement-API.patch b/patches/server/Add-more-advancement-API.patch similarity index 100% rename from patches/unapplied/server/Add-more-advancement-API.patch rename to patches/server/Add-more-advancement-API.patch diff --git a/patches/unapplied/server/Add-option-for-console-having-all-permissions.patch b/patches/server/Add-option-for-console-having-all-permissions.patch similarity index 100% rename from patches/unapplied/server/Add-option-for-console-having-all-permissions.patch rename to patches/server/Add-option-for-console-having-all-permissions.patch diff --git a/patches/unapplied/server/Add-option-to-fix-items-merging-through-walls.patch b/patches/server/Add-option-to-fix-items-merging-through-walls.patch similarity index 100% rename from patches/unapplied/server/Add-option-to-fix-items-merging-through-walls.patch rename to patches/server/Add-option-to-fix-items-merging-through-walls.patch diff --git a/patches/unapplied/server/Add-permission-for-command-blocks.patch b/patches/server/Add-permission-for-command-blocks.patch similarity index 100% rename from patches/unapplied/server/Add-permission-for-command-blocks.patch rename to patches/server/Add-permission-for-command-blocks.patch diff --git a/patches/unapplied/server/Add-phantom-creative-and-insomniac-controls.patch b/patches/server/Add-phantom-creative-and-insomniac-controls.patch similarity index 100% rename from patches/unapplied/server/Add-phantom-creative-and-insomniac-controls.patch rename to patches/server/Add-phantom-creative-and-insomniac-controls.patch diff --git a/patches/unapplied/server/Add-playPickupItemAnimation-to-LivingEntity.patch b/patches/server/Add-playPickupItemAnimation-to-LivingEntity.patch similarity index 100% rename from patches/unapplied/server/Add-playPickupItemAnimation-to-LivingEntity.patch rename to patches/server/Add-playPickupItemAnimation-to-LivingEntity.patch diff --git a/patches/unapplied/server/Add-raw-address-to-AsyncPlayerPreLoginEvent.patch b/patches/server/Add-raw-address-to-AsyncPlayerPreLoginEvent.patch similarity index 98% rename from patches/unapplied/server/Add-raw-address-to-AsyncPlayerPreLoginEvent.patch rename to patches/server/Add-raw-address-to-AsyncPlayerPreLoginEvent.patch index 91b268517e..5f9e532f1d 100644 --- a/patches/unapplied/server/Add-raw-address-to-AsyncPlayerPreLoginEvent.patch +++ b/patches/server/Add-raw-address-to-AsyncPlayerPreLoginEvent.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListene index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se +@@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, public void fireEvents() throws Exception { String playerName = ServerLoginPacketListenerImpl.this.gameProfile.getName(); java.net.InetAddress address = ((java.net.InetSocketAddress) ServerLoginPacketListenerImpl.this.connection.getRemoteAddress()).getAddress(); diff --git a/patches/unapplied/server/Add-recipe-to-cook-events.patch b/patches/server/Add-recipe-to-cook-events.patch similarity index 86% rename from patches/unapplied/server/Add-recipe-to-cook-events.patch rename to patches/server/Add-recipe-to-cook-events.patch index a9704d6fb5..9f65de3dcb 100644 --- a/patches/unapplied/server/Add-recipe-to-cook-events.patch +++ b/patches/server/Add-recipe-to-cook-events.patch @@ -33,11 +33,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 }).orElse(itemstack); @@ -0,0 +0,0 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable { - CraftItemStack source = CraftItemStack.asCraftMirror(itemstack); - org.bukkit.inventory.ItemStack result = CraftItemStack.asBukkitCopy(itemstack1); + CraftItemStack source = CraftItemStack.asCraftMirror(itemstack); + org.bukkit.inventory.ItemStack result = CraftItemStack.asBukkitCopy(itemstack1); -- BlockCookEvent blockCookEvent = new BlockCookEvent(CraftBlock.at(world, pos), source, result); +- BlockCookEvent blockCookEvent = new BlockCookEvent(CraftBlock.at(world, pos), source, result); + BlockCookEvent blockCookEvent = new BlockCookEvent(CraftBlock.at(world, pos), source, result, (org.bukkit.inventory.CookingRecipe) recipe.map(CampfireCookingRecipe::toBukkitRecipe).orElse(null)); // Paper - world.getCraftServer().getPluginManager().callEvent(blockCookEvent); + world.getCraftServer().getPluginManager().callEvent(blockCookEvent); - if (blockCookEvent.isCancelled()) { + if (blockCookEvent.isCancelled()) { diff --git a/patches/unapplied/server/Add-sendOpLevel-API.patch b/patches/server/Add-sendOpLevel-API.patch similarity index 100% rename from patches/unapplied/server/Add-sendOpLevel-API.patch rename to patches/server/Add-sendOpLevel-API.patch diff --git a/patches/unapplied/server/Add-setMaxPlayers-API.patch b/patches/server/Add-setMaxPlayers-API.patch similarity index 92% rename from patches/unapplied/server/Add-setMaxPlayers-API.patch rename to patches/server/Add-setMaxPlayers-API.patch index 8585496ae5..eeb70e2464 100644 --- a/patches/unapplied/server/Add-setMaxPlayers-API.patch +++ b/patches/server/Add-setMaxPlayers-API.patch @@ -9,9 +9,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { - public final PlayerDataStorage playerIo; private boolean doWhiteList; - private final RegistryAccess.Frozen registryHolder; + private final LayeredRegistryAccess registries; + private final RegistryAccess.Frozen synchronizedRegistries; - protected final int maxPlayers; + protected int maxPlayers; public final void setMaxPlayers(int maxPlayers) { this.maxPlayers = maxPlayers; } // Paper - remove final and add setter private int viewDistance; diff --git a/patches/unapplied/server/Add-support-for-hex-color-codes-in-console.patch b/patches/server/Add-support-for-hex-color-codes-in-console.patch similarity index 100% rename from patches/unapplied/server/Add-support-for-hex-color-codes-in-console.patch rename to patches/server/Add-support-for-hex-color-codes-in-console.patch diff --git a/patches/unapplied/server/Add-toggle-for-always-placing-the-dragon-egg.patch b/patches/server/Add-toggle-for-always-placing-the-dragon-egg.patch similarity index 100% rename from patches/unapplied/server/Add-toggle-for-always-placing-the-dragon-egg.patch rename to patches/server/Add-toggle-for-always-placing-the-dragon-egg.patch diff --git a/patches/unapplied/server/Add-villager-reputation-API.patch b/patches/server/Add-villager-reputation-API.patch similarity index 95% rename from patches/unapplied/server/Add-villager-reputation-API.patch rename to patches/server/Add-villager-reputation-API.patch index ce840121cc..f14af843be 100644 --- a/patches/unapplied/server/Add-villager-reputation-API.patch +++ b/patches/server/Add-villager-reputation-API.patch @@ -11,9 +11,9 @@ diff --git a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer. index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java +++ b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java -@@ -0,0 +0,0 @@ import net.minecraft.util.VisibleForDebug; - +@@ -0,0 +0,0 @@ import org.slf4j.Logger; public class GossipContainer { + private static final Logger LOGGER = LogUtils.getLogger(); public static final int DISCARD_THRESHOLD = 2; - private final Map gossips = Maps.newHashMap(); + private final Map gossips = Maps.newHashMap(); public Map getReputations() { return this.gossips; } // Paper - add getter for reputations @@ -63,7 +63,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end } - static class GossipEntry { + static record GossipEntry(UUID target, GossipType type, int value) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java @@ -84,7 +84,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public CraftVillager(CraftServer server, net.minecraft.world.entity.npc.Villager entity) { @@ -0,0 +0,0 @@ public class CraftVillager extends CraftAbstractVillager implements Villager { public static VillagerProfession bukkitToNmsProfession(Profession bukkit) { - return Registry.VILLAGER_PROFESSION.get(CraftNamespacedKey.toMinecraft(bukkit.getKey())); + return BuiltInRegistries.VILLAGER_PROFESSION.get(CraftNamespacedKey.toMinecraft(bukkit.getKey())); } + + // Paper start - Add villager reputation API diff --git a/patches/unapplied/server/Add-worldborder-events.patch b/patches/server/Add-worldborder-events.patch similarity index 100% rename from patches/unapplied/server/Add-worldborder-events.patch rename to patches/server/Add-worldborder-events.patch diff --git a/patches/unapplied/server/Add-zombie-targets-turtle-egg-config.patch b/patches/server/Add-zombie-targets-turtle-egg-config.patch similarity index 100% rename from patches/unapplied/server/Add-zombie-targets-turtle-egg-config.patch rename to patches/server/Add-zombie-targets-turtle-egg-config.patch diff --git a/patches/unapplied/server/Added-EntityDamageItemEvent.patch b/patches/server/Added-EntityDamageItemEvent.patch similarity index 100% rename from patches/unapplied/server/Added-EntityDamageItemEvent.patch rename to patches/server/Added-EntityDamageItemEvent.patch diff --git a/patches/unapplied/server/Added-PlayerBedFailEnterEvent.patch b/patches/server/Added-PlayerBedFailEnterEvent.patch similarity index 100% rename from patches/unapplied/server/Added-PlayerBedFailEnterEvent.patch rename to patches/server/Added-PlayerBedFailEnterEvent.patch diff --git a/patches/unapplied/server/Added-PlayerDeepSleepEvent.patch b/patches/server/Added-PlayerDeepSleepEvent.patch similarity index 100% rename from patches/unapplied/server/Added-PlayerDeepSleepEvent.patch rename to patches/server/Added-PlayerDeepSleepEvent.patch diff --git a/patches/unapplied/server/Added-PlayerLecternPageChangeEvent.patch b/patches/server/Added-PlayerLecternPageChangeEvent.patch similarity index 100% rename from patches/unapplied/server/Added-PlayerLecternPageChangeEvent.patch rename to patches/server/Added-PlayerLecternPageChangeEvent.patch diff --git a/patches/unapplied/server/Added-PlayerLoomPatternSelectEvent.patch b/patches/server/Added-PlayerLoomPatternSelectEvent.patch similarity index 100% rename from patches/unapplied/server/Added-PlayerLoomPatternSelectEvent.patch rename to patches/server/Added-PlayerLoomPatternSelectEvent.patch diff --git a/patches/unapplied/server/Added-PlayerStonecutterRecipeSelectEvent.patch b/patches/server/Added-PlayerStonecutterRecipeSelectEvent.patch similarity index 100% rename from patches/unapplied/server/Added-PlayerStonecutterRecipeSelectEvent.patch rename to patches/server/Added-PlayerStonecutterRecipeSelectEvent.patch diff --git a/patches/unapplied/server/Added-ServerResourcesReloadedEvent.patch b/patches/server/Added-ServerResourcesReloadedEvent.patch similarity index 94% rename from patches/unapplied/server/Added-ServerResourcesReloadedEvent.patch rename to patches/server/Added-ServerResourcesReloadedEvent.patch index 4bc75d712a..c7028070cc 100644 --- a/patches/unapplied/server/Added-ServerResourcesReloadedEvent.patch +++ b/patches/server/Added-ServerResourcesReloadedEvent.patch @@ -19,12 +19,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + public CompletableFuture reloadResources(Collection dataPacks, io.papermc.paper.event.server.ServerResourcesReloadedEvent.Cause cause) { + // Paper end - RegistryAccess.Frozen iregistrycustom_dimension = this.registryAccess(); + RegistryAccess.Frozen iregistrycustom_dimension = this.registries.getAccessForLoading(RegistryLayer.RELOADABLE); CompletableFuture completablefuture = CompletableFuture.supplyAsync(() -> { Stream stream = dataPacks.stream(); // CraftBukkit - decompile error @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop process() { @@ -190,11 +188,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + final Component initialResult = input.message().component(); + final AsyncChatDecorateEvent event; ++ //TODO + if (this.commandSourceStack != null) { + // TODO more command decorate context -+ event = new AsyncChatCommandDecorateEvent(true, player, this.originalMessage, this.isPreview, initialResult); ++ event = new AsyncChatCommandDecorateEvent(true, player, this.originalMessage, false, initialResult); + } else { -+ event = new AsyncChatDecorateEvent(true, player, this.originalMessage, this.isPreview, initialResult); ++ event = new AsyncChatDecorateEvent(true, player, this.originalMessage, false, initialResult); + } + this.post(event); + if (!event.isCancelled() && !event.result().equals(initialResult)) { @@ -1902,8 +1901,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - }, chatExecutor); - }; + // Paper start - moved to ChatPreviewProcessor -+ return ChatDecorator.create((sender, commandSourceStack, message, isPreview) -> { -+ final io.papermc.paper.adventure.ChatDecorationProcessor processor = new io.papermc.paper.adventure.ChatDecorationProcessor(this, sender, commandSourceStack, message, isPreview); ++ return ChatDecorator.create((sender, commandSourceStack, message) -> { ++ final io.papermc.paper.adventure.ChatDecorationProcessor processor = new io.papermc.paper.adventure.ChatDecorationProcessor(this, sender, commandSourceStack, message); + return processor.process(); + }); + // Paper end diff --git a/patches/unapplied/server/Allow-adding-items-to-BlockDropItemEvent.patch b/patches/server/Allow-adding-items-to-BlockDropItemEvent.patch similarity index 100% rename from patches/unapplied/server/Allow-adding-items-to-BlockDropItemEvent.patch rename to patches/server/Allow-adding-items-to-BlockDropItemEvent.patch diff --git a/patches/unapplied/server/Allow-disabling-mob-spawner-spawn-egg-transformation.patch b/patches/server/Allow-disabling-mob-spawner-spawn-egg-transformation.patch similarity index 100% rename from patches/unapplied/server/Allow-disabling-mob-spawner-spawn-egg-transformation.patch rename to patches/server/Allow-disabling-mob-spawner-spawn-egg-transformation.patch diff --git a/patches/unapplied/server/Allow-skipping-writing-of-comments-to-server.propert.patch b/patches/server/Allow-skipping-writing-of-comments-to-server.propert.patch similarity index 100% rename from patches/unapplied/server/Allow-skipping-writing-of-comments-to-server.propert.patch rename to patches/server/Allow-skipping-writing-of-comments-to-server.propert.patch diff --git a/patches/unapplied/server/Allow-using-signs-inside-spawn-protection.patch b/patches/server/Allow-using-signs-inside-spawn-protection.patch similarity index 64% rename from patches/unapplied/server/Allow-using-signs-inside-spawn-protection.patch rename to patches/server/Allow-using-signs-inside-spawn-protection.patch index 2798e8fa00..3b2b9a0495 100644 --- a/patches/unapplied/server/Allow-using-signs-inside-spawn-protection.patch +++ b/patches/server/Allow-using-signs-inside-spawn-protection.patch @@ -9,11 +9,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - int i = this.player.level.getMaxBuildHeight(); + int i = this.player.level.getMaxBuildHeight(); - if (blockposition.getY() < i) { -- if (this.awaitingPositionFromClient == null && this.player.distanceToSqr((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && worldserver.mayInteract(this.player, blockposition)) { + if (blockposition.getY() < i) { +- if (this.awaitingPositionFromClient == null && this.player.distanceToSqr((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && worldserver.mayInteract(this.player, blockposition)) { + if (this.awaitingPositionFromClient == null && this.player.distanceToSqr((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && (worldserver.mayInteract(this.player, blockposition) || (worldserver.paperConfig().spawn.allowUsingSignsInsideSpawnProtection && worldserver.getBlockState(blockposition).getBlock() instanceof net.minecraft.world.level.block.SignBlock))) { // Paper - sign check - this.player.stopUsingItem(); // CraftBukkit - SPIGOT-4706 - InteractionResult enuminteractionresult = this.player.gameMode.useItemOn(this.player, worldserver, itemstack, enumhand, movingobjectpositionblock); + this.player.stopUsingItem(); // CraftBukkit - SPIGOT-4706 + InteractionResult enuminteractionresult = this.player.gameMode.useItemOn(this.player, worldserver, itemstack, enumhand, movingobjectpositionblock); diff --git a/patches/unapplied/server/Attributes-API-for-item-defaults.patch b/patches/server/Attributes-API-for-item-defaults.patch similarity index 100% rename from patches/unapplied/server/Attributes-API-for-item-defaults.patch rename to patches/server/Attributes-API-for-item-defaults.patch diff --git a/patches/unapplied/server/Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch b/patches/server/Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch similarity index 100% rename from patches/unapplied/server/Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch rename to patches/server/Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch diff --git a/patches/unapplied/server/Beacon-API-custom-effect-ranges.patch b/patches/server/Beacon-API-custom-effect-ranges.patch similarity index 97% rename from patches/unapplied/server/Beacon-API-custom-effect-ranges.patch rename to patches/server/Beacon-API-custom-effect-ranges.patch index 940516493a..35eaac4b81 100644 --- a/patches/unapplied/server/Beacon-API-custom-effect-ranges.patch +++ b/patches/server/Beacon-API-custom-effect-ranges.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEnt index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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 -@@ -0,0 +0,0 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -0,0 +0,0 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name return (BeaconBlockEntity.hasSecondaryEffect(this.levels, this.primaryPower, this.secondaryPower)) ? CraftPotionUtil.toBukkit(new MobEffectInstance(this.secondaryPower, BeaconBlockEntity.getLevel(this.levels), BeaconBlockEntity.getAmplification(this.levels, this.primaryPower, this.secondaryPower), true, true)) : null; } // CraftBukkit end @@ -35,7 +35,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public BeaconBlockEntity(BlockPos pos, BlockState state) { super(BlockEntityType.BEACON, pos, state); -@@ -0,0 +0,0 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -0,0 +0,0 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name } if (blockEntity.levels > 0 && !blockEntity.beamSections.isEmpty()) { @@ -44,7 +44,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 BeaconBlockEntity.playSound(world, pos, SoundEvents.BEACON_AMBIENT); } } -@@ -0,0 +0,0 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -0,0 +0,0 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name } public static List getHumansInRange(Level world, BlockPos blockposition, int i) { @@ -59,7 +59,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 AABB axisalignedbb = (new AABB(blockposition)).inflate(d0).expandTowards(0.0D, (double) world.getHeight(), 0.0D); List list = world.getEntitiesOfClass(Player.class, axisalignedbb); -@@ -0,0 +0,0 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -0,0 +0,0 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name } private static void applyEffects(Level world, BlockPos pos, int beaconLevel, @Nullable MobEffect primaryEffect, @Nullable MobEffect secondaryEffect) { @@ -78,7 +78,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 BeaconBlockEntity.applyEffect(list, primaryEffect, j, b0, true, pos); // Paper - BeaconEffectEvent -@@ -0,0 +0,0 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -0,0 +0,0 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name } this.lockKey = LockCode.fromTag(nbt); @@ -86,7 +86,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } @Override -@@ -0,0 +0,0 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -0,0 +0,0 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name } this.lockKey.addToTag(nbt); diff --git a/patches/unapplied/server/Brand-support.patch b/patches/server/Brand-support.patch similarity index 98% rename from patches/unapplied/server/Brand-support.patch rename to patches/server/Brand-support.patch index f047031047..cc6d552a8b 100644 --- a/patches/unapplied/server/Brand-support.patch +++ b/patches/server/Brand-support.patch @@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) { this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH); - this.lastSeenMessagesValidator = new LastSeenMessagesValidator(); + this.lastSeenMessages = new LastSeenMessagesValidator(20); @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private static final ResourceLocation CUSTOM_REGISTER = new ResourceLocation("register"); private static final ResourceLocation CUSTOM_UNREGISTER = new ResourceLocation("unregister"); diff --git a/patches/unapplied/server/Buffer-joins-to-world.patch b/patches/server/Buffer-joins-to-world.patch similarity index 100% rename from patches/unapplied/server/Buffer-joins-to-world.patch rename to patches/server/Buffer-joins-to-world.patch diff --git a/patches/unapplied/server/Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch b/patches/server/Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch similarity index 100% rename from patches/unapplied/server/Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch rename to patches/server/Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch diff --git a/patches/unapplied/server/Cache-block-data-strings.patch b/patches/server/Cache-block-data-strings.patch similarity index 100% rename from patches/unapplied/server/Cache-block-data-strings.patch rename to patches/server/Cache-block-data-strings.patch diff --git a/patches/unapplied/server/Cache-burn-durations.patch b/patches/server/Cache-burn-durations.patch similarity index 100% rename from patches/unapplied/server/Cache-burn-durations.patch rename to patches/server/Cache-burn-durations.patch diff --git a/patches/unapplied/server/Change-EnderEye-target-without-changing-other-things.patch b/patches/server/Change-EnderEye-target-without-changing-other-things.patch similarity index 100% rename from patches/unapplied/server/Change-EnderEye-target-without-changing-other-things.patch rename to patches/server/Change-EnderEye-target-without-changing-other-things.patch diff --git a/patches/unapplied/server/Clean-up-duplicated-GameProfile-Properties.patch b/patches/server/Clean-up-duplicated-GameProfile-Properties.patch similarity index 100% rename from patches/unapplied/server/Clean-up-duplicated-GameProfile-Properties.patch rename to patches/server/Clean-up-duplicated-GameProfile-Properties.patch diff --git a/patches/unapplied/server/Clear-bucket-NBT-after-dispense.patch b/patches/server/Clear-bucket-NBT-after-dispense.patch similarity index 100% rename from patches/unapplied/server/Clear-bucket-NBT-after-dispense.patch rename to patches/server/Clear-bucket-NBT-after-dispense.patch diff --git a/patches/unapplied/server/Climbing-should-not-bypass-cramming-gamerule.patch b/patches/server/Climbing-should-not-bypass-cramming-gamerule.patch similarity index 91% rename from patches/unapplied/server/Climbing-should-not-bypass-cramming-gamerule.patch rename to patches/server/Climbing-should-not-bypass-cramming-gamerule.patch index 699c5cb4e4..e193f4db2b 100644 --- a/patches/unapplied/server/Climbing-should-not-bypass-cramming-gamerule.patch +++ b/patches/server/Climbing-should-not-bypass-cramming-gamerule.patch @@ -49,14 +49,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity { - return; - } - // Paper end - don't run getEntities if we're not going to use its result -- List list = this.level.getEntities((Entity) this, this.getBoundingBox(), EntitySelector.pushableBy(this)); -+ List list = this.level.getEntities((Entity) this, this.getBoundingBox(), EntitySelector.pushable(this, level.paperConfig().collisions.fixClimbingBypassingCrammingRule)); // Paper - fix climbing bypassing cramming rule + return; + } + // Paper end - don't run getEntities if we're not going to use its result +- List list = this.level.getEntities((Entity) this, this.getBoundingBox(), EntitySelector.pushableBy(this)); ++ List list = this.level.getEntities((Entity) this, this.getBoundingBox(), EntitySelector.pushable(this, level.paperConfig().collisions.fixClimbingBypassingCrammingRule)); // Paper - fix climbing bypassing cramming rule - if (!list.isEmpty()) { - // Paper - move up + if (!list.isEmpty()) { + // Paper - moved up @@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity { return !this.isRemoved() && this.collides; // CraftBukkit } @@ -92,7 +92,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/animal/Parrot.java b/src/m index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Parrot.java +++ b/src/main/java/net/minecraft/world/entity/animal/Parrot.java -@@ -0,0 +0,0 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { +@@ -0,0 +0,0 @@ public class Parrot extends ShoulderRidingEntity implements VariantHolder { } @Override diff --git a/patches/unapplied/server/Collision-option-for-requiring-a-player-participant.patch b/patches/server/Collision-option-for-requiring-a-player-participant.patch similarity index 97% rename from patches/unapplied/server/Collision-option-for-requiring-a-player-participant.patch rename to patches/server/Collision-option-for-requiring-a-player-participant.patch index 5b130b8f6c..294874f525 100644 --- a/patches/unapplied/server/Collision-option-for-requiring-a-player-participant.patch +++ b/patches/server/Collision-option-for-requiring-a-player-participant.patch @@ -32,7 +32,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/ma index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java -@@ -0,0 +0,0 @@ public class Boat extends Entity { +@@ -0,0 +0,0 @@ public class Boat extends Entity implements VariantHolder { @Override public void push(Entity entity) { diff --git a/patches/unapplied/server/Config-option-for-Piglins-guarding-chests.patch b/patches/server/Config-option-for-Piglins-guarding-chests.patch similarity index 100% rename from patches/unapplied/server/Config-option-for-Piglins-guarding-chests.patch rename to patches/server/Config-option-for-Piglins-guarding-chests.patch diff --git a/patches/unapplied/server/Configurable-door-breaking-difficulty.patch b/patches/server/Configurable-door-breaking-difficulty.patch similarity index 100% rename from patches/unapplied/server/Configurable-door-breaking-difficulty.patch rename to patches/server/Configurable-door-breaking-difficulty.patch diff --git a/patches/unapplied/server/Configurable-item-frame-map-cursor-update-interval.patch b/patches/server/Configurable-item-frame-map-cursor-update-interval.patch similarity index 100% rename from patches/unapplied/server/Configurable-item-frame-map-cursor-update-interval.patch rename to patches/server/Configurable-item-frame-map-cursor-update-interval.patch diff --git a/patches/unapplied/server/Configurable-max-leash-distance.patch b/patches/server/Configurable-max-leash-distance.patch similarity index 100% rename from patches/unapplied/server/Configurable-max-leash-distance.patch rename to patches/server/Configurable-max-leash-distance.patch diff --git a/patches/unapplied/server/Convert-legacy-attributes-in-Item-Meta.patch b/patches/server/Convert-legacy-attributes-in-Item-Meta.patch similarity index 100% rename from patches/unapplied/server/Convert-legacy-attributes-in-Item-Meta.patch rename to patches/server/Convert-legacy-attributes-in-Item-Meta.patch diff --git a/patches/unapplied/server/Create-HoverEvent-from-ItemStack-Entity.patch b/patches/server/Create-HoverEvent-from-ItemStack-Entity.patch similarity index 100% rename from patches/unapplied/server/Create-HoverEvent-from-ItemStack-Entity.patch rename to patches/server/Create-HoverEvent-from-ItemStack-Entity.patch diff --git a/patches/unapplied/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch b/patches/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch similarity index 99% rename from patches/unapplied/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch rename to patches/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch index 4718e0f2fb..cf0447c3f1 100644 --- a/patches/unapplied/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch +++ b/patches/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch @@ -15,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 implementation("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - implementation + annotationProcessor("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - Needed to generate meta for our Log4j plugins // Paper end - implementation("org.apache.logging.log4j:log4j-iostreams:2.17.1") // Paper + implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion implementation("org.ow2.asm:asm:9.3") implementation("org.ow2.asm:asm-commons:9.3") // Paper - ASM event executor generation implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files @@ -559,7 +559,7 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListene index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se +@@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, MutableComponent ichatmutablecomponent = Component.translatable("multiplayer.disconnect.invalid_player_data"); // Paper start if (MinecraftServer.getServer().isDebugging()) { diff --git a/patches/unapplied/server/Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch b/patches/server/Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch similarity index 100% rename from patches/unapplied/server/Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch rename to patches/server/Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch diff --git a/patches/unapplied/server/Do-not-let-the-server-load-chunks-from-newer-version.patch b/patches/server/Do-not-let-the-server-load-chunks-from-newer-version.patch similarity index 100% rename from patches/unapplied/server/Do-not-let-the-server-load-chunks-from-newer-version.patch rename to patches/server/Do-not-let-the-server-load-chunks-from-newer-version.patch diff --git a/patches/unapplied/server/Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch b/patches/server/Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch similarity index 98% rename from patches/unapplied/server/Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch rename to patches/server/Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch index 90b9df4727..b2567950ac 100644 --- a/patches/unapplied/server/Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch +++ b/patches/server/Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch @@ -48,8 +48,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // Paper end - special close for unloaded inventory + @Override public void doCloseContainer() { - this.containerMenu.removed(this); 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java diff --git a/patches/unapplied/server/Don-t-apply-cramming-damage-to-players.patch b/patches/server/Don-t-apply-cramming-damage-to-players.patch similarity index 100% rename from patches/unapplied/server/Don-t-apply-cramming-damage-to-players.patch rename to patches/server/Don-t-apply-cramming-damage-to-players.patch diff --git a/patches/unapplied/server/Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch b/patches/server/Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch similarity index 100% rename from patches/unapplied/server/Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch rename to patches/server/Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch diff --git a/patches/unapplied/server/Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch b/patches/server/Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch similarity index 100% rename from patches/unapplied/server/Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch rename to patches/server/Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch diff --git a/patches/unapplied/server/Don-t-fire-BlockFade-on-worldgen-threads.patch b/patches/server/Don-t-fire-BlockFade-on-worldgen-threads.patch similarity index 100% rename from patches/unapplied/server/Don-t-fire-BlockFade-on-worldgen-threads.patch rename to patches/server/Don-t-fire-BlockFade-on-worldgen-threads.patch diff --git a/patches/unapplied/server/Don-t-ignore-result-of-PlayerEditBookEvent.patch b/patches/server/Don-t-ignore-result-of-PlayerEditBookEvent.patch similarity index 100% rename from patches/unapplied/server/Don-t-ignore-result-of-PlayerEditBookEvent.patch rename to patches/server/Don-t-ignore-result-of-PlayerEditBookEvent.patch diff --git a/patches/unapplied/server/Don-t-require-FACING-data.patch b/patches/server/Don-t-require-FACING-data.patch similarity index 100% rename from patches/unapplied/server/Don-t-require-FACING-data.patch rename to patches/server/Don-t-require-FACING-data.patch diff --git a/patches/server/Don-t-run-entity-collision-code-if-not-needed.patch b/patches/server/Don-t-run-entity-collision-code-if-not-needed.patch new file mode 100644 index 0000000000..76937117e3 --- /dev/null +++ b/patches/server/Don-t-run-entity-collision-code-if-not-needed.patch @@ -0,0 +1,43 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Spottedleaf +Date: Wed, 15 Apr 2020 17:56:07 -0700 +Subject: [PATCH] Don't run entity collision code if not needed + +Will not run if: +Max entity cramming is disabled and the max collisions per entity is less than or equal to 0. +Entity#isPushable() returns false, meaning all entities will not be able to collide with this +entity anyways. +The entity's current team collision rule causes them to NEVER collide. + +Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> + +diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java ++++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +@@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity { + if (this.level.isClientSide()) { + this.level.getEntities(EntityTypeTest.forClass(net.minecraft.world.entity.player.Player.class), this.getBoundingBox(), EntitySelector.pushableBy(this)).forEach(this::doPush); + } else { ++ // Paper start - don't run getEntities if we're not going to use its result ++ if (!this.isPushable()) { ++ return; ++ } ++ net.minecraft.world.scores.Team team = this.getTeam(); ++ if (team != null && team.getCollisionRule() == net.minecraft.world.scores.Team.CollisionRule.NEVER) { ++ return; ++ } ++ ++ int i = this.level.getGameRules().getInt(GameRules.RULE_MAX_ENTITY_CRAMMING); ++ if (i <= 0 && level.paperConfig().collisions.maxEntityCollisions <= 0) { ++ return; ++ } ++ // Paper end - don't run getEntities if we're not going to use its result + List list = this.level.getEntities((Entity) this, this.getBoundingBox(), EntitySelector.pushableBy(this)); + + if (!list.isEmpty()) { +- int i = this.level.getGameRules().getInt(GameRules.RULE_MAX_ENTITY_CRAMMING); ++ // Paper - moved up + int j; + + if (i > 0 && list.size() > i - 1 && this.random.nextInt(4) == 0) { diff --git a/patches/unapplied/server/Drop-carried-item-when-player-has-disconnected.patch b/patches/server/Drop-carried-item-when-player-has-disconnected.patch similarity index 100% rename from patches/unapplied/server/Drop-carried-item-when-player-has-disconnected.patch rename to patches/server/Drop-carried-item-when-player-has-disconnected.patch diff --git a/patches/unapplied/server/Eigencraft-redstone-implementation.patch b/patches/server/Eigencraft-redstone-implementation.patch similarity index 100% rename from patches/unapplied/server/Eigencraft-redstone-implementation.patch rename to patches/server/Eigencraft-redstone-implementation.patch diff --git a/patches/unapplied/server/Empty-commands-shall-not-be-dispatched.patch b/patches/server/Empty-commands-shall-not-be-dispatched.patch similarity index 100% rename from patches/unapplied/server/Empty-commands-shall-not-be-dispatched.patch rename to patches/server/Empty-commands-shall-not-be-dispatched.patch diff --git a/patches/unapplied/server/Enhance-console-tab-completions-for-brigadier-comman.patch b/patches/server/Enhance-console-tab-completions-for-brigadier-comman.patch similarity index 100% rename from patches/unapplied/server/Enhance-console-tab-completions-for-brigadier-comman.patch rename to patches/server/Enhance-console-tab-completions-for-brigadier-comman.patch diff --git a/patches/unapplied/server/Ensure-Entity-AABB-s-are-never-invalid.patch b/patches/server/Ensure-Entity-AABB-s-are-never-invalid.patch similarity index 100% rename from patches/unapplied/server/Ensure-Entity-AABB-s-are-never-invalid.patch rename to patches/server/Ensure-Entity-AABB-s-are-never-invalid.patch diff --git a/patches/unapplied/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch b/patches/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch similarity index 100% rename from patches/unapplied/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch rename to patches/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch diff --git a/patches/unapplied/server/Ensure-disconnect-for-book-edit-is-called-on-main.patch b/patches/server/Ensure-disconnect-for-book-edit-is-called-on-main.patch similarity index 100% rename from patches/unapplied/server/Ensure-disconnect-for-book-edit-is-called-on-main.patch rename to patches/server/Ensure-disconnect-for-book-edit-is-called-on-main.patch diff --git a/patches/unapplied/server/Ensure-safe-gateway-teleport.patch b/patches/server/Ensure-safe-gateway-teleport.patch similarity index 100% rename from patches/unapplied/server/Ensure-safe-gateway-teleport.patch rename to patches/server/Ensure-safe-gateway-teleport.patch diff --git a/patches/unapplied/server/Entity-isTicking.patch b/patches/server/Entity-isTicking.patch similarity index 100% rename from patches/unapplied/server/Entity-isTicking.patch rename to patches/server/Entity-isTicking.patch diff --git a/patches/unapplied/server/Entity-load-save-limit-per-chunk.patch b/patches/server/Entity-load-save-limit-per-chunk.patch similarity index 99% rename from patches/unapplied/server/Entity-load-save-limit-per-chunk.patch rename to patches/server/Entity-load-save-limit-per-chunk.patch index 97b95ce3a4..9be1a5b836 100644 --- a/patches/unapplied/server/Entity-load-save-limit-per-chunk.patch +++ b/patches/server/Entity-load-save-limit-per-chunk.patch @@ -12,7 +12,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java -@@ -0,0 +0,0 @@ public class EntityType implements EntityTypeTest { +@@ -0,0 +0,0 @@ public class EntityType implements FeatureElement, EntityTypeT final Spliterator spliterator = entityNbtList.spliterator(); return StreamSupport.stream(new Spliterator() { diff --git a/patches/unapplied/server/EntityMoveEvent.patch b/patches/server/EntityMoveEvent.patch similarity index 100% rename from patches/unapplied/server/EntityMoveEvent.patch rename to patches/server/EntityMoveEvent.patch diff --git a/patches/unapplied/server/Expand-world-key-API.patch b/patches/server/Expand-world-key-API.patch similarity index 88% rename from patches/unapplied/server/Expand-world-key-API.patch rename to patches/server/Expand-world-key-API.patch index f730e4169e..e8c17bdfc6 100644 --- a/patches/unapplied/server/Expand-world-key-API.patch +++ b/patches/server/Expand-world-key-API.patch @@ -45,8 +45,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } else if (name.equals(levelName + "_the_end")) { worldKey = net.minecraft.world.level.Level.END; } else { -- worldKey = ResourceKey.create(net.minecraft.core.Registry.DIMENSION_REGISTRY, new ResourceLocation(name.toLowerCase(java.util.Locale.ENGLISH))); -+ worldKey = ResourceKey.create(net.minecraft.core.Registry.DIMENSION_REGISTRY, new net.minecraft.resources.ResourceLocation(creator.key().getNamespace().toLowerCase(java.util.Locale.ENGLISH), creator.key().getKey().toLowerCase(java.util.Locale.ENGLISH))); // Paper +- worldKey = ResourceKey.create(Registries.DIMENSION, new ResourceLocation(name.toLowerCase(java.util.Locale.ENGLISH))); ++ worldKey = ResourceKey.create(Registries.DIMENSION, new net.minecraft.resources.ResourceLocation(creator.key().getNamespace().toLowerCase(java.util.Locale.ENGLISH), creator.key().getKey().toLowerCase(java.util.Locale.ENGLISH))); // Paper } ServerLevel internal = (ServerLevel) new ServerLevel(this.console, console.executor, worldSession, worlddata, worldKey, worlddimension, this.getServer().progressListenerFactory.create(11), @@ -57,7 +57,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start + @Override + public World getWorld(NamespacedKey worldKey) { -+ ServerLevel worldServer = console.getLevel(ResourceKey.create(net.minecraft.core.Registry.DIMENSION_REGISTRY, CraftNamespacedKey.toMinecraft(worldKey))); ++ ServerLevel worldServer = console.getLevel(ResourceKey.create(net.minecraft.core.registries.Registries.DIMENSION, CraftNamespacedKey.toMinecraft(worldKey))); + if (worldServer == null) return null; + return worldServer.getWorld(); + } diff --git a/patches/unapplied/server/ExperienceOrbMergeEvent.patch b/patches/server/ExperienceOrbMergeEvent.patch similarity index 100% rename from patches/unapplied/server/ExperienceOrbMergeEvent.patch rename to patches/server/ExperienceOrbMergeEvent.patch diff --git a/patches/unapplied/server/Expose-LivingEntity-hurt-direction.patch b/patches/server/Expose-LivingEntity-hurt-direction.patch similarity index 100% rename from patches/unapplied/server/Expose-LivingEntity-hurt-direction.patch rename to patches/server/Expose-LivingEntity-hurt-direction.patch diff --git a/patches/unapplied/server/Expose-Tracked-Players.patch b/patches/server/Expose-Tracked-Players.patch similarity index 100% rename from patches/unapplied/server/Expose-Tracked-Players.patch rename to patches/server/Expose-Tracked-Players.patch diff --git a/patches/unapplied/server/Expose-game-version.patch b/patches/server/Expose-game-version.patch similarity index 100% rename from patches/unapplied/server/Expose-game-version.patch rename to patches/server/Expose-game-version.patch diff --git a/patches/unapplied/server/Expose-protocol-version.patch b/patches/server/Expose-protocol-version.patch similarity index 100% rename from patches/unapplied/server/Expose-protocol-version.patch rename to patches/server/Expose-protocol-version.patch diff --git a/patches/unapplied/server/Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/server/Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch similarity index 100% rename from patches/unapplied/server/Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch rename to patches/server/Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch diff --git a/patches/unapplied/server/Expose-world-spawn-angle.patch b/patches/server/Expose-world-spawn-angle.patch similarity index 100% rename from patches/unapplied/server/Expose-world-spawn-angle.patch rename to patches/server/Expose-world-spawn-angle.patch diff --git a/patches/unapplied/server/Extend-block-drop-capture-to-capture-all-items-added.patch b/patches/server/Extend-block-drop-capture-to-capture-all-items-added.patch similarity index 100% rename from patches/unapplied/server/Extend-block-drop-capture-to-capture-all-items-added.patch rename to patches/server/Extend-block-drop-capture-to-capture-all-items-added.patch diff --git a/patches/unapplied/server/Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch b/patches/server/Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch similarity index 100% rename from patches/unapplied/server/Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch rename to patches/server/Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch diff --git a/patches/unapplied/server/Fix-Concurrency-issue-in-ShufflingList.patch b/patches/server/Fix-Concurrency-issue-in-ShufflingList.patch similarity index 85% rename from patches/unapplied/server/Fix-Concurrency-issue-in-ShufflingList.patch rename to patches/server/Fix-Concurrency-issue-in-ShufflingList.patch index d39eae569b..8278819057 100644 --- a/patches/unapplied/server/Fix-Concurrency-issue-in-ShufflingList.patch +++ b/patches/server/Fix-Concurrency-issue-in-ShufflingList.patch @@ -10,21 +10,21 @@ diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/GateBehavior.j index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/GateBehavior.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/GateBehavior.java -@@ -0,0 +0,0 @@ public class GateBehavior extends Behavior { +@@ -0,0 +0,0 @@ public class GateBehavior implements BehaviorControl private final Set> exitErasedMemories; private final GateBehavior.OrderPolicy orderPolicy; private final GateBehavior.RunningPolicy runningPolicy; -- private final ShufflingList> behaviors = new ShufflingList<>(); -+ private final ShufflingList> behaviors = new ShufflingList<>(false); // Paper - don't use a clone +- private final ShufflingList> behaviors = new ShufflingList<>(); ++ private final ShufflingList> behaviors = new ShufflingList<>(false); // Paper - don't use a clone + private Behavior.Status status = Behavior.Status.STOPPED; - public GateBehavior(Map, MemoryStatus> requiredMemoryState, Set> memoriesToForgetWhenStopped, GateBehavior.OrderPolicy order, GateBehavior.RunningPolicy runMode, List, Integer>> tasks) { - super(requiredMemoryState); + public GateBehavior(Map, MemoryStatus> requiredMemoryState, Set> memoriesToForgetWhenStopped, GateBehavior.OrderPolicy order, GateBehavior.RunningPolicy runMode, List, Integer>> tasks) { diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java b/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java @@ -0,0 +0,0 @@ import net.minecraft.util.RandomSource; - public class ShufflingList { + public class ShufflingList implements Iterable { protected final List> entries; private final RandomSource random = RandomSource.create(); + private final boolean isUnsafe; // Paper @@ -49,7 +49,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.entries = Lists.newArrayList(list); } -@@ -0,0 +0,0 @@ public class ShufflingList { +@@ -0,0 +0,0 @@ public class ShufflingList implements Iterable { } public ShufflingList shuffle() { diff --git a/patches/unapplied/server/Fix-CraftPotionBrewer-cache.patch b/patches/server/Fix-CraftPotionBrewer-cache.patch similarity index 100% rename from patches/unapplied/server/Fix-CraftPotionBrewer-cache.patch rename to patches/server/Fix-CraftPotionBrewer-cache.patch diff --git a/patches/unapplied/server/Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch b/patches/server/Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch similarity index 100% rename from patches/unapplied/server/Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch rename to patches/server/Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch diff --git a/patches/unapplied/server/Fix-CraftSound-backwards-compatibility.patch b/patches/server/Fix-CraftSound-backwards-compatibility.patch similarity index 92% rename from patches/unapplied/server/Fix-CraftSound-backwards-compatibility.patch rename to patches/server/Fix-CraftSound-backwards-compatibility.patch index c3ce3d993e..6cd7635a20 100644 --- a/patches/unapplied/server/Fix-CraftSound-backwards-compatibility.patch +++ b/patches/server/Fix-CraftSound-backwards-compatibility.patch @@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java @@ -0,0 +0,0 @@ public class CraftSound { public static Sound getBukkit(SoundEvent soundEffect) { - return Registry.SOUNDS.get(CraftNamespacedKey.fromMinecraft(net.minecraft.core.Registry.SOUND_EVENT.getKey(soundEffect))); + return Registry.SOUNDS.get(CraftNamespacedKey.fromMinecraft(BuiltInRegistries.SOUND_EVENT.getKey(soundEffect))); } + + // Paper start diff --git a/patches/unapplied/server/Fix-CraftTeam-null-check.patch b/patches/server/Fix-CraftTeam-null-check.patch similarity index 100% rename from patches/unapplied/server/Fix-CraftTeam-null-check.patch rename to patches/server/Fix-CraftTeam-null-check.patch diff --git a/patches/unapplied/server/Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch b/patches/server/Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch similarity index 100% rename from patches/unapplied/server/Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch rename to patches/server/Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch diff --git a/patches/unapplied/server/Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/patches/server/Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch similarity index 91% rename from patches/unapplied/server/Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch rename to patches/server/Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index f2ca641253..2c809bc89c 100644 --- a/patches/unapplied/server/Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/patches/server/Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -60,7 +60,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { this.playersByUUID.put(player.getUUID(), player); - // this.broadcastAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[]{entityplayer})); // CraftBukkit - replaced with loop below + // this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer))); // CraftBukkit - replaced with loop below + // Paper start - correctly register player BEFORE PlayerJoinEvent, so the entity is valid and doesn't require tick delay hacks + player.supressTrackerForLogin = true; @@ -72,14 +72,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 CraftPlayer bukkitPlayer = player.getBukkitEntity(); @@ -0,0 +0,0 @@ public abstract class PlayerList { - player.connection.send(new ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.ADD_PLAYER, new ServerPlayer[]{entityplayer1})); + player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer1))); } player.sentListPacket = true; + player.supressTrackerForLogin = false; // Paper + ((ServerLevel)player.level).getChunkSource().chunkMap.addEntity(player); // Paper - track entity now // CraftBukkit end - player.connection.send(new ClientboundSetEntityDataPacket(player.getId(), player.getEntityData(), true)); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn + player.getEntityData().refresh(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn @@ -0,0 +0,0 @@ public abstract class PlayerList { playerconnection.send(new ClientboundUpdateMobEffectPacket(player.getId(), mobeffect)); } diff --git a/patches/unapplied/server/Fix-Not-a-string-Map-Conversion-spam.patch b/patches/server/Fix-Not-a-string-Map-Conversion-spam.patch similarity index 100% rename from patches/unapplied/server/Fix-Not-a-string-Map-Conversion-spam.patch rename to patches/server/Fix-Not-a-string-Map-Conversion-spam.patch diff --git a/patches/unapplied/server/Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/Fix-Per-World-Difficulty-Remembering-Difficulty.patch similarity index 99% rename from patches/unapplied/server/Fix-Per-World-Difficulty-Remembering-Difficulty.patch rename to patches/server/Fix-Per-World-Difficulty-Remembering-Difficulty.patch index 2ee3001afb..a92569915d 100644 --- a/patches/unapplied/server/Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/patches/server/Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -82,7 +82,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class ServerPlayer extends Player { this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds - this.connection.send(new ClientboundRespawnPacket(worldserver.dimensionTypeId(), worldserver.dimension(), BiomeManager.obfuscateSeed(worldserver.getSeed()), this.gameMode.getGameModeForPlayer(), this.gameMode.getPreviousGameModeForPlayer(), worldserver.isDebug(), worldserver.isFlat(), true, this.getLastDeathLocation())); + this.connection.send(new ClientboundRespawnPacket(worldserver.dimensionTypeId(), worldserver.dimension(), BiomeManager.obfuscateSeed(worldserver.getSeed()), this.gameMode.getGameModeForPlayer(), this.gameMode.getPreviousGameModeForPlayer(), worldserver.isDebug(), worldserver.isFlat(), (byte) 3, this.getLastDeathLocation())); - this.connection.send(new ClientboundChangeDifficultyPacket(this.level.getDifficulty(), this.level.getLevelData().isDifficultyLocked())); + this.connection.send(new ClientboundChangeDifficultyPacket(worldserver.getDifficulty(), this.level.getLevelData().isDifficultyLocked())); // Paper - fix difficulty sync issue PlayerList playerlist = this.server.getPlayerList(); diff --git a/patches/unapplied/server/Fix-Player-spawnParticle-x-y-z-precision-loss.patch b/patches/server/Fix-Player-spawnParticle-x-y-z-precision-loss.patch similarity index 100% rename from patches/unapplied/server/Fix-Player-spawnParticle-x-y-z-precision-loss.patch rename to patches/server/Fix-Player-spawnParticle-x-y-z-precision-loss.patch diff --git a/patches/unapplied/server/Fix-PlayerBucketEmptyEvent-result-itemstack.patch b/patches/server/Fix-PlayerBucketEmptyEvent-result-itemstack.patch similarity index 100% rename from patches/unapplied/server/Fix-PlayerBucketEmptyEvent-result-itemstack.patch rename to patches/server/Fix-PlayerBucketEmptyEvent-result-itemstack.patch diff --git a/patches/unapplied/server/Fix-PlayerDropItemEvent-using-wrong-item.patch b/patches/server/Fix-PlayerDropItemEvent-using-wrong-item.patch similarity index 100% rename from patches/unapplied/server/Fix-PlayerDropItemEvent-using-wrong-item.patch rename to patches/server/Fix-PlayerDropItemEvent-using-wrong-item.patch diff --git a/patches/unapplied/server/Fix-PlayerItemConsumeEvent-cancelling-properly.patch b/patches/server/Fix-PlayerItemConsumeEvent-cancelling-properly.patch similarity index 100% rename from patches/unapplied/server/Fix-PlayerItemConsumeEvent-cancelling-properly.patch rename to patches/server/Fix-PlayerItemConsumeEvent-cancelling-properly.patch diff --git a/patches/unapplied/server/Fix-PotionEffect-ignores-icon-flag.patch b/patches/server/Fix-PotionEffect-ignores-icon-flag.patch similarity index 100% rename from patches/unapplied/server/Fix-PotionEffect-ignores-icon-flag.patch rename to patches/server/Fix-PotionEffect-ignores-icon-flag.patch diff --git a/patches/unapplied/server/Fix-PotionSplashEvent-for-water-splash-potions.patch b/patches/server/Fix-PotionSplashEvent-for-water-splash-potions.patch similarity index 79% rename from patches/unapplied/server/Fix-PotionSplashEvent-for-water-splash-potions.patch rename to patches/server/Fix-PotionSplashEvent-for-water-splash-potions.patch index 46ac8319fb..f488a39ec7 100644 --- a/patches/unapplied/server/Fix-PotionSplashEvent-for-water-splash-potions.patch +++ b/patches/server/Fix-PotionSplashEvent-for-water-splash-potions.patch @@ -16,24 +16,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + private static final Predicate APPLY_WATER_GET_ENTITIES_PREDICATE = ThrownPotion.WATER_SENSITIVE.or(Axolotl.class::isInstance); // Paper private void applyWater() { AABB axisalignedbb = this.getBoundingBox().inflate(4.0D, 2.0D, 4.0D); -- List list = this.level.getEntitiesOfClass(net.minecraft.world.entity.LivingEntity.class, axisalignedbb, ThrownPotion.WATER_SENSITIVE); +- List list = this.level.getEntitiesOfClass(net.minecraft.world.entity.LivingEntity.class, axisalignedbb, ThrownPotion.WATER_SENSITIVE_OR_ON_FIRE); + List list = this.level.getEntitiesOfClass(net.minecraft.world.entity.LivingEntity.class, axisalignedbb, ThrownPotion.APPLY_WATER_GET_ENTITIES_PREDICATE); // Paper + Map affected = new HashMap<>(); // Paper + Iterator iterator = list.iterator(); - if (!list.isEmpty()) { - Iterator iterator = list.iterator(); + while (iterator.hasNext()) { + net.minecraft.world.entity.LivingEntity entityliving = (net.minecraft.world.entity.LivingEntity) iterator.next(); ++ // Paper start - Change into single getEntities for axolotls & water sensitive ++ if (entityliving instanceof Axolotl axolotl) { ++ affected.put(axolotl.getBukkitLivingEntity(), 1.0); ++ continue; ++ } ++ // Paper end + double d0 = this.distanceToSqr((Entity) entityliving); - while (iterator.hasNext()) { - net.minecraft.world.entity.LivingEntity entityliving = (net.minecraft.world.entity.LivingEntity) iterator.next(); -+ // Paper start - Change into single getEntities for axolotls & water sensitive -+ if (entityliving instanceof Axolotl axolotl) { -+ affected.put(axolotl.getBukkitLivingEntity(), 1.0); -+ continue; -+ } -+ // Paper end - double d0 = this.distanceToSqr((Entity) entityliving); - - if (d0 < 16.0D && entityliving.isSensitiveToWater()) { + if (d0 < 16.0D) { + if (entityliving.isSensitiveToWater()) { - entityliving.hurt(DamageSource.indirectMagic(this, this.getOwner()), 1.0F); + // Paper start + double intensity = 1.0D - Math.sqrt(d0) / 4.0D; @@ -41,6 +40,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // entityliving.hurt(DamageSource.indirectMagic(this, this.getOwner()), 1.0F); // Paper - moved down + // Paper end } + + if (entityliving.isOnFire() && entityliving.isAlive()) { +@@ -0,0 +0,0 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie } } diff --git a/patches/unapplied/server/Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch b/patches/server/Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch similarity index 100% rename from patches/unapplied/server/Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch rename to patches/server/Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch diff --git a/patches/unapplied/server/Fix-SPIGOT-5885-Unable-to-disable-advancements.patch b/patches/server/Fix-SPIGOT-5885-Unable-to-disable-advancements.patch similarity index 100% rename from patches/unapplied/server/Fix-SPIGOT-5885-Unable-to-disable-advancements.patch rename to patches/server/Fix-SPIGOT-5885-Unable-to-disable-advancements.patch diff --git a/patches/unapplied/server/Fix-SPIGOT-5989.patch b/patches/server/Fix-SPIGOT-5989.patch similarity index 100% rename from patches/unapplied/server/Fix-SPIGOT-5989.patch rename to patches/server/Fix-SPIGOT-5989.patch diff --git a/patches/unapplied/server/Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/patches/server/Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch similarity index 100% rename from patches/unapplied/server/Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch rename to patches/server/Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch diff --git a/patches/unapplied/server/Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch b/patches/server/Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch similarity index 100% rename from patches/unapplied/server/Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch rename to patches/server/Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch diff --git a/patches/unapplied/server/Fix-and-optimise-world-force-upgrading.patch b/patches/server/Fix-and-optimise-world-force-upgrading.patch similarity index 97% rename from patches/unapplied/server/Fix-and-optimise-world-force-upgrading.patch rename to patches/server/Fix-and-optimise-world-force-upgrading.patch index a989a73e5a..f9bb3bb62d 100644 --- a/patches/unapplied/server/Fix-and-optimise-world-force-upgrading.patch +++ b/patches/server/Fix-and-optimise-world-force-upgrading.patch @@ -250,7 +250,7 @@ diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/mi index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java -@@ -0,0 +0,0 @@ import java.util.Objects; +@@ -0,0 +0,0 @@ import java.nio.file.Paths; import java.util.Optional; import java.util.UUID; import java.util.function.BooleanSupplier; @@ -259,7 +259,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import joptsimple.OptionParser; import joptsimple.OptionSet; @@ -0,0 +0,0 @@ public class Main { - + return new WorldLoader.InitConfig(worldloader_d, Commands.CommandSelection.DEDICATED, serverPropertiesHandler.functionPermissionLevel); } + // Paper start - fix and optimise world upgrading @@ -271,26 +271,26 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // Paper end - fix and optimise world upgrading + - public static void forceUpgrade(LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, boolean eraseCache, BooleanSupplier continueCheck, WorldGenSettings generatorOptions) { + public static void forceUpgrade(LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, boolean eraseCache, BooleanSupplier continueCheck, Registry dimensionOptionsRegistry) { Main.LOGGER.info("Forcing world upgrade! {}", session.getLevelId()); // CraftBukkit - WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, generatorOptions, eraseCache); + WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, dimensionOptionsRegistry, eraseCache); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { - return true; -- }, worlddata.worldGenSettings()); +- }, iregistry); - } + // Paper - move down PrimaryLevelData iworlddataserver = worlddata; - WorldGenSettings generatorsettings = worlddata.worldGenSettings(); + boolean flag = worlddata.isDebugWorld(); @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop worldKey = ResourceKey.create(Registry.DIMENSION_REGISTRY, dimensionKey.location()); + ResourceKey worldKey = ResourceKey.create(Registries.DIMENSION, dimensionKey.location()); if (dimensionKey == LevelStem.OVERWORLD) { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java @@ -370,7 +370,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - if (console.options.has("forceUpgrade")) { - net.minecraft.server.Main.forceUpgrade(worldSession, DataFixers.getDataFixer(), console.options.has("eraseCache"), () -> { - return true; -- }, worlddata.worldGenSettings()); +- }, iregistry); - } + // Paper - move down diff --git a/patches/unapplied/server/Fix-arrows-never-despawning-MC-125757.patch b/patches/server/Fix-arrows-never-despawning-MC-125757.patch similarity index 100% rename from patches/unapplied/server/Fix-arrows-never-despawning-MC-125757.patch rename to patches/server/Fix-arrows-never-despawning-MC-125757.patch diff --git a/patches/unapplied/server/Fix-block-drops-position-losing-precision-millions-o.patch b/patches/server/Fix-block-drops-position-losing-precision-millions-o.patch similarity index 100% rename from patches/unapplied/server/Fix-block-drops-position-losing-precision-millions-o.patch rename to patches/server/Fix-block-drops-position-losing-precision-millions-o.patch diff --git a/patches/unapplied/server/Fix-checkReach-check-for-Shulker-boxes.patch b/patches/server/Fix-checkReach-check-for-Shulker-boxes.patch similarity index 100% rename from patches/unapplied/server/Fix-checkReach-check-for-Shulker-boxes.patch rename to patches/server/Fix-checkReach-check-for-Shulker-boxes.patch diff --git a/patches/unapplied/server/Fix-client-lag-on-advancement-loading.patch b/patches/server/Fix-client-lag-on-advancement-loading.patch similarity index 100% rename from patches/unapplied/server/Fix-client-lag-on-advancement-loading.patch rename to patches/server/Fix-client-lag-on-advancement-loading.patch diff --git a/patches/unapplied/server/Fix-commands-from-signs-not-firing-command-events.patch b/patches/server/Fix-commands-from-signs-not-firing-command-events.patch similarity index 100% rename from patches/unapplied/server/Fix-commands-from-signs-not-firing-command-events.patch rename to patches/server/Fix-commands-from-signs-not-firing-command-events.patch diff --git a/patches/unapplied/server/Fix-curing-zombie-villager-discount-exploit.patch b/patches/server/Fix-curing-zombie-villager-discount-exploit.patch similarity index 100% rename from patches/unapplied/server/Fix-curing-zombie-villager-discount-exploit.patch rename to patches/server/Fix-curing-zombie-villager-discount-exploit.patch diff --git a/patches/unapplied/server/Fix-dangerous-end-portal-logic.patch b/patches/server/Fix-dangerous-end-portal-logic.patch similarity index 100% rename from patches/unapplied/server/Fix-dangerous-end-portal-logic.patch rename to patches/server/Fix-dangerous-end-portal-logic.patch diff --git a/patches/unapplied/server/Fix-deop-kicking-non-whitelisted-player-when-white-l.patch b/patches/server/Fix-deop-kicking-non-whitelisted-player-when-white-l.patch similarity index 100% rename from patches/unapplied/server/Fix-deop-kicking-non-whitelisted-player-when-white-l.patch rename to patches/server/Fix-deop-kicking-non-whitelisted-player-when-white-l.patch diff --git a/patches/unapplied/server/Fix-for-large-move-vectors-crashing-server.patch b/patches/server/Fix-for-large-move-vectors-crashing-server.patch similarity index 100% rename from patches/unapplied/server/Fix-for-large-move-vectors-crashing-server.patch rename to patches/server/Fix-for-large-move-vectors-crashing-server.patch diff --git a/patches/unapplied/server/Fix-harming-potion-dupe.patch b/patches/server/Fix-harming-potion-dupe.patch similarity index 100% rename from patches/unapplied/server/Fix-harming-potion-dupe.patch rename to patches/server/Fix-harming-potion-dupe.patch diff --git a/patches/unapplied/server/Fix-hex-colors-not-working-in-some-kick-messages.patch b/patches/server/Fix-hex-colors-not-working-in-some-kick-messages.patch similarity index 99% rename from patches/unapplied/server/Fix-hex-colors-not-working-in-some-kick-messages.patch rename to patches/server/Fix-hex-colors-not-working-in-some-kick-messages.patch index c4d6d56cd0..9b19ff5264 100644 --- a/patches/unapplied/server/Fix-hex-colors-not-working-in-some-kick-messages.patch +++ b/patches/server/Fix-hex-colors-not-working-in-some-kick-messages.patch @@ -28,7 +28,7 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListene index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se +@@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, // CraftBukkit start @Deprecated public void disconnect(String s) { diff --git a/patches/unapplied/server/Fix-incorrect-message-for-outdated-client.patch b/patches/server/Fix-incorrect-message-for-outdated-client.patch similarity index 100% rename from patches/unapplied/server/Fix-incorrect-message-for-outdated-client.patch rename to patches/server/Fix-incorrect-message-for-outdated-client.patch diff --git a/patches/unapplied/server/Fix-incosistency-issue-with-empty-map-items-in-CB.patch b/patches/server/Fix-incosistency-issue-with-empty-map-items-in-CB.patch similarity index 100% rename from patches/unapplied/server/Fix-incosistency-issue-with-empty-map-items-in-CB.patch rename to patches/server/Fix-incosistency-issue-with-empty-map-items-in-CB.patch diff --git a/patches/unapplied/server/Fix-interact-event-not-being-called-in-adventure.patch b/patches/server/Fix-interact-event-not-being-called-in-adventure.patch similarity index 81% rename from patches/unapplied/server/Fix-interact-event-not-being-called-in-adventure.patch rename to patches/server/Fix-interact-event-not-being-called-in-adventure.patch index 6d5f497304..cf636b2140 100644 --- a/patches/unapplied/server/Fix-interact-event-not-being-called-in-adventure.patch +++ b/patches/server/Fix-interact-event-not-being-called-in-adventure.patch @@ -10,14 +10,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - MutableComponent ichatmutablecomponent = Component.translatable("build.tooHigh", i - 1).withStyle(ChatFormatting.RED); + MutableComponent ichatmutablecomponent = Component.translatable("build.tooHigh", i - 1).withStyle(ChatFormatting.RED); - this.player.sendSystemMessage(ichatmutablecomponent, true); -- } else if (enuminteractionresult.shouldSwing()) { + this.player.sendSystemMessage(ichatmutablecomponent, true); +- } else if (enuminteractionresult.shouldSwing()) { + } else if (enuminteractionresult.shouldSwing() && !this.player.gameMode.interactResult) { // Paper - this.player.swing(enumhand, true); + this.player.swing(enumhand, true); + } } - } @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // SPIGOT-5607: Only call interact event if no block or entity is being clicked. Use bukkit ray trace method, because it handles blocks and entities at the same time org.bukkit.util.RayTraceResult result = this.player.level.getWorld().rayTrace(origin, origin.getDirection(), d3, org.bukkit.FluidCollisionMode.NEVER, false, 0.1, entity -> entity != this.player.getBukkitEntity()); diff --git a/patches/unapplied/server/Fix-invulnerable-end-crystals.patch b/patches/server/Fix-invulnerable-end-crystals.patch similarity index 86% rename from patches/unapplied/server/Fix-invulnerable-end-crystals.patch rename to patches/server/Fix-invulnerable-end-crystals.patch index 1b9bae57b8..d98c2db362 100644 --- a/patches/unapplied/server/Fix-invulnerable-end-crystals.patch +++ b/patches/server/Fix-invulnerable-end-crystals.patch @@ -56,10 +56,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/level/levelgen/feature/SpikeFeature.java +++ b/src/main/java/net/minecraft/world/level/levelgen/feature/SpikeFeature.java @@ -0,0 +0,0 @@ public class SpikeFeature extends Feature { - endCrystal.setBeamTarget(config.getCrystalBeamTarget()); - endCrystal.setInvulnerable(config.isCrystalInvulnerable()); - endCrystal.moveTo((double)spike.getCenterX() + 0.5D, (double)(spike.getHeight() + 1), (double)spike.getCenterZ() + 0.5D, random.nextFloat() * 360.0F, 0.0F); + endCrystal.setBeamTarget(config.getCrystalBeamTarget()); + endCrystal.setInvulnerable(config.isCrystalInvulnerable()); + endCrystal.moveTo((double)spike.getCenterX() + 0.5D, (double)(spike.getHeight() + 1), (double)spike.getCenterZ() + 0.5D, random.nextFloat() * 360.0F, 0.0F); + endCrystal.generatedByDragonFight = true; // Paper - world.addFreshEntity(endCrystal); - this.setBlock(world, new BlockPos(spike.getCenterX(), spike.getHeight(), spike.getCenterZ()), Blocks.BEDROCK.defaultBlockState()); - } + world.addFreshEntity(endCrystal); + this.setBlock(world, new BlockPos(spike.getCenterX(), spike.getHeight(), spike.getCenterZ()), Blocks.BEDROCK.defaultBlockState()); + } diff --git a/patches/unapplied/server/Fix-issues-with-mob-conversion.patch b/patches/server/Fix-issues-with-mob-conversion.patch similarity index 100% rename from patches/unapplied/server/Fix-issues-with-mob-conversion.patch rename to patches/server/Fix-issues-with-mob-conversion.patch diff --git a/patches/unapplied/server/Fix-item-locations-dropped-from-campfires.patch b/patches/server/Fix-item-locations-dropped-from-campfires.patch similarity index 71% rename from patches/unapplied/server/Fix-item-locations-dropped-from-campfires.patch rename to patches/server/Fix-item-locations-dropped-from-campfires.patch index 16c09fd48e..e2c2851318 100644 --- a/patches/unapplied/server/Fix-item-locations-dropped-from-campfires.patch +++ b/patches/server/Fix-item-locations-dropped-from-campfires.patch @@ -10,15 +10,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java @@ -0,0 +0,0 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable { - result = blockCookEvent.getResult(); - itemstack1 = CraftItemStack.asNMSCopy(result); - // CraftBukkit end -- Containers.dropItemStack(world, (double) pos.getX(), (double) pos.getY(), (double) pos.getZ(), itemstack1); + result = blockCookEvent.getResult(); + itemstack1 = CraftItemStack.asNMSCopy(result); + // CraftBukkit end +- Containers.dropItemStack(world, (double) pos.getX(), (double) pos.getY(), (double) pos.getZ(), itemstack1); + // Paper start + net.minecraft.world.entity.item.ItemEntity droppedItem = new net.minecraft.world.entity.item.ItemEntity(world, pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D, itemstack1.split(world.random.nextInt(21) + 10)); + droppedItem.setDeltaMovement(world.random.nextGaussian() * 0.05D, world.random.nextGaussian() * 0.05D + 0.2D, world.random.nextGaussian() * 0.05D); + world.addFreshEntity(droppedItem); + // Paper end - campfire.items.set(i, ItemStack.EMPTY); - world.sendBlockUpdated(pos, state, state, 3); - world.gameEvent(GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(state)); + campfire.items.set(i, ItemStack.EMPTY); + world.sendBlockUpdated(pos, state, state, 3); + world.gameEvent(GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(state)); diff --git a/patches/unapplied/server/Fix-missing-chunks-due-to-integer-overflow.patch b/patches/server/Fix-missing-chunks-due-to-integer-overflow.patch similarity index 100% rename from patches/unapplied/server/Fix-missing-chunks-due-to-integer-overflow.patch rename to patches/server/Fix-missing-chunks-due-to-integer-overflow.patch diff --git a/patches/unapplied/server/Fix-nerfed-slime-when-splitting.patch b/patches/server/Fix-nerfed-slime-when-splitting.patch similarity index 71% rename from patches/unapplied/server/Fix-nerfed-slime-when-splitting.patch rename to patches/server/Fix-nerfed-slime-when-splitting.patch index c98748875e..7d20ae213b 100644 --- a/patches/unapplied/server/Fix-nerfed-slime-when-splitting.patch +++ b/patches/server/Fix-nerfed-slime-when-splitting.patch @@ -9,10 +9,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/monster/Slime.java +++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java @@ -0,0 +0,0 @@ public class Slime extends Mob implements Enemy { - entityslime.setPersistenceRequired(); - } + entityslime.setPersistenceRequired(); + } + entityslime.aware = this.aware; // Paper - entityslime.setCustomName(ichatbasecomponent); - entityslime.setNoAi(flag); - entityslime.setInvulnerable(this.isInvulnerable()); + entityslime.setCustomName(ichatbasecomponent); + entityslime.setNoAi(flag); + entityslime.setInvulnerable(this.isInvulnerable()); diff --git a/patches/unapplied/server/Fix-numerous-item-duplication-issues-and-teleport-is.patch b/patches/server/Fix-numerous-item-duplication-issues-and-teleport-is.patch similarity index 100% rename from patches/unapplied/server/Fix-numerous-item-duplication-issues-and-teleport-is.patch rename to patches/server/Fix-numerous-item-duplication-issues-and-teleport-is.patch diff --git a/patches/unapplied/server/Fix-piston-physics-inconsistency-MC-188840.patch b/patches/server/Fix-piston-physics-inconsistency-MC-188840.patch similarity index 100% rename from patches/unapplied/server/Fix-piston-physics-inconsistency-MC-188840.patch rename to patches/server/Fix-piston-physics-inconsistency-MC-188840.patch diff --git a/patches/unapplied/server/Fix-regex-mistake-in-CB-NBT-int-deserialization.patch b/patches/server/Fix-regex-mistake-in-CB-NBT-int-deserialization.patch similarity index 100% rename from patches/unapplied/server/Fix-regex-mistake-in-CB-NBT-int-deserialization.patch rename to patches/server/Fix-regex-mistake-in-CB-NBT-int-deserialization.patch diff --git a/patches/unapplied/server/Fix-return-value-of-Block-applyBoneMeal-always-being.patch b/patches/server/Fix-return-value-of-Block-applyBoneMeal-always-being.patch similarity index 100% rename from patches/unapplied/server/Fix-return-value-of-Block-applyBoneMeal-always-being.patch rename to patches/server/Fix-return-value-of-Block-applyBoneMeal-always-being.patch diff --git a/patches/unapplied/server/Fix-sand-duping.patch b/patches/server/Fix-sand-duping.patch similarity index 100% rename from patches/unapplied/server/Fix-sand-duping.patch rename to patches/server/Fix-sand-duping.patch diff --git a/patches/unapplied/server/Fix-some-rails-connecting-improperly.patch b/patches/server/Fix-some-rails-connecting-improperly.patch similarity index 100% rename from patches/unapplied/server/Fix-some-rails-connecting-improperly.patch rename to patches/server/Fix-some-rails-connecting-improperly.patch diff --git a/patches/unapplied/server/Fix-test-not-bootstrapping.patch b/patches/server/Fix-test-not-bootstrapping.patch similarity index 100% rename from patches/unapplied/server/Fix-test-not-bootstrapping.patch rename to patches/server/Fix-test-not-bootstrapping.patch diff --git a/patches/unapplied/server/Fix-villager-boat-exploit.patch b/patches/server/Fix-villager-boat-exploit.patch similarity index 100% rename from patches/unapplied/server/Fix-villager-boat-exploit.patch rename to patches/server/Fix-villager-boat-exploit.patch diff --git a/patches/unapplied/server/Fix-villager-trading-demand-MC-163962.patch b/patches/server/Fix-villager-trading-demand-MC-163962.patch similarity index 100% rename from patches/unapplied/server/Fix-villager-trading-demand-MC-163962.patch rename to patches/server/Fix-villager-trading-demand-MC-163962.patch diff --git a/patches/unapplied/server/Fixed-TileEntityBell-memory-leak.patch b/patches/server/Fixed-TileEntityBell-memory-leak.patch similarity index 100% rename from patches/unapplied/server/Fixed-TileEntityBell-memory-leak.patch rename to patches/server/Fixed-TileEntityBell-memory-leak.patch diff --git a/patches/unapplied/server/Fixes-kick-event-leave-message-not-being-sent.patch b/patches/server/Fixes-kick-event-leave-message-not-being-sent.patch similarity index 97% rename from patches/unapplied/server/Fixes-kick-event-leave-message-not-being-sent.patch rename to patches/server/Fixes-kick-event-leave-message-not-being-sent.patch index 4c4c2db146..3951a815a0 100644 --- a/patches/unapplied/server/Fixes-kick-event-leave-message-not-being-sent.patch +++ b/patches/server/Fixes-kick-event-leave-message-not-being-sent.patch @@ -14,8 +14,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public Integer clientViewDistance; - public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent // CraftBukkit end - public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - + public boolean isRealPlayer; // Paper + public double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/patches/unapplied/server/Get-entity-default-attributes.patch b/patches/server/Get-entity-default-attributes.patch similarity index 100% rename from patches/unapplied/server/Get-entity-default-attributes.patch rename to patches/server/Get-entity-default-attributes.patch diff --git a/patches/unapplied/server/Goat-ram-API.patch b/patches/server/Goat-ram-API.patch similarity index 100% rename from patches/unapplied/server/Goat-ram-API.patch rename to patches/server/Goat-ram-API.patch diff --git a/patches/unapplied/server/Guardian-beam-workaround.patch b/patches/server/Guardian-beam-workaround.patch similarity index 100% rename from patches/unapplied/server/Guardian-beam-workaround.patch rename to patches/server/Guardian-beam-workaround.patch diff --git a/patches/unapplied/server/Hide-sync-chunk-writes-behind-flag.patch b/patches/server/Hide-sync-chunk-writes-behind-flag.patch similarity index 100% rename from patches/unapplied/server/Hide-sync-chunk-writes-behind-flag.patch rename to patches/server/Hide-sync-chunk-writes-behind-flag.patch diff --git a/patches/unapplied/server/Implement-API-to-expose-exact-interaction-point.patch b/patches/server/Implement-API-to-expose-exact-interaction-point.patch similarity index 100% rename from patches/unapplied/server/Implement-API-to-expose-exact-interaction-point.patch rename to patches/server/Implement-API-to-expose-exact-interaction-point.patch diff --git a/patches/unapplied/server/Implement-API-to-get-Material-from-Boats-and-Minecar.patch b/patches/server/Implement-API-to-get-Material-from-Boats-and-Minecar.patch similarity index 100% rename from patches/unapplied/server/Implement-API-to-get-Material-from-Boats-and-Minecar.patch rename to patches/server/Implement-API-to-get-Material-from-Boats-and-Minecar.patch diff --git a/patches/unapplied/server/Implement-BlockPreDispenseEvent.patch b/patches/server/Implement-BlockPreDispenseEvent.patch similarity index 100% rename from patches/unapplied/server/Implement-BlockPreDispenseEvent.patch rename to patches/server/Implement-BlockPreDispenseEvent.patch diff --git a/patches/unapplied/server/Implement-Mob-Goal-API.patch b/patches/server/Implement-Mob-Goal-API.patch similarity index 100% rename from patches/unapplied/server/Implement-Mob-Goal-API.patch rename to patches/server/Implement-Mob-Goal-API.patch diff --git a/patches/unapplied/server/Implement-Player-Client-Options-API.patch b/patches/server/Implement-Player-Client-Options-API.patch similarity index 100% rename from patches/unapplied/server/Implement-Player-Client-Options-API.patch rename to patches/server/Implement-Player-Client-Options-API.patch diff --git a/patches/unapplied/server/Implement-PlayerFlowerPotManipulateEvent.patch b/patches/server/Implement-PlayerFlowerPotManipulateEvent.patch similarity index 100% rename from patches/unapplied/server/Implement-PlayerFlowerPotManipulateEvent.patch rename to patches/server/Implement-PlayerFlowerPotManipulateEvent.patch diff --git a/patches/unapplied/server/Implement-TargetHitEvent.patch b/patches/server/Implement-TargetHitEvent.patch similarity index 100% rename from patches/unapplied/server/Implement-TargetHitEvent.patch rename to patches/server/Implement-TargetHitEvent.patch diff --git a/patches/unapplied/server/Implement-methods-to-convert-between-Component-and-B.patch b/patches/server/Implement-methods-to-convert-between-Component-and-B.patch similarity index 100% rename from patches/unapplied/server/Implement-methods-to-convert-between-Component-and-B.patch rename to patches/server/Implement-methods-to-convert-between-Component-and-B.patch diff --git a/patches/unapplied/server/Implemented-BlockFailedDispenseEvent.patch b/patches/server/Implemented-BlockFailedDispenseEvent.patch similarity index 100% rename from patches/unapplied/server/Implemented-BlockFailedDispenseEvent.patch rename to patches/server/Implemented-BlockFailedDispenseEvent.patch diff --git a/patches/unapplied/server/Improve-Arrow-API.patch b/patches/server/Improve-Arrow-API.patch similarity index 100% rename from patches/unapplied/server/Improve-Arrow-API.patch rename to patches/server/Improve-Arrow-API.patch diff --git a/patches/unapplied/server/Improve-Legacy-Component-serialization-size.patch b/patches/server/Improve-Legacy-Component-serialization-size.patch similarity index 100% rename from patches/unapplied/server/Improve-Legacy-Component-serialization-size.patch rename to patches/server/Improve-Legacy-Component-serialization-size.patch diff --git a/patches/unapplied/server/Improve-ServerGUI.patch b/patches/server/Improve-ServerGUI.patch similarity index 100% rename from patches/unapplied/server/Improve-ServerGUI.patch rename to patches/server/Improve-ServerGUI.patch diff --git a/patches/unapplied/server/Improve-boat-collision-performance.patch b/patches/server/Improve-boat-collision-performance.patch similarity index 93% rename from patches/unapplied/server/Improve-boat-collision-performance.patch rename to patches/server/Improve-boat-collision-performance.patch index 4b94c67a01..500835a969 100644 --- a/patches/unapplied/server/Improve-boat-collision-performance.patch +++ b/patches/server/Improve-boat-collision-performance.patch @@ -26,13 +26,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - if (entity instanceof LivingEntity) { + if (entity instanceof LivingEntity && entity.distanceToSqr(this) <= (200.0D * 200.0D)) { // Paper - this.blockUsingShield((LivingEntity) entity); - } - } + LivingEntity entityliving = (LivingEntity) entity; + + this.blockUsingShield(entityliving); @@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity { } - if (entity1 != null) { + if (entity1 != null && !source.isExplosion()) { - double d0 = entity1.getX() - this.getX(); + final boolean far = entity1.distanceToSqr(this) > (200.0 * 200.0); // Paper + double d0 = far ? (Math.random() - Math.random()) : entity1.getX() - this.getX(); // Paper @@ -57,7 +57,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/ma index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java -@@ -0,0 +0,0 @@ public class Boat extends Entity { +@@ -0,0 +0,0 @@ public class Boat extends Entity implements VariantHolder { this.invFriction = 0.05F; if (this.oldStatus == Boat.Status.IN_AIR && this.status != Boat.Status.IN_AIR && this.status != Boat.Status.ON_LAND) { this.waterLevel = this.getY(1.0D); diff --git a/patches/unapplied/server/Inline-shift-direction-fields.patch b/patches/server/Inline-shift-direction-fields.patch similarity index 100% rename from patches/unapplied/server/Inline-shift-direction-fields.patch rename to patches/server/Inline-shift-direction-fields.patch diff --git a/patches/unapplied/server/Introduce-beacon-activation-deactivation-events.patch b/patches/server/Introduce-beacon-activation-deactivation-events.patch similarity index 96% rename from patches/unapplied/server/Introduce-beacon-activation-deactivation-events.patch rename to patches/server/Introduce-beacon-activation-deactivation-events.patch index e95e748b1f..99a05ba266 100644 --- a/patches/unapplied/server/Introduce-beacon-activation-deactivation-events.patch +++ b/patches/server/Introduce-beacon-activation-deactivation-events.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEnt index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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 -@@ -0,0 +0,0 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -0,0 +0,0 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name BeaconBlockEntity.playSound(world, pos, SoundEvents.BEACON_AMBIENT); } } @@ -24,7 +24,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (blockEntity.lastCheckY >= l) { blockEntity.lastCheckY = world.getMinBuildHeight() - 1; -@@ -0,0 +0,0 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -0,0 +0,0 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name @Override public void setRemoved() { diff --git a/patches/unapplied/server/Inventory-close.patch b/patches/server/Inventory-close.patch similarity index 100% rename from patches/unapplied/server/Inventory-close.patch rename to patches/server/Inventory-close.patch diff --git a/patches/unapplied/server/Inventory-getHolder-method-without-block-snapshot.patch b/patches/server/Inventory-getHolder-method-without-block-snapshot.patch similarity index 100% rename from patches/unapplied/server/Inventory-getHolder-method-without-block-snapshot.patch rename to patches/server/Inventory-getHolder-method-without-block-snapshot.patch diff --git a/patches/unapplied/server/Item-Rarity-API.patch b/patches/server/Item-Rarity-API.patch similarity index 100% rename from patches/unapplied/server/Item-Rarity-API.patch rename to patches/server/Item-Rarity-API.patch diff --git a/patches/unapplied/server/Item-no-age-no-player-pickup.patch b/patches/server/Item-no-age-no-player-pickup.patch similarity index 100% rename from patches/unapplied/server/Item-no-age-no-player-pickup.patch rename to patches/server/Item-no-age-no-player-pickup.patch diff --git a/patches/unapplied/server/ItemStack-repair-check-API.patch b/patches/server/ItemStack-repair-check-API.patch similarity index 100% rename from patches/unapplied/server/ItemStack-repair-check-API.patch rename to patches/server/ItemStack-repair-check-API.patch diff --git a/patches/unapplied/server/Lazily-track-plugin-scoreboards-by-default.patch b/patches/server/Lazily-track-plugin-scoreboards-by-default.patch similarity index 100% rename from patches/unapplied/server/Lazily-track-plugin-scoreboards-by-default.patch rename to patches/server/Lazily-track-plugin-scoreboards-by-default.patch diff --git a/patches/unapplied/server/Left-handed-API.patch b/patches/server/Left-handed-API.patch similarity index 100% rename from patches/unapplied/server/Left-handed-API.patch rename to patches/server/Left-handed-API.patch diff --git a/patches/unapplied/server/Limit-item-frame-cursors-on-maps.patch b/patches/server/Limit-item-frame-cursors-on-maps.patch similarity index 100% rename from patches/unapplied/server/Limit-item-frame-cursors-on-maps.patch rename to patches/server/Limit-item-frame-cursors-on-maps.patch diff --git a/patches/unapplied/server/Limit-recipe-packets.patch b/patches/server/Limit-recipe-packets.patch similarity index 100% rename from patches/unapplied/server/Limit-recipe-packets.patch rename to patches/server/Limit-recipe-packets.patch diff --git a/patches/unapplied/server/Line-Of-Sight-Changes.patch b/patches/server/Line-Of-Sight-Changes.patch similarity index 100% rename from patches/unapplied/server/Line-Of-Sight-Changes.patch rename to patches/server/Line-Of-Sight-Changes.patch diff --git a/patches/unapplied/server/Load-Chunks-for-Login-Asynchronously.patch b/patches/server/Load-Chunks-for-Login-Asynchronously.patch similarity index 98% rename from patches/unapplied/server/Load-Chunks-for-Login-Asynchronously.patch rename to patches/server/Load-Chunks-for-Login-Asynchronously.patch index 920ba609ce..2e199ab4e9 100644 --- a/patches/unapplied/server/Load-Chunks-for-Login-Asynchronously.patch +++ b/patches/server/Load-Chunks-for-Login-Asynchronously.patch @@ -84,7 +84,7 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListene index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se +@@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, } // Paper end } else if (this.state == ServerLoginPacketListenerImpl.State.DELAY_ACCEPT) { @@ -93,7 +93,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (entityplayer == null) { this.state = ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT; -@@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se +@@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, } this.connection.send(new ClientboundGameProfilePacket(this.gameProfile)); @@ -241,7 +241,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end // CraftBukkit start - // this.broadcastAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, new EntityPlayer[]{entityplayer})); + // this.broadcastAll(new ClientboundPlayerInfoRemovePacket(List.of(entityplayer.getUUID()))); @@ -0,0 +0,0 @@ public abstract class PlayerList { this.cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity()); // CraftBukkit end diff --git a/patches/unapplied/server/MC-4-Fix-item-position-desync.patch b/patches/server/MC-4-Fix-item-position-desync.patch similarity index 85% rename from patches/unapplied/server/MC-4-Fix-item-position-desync.patch rename to patches/server/MC-4-Fix-item-position-desync.patch index bc9d0fa294..03813c29b8 100644 --- a/patches/unapplied/server/MC-4-Fix-item-position-desync.patch +++ b/patches/server/MC-4-Fix-item-position-desync.patch @@ -13,16 +13,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java +++ b/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java @@ -0,0 +0,0 @@ public class VecDeltaCodec { - public Vec3 base = Vec3.ZERO; // Paper - private static long encode(double value) { -- return Mth.lfloor(value * 4096.0D); -+ return Mth.lfloor(value * 4096.0D); // Paper - check ItemEntity#setPosRaw on update + @VisibleForTesting + static long encode(double value) { +- return Math.round(value * 4096.0D); ++ return Math.round(value * 4096.0D); // Paper - diff on change } - private static double decode(long value) { + @VisibleForTesting + static double decode(long value) { - return (double)value / 4096.0D; -+ return (double)value / 4096.0D; // Paper - check ItemEntity#setPosRaw on update ++ return (double)value / 4096.0D; // Paper - diff on change } public Vec3 decode(long x, long y, long z) { diff --git a/patches/unapplied/server/Make-EntityUnleashEvent-cancellable.patch b/patches/server/Make-EntityUnleashEvent-cancellable.patch similarity index 100% rename from patches/unapplied/server/Make-EntityUnleashEvent-cancellable.patch rename to patches/server/Make-EntityUnleashEvent-cancellable.patch diff --git a/patches/unapplied/server/Make-hoppers-respect-inventory-max-stack-size.patch b/patches/server/Make-hoppers-respect-inventory-max-stack-size.patch similarity index 100% rename from patches/unapplied/server/Make-hoppers-respect-inventory-max-stack-size.patch rename to patches/server/Make-hoppers-respect-inventory-max-stack-size.patch diff --git a/patches/unapplied/server/Make-item-validations-configurable.patch b/patches/server/Make-item-validations-configurable.patch similarity index 100% rename from patches/unapplied/server/Make-item-validations-configurable.patch rename to patches/server/Make-item-validations-configurable.patch diff --git a/patches/unapplied/server/Make-schedule-command-per-world.patch b/patches/server/Make-schedule-command-per-world.patch similarity index 100% rename from patches/unapplied/server/Make-schedule-command-per-world.patch rename to patches/server/Make-schedule-command-per-world.patch diff --git a/patches/unapplied/server/Maps-shouldn-t-load-chunks.patch b/patches/server/Maps-shouldn-t-load-chunks.patch similarity index 73% rename from patches/unapplied/server/Maps-shouldn-t-load-chunks.patch rename to patches/server/Maps-shouldn-t-load-chunks.patch index 9857731686..1b8e6fbcce 100644 --- a/patches/unapplied/server/Maps-shouldn-t-load-chunks.patch +++ b/patches/server/Maps-shouldn-t-load-chunks.patch @@ -19,14 +19,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/item/MapItem.java +++ b/src/main/java/net/minecraft/world/item/MapItem.java @@ -0,0 +0,0 @@ public class MapItem extends ComplexItem { - int k2 = (j / i + k1 - 64) * i; - int l2 = (k / i + l1 - 64) * i; + int j2 = (j / i + k1 - 64) * i; + int k2 = (k / i + l1 - 64) * i; Multiset multiset = LinkedHashMultiset.create(); -- LevelChunk chunk = world.getChunkAt(new BlockPos(k2, 0, l2)); -+ LevelChunk chunk = world.getChunkIfLoaded(new BlockPos(k2, 0, l2)); // Paper - Maps shouldn't load chunks +- LevelChunk chunk = world.getChunk(SectionPos.blockToSectionCoord(j2), SectionPos.blockToSectionCoord(k2)); ++ LevelChunk chunk = world.getChunkIfLoaded(SectionPos.blockToSectionCoord(j2), SectionPos.blockToSectionCoord(k2)); // Paper - Maps shouldn't load chunks - if (!chunk.isEmpty()) { + if (chunk != null && !chunk.isEmpty()) { // Paper - Maps shouldn't load chunks - ChunkPos chunkcoordintpair = chunk.getPos(); - int i3 = k2 & 15; - int j3 = l2 & 15; + int l2 = 0; + double d1 = 0.0D; + int i3; diff --git a/patches/unapplied/server/Merchant-getRecipes-should-return-an-immutable-list.patch b/patches/server/Merchant-getRecipes-should-return-an-immutable-list.patch similarity index 100% rename from patches/unapplied/server/Merchant-getRecipes-should-return-an-immutable-list.patch rename to patches/server/Merchant-getRecipes-should-return-an-immutable-list.patch diff --git a/patches/unapplied/server/Missing-Entity-Behavior-API.patch b/patches/server/Missing-Entity-Behavior-API.patch similarity index 99% rename from patches/unapplied/server/Missing-Entity-Behavior-API.patch rename to patches/server/Missing-Entity-Behavior-API.patch index 0458eeb677..d7cdcbd868 100644 --- a/patches/unapplied/server/Missing-Entity-Behavior-API.patch +++ b/patches/server/Missing-Entity-Behavior-API.patch @@ -150,9 +150,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return this.getFlag(FLAG_OPEN_MOUTH); + } + // Paper End - Horse API - private void openMouth() { - if (!this.level.isClientSide) { - this.mouthCounter = 1; ++ + @Override + public InteractionResult mobInteract(Player player, InteractionHand hand) { + if (!this.isVehicle() && !this.isBaby()) { @@ -0,0 +0,0 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, this.setFlag(16, eatingGrass); } @@ -169,7 +170,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java b/ index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java -@@ -0,0 +0,0 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { +@@ -0,0 +0,0 @@ public class Llama extends AbstractChestedHorse implements VariantHolder CODEC = codec(Registry.BLOCK.byNameCodec(), Block::defaultBlockState).stable(); + public static final Codec CODEC = codec(BuiltInRegistries.BLOCK.byNameCodec(), Block::defaultBlockState).stable(); + // Paper start - optimise getType calls + org.bukkit.Material cachedMaterial; diff --git a/patches/unapplied/server/Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch b/patches/server/Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch similarity index 100% rename from patches/unapplied/server/Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch rename to patches/server/Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch diff --git a/patches/unapplied/server/Optimize-Bit-Operations-by-inlining.patch b/patches/server/Optimize-Bit-Operations-by-inlining.patch similarity index 100% rename from patches/unapplied/server/Optimize-Bit-Operations-by-inlining.patch rename to patches/server/Optimize-Bit-Operations-by-inlining.patch diff --git a/patches/unapplied/server/Optimize-Dynamic-get-Missing-Keys.patch b/patches/server/Optimize-Dynamic-get-Missing-Keys.patch similarity index 100% rename from patches/unapplied/server/Optimize-Dynamic-get-Missing-Keys.patch rename to patches/server/Optimize-Dynamic-get-Missing-Keys.patch diff --git a/patches/unapplied/server/Optimize-NetworkManager-Exception-Handling.patch b/patches/server/Optimize-NetworkManager-Exception-Handling.patch similarity index 100% rename from patches/unapplied/server/Optimize-NetworkManager-Exception-Handling.patch rename to patches/server/Optimize-NetworkManager-Exception-Handling.patch diff --git a/patches/unapplied/server/Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch b/patches/server/Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch similarity index 100% rename from patches/unapplied/server/Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch rename to patches/server/Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch diff --git a/patches/unapplied/server/Optimize-Voxel-Shape-Merging.patch b/patches/server/Optimize-Voxel-Shape-Merging.patch similarity index 100% rename from patches/unapplied/server/Optimize-Voxel-Shape-Merging.patch rename to patches/server/Optimize-Voxel-Shape-Merging.patch diff --git a/patches/unapplied/server/Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch b/patches/server/Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch similarity index 99% rename from patches/unapplied/server/Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch rename to patches/server/Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch index bc8dad0309..40ab4c05ab 100644 --- a/patches/unapplied/server/Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch +++ b/patches/server/Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch @@ -337,10 +337,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -0,0 +0,0 @@ public class ServerPlayer extends Player { - public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - + public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent + // CraftBukkit end public boolean isRealPlayer; // Paper + public double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper + public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, @Nullable ProfilePublicKey publicKey) { diff --git a/patches/unapplied/server/Optimize-brigadier-child-sorting-performance.patch b/patches/server/Optimize-brigadier-child-sorting-performance.patch similarity index 100% rename from patches/unapplied/server/Optimize-brigadier-child-sorting-performance.patch rename to patches/server/Optimize-brigadier-child-sorting-performance.patch diff --git a/patches/unapplied/server/Optimize-entity-tracker-passenger-checks.patch b/patches/server/Optimize-entity-tracker-passenger-checks.patch similarity index 100% rename from patches/unapplied/server/Optimize-entity-tracker-passenger-checks.patch rename to patches/server/Optimize-entity-tracker-passenger-checks.patch diff --git a/patches/unapplied/server/Optimize-indirect-passenger-iteration.patch b/patches/server/Optimize-indirect-passenger-iteration.patch similarity index 100% rename from patches/unapplied/server/Optimize-indirect-passenger-iteration.patch rename to patches/server/Optimize-indirect-passenger-iteration.patch diff --git a/patches/unapplied/server/Optimize-the-advancement-data-player-iteration-to-be.patch b/patches/server/Optimize-the-advancement-data-player-iteration-to-be.patch similarity index 100% rename from patches/unapplied/server/Optimize-the-advancement-data-player-iteration-to-be.patch rename to patches/server/Optimize-the-advancement-data-player-iteration-to-be.patch diff --git a/patches/unapplied/server/Option-for-maximum-exp-value-when-merging-orbs.patch b/patches/server/Option-for-maximum-exp-value-when-merging-orbs.patch similarity index 100% rename from patches/unapplied/server/Option-for-maximum-exp-value-when-merging-orbs.patch rename to patches/server/Option-for-maximum-exp-value-when-merging-orbs.patch diff --git a/patches/unapplied/server/Option-to-prevent-NBT-copy-in-smithing-recipes.patch b/patches/server/Option-to-prevent-NBT-copy-in-smithing-recipes.patch similarity index 100% rename from patches/unapplied/server/Option-to-prevent-NBT-copy-in-smithing-recipes.patch rename to patches/server/Option-to-prevent-NBT-copy-in-smithing-recipes.patch diff --git a/patches/unapplied/server/Paper-dumpitem-command.patch b/patches/server/Paper-dumpitem-command.patch similarity index 100% rename from patches/unapplied/server/Paper-dumpitem-command.patch rename to patches/server/Paper-dumpitem-command.patch diff --git a/patches/unapplied/server/Player-Chunk-Load-Unload-Events.patch b/patches/server/Player-Chunk-Load-Unload-Events.patch similarity index 100% rename from patches/unapplied/server/Player-Chunk-Load-Unload-Events.patch rename to patches/server/Player-Chunk-Load-Unload-Events.patch diff --git a/patches/unapplied/server/Player-elytra-boost-API.patch b/patches/server/Player-elytra-boost-API.patch similarity index 100% rename from patches/unapplied/server/Player-elytra-boost-API.patch rename to patches/server/Player-elytra-boost-API.patch diff --git a/patches/unapplied/server/PortalCreateEvent-needs-to-know-its-entity.patch b/patches/server/PortalCreateEvent-needs-to-know-its-entity.patch similarity index 97% rename from patches/unapplied/server/PortalCreateEvent-needs-to-know-its-entity.patch rename to patches/server/PortalCreateEvent-needs-to-know-its-entity.patch index 0ae135cde8..cb27dee715 100644 --- a/patches/unapplied/server/PortalCreateEvent-needs-to-know-its-entity.patch +++ b/patches/server/PortalCreateEvent-needs-to-know-its-entity.patch @@ -90,7 +90,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.EmptyBlockGetter; import net.minecraft.world.level.Level; -@@ -0,0 +0,0 @@ public abstract class BlockBehaviour { +@@ -0,0 +0,0 @@ public abstract class BlockBehaviour implements FeatureElement { DebugPackets.sendNeighborsUpdatePacket(world, pos); } @@ -107,9 +107,9 @@ diff --git a/src/main/java/net/minecraft/world/level/portal/PortalShape.java b/s index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/portal/PortalShape.java +++ b/src/main/java/net/minecraft/world/level/portal/PortalShape.java -@@ -0,0 +0,0 @@ import net.minecraft.server.level.ServerLevel; - import net.minecraft.tags.BlockTags; +@@ -0,0 +0,0 @@ import net.minecraft.tags.BlockTags; import net.minecraft.util.Mth; + import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityDimensions; +import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.level.LevelAccessor; diff --git a/patches/unapplied/server/Potential-bed-API.patch b/patches/server/Potential-bed-API.patch similarity index 100% rename from patches/unapplied/server/Potential-bed-API.patch rename to patches/server/Potential-bed-API.patch diff --git a/patches/unapplied/server/Prevent-AFK-kick-while-watching-end-credits.patch b/patches/server/Prevent-AFK-kick-while-watching-end-credits.patch similarity index 100% rename from patches/unapplied/server/Prevent-AFK-kick-while-watching-end-credits.patch rename to patches/server/Prevent-AFK-kick-while-watching-end-credits.patch diff --git a/patches/unapplied/server/Prevent-grindstones-from-overstacking-items.patch b/patches/server/Prevent-grindstones-from-overstacking-items.patch similarity index 100% rename from patches/unapplied/server/Prevent-grindstones-from-overstacking-items.patch rename to patches/server/Prevent-grindstones-from-overstacking-items.patch diff --git a/patches/unapplied/server/Prevent-headless-pistons-from-being-created.patch b/patches/server/Prevent-headless-pistons-from-being-created.patch similarity index 100% rename from patches/unapplied/server/Prevent-headless-pistons-from-being-created.patch rename to patches/server/Prevent-headless-pistons-from-being-created.patch diff --git a/patches/unapplied/server/Prevent-opening-inventories-when-frozen.patch b/patches/server/Prevent-opening-inventories-when-frozen.patch similarity index 100% rename from patches/unapplied/server/Prevent-opening-inventories-when-frozen.patch rename to patches/server/Prevent-opening-inventories-when-frozen.patch diff --git a/patches/unapplied/server/Prevent-position-desync-in-playerconnection-causing-.patch b/patches/server/Prevent-position-desync-in-playerconnection-causing-.patch similarity index 100% rename from patches/unapplied/server/Prevent-position-desync-in-playerconnection-causing-.patch rename to patches/server/Prevent-position-desync-in-playerconnection-causing-.patch diff --git a/patches/unapplied/server/Prevent-teleporting-dead-entities.patch b/patches/server/Prevent-teleporting-dead-entities.patch similarity index 100% rename from patches/unapplied/server/Prevent-teleporting-dead-entities.patch rename to patches/server/Prevent-teleporting-dead-entities.patch diff --git a/patches/unapplied/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch b/patches/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch similarity index 97% rename from patches/unapplied/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch rename to patches/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch index 344b090fec..bf56b059f7 100644 --- a/patches/unapplied/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch +++ b/patches/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch @@ -118,7 +118,7 @@ diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour. index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -0,0 +0,0 @@ public abstract class BlockBehaviour { +@@ -0,0 +0,0 @@ public abstract class BlockBehaviour implements FeatureElement { /** @deprecated */ @Deprecated public boolean canBeReplaced(BlockState state, BlockPlaceContext context) { @@ -127,7 +127,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } /** @deprecated */ -@@ -0,0 +0,0 @@ public abstract class BlockBehaviour { +@@ -0,0 +0,0 @@ public abstract class BlockBehaviour implements FeatureElement { return ((Block) this.owner).builtInRegistryHolder(); } @@ -140,7 +140,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public Material getMaterial() { return this.material; } -@@ -0,0 +0,0 @@ public abstract class BlockBehaviour { +@@ -0,0 +0,0 @@ public abstract class BlockBehaviour implements FeatureElement { } public PushReaction getPistonPushReaction() { diff --git a/patches/unapplied/server/Rate-options-and-timings-for-sensors-and-behaviors.patch b/patches/server/Rate-options-and-timings-for-sensors-and-behaviors.patch similarity index 97% rename from patches/unapplied/server/Rate-options-and-timings-for-sensors-and-behaviors.patch rename to patches/server/Rate-options-and-timings-for-sensors-and-behaviors.patch index 8a24833ef2..aa94c146a3 100644 --- a/patches/unapplied/server/Rate-options-and-timings-for-sensors-and-behaviors.patch +++ b/patches/server/Rate-options-and-timings-for-sensors-and-behaviors.patch @@ -31,7 +31,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java -@@ -0,0 +0,0 @@ public abstract class Behavior { +@@ -0,0 +0,0 @@ public abstract class Behavior implements BehaviorContro private long endTimestamp; private final int minDuration; private final int maxDuration; @@ -42,7 +42,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public Behavior(Map, MemoryStatus> requiredMemoryState) { this(requiredMemoryState, 60); -@@ -0,0 +0,0 @@ public abstract class Behavior { +@@ -0,0 +0,0 @@ public abstract class Behavior implements BehaviorContro this.minDuration = minRunTime; this.maxDuration = maxRunTime; this.entryCondition = requiredMemoryState; @@ -57,10 +57,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end } - public Behavior.Status getStatus() { -@@ -0,0 +0,0 @@ public abstract class Behavior { - } + @Override +@@ -0,0 +0,0 @@ public abstract class Behavior implements BehaviorContro + @Override public final boolean tryStart(ServerLevel world, E entity, long time) { + // Paper start - behavior tick rate + int tickRate = java.util.Objects.requireNonNullElse(world.paperConfig().tickRates.behavior.get(entity.getType(), this.configKey), -1); @@ -78,9 +78,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return true; } else { return false; -@@ -0,0 +0,0 @@ public abstract class Behavior { - } +@@ -0,0 +0,0 @@ public abstract class Behavior implements BehaviorContro + @Override public final void tickOrStop(ServerLevel world, E entity, long time) { + this.timing.startTiming(); // Paper - behavior timings if (!this.timedOut(time) && this.canStillUse(world, entity, time)) { diff --git a/patches/unapplied/server/Reduce-MutableInt-allocations-from-light-engine.patch b/patches/server/Reduce-MutableInt-allocations-from-light-engine.patch similarity index 100% rename from patches/unapplied/server/Reduce-MutableInt-allocations-from-light-engine.patch rename to patches/server/Reduce-MutableInt-allocations-from-light-engine.patch diff --git a/patches/unapplied/server/Reduce-allocation-of-Vec3D-by-entity-tracker.patch b/patches/server/Reduce-allocation-of-Vec3D-by-entity-tracker.patch similarity index 96% rename from patches/unapplied/server/Reduce-allocation-of-Vec3D-by-entity-tracker.patch rename to patches/server/Reduce-allocation-of-Vec3D-by-entity-tracker.patch index 1d5a98626f..acb545eaf1 100644 --- a/patches/unapplied/server/Reduce-allocation-of-Vec3D-by-entity-tracker.patch +++ b/patches/server/Reduce-allocation-of-Vec3D-by-entity-tracker.patch @@ -8,15 +8,15 @@ diff --git a/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.jav index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java +++ b/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java -@@ -0,0 +0,0 @@ import net.minecraft.world.phys.Vec3; +@@ -0,0 +0,0 @@ import org.jetbrains.annotations.VisibleForTesting; public class VecDeltaCodec { private static final double TRUNCATION_STEPS = 4096.0D; - private Vec3 base = Vec3.ZERO; + public Vec3 base = Vec3.ZERO; // Paper - private static long encode(double value) { - return Mth.lfloor(value * 4096.0D); + @VisibleForTesting + static long encode(double value) { diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/patches/unapplied/server/Reduce-blockpos-allocation-from-pathfinding.patch b/patches/server/Reduce-blockpos-allocation-from-pathfinding.patch similarity index 100% rename from patches/unapplied/server/Reduce-blockpos-allocation-from-pathfinding.patch rename to patches/server/Reduce-blockpos-allocation-from-pathfinding.patch diff --git a/patches/unapplied/server/Remove-ProjectileHitEvent-call-when-fireballs-dead.patch b/patches/server/Remove-ProjectileHitEvent-call-when-fireballs-dead.patch similarity index 100% rename from patches/unapplied/server/Remove-ProjectileHitEvent-call-when-fireballs-dead.patch rename to patches/server/Remove-ProjectileHitEvent-call-when-fireballs-dead.patch diff --git a/patches/unapplied/server/Remove-some-streams-from-structures.patch b/patches/server/Remove-some-streams-from-structures.patch similarity index 100% rename from patches/unapplied/server/Remove-some-streams-from-structures.patch rename to patches/server/Remove-some-streams-from-structures.patch diff --git a/patches/unapplied/server/Remove-stale-POIs.patch b/patches/server/Remove-stale-POIs.patch similarity index 100% rename from patches/unapplied/server/Remove-stale-POIs.patch rename to patches/server/Remove-stale-POIs.patch diff --git a/patches/unapplied/server/Remove-streams-from-SensorNearest.patch b/patches/server/Remove-streams-from-SensorNearest.patch similarity index 100% rename from patches/unapplied/server/Remove-streams-from-SensorNearest.patch rename to patches/server/Remove-streams-from-SensorNearest.patch diff --git a/patches/unapplied/server/Remove-streams-from-classes-related-villager-gossip.patch b/patches/server/Remove-streams-from-classes-related-villager-gossip.patch similarity index 73% rename from patches/unapplied/server/Remove-streams-from-classes-related-villager-gossip.patch rename to patches/server/Remove-streams-from-classes-related-villager-gossip.patch index 486a8b5191..f164335d26 100644 --- a/patches/unapplied/server/Remove-streams-from-classes-related-villager-gossip.patch +++ b/patches/server/Remove-streams-from-classes-related-villager-gossip.patch @@ -8,6 +8,15 @@ diff --git a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer. index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java +++ b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java +@@ -0,0 +0,0 @@ import org.slf4j.Logger; + public class GossipContainer { + private static final Logger LOGGER = LogUtils.getLogger(); + public static final int DISCARD_THRESHOLD = 2; +- private final Map gossips = Maps.newHashMap(); public Map getReputations() { return this.gossips; } // Paper - add getter for reputations ++ private final Map gossips = Maps.newHashMap(); + + @VisibleForDebug + public Map> getGossipEntries() { @@ -0,0 +0,0 @@ public class GossipContainer { }); } @@ -15,10 +24,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start - Remove streams from reputation + private List decompress() { + List list = new it.unimi.dsi.fastutil.objects.ObjectArrayList<>(); -+ for (Map.Entry entry : getReputations().entrySet()) { ++ for (Map.Entry entry : this.gossips.entrySet()) { + for (GossipContainer.GossipEntry cur : entry.getValue().decompress(entry.getKey())) { -+ if (cur.weightedValue() != 0) ++ if (cur.weightedValue() != 0) { + list.add(cur); ++ } + } + } + return list; @@ -26,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end + private Collection selectGossipsForTransfer(RandomSource random, int count) { -- List list = this.unpack().collect(Collectors.toList()); +- List list = this.unpack().toList(); + List list = this.decompress(); // Paper - Remove streams from reputation if (list.isEmpty()) { return Collections.emptyList(); @@ -34,11 +44,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class GossipContainer { } - public Dynamic store(DynamicOps ops) { -- return new Dynamic<>(ops, ops.createList(this.unpack().map((entry) -> { -+ return new Dynamic<>(ops, ops.createList(this.decompress().stream().map((entry) -> { // Paper - remove streams from reputation - return entry.store(ops); - }).map(Dynamic::getValue))); + public T store(DynamicOps ops) { +- return GossipContainer.GossipEntry.LIST_CODEC.encodeStart(ops, this.unpack().toList()).resultOrPartial((error) -> { ++ return GossipContainer.GossipEntry.LIST_CODEC.encodeStart(ops, this.decompress()).resultOrPartial((error) -> { + LOGGER.warn("Failed to serialize gossips: {}", (Object)error); + }).orElseGet(ops::emptyList); } @@ -0,0 +0,0 @@ public class GossipContainer { final Object2IntMap entries = new Object2IntOpenHashMap<>(); diff --git a/patches/unapplied/server/Reset-Ender-Crystals-on-Dragon-Spawn.patch b/patches/server/Reset-Ender-Crystals-on-Dragon-Spawn.patch similarity index 77% rename from patches/unapplied/server/Reset-Ender-Crystals-on-Dragon-Spawn.patch rename to patches/server/Reset-Ender-Crystals-on-Dragon-Spawn.patch index 6cabd7e49a..8f8cfb253a 100644 --- a/patches/unapplied/server/Reset-Ender-Crystals-on-Dragon-Spawn.patch +++ b/patches/server/Reset-Ender-Crystals-on-Dragon-Spawn.patch @@ -15,10 +15,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java +++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java @@ -0,0 +0,0 @@ public class EndDragonFight { - enderDragon.moveTo(0.0D, 128.0D, 0.0D, this.level.random.nextFloat() * 360.0F, 0.0F); - this.level.addFreshEntity(enderDragon); - this.dragonUUID = enderDragon.getUUID(); -+ this.resetSpikeCrystals(); // Paper - return enderDragon; - } + enderDragon.moveTo(0.0D, 128.0D, 0.0D, this.level.random.nextFloat() * 360.0F, 0.0F); + this.level.addFreshEntity(enderDragon); + this.dragonUUID = enderDragon.getUUID(); ++ this.resetSpikeCrystals(); // Paper + } + return enderDragon; diff --git a/patches/unapplied/server/Reset-shield-blocking-on-dimension-change.patch b/patches/server/Reset-shield-blocking-on-dimension-change.patch similarity index 100% rename from patches/unapplied/server/Reset-shield-blocking-on-dimension-change.patch rename to patches/server/Reset-shield-blocking-on-dimension-change.patch diff --git a/patches/unapplied/server/Retain-block-place-order-when-capturing-blockstates.patch b/patches/server/Retain-block-place-order-when-capturing-blockstates.patch similarity index 100% rename from patches/unapplied/server/Retain-block-place-order-when-capturing-blockstates.patch rename to patches/server/Retain-block-place-order-when-capturing-blockstates.patch diff --git a/patches/unapplied/server/Return-chat-component-with-empty-text-instead-of-thr.patch b/patches/server/Return-chat-component-with-empty-text-instead-of-thr.patch similarity index 100% rename from patches/unapplied/server/Return-chat-component-with-empty-text-instead-of-thr.patch rename to patches/server/Return-chat-component-with-empty-text-instead-of-thr.patch diff --git a/patches/unapplied/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch b/patches/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch similarity index 100% rename from patches/unapplied/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch rename to patches/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch diff --git a/patches/unapplied/server/Send-empty-commands-if-tab-completion-is-disabled.patch b/patches/server/Send-empty-commands-if-tab-completion-is-disabled.patch similarity index 100% rename from patches/unapplied/server/Send-empty-commands-if-tab-completion-is-disabled.patch rename to patches/server/Send-empty-commands-if-tab-completion-is-disabled.patch diff --git a/patches/unapplied/server/Set-area-affect-cloud-rotation.patch b/patches/server/Set-area-affect-cloud-rotation.patch similarity index 100% rename from patches/unapplied/server/Set-area-affect-cloud-rotation.patch rename to patches/server/Set-area-affect-cloud-rotation.patch diff --git a/patches/unapplied/server/Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/patches/server/Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch similarity index 100% rename from patches/unapplied/server/Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch rename to patches/server/Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch diff --git a/patches/unapplied/server/Significantly-improve-performance-of-the-end-generat.patch b/patches/server/Significantly-improve-performance-of-the-end-generat.patch similarity index 100% rename from patches/unapplied/server/Significantly-improve-performance-of-the-end-generat.patch rename to patches/server/Significantly-improve-performance-of-the-end-generat.patch diff --git a/patches/unapplied/server/Spawn-player-in-correct-world-on-login.patch b/patches/server/Spawn-player-in-correct-world-on-login.patch similarity index 100% rename from patches/unapplied/server/Spawn-player-in-correct-world-on-login.patch rename to patches/server/Spawn-player-in-correct-world-on-login.patch diff --git a/patches/unapplied/server/Stinger-API.patch b/patches/server/Stinger-API.patch similarity index 100% rename from patches/unapplied/server/Stinger-API.patch rename to patches/server/Stinger-API.patch diff --git a/patches/unapplied/server/Stop-copy-on-write-operations-for-updating-light-dat.patch b/patches/server/Stop-copy-on-write-operations-for-updating-light-dat.patch similarity index 100% rename from patches/unapplied/server/Stop-copy-on-write-operations-for-updating-light-dat.patch rename to patches/server/Stop-copy-on-write-operations-for-updating-light-dat.patch diff --git a/patches/unapplied/server/Support-components-in-ItemMeta.patch b/patches/server/Support-components-in-ItemMeta.patch similarity index 100% rename from patches/unapplied/server/Support-components-in-ItemMeta.patch rename to patches/server/Support-components-in-ItemMeta.patch diff --git a/patches/unapplied/server/Support-old-UUID-format-for-NBT.patch b/patches/server/Support-old-UUID-format-for-NBT.patch similarity index 100% rename from patches/unapplied/server/Support-old-UUID-format-for-NBT.patch rename to patches/server/Support-old-UUID-format-for-NBT.patch diff --git a/patches/unapplied/server/Synchronize-PalettedContainer-instead-of-ThreadingDe.patch b/patches/server/Synchronize-PalettedContainer-instead-of-ThreadingDe.patch similarity index 100% rename from patches/unapplied/server/Synchronize-PalettedContainer-instead-of-ThreadingDe.patch rename to patches/server/Synchronize-PalettedContainer-instead-of-ThreadingDe.patch diff --git a/patches/unapplied/server/Thread-Safe-Vanilla-Command-permission-checking.patch b/patches/server/Thread-Safe-Vanilla-Command-permission-checking.patch similarity index 100% rename from patches/unapplied/server/Thread-Safe-Vanilla-Command-permission-checking.patch rename to patches/server/Thread-Safe-Vanilla-Command-permission-checking.patch diff --git a/patches/unapplied/server/Throw-proper-exception-on-empty-JsonList-file.patch b/patches/server/Throw-proper-exception-on-empty-JsonList-file.patch similarity index 100% rename from patches/unapplied/server/Throw-proper-exception-on-empty-JsonList-file.patch rename to patches/server/Throw-proper-exception-on-empty-JsonList-file.patch diff --git a/patches/unapplied/server/Toggle-for-removing-existing-dragon.patch b/patches/server/Toggle-for-removing-existing-dragon.patch similarity index 100% rename from patches/unapplied/server/Toggle-for-removing-existing-dragon.patch rename to patches/server/Toggle-for-removing-existing-dragon.patch diff --git a/patches/unapplied/server/Update-itemstack-legacy-name-and-lore.patch b/patches/server/Update-itemstack-legacy-name-and-lore.patch similarity index 100% rename from patches/unapplied/server/Update-itemstack-legacy-name-and-lore.patch rename to patches/server/Update-itemstack-legacy-name-and-lore.patch diff --git a/patches/unapplied/server/Use-distance-map-to-optimise-entity-tracker.patch b/patches/server/Use-distance-map-to-optimise-entity-tracker.patch similarity index 100% rename from patches/unapplied/server/Use-distance-map-to-optimise-entity-tracker.patch rename to patches/server/Use-distance-map-to-optimise-entity-tracker.patch diff --git a/patches/unapplied/server/Use-getChunkIfLoadedImmediately-in-places.patch b/patches/server/Use-getChunkIfLoadedImmediately-in-places.patch similarity index 79% rename from patches/unapplied/server/Use-getChunkIfLoadedImmediately-in-places.patch rename to patches/server/Use-getChunkIfLoadedImmediately-in-places.patch index a414a4c663..548fff400b 100644 --- a/patches/unapplied/server/Use-getChunkIfLoadedImmediately-in-places.patch +++ b/patches/server/Use-getChunkIfLoadedImmediately-in-places.patch @@ -20,15 +20,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } @Override -@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel { - - for (int l1 = j; l1 <= i1; ++l1) { - for (int i2 = l; i2 <= k1; ++i2) { -- LevelChunk chunk = this.getChunkSource().getChunkNow(l1, i2); -+ LevelChunk chunk = (LevelChunk) this.getChunkIfLoadedImmediately(l1, i2); // Paper - - if (chunk != null) { - for (int j2 = k; j2 <= j1; ++j2) { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/Level.java @@ -47,3 +38,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public abstract ResourceKey getTypeKey(); protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, Holder holder, Supplier supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor +diff --git a/src/main/java/net/minecraft/world/level/gameevent/GameEventDispatcher.java b/src/main/java/net/minecraft/world/level/gameevent/GameEventDispatcher.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/level/gameevent/GameEventDispatcher.java ++++ b/src/main/java/net/minecraft/world/level/gameevent/GameEventDispatcher.java +@@ -0,0 +0,0 @@ public class GameEventDispatcher { + + for (int l1 = j; l1 <= i1; ++l1) { + for (int i2 = l; i2 <= k1; ++i2) { +- LevelChunk chunk = this.level.getChunkSource().getChunkNow(l1, i2); ++ LevelChunk chunk = (LevelChunk) this.level.getChunkIfLoadedImmediately(l1, i2); // Paper + + if (chunk != null) { + for (int j2 = k; j2 <= j1; ++j2) { diff --git a/patches/unapplied/server/Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch b/patches/server/Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch similarity index 100% rename from patches/unapplied/server/Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch rename to patches/server/Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch diff --git a/patches/unapplied/server/Validate-PickItem-Packet-and-kick-for-invalid.patch b/patches/server/Validate-PickItem-Packet-and-kick-for-invalid.patch similarity index 100% rename from patches/unapplied/server/Validate-PickItem-Packet-and-kick-for-invalid.patch rename to patches/server/Validate-PickItem-Packet-and-kick-for-invalid.patch diff --git a/patches/unapplied/server/Vanilla-command-permission-fixes.patch b/patches/server/Vanilla-command-permission-fixes.patch similarity index 100% rename from patches/unapplied/server/Vanilla-command-permission-fixes.patch rename to patches/server/Vanilla-command-permission-fixes.patch diff --git a/patches/unapplied/server/Villager-Restocks-API.patch b/patches/server/Villager-Restocks-API.patch similarity index 100% rename from patches/unapplied/server/Villager-Restocks-API.patch rename to patches/server/Villager-Restocks-API.patch diff --git a/patches/unapplied/server/Villager-resetOffers.patch b/patches/server/Villager-resetOffers.patch similarity index 100% rename from patches/unapplied/server/Villager-resetOffers.patch rename to patches/server/Villager-resetOffers.patch diff --git a/patches/unapplied/server/Wait-for-Async-Tasks-during-shutdown.patch b/patches/server/Wait-for-Async-Tasks-during-shutdown.patch similarity index 100% rename from patches/unapplied/server/Wait-for-Async-Tasks-during-shutdown.patch rename to patches/server/Wait-for-Async-Tasks-during-shutdown.patch diff --git a/patches/unapplied/server/Zombie-API-breaking-doors.patch b/patches/server/Zombie-API-breaking-doors.patch similarity index 100% rename from patches/unapplied/server/Zombie-API-breaking-doors.patch rename to patches/server/Zombie-API-breaking-doors.patch diff --git a/patches/unapplied/server/add-DragonEggFormEvent.patch b/patches/server/add-DragonEggFormEvent.patch similarity index 100% rename from patches/unapplied/server/add-DragonEggFormEvent.patch rename to patches/server/add-DragonEggFormEvent.patch diff --git a/patches/unapplied/server/add-RespawnFlags-to-PlayerRespawnEvent.patch b/patches/server/add-RespawnFlags-to-PlayerRespawnEvent.patch similarity index 100% rename from patches/unapplied/server/add-RespawnFlags-to-PlayerRespawnEvent.patch rename to patches/server/add-RespawnFlags-to-PlayerRespawnEvent.patch diff --git a/patches/unapplied/server/add-consumeFuel-to-FurnaceBurnEvent.patch b/patches/server/add-consumeFuel-to-FurnaceBurnEvent.patch similarity index 100% rename from patches/unapplied/server/add-consumeFuel-to-FurnaceBurnEvent.patch rename to patches/server/add-consumeFuel-to-FurnaceBurnEvent.patch diff --git a/patches/unapplied/server/add-get-set-drop-chance-to-EntityEquipment.patch b/patches/server/add-get-set-drop-chance-to-EntityEquipment.patch similarity index 100% rename from patches/unapplied/server/add-get-set-drop-chance-to-EntityEquipment.patch rename to patches/server/add-get-set-drop-chance-to-EntityEquipment.patch diff --git a/patches/unapplied/server/add-isDeeplySleeping-to-HumanEntity.patch b/patches/server/add-isDeeplySleeping-to-HumanEntity.patch similarity index 100% rename from patches/unapplied/server/add-isDeeplySleeping-to-HumanEntity.patch rename to patches/server/add-isDeeplySleeping-to-HumanEntity.patch diff --git a/patches/unapplied/server/add-per-world-spawn-limits.patch b/patches/server/add-per-world-spawn-limits.patch similarity index 100% rename from patches/unapplied/server/add-per-world-spawn-limits.patch rename to patches/server/add-per-world-spawn-limits.patch diff --git a/patches/unapplied/server/added-PlayerNameEntityEvent.patch b/patches/server/added-PlayerNameEntityEvent.patch similarity index 100% rename from patches/unapplied/server/added-PlayerNameEntityEvent.patch rename to patches/server/added-PlayerNameEntityEvent.patch diff --git a/patches/unapplied/server/added-option-to-disable-pathfinding-updates-on-block.patch b/patches/server/added-option-to-disable-pathfinding-updates-on-block.patch similarity index 100% rename from patches/unapplied/server/added-option-to-disable-pathfinding-updates-on-block.patch rename to patches/server/added-option-to-disable-pathfinding-updates-on-block.patch diff --git a/patches/unapplied/server/additions-to-PlayerGameModeChangeEvent.patch b/patches/server/additions-to-PlayerGameModeChangeEvent.patch similarity index 96% rename from patches/unapplied/server/additions-to-PlayerGameModeChangeEvent.patch rename to patches/server/additions-to-PlayerGameModeChangeEvent.patch index 366cfd7409..6de248a307 100644 --- a/patches/unapplied/server/additions-to-PlayerGameModeChangeEvent.patch +++ b/patches/server/additions-to-PlayerGameModeChangeEvent.patch @@ -119,7 +119,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return event; // Paper } // CraftBukkit end - this.setGameModeForPlayer(gameMode, this.gameModeForPlayer); + this.setGameModeForPlayer(gameMode, this.previousGameModeForPlayer); + this.player.onUpdateAbilities(); + this.player.server.getPlayerList().broadcastAll(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE, this.player), this.player); // CraftBukkit + this.level.updateSleepingPlayerList(); - return true; + return event; // Paper } diff --git a/patches/unapplied/server/copy-TESign-isEditable-from-snapshots.patch b/patches/server/copy-TESign-isEditable-from-snapshots.patch similarity index 89% rename from patches/unapplied/server/copy-TESign-isEditable-from-snapshots.patch rename to patches/server/copy-TESign-isEditable-from-snapshots.patch index 009df2a106..a9f8bc3ee3 100644 --- a/patches/unapplied/server/copy-TESign-isEditable-from-snapshots.patch +++ b/patches/server/copy-TESign-isEditable-from-snapshots.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/mai index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java -@@ -0,0 +0,0 @@ public class CraftSign extends CraftBlockEntityState implements +@@ -0,0 +0,0 @@ public class CraftSign extends CraftBlockEntityState< } // Paper end } diff --git a/patches/unapplied/server/fix-PigZombieAngerEvent-cancellation.patch b/patches/server/fix-PigZombieAngerEvent-cancellation.patch similarity index 93% rename from patches/unapplied/server/fix-PigZombieAngerEvent-cancellation.patch rename to patches/server/fix-PigZombieAngerEvent-cancellation.patch index b01338dfcf..ed64faef27 100644 --- a/patches/unapplied/server/fix-PigZombieAngerEvent-cancellation.patch +++ b/patches/server/fix-PigZombieAngerEvent-cancellation.patch @@ -9,9 +9,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/monster/ZombifiedPiglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/ZombifiedPiglin.java @@ -0,0 +0,0 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { - private static final int ALERT_RANGE_Y = 10; - private static final UniformInt ALERT_INTERVAL = TimeUtil.rangeOfSeconds(4, 6); private int ticksUntilNextAlert; + private static final float ZOMBIFIED_PIGLIN_EYE_HEIGHT = 1.79F; + private static final float ZOMBIFIED_PIGLIN_BABY_EYE_HEIGHT_ADJUSTMENT = 0.82F; + private HurtByTargetGoal pathfinderGoalHurtByTarget; // Paper public ZombifiedPiglin(EntityType type, Level world) { diff --git a/patches/unapplied/server/fix-PlayerItemHeldEvent-firing-twice.patch b/patches/server/fix-PlayerItemHeldEvent-firing-twice.patch similarity index 100% rename from patches/unapplied/server/fix-PlayerItemHeldEvent-firing-twice.patch rename to patches/server/fix-PlayerItemHeldEvent-firing-twice.patch diff --git a/patches/unapplied/server/fix-converting-txt-to-json-file.patch b/patches/server/fix-converting-txt-to-json-file.patch similarity index 100% rename from patches/unapplied/server/fix-converting-txt-to-json-file.patch rename to patches/server/fix-converting-txt-to-json-file.patch diff --git a/patches/unapplied/server/fix-dead-slime-setSize-invincibility.patch b/patches/server/fix-dead-slime-setSize-invincibility.patch similarity index 100% rename from patches/unapplied/server/fix-dead-slime-setSize-invincibility.patch rename to patches/server/fix-dead-slime-setSize-invincibility.patch diff --git a/patches/unapplied/server/forced-whitelist-use-configurable-kick-message.patch b/patches/server/forced-whitelist-use-configurable-kick-message.patch similarity index 100% rename from patches/unapplied/server/forced-whitelist-use-configurable-kick-message.patch rename to patches/server/forced-whitelist-use-configurable-kick-message.patch diff --git a/patches/unapplied/server/incremental-chunk-and-player-saving.patch b/patches/server/incremental-chunk-and-player-saving.patch similarity index 100% rename from patches/unapplied/server/incremental-chunk-and-player-saving.patch rename to patches/server/incremental-chunk-and-player-saving.patch diff --git a/patches/unapplied/server/living-entity-allow-attribute-registration.patch b/patches/server/living-entity-allow-attribute-registration.patch similarity index 96% rename from patches/unapplied/server/living-entity-allow-attribute-registration.patch rename to patches/server/living-entity-allow-attribute-registration.patch index 7919856caa..c2c28e7360 100644 --- a/patches/unapplied/server/living-entity-allow-attribute-registration.patch +++ b/patches/server/living-entity-allow-attribute-registration.patch @@ -38,7 +38,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end + public static net.minecraft.world.entity.ai.attributes.Attribute toMinecraft(Attribute attribute) { - return net.minecraft.core.Registry.ATTRIBUTE.get(CraftNamespacedKey.toMinecraft(attribute.getKey())); + return BuiltInRegistries.ATTRIBUTE.get(CraftNamespacedKey.toMinecraft(attribute.getKey())); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 diff --git a/patches/unapplied/server/misc-debugging-dumps.patch b/patches/server/misc-debugging-dumps.patch similarity index 97% rename from patches/unapplied/server/misc-debugging-dumps.patch rename to patches/server/misc-debugging-dumps.patch index f634843476..e7901b7a62 100644 --- a/patches/unapplied/server/misc-debugging-dumps.patch +++ b/patches/server/misc-debugging-dumps.patch @@ -50,18 +50,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 org.spigotmc.WatchdogThread.doStop(); // Paper @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop -Date: Sun, 28 Jun 2020 19:36:55 -0400 -Subject: [PATCH] Don't allow null UUID's for chat - - -diff --git a/src/main/java/net/minecraft/network/chat/ChatSender.java b/src/main/java/net/minecraft/network/chat/ChatSender.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/network/chat/ChatSender.java -+++ b/src/main/java/net/minecraft/network/chat/ChatSender.java -@@ -0,0 +0,0 @@ import net.minecraft.world.entity.player.ProfilePublicKey; - public record ChatSender(UUID profileId, @Nullable ProfilePublicKey profilePublicKey) { - public static final ChatSender SYSTEM = new ChatSender(Util.NIL_UUID, (ProfilePublicKey)null); - -+ // Paper start -+ public ChatSender { -+ com.google.common.base.Preconditions.checkNotNull(profileId, "uuid cannot be null"); -+ } -+ // Paper end -+ - public boolean isSystem() { - return SYSTEM.equals(this); - } diff --git a/patches/unapplied/server/Don-t-run-entity-collision-code-if-not-needed.patch b/patches/unapplied/server/Don-t-run-entity-collision-code-if-not-needed.patch deleted file mode 100644 index 609bfe2d10..0000000000 --- a/patches/unapplied/server/Don-t-run-entity-collision-code-if-not-needed.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Spottedleaf -Date: Wed, 15 Apr 2020 17:56:07 -0700 -Subject: [PATCH] Don't run entity collision code if not needed - -Will not run if: -Max entity cramming is disabled and the max collisions per entity is less than or equal to 0. -Entity#isPushable() returns false, meaning all entities will not be able to collide with this -entity anyways. -The entity's current team collision rule causes them to NEVER collide. - -Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> - -diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/LivingEntity.java -+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity { - protected void serverAiStep() {} - - protected void pushEntities() { -+ // Paper start - don't run getEntities if we're not going to use its result -+ if (!this.isPushable()) { -+ return; -+ } -+ net.minecraft.world.scores.Team team = this.getTeam(); -+ if (team != null && team.getCollisionRule() == net.minecraft.world.scores.Team.CollisionRule.NEVER) { -+ return; -+ } -+ -+ int i = this.level.getGameRules().getInt(GameRules.RULE_MAX_ENTITY_CRAMMING); -+ if (i <= 0 && level.paperConfig().collisions.maxEntityCollisions <= 0) { -+ return; -+ } -+ // Paper end - don't run getEntities if we're not going to use its result - List list = this.level.getEntities((Entity) this, this.getBoundingBox(), EntitySelector.pushableBy(this)); - - if (!list.isEmpty()) { -- int i = this.level.getGameRules().getInt(GameRules.RULE_MAX_ENTITY_CRAMMING); -+ // Paper - move up - int j; - - if (i > 0 && list.size() > i - 1 && this.random.nextInt(4) == 0) { diff --git a/patches/unapplied/server/Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch b/patches/unapplied/server/Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch deleted file mode 100644 index 7259fba86f..0000000000 --- a/patches/unapplied/server/Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jake Potrebic -Date: Fri, 3 Jul 2020 15:03:33 -0700 -Subject: [PATCH] Improve EntityTargetLivingEntityEvent for 1.16 mobs - -CraftBukkit has a bug in their implementation and is incorrectly handling forget -Also adds more target reasons for why it forgot target. - -diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java b/src/main/java/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java -+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java -@@ -0,0 +0,0 @@ public class StopAttackingIfTargetInvalid extends Behavior { - LivingEntity entityliving = this.getAttackTarget(entity); - - if (!entity.canAttack(entityliving)) { -- this.clearAttackTarget(entity); -+ this.clearAttackTarget(entity, org.bukkit.event.entity.EntityTargetEvent.TargetReason.TARGET_INVALID); // Paper - } else if (this.canGrowTiredOfTryingToReachTarget && StopAttackingIfTargetInvalid.isTiredOfTryingToReachTarget(entity)) { -- this.clearAttackTarget(entity); -+ this.clearAttackTarget(entity, org.bukkit.event.entity.EntityTargetEvent.TargetReason.FORGOT_TARGET); // Paper - } else if (this.isCurrentTargetDeadOrRemoved(entity)) { -- this.clearAttackTarget(entity); -+ this.clearAttackTarget(entity, org.bukkit.event.entity.EntityTargetEvent.TargetReason.TARGET_DIED); // Paper - } else if (this.isCurrentTargetInDifferentLevel(entity)) { -- this.clearAttackTarget(entity); -+ this.clearAttackTarget(entity, org.bukkit.event.entity.EntityTargetEvent.TargetReason.TARGET_OTHER_LEVEL); // Paper - } else if (this.stopAttackingWhen.test(this.getAttackTarget(entity))) { -- this.clearAttackTarget(entity); -+ this.clearAttackTarget(entity, org.bukkit.event.entity.EntityTargetEvent.TargetReason.TARGET_INVALID); // Paper - } - } - -@@ -0,0 +0,0 @@ public class StopAttackingIfTargetInvalid extends Behavior { - return optional.isPresent() && !((LivingEntity) optional.get()).isAlive(); - } - -- protected void clearAttackTarget(E entity) { -+ protected void clearAttackTarget(E entity, EntityTargetEvent.TargetReason reason) { - // CraftBukkit start -- LivingEntity old = entity.getBrain().getMemory(MemoryModuleType.ATTACK_TARGET).orElse(null); -- EntityTargetEvent event = CraftEventFactory.callEntityTargetLivingEvent(entity, null, (old != null && !old.isAlive()) ? EntityTargetEvent.TargetReason.TARGET_DIED : EntityTargetEvent.TargetReason.FORGOT_TARGET); -+ // Paper start - fix this event -+ // LivingEntity old = entity.getBrain().getMemory(MemoryModuleType.ATTACK_TARGET).orElse(null); -+ EntityTargetEvent event = CraftEventFactory.callEntityTargetLivingEvent(entity, null, reason); - if (event.isCancelled()) { - return; - } -- if (event.getTarget() != null) { -+ // comment out, bad logic - bad -+ /*if (event.getTarget() != null) { - entity.getBrain().setMemory(MemoryModuleType.ATTACK_TARGET, ((CraftLivingEntity) event.getTarget()).getHandle()); - return; -- } -+ }*/ -+ // Paper end - // CraftBukkit end - this.onTargetErased.accept(entity, this.getAttackTarget(entity)); - entity.getBrain().eraseMemory(MemoryModuleType.ATTACK_TARGET); diff --git a/patches/unapplied/server/Improve-inlinig-for-some-hot-IBlockData-methods.patch b/patches/unapplied/server/Improve-inlinig-for-some-hot-IBlockData-methods.patch deleted file mode 100644 index d36dfee581..0000000000 --- a/patches/unapplied/server/Improve-inlinig-for-some-hot-IBlockData-methods.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Spottedleaf -Date: Mon, 6 Jul 2020 20:46:50 -0700 -Subject: [PATCH] Improve inlinig for some hot IBlockData methods - - -diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -0,0 +0,0 @@ public abstract class BlockBehaviour { - return this.conditionallyFullOpaque; - } - // Paper end - starlight -+ // Paper start -+ protected boolean isTicking; -+ protected FluidState fluid; -+ // Paper end - - public void initCache() { -+ this.fluid = this.getBlock().getFluidState(this.asState()); // Paper - moved from getFluid() -+ this.isTicking = this.getBlock().isRandomlyTicking(this.asState()); // Paper - moved from isTicking() - if (!this.getBlock().hasDynamicShape()) { - this.cache = new BlockBehaviour.BlockStateBase.Cache(this.asState()); - } -@@ -0,0 +0,0 @@ public abstract class BlockBehaviour { - return this.shapeExceedsCube; // Paper - moved into shape cache init - } - -- public boolean useShapeForLightOcclusion() { -+ public final boolean useShapeForLightOcclusion() { // Paper - return this.useShapeForLightOcclusion; - } - -- public int getLightEmission() { -+ public final int getLightEmission() { // Paper - return this.lightEmission; - } - -- public boolean isAir() { -+ public final boolean isAir() { // Paper - return this.isAir; - } - -@@ -0,0 +0,0 @@ public abstract class BlockBehaviour { - } - } - -- public boolean canOcclude() { -+ public final boolean canOcclude() { // Paper - return this.canOcclude; - } - -@@ -0,0 +0,0 @@ public abstract class BlockBehaviour { - return this.getBlock() == block; - } - -- public FluidState getFluidState() { -- return this.getBlock().getFluidState(this.asState()); -+ public final FluidState getFluidState() { // Paper -+ return this.fluid; // Paper - moved into init - } - -- public boolean isRandomlyTicking() { -- return this.getBlock().isRandomlyTicking(this.asState()); -+ public final boolean isRandomlyTicking() { // Paper -+ return this.isTicking; // Paper - moved into init - } - - public long getSeed(BlockPos pos) { -diff --git a/src/main/java/net/minecraft/world/level/material/FluidState.java b/src/main/java/net/minecraft/world/level/material/FluidState.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/level/material/FluidState.java -+++ b/src/main/java/net/minecraft/world/level/material/FluidState.java -@@ -0,0 +0,0 @@ public final class FluidState extends StateHolder { - public static final int AMOUNT_MAX = 9; - public static final int AMOUNT_FULL = 8; - -+ // Paper start -+ protected final boolean isEmpty; -+ // Paper end - public FluidState(Fluid fluid, ImmutableMap, Comparable> propertiesMap, MapCodec codec) { - super(fluid, propertiesMap, codec); -+ this.isEmpty = fluid.isEmpty(); // Paper - moved from isEmpty() - } - - public Fluid getType() { -@@ -0,0 +0,0 @@ public final class FluidState extends StateHolder { - } - - public boolean isEmpty() { -- return this.getType().isEmpty(); -+ return this.isEmpty; // Paper - moved into constructor - } - - public float getHeight(BlockGetter world, BlockPos pos) { diff --git a/patches/unapplied/server/Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch b/patches/unapplied/server/Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch deleted file mode 100644 index 33b6a07b3e..0000000000 --- a/patches/unapplied/server/Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> -Date: Fri, 19 Mar 2021 16:07:21 -0700 -Subject: [PATCH] Only set despawnTimer for Wandering Traders spawned by - MobSpawnerTrader - - -diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/EntityType.java -+++ b/src/main/java/net/minecraft/world/entity/EntityType.java -@@ -0,0 +0,0 @@ public class EntityType implements EntityTypeTest { - - @Nullable - public T spawn(ServerLevel worldserver, @Nullable CompoundTag nbttagcompound, @Nullable Component ichatbasecomponent, @Nullable Player entityhuman, BlockPos blockposition, MobSpawnType enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) { -+ // Paper start - add consumer to modify entity before spawn -+ return this.spawn(worldserver, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1, spawnReason, null); -+ } -+ @Nullable -+ public T spawn(ServerLevel worldserver, @Nullable CompoundTag nbttagcompound, @Nullable Component ichatbasecomponent, @Nullable Player entityhuman, BlockPos blockposition, MobSpawnType enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason, @Nullable java.util.function.Consumer op) { -+ // Paper end - // Paper start - Call PreCreatureSpawnEvent - org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(EntityType.getKey(this).getPath()); - if (type != null) { -@@ -0,0 +0,0 @@ public class EntityType implements EntityTypeTest { - } - // Paper end - T t0 = this.create(worldserver, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1); -+ if (t0 != null && op != null) op.accept(t0); // Paper - - if (t0 != null) { - worldserver.addFreshEntityWithPassengers(t0, spawnReason); -diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java -+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java -@@ -0,0 +0,0 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill - - public WanderingTrader(EntityType type, Level world) { - super(type, world); -- this.setDespawnDelay(48000); // CraftBukkit - set default from MobSpawnerTrader -+ //this.setDespawnDelay(48000); // CraftBukkit - set default from MobSpawnerTrader // Paper - move back to MobSpawnerTrader - Vanilla behavior is that only traders spawned by it have this value set. - } - - @Override -diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java -+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java -@@ -0,0 +0,0 @@ public class WanderingTraderSpawner implements CustomSpawner { - return false; - } - -- WanderingTrader entityvillagertrader = (WanderingTrader) EntityType.WANDERING_TRADER.spawn(world, (CompoundTag) null, (Component) null, (Player) null, blockposition2, MobSpawnType.EVENT, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit -+ WanderingTrader entityvillagertrader = (WanderingTrader) EntityType.WANDERING_TRADER.spawn(world, (CompoundTag) null, (Component) null, (Player) null, blockposition2, MobSpawnType.EVENT, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL, trader -> trader.setDespawnDelay(48000)); // CraftBukkit // Paper - set despawnTimer before spawn events called - - if (entityvillagertrader != null) { - for (int i = 0; i < 2; ++i) {