From f328e1ae26ace3dd1bdf2e9b58489f3d9cba7a43 Mon Sep 17 00:00:00 2001 From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Date: Thu, 8 Jun 2023 04:47:19 -0400 Subject: [PATCH] vine boom sound --- ...ntrol-player-s-insomnia-and-phantoms.patch | 0 ...nate-Current-redstone-implementation.patch | 2 +- .../server/Add-BlockLockCheckEvent.patch | 0 ...ItemEvent-and-EntityCompostItemEvent.patch | 0 .../server/Add-Entity-Body-Yaw-API.patch | 0 ...eEvent-and-CollarColorable-interface.patch | 25 ++-- .../server/Add-EntityFertilizeEggEvent.patch | 33 ----- .../server/Add-EntityPortalReadyEvent.patch | 4 +- .../Add-Mob-Experience-reward-API.patch | 0 .../server/Add-Moving-Piston-API.patch | 0 .../Add-NamespacedKey-biome-methods.patch | 0 .../Add-Player-Warden-Warning-API.patch | 0 .../server/Add-Player-getFishHook.patch | 0 .../Add-PlayerInventorySlotChangeEvent.patch | 0 .../server/Add-PlayerStopUsingItemEvent.patch | 2 +- .../Add-PrePlayerAttackEntityEvent.patch | 0 .../server/Add-Shearable-API.patch | 0 .../Add-Sneaking-API-for-Entities.patch | 0 .../Add-Velocity-IP-Forwarding-Support.patch | 0 .../server/Add-WardenAngerChangeEvent.patch | 2 +- ...arameter-to-ProjectileSource-launchP.patch | 0 ...tion-for-spider-worldborder-climbing.patch | 4 +- .../server/Add-entity-knockback-API.patch | 0 ...ded-block-state-to-BlockExplodeEvent.patch | 3 +- .../server/Add-fire-tick-delay-option.patch | 0 .../server/Add-getDrops-to-BlockState.patch | 0 .../server/Add-missing-BlockFadeEvents.patch | 0 ...ssing-SpigotConfig-logCommands-check.patch | 0 ...rtant-BlockStateListPopulator-method.patch | 0 ...-strict-advancement-dimension-checks.patch | 5 +- .../Add-paper-dumplisteners-command.patch | 0 ...king-amount-to-PlayerItemDamageEvent.patch | 0 ...-debug-information-to-chat-packet-er.patch | 0 .../Add-support-for-Proxy-Protocol.patch | 0 .../server/Add-transient-modifier-API.patch | 0 ...us-missing-EntityDropItemEvent-calls.patch | 12 +- .../server/Added-EntityToggleSitEvent.patch | 10 +- ...-serialization-deserialization-for-P.patch | 0 ...low-changing-bed-s-occupied-property.patch | 0 ...hange-the-podium-for-the-EnderDragon.patch | 34 +++--- ...-Lazy-Initialization-for-Enum-Fields.patch | 0 .../server/Block-Ticking-API.patch | 0 ...-redstone-on-top-of-trap-doors-early.patch | 0 .../Call-BlockPhysicsEvent-more-often.patch | 0 .../server/Collision-API.patch | 0 .../Configurable-chat-thread-limit.patch | 0 ...ectly-handle-ArmorStand-invisibility.patch | 0 ...-interactions-with-items-on-cooldown.patch | 0 ...nk-items-during-EntityResurrectEvent.patch | 2 +- ...stom-Chat-Completion-Suggestions-API.patch | 0 .../server/Detect-headless-JREs.patch | 0 ...t-selector-resolving-in-books-by-def.patch | 0 ...o-not-accept-invalid-client-settings.patch | 2 +- ...-chunk-for-dynamic-game-event-listen.patch | 0 ...broadcast-messages-to-command-blocks.patch | 0 ...onent-in-resource-pack-rejection-mes.patch | 2 +- .../server/Don-t-tick-markers.patch | 0 ...-level-random-in-entity-constructors.patch | 8 +- .../Dont-resent-entity-on-art-update.patch | 0 .../Elder-Guardian-appearance-API.patch | 0 .../server/EntityPickupItemEvent-fixes.patch | 0 .../server/Expand-PlayerItemMendEvent.patch | 0 ...sion-moving-velocity-to-VehicleBlock.patch | 0 .../FallingBlock-auto-expire-setting.patch | 33 +++-- ...-CauldronLevelChange-on-initial-fill.patch | 0 ...ntityChangeBlockEvent-in-more-places.patch | 6 +- .../server/Fix-Bee-flower-NPE.patch | 0 ...shPotion-and-LingeringPotion-spawnin.patch | 0 .../Fix-DamageCause-for-Falling-Blocks.patch | 2 +- ...nt-suggestion-permissions-to-align-w.patch | 0 ...tEvent-cancellation-cant-fully-preve.patch | 0 ...ntory-for-smokers-and-blast-furnaces.patch | 0 ...ity-drop-not-updating-the-client-inv.patch | 0 ...event-sleeping-villagers-moving-towa.patch | 0 ...verriding-a-block-entity-during-worl.patch | 0 ...x-NPE-for-BlockDataMeta-getBlockData.patch | 0 ...-Allay-stopDancing-while-not-dancing.patch | 0 ...ix-OfflinePlayer-getBedSpawnLocation.patch | 0 .../Fix-SpawnEggMeta-get-setSpawnedType.patch | 0 ...g-not-using-commands.spam-exclusions.patch | 0 ...reGrowEvent-species-for-RED_MUSHROOM.patch | 0 .../server/Fix-a-bunch-of-vanilla-bugs.patch | 51 ++------ .../Fix-a-couple-of-upstream-bed-issues.patch | 0 ...vancement-triggers-for-entity-damage.patch | 0 .../server/Fix-api-checking-banned-ips.patch | 0 ...async-entity-add-due-to-fungus-trees.patch | 0 ...hives-generating-from-using-bonemeal.patch | 0 ...inventories-returning-null-Locations.patch | 0 ...okshelf-and-jukebox-setItem-with-air.patch | 0 ...access-to-lookups-field-in-RegistryO.patch | 0 ...ng-to-bad-recipes-in-furnace-like-ti.patch | 0 .../Fix-custom-piglin-loved-items.patch | 0 ...Fix-demo-flag-not-enabling-demo-mode.patch | 0 ...eehive-without-any-players-nearby-th.patch | 0 ...Fix-force-opening-enchantment-tables.patch | 4 +- ...ies-in-dispense-events-regarding-sta.patch | 6 +- .../server/Fix-player-kick-on-shutdown.patch | 0 ...ix-plugin-loggers-on-server-shutdown.patch | 0 ...rs-not-spawning-outside-slime-chunks.patch | 0 ...and-message-for-brigadier-syntax-exc.patch | 0 .../Fix-text-display-error-on-spawn.patch | 0 ...and-additions-to-the-SpawnReason-API.patch | 8 +- .../server/Flying-Fall-Damage.patch | 0 .../{unapplied => }/server/Friction-API.patch | 8 +- .../server/Ignore-impossible-spawn-tick.patch | 0 .../server/Improve-PortalEvents.patch | 0 ...-for-some-hot-BlockBehavior-and-Flui.patch | 0 .../server/Improve-logging-and-errors.patch | 0 .../server/ItemStack-damage-API.patch | 0 .../server/Limit-pet-look-distance.patch | 0 .../server/Missing-eating-regain-reason.patch | 0 .../server/Missing-effect-cause.patch | 0 ...-of-WorldCreator-keepSpawnLoaded-ret.patch | 0 .../server/More-Teleport-API.patch | 0 .../More-accurate-isInOpenWater-impl.patch | 0 ...la-friendly-methods-to-update-trades.patch | 0 .../server/Nameable-Banner-API.patch | 0 ...recalcBlockCounts-for-empty-sections.patch | 0 .../server/Optimize-Hoppers.patch | 6 +- ...s-ServerLevel-for-gamerule-callbacks.patch | 4 +- .../Player-Entity-Tracking-Events.patch | 0 ...nts-being-fired-from-unloaded-chunks.patch | 0 ...expired-keys-from-impacting-new-join.patch | 0 .../Prevent-compass-from-loading-chunks.patch | 0 ...mpty-items-from-being-added-to-world.patch | 2 +- ...entity-loading-causing-async-lookups.patch | 2 +- ...nt-tile-entity-copies-loading-chunks.patch | 4 +- .../server/Properly-resend-entities.patch | 2 +- ...esh-ProjectileSource-for-projectiles.patch | 4 +- ...tItemStack-setAmount-null-assignment.patch | 0 ...e-invalid-signature-login-stacktrace.patch | 0 ...ry-onTrackingStart-during-navigation.patch | 0 .../Sanitize-Sent-BlockEntity-NBT.patch | 0 ...ck-entities-after-destroy-prediction.patch | 4 +- ...ook-changes-from-crashing-the-server.patch | 6 +- .../server/Sync-offhand-slot-in-menus.patch | 0 ...n-on-world-create-while-being-ticked.patch | 0 ...-source-for-fireworks-from-dispenser.patch | 0 ...uence-violations-like-they-should-be.patch | 0 ..._destroyed-trigger-in-the-correct-pl.patch | 0 ...when-a-captured-block-state-is-outda.patch | 0 .../Use-array-for-gamerule-storage.patch | 0 ...le-player-info-update-packet-on-join.patch | 2 +- ...random-in-ServerLoginPacketListenerI.patch | 0 ...tead-of-display-name-in-PlayerList-g.patch | 0 ...-on-plugins-accessing-faraway-chunks.patch | 0 .../server/Win-Screen-API.patch | 0 .../server/WorldCreator-keepSpawnLoaded.patch | 0 .../server/cache-resource-keys.patch | 0 ...global-player-list-where-appropriate.patch | 15 +-- ...config-for-disabling-entity-tag-tags.patch | 0 ...re-reset-EnderDragon-boss-event-name.patch | 4 +- .../server/fix-Instruments.patch | 0 .../fix-Jigsaw-block-kicking-user.patch | 0 ...7-green-map-markers-do-not-disappear.patch | 2 +- ...-snow-cauldrons-not-turning-to-water.patch | 0 ...y-vehicle-collision-event-not-called.patch | 0 .../optimized-dirt-and-snow-spreading.patch | 0 ...duplicate-animate-packet-for-records.patch | 0 ...rmEvent-for-mud-converting-into-clay.patch | 0 ...wListing-before-received-from-client.patch | 22 ---- ...ht-killed-statuses-should-be-false-f.patch | 26 ---- ...x-MapLike-Codec-missing-key-selector.patch | 19 --- .../server/Fix-block-place-logic.patch | 68 ----------- ...ore-player-sending-on-dimension-chan.patch | 20 --- ...ound-for-client-lag-spikes-MC-162253.patch | 114 ------------------ 166 files changed, 128 insertions(+), 466 deletions(-) rename patches/{unapplied => }/server/Ability-to-control-player-s-insomnia-and-phantoms.patch (100%) rename patches/{unapplied => }/server/Add-Alternate-Current-redstone-implementation.patch (99%) rename patches/{unapplied => }/server/Add-BlockLockCheckEvent.patch (100%) rename patches/{unapplied => }/server/Add-CompostItemEvent-and-EntityCompostItemEvent.patch (100%) rename patches/{unapplied => }/server/Add-Entity-Body-Yaw-API.patch (100%) rename patches/{unapplied => }/server/Add-EntityDyeEvent-and-CollarColorable-interface.patch (68%) rename patches/{unapplied => }/server/Add-EntityFertilizeEggEvent.patch (53%) rename patches/{unapplied => }/server/Add-EntityPortalReadyEvent.patch (93%) rename patches/{unapplied => }/server/Add-Mob-Experience-reward-API.patch (100%) rename patches/{unapplied => }/server/Add-Moving-Piston-API.patch (100%) rename patches/{unapplied => }/server/Add-NamespacedKey-biome-methods.patch (100%) rename patches/{unapplied => }/server/Add-Player-Warden-Warning-API.patch (100%) rename patches/{unapplied => }/server/Add-Player-getFishHook.patch (100%) rename patches/{unapplied => }/server/Add-PlayerInventorySlotChangeEvent.patch (100%) rename patches/{unapplied => }/server/Add-PlayerStopUsingItemEvent.patch (91%) rename patches/{unapplied => }/server/Add-PrePlayerAttackEntityEvent.patch (100%) rename patches/{unapplied => }/server/Add-Shearable-API.patch (100%) rename patches/{unapplied => }/server/Add-Sneaking-API-for-Entities.patch (100%) rename patches/{unapplied => }/server/Add-Velocity-IP-Forwarding-Support.patch (100%) rename patches/{unapplied => }/server/Add-WardenAngerChangeEvent.patch (98%) rename patches/{unapplied => }/server/Add-a-consumer-parameter-to-ProjectileSource-launchP.patch (100%) rename patches/{unapplied => }/server/Add-config-option-for-spider-worldborder-climbing.patch (94%) rename patches/{unapplied => }/server/Add-entity-knockback-API.patch (100%) rename patches/{unapplied => }/server/Add-exploded-block-state-to-BlockExplodeEvent.patch (99%) rename patches/{unapplied => }/server/Add-fire-tick-delay-option.patch (100%) rename patches/{unapplied => }/server/Add-getDrops-to-BlockState.patch (100%) rename patches/{unapplied => }/server/Add-missing-BlockFadeEvents.patch (100%) rename patches/{unapplied => }/server/Add-missing-SpigotConfig-logCommands-check.patch (100%) rename patches/{unapplied => }/server/Add-missing-important-BlockStateListPopulator-method.patch (100%) rename patches/{unapplied => }/server/Add-option-for-strict-advancement-dimension-checks.patch (92%) rename patches/{unapplied => }/server/Add-paper-dumplisteners-command.patch (100%) rename patches/{unapplied => }/server/Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch (100%) rename patches/{unapplied => }/server/Add-some-minimal-debug-information-to-chat-packet-er.patch (100%) rename patches/{unapplied => }/server/Add-support-for-Proxy-Protocol.patch (100%) rename patches/{unapplied => }/server/Add-transient-modifier-API.patch (100%) rename patches/{unapplied => }/server/Add-various-missing-EntityDropItemEvent-calls.patch (89%) rename patches/{unapplied => }/server/Added-EntityToggleSitEvent.patch (94%) rename patches/{unapplied => }/server/Added-byte-array-serialization-deserialization-for-P.patch (100%) rename patches/{unapplied => }/server/Allow-changing-bed-s-occupied-property.patch (100%) rename patches/{unapplied => }/server/Allow-to-change-the-podium-for-the-EnderDragon.patch (76%) rename patches/{unapplied => }/server/Avoid-Lazy-Initialization-for-Enum-Fields.patch (100%) rename patches/{unapplied => }/server/Block-Ticking-API.patch (100%) rename patches/{unapplied => }/server/Break-redstone-on-top-of-trap-doors-early.patch (100%) rename patches/{unapplied => }/server/Call-BlockPhysicsEvent-more-often.patch (100%) rename patches/{unapplied => }/server/Collision-API.patch (100%) rename patches/{unapplied => }/server/Configurable-chat-thread-limit.patch (100%) rename patches/{unapplied => }/server/Correctly-handle-ArmorStand-invisibility.patch (100%) rename patches/{unapplied => }/server/Correctly-handle-interactions-with-items-on-cooldown.patch (100%) rename patches/{unapplied => }/server/Correctly-shrink-items-during-EntityResurrectEvent.patch (96%) rename patches/{unapplied => }/server/Custom-Chat-Completion-Suggestions-API.patch (100%) rename patches/{unapplied => }/server/Detect-headless-JREs.patch (100%) rename patches/{unapplied => }/server/Disable-component-selector-resolving-in-books-by-def.patch (100%) rename patches/{unapplied => }/server/Do-not-accept-invalid-client-settings.patch (98%) rename patches/{unapplied => }/server/Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch (100%) rename patches/{unapplied => }/server/Don-t-broadcast-messages-to-command-blocks.patch (100%) rename patches/{unapplied => }/server/Don-t-print-component-in-resource-pack-rejection-mes.patch (98%) rename patches/{unapplied => }/server/Don-t-tick-markers.patch (100%) rename patches/{unapplied => }/server/Don-t-use-level-random-in-entity-constructors.patch (90%) rename patches/{unapplied => }/server/Dont-resent-entity-on-art-update.patch (100%) rename patches/{unapplied => }/server/Elder-Guardian-appearance-API.patch (100%) rename patches/{unapplied => }/server/EntityPickupItemEvent-fixes.patch (100%) rename patches/{unapplied => }/server/Expand-PlayerItemMendEvent.patch (100%) rename patches/{unapplied => }/server/Expose-pre-collision-moving-velocity-to-VehicleBlock.patch (100%) rename patches/{unapplied => }/server/FallingBlock-auto-expire-setting.patch (71%) rename patches/{unapplied => }/server/Fire-CauldronLevelChange-on-initial-fill.patch (100%) rename patches/{unapplied => }/server/Fire-EntityChangeBlockEvent-in-more-places.patch (98%) rename patches/{unapplied => }/server/Fix-Bee-flower-NPE.patch (100%) rename patches/{unapplied => }/server/Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch (100%) rename patches/{unapplied => }/server/Fix-DamageCause-for-Falling-Blocks.patch (95%) rename patches/{unapplied => }/server/Fix-EntityArgument-suggestion-permissions-to-align-w.patch (100%) rename patches/{unapplied => }/server/Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch (100%) rename patches/{unapplied => }/server/Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch (100%) rename patches/{unapplied => }/server/Fix-HumanEntity-drop-not-updating-the-client-inv.patch (100%) rename patches/{unapplied => }/server/Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch (100%) rename patches/{unapplied => }/server/Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch (100%) rename patches/{unapplied => }/server/Fix-NPE-for-BlockDataMeta-getBlockData.patch (100%) rename patches/{unapplied => }/server/Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch (100%) rename patches/{unapplied => }/server/Fix-OfflinePlayer-getBedSpawnLocation.patch (100%) rename patches/{unapplied => }/server/Fix-SpawnEggMeta-get-setSpawnedType.patch (100%) rename patches/{unapplied => }/server/Fix-Spigot-Config-not-using-commands.spam-exclusions.patch (100%) rename patches/{unapplied => }/server/Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch (100%) rename patches/{unapplied => }/server/Fix-a-bunch-of-vanilla-bugs.patch (85%) rename patches/{unapplied => }/server/Fix-a-couple-of-upstream-bed-issues.patch (100%) rename patches/{unapplied => }/server/Fix-advancement-triggers-for-entity-damage.patch (100%) rename patches/{unapplied => }/server/Fix-api-checking-banned-ips.patch (100%) rename patches/{unapplied => }/server/Fix-async-entity-add-due-to-fungus-trees.patch (100%) rename patches/{unapplied => }/server/Fix-beehives-generating-from-using-bonemeal.patch (100%) rename patches/{unapplied => }/server/Fix-certain-inventories-returning-null-Locations.patch (100%) rename patches/{unapplied => }/server/Fix-chiseled-bookshelf-and-jukebox-setItem-with-air.patch (100%) rename patches/{unapplied => }/server/Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch (100%) rename patches/{unapplied => }/server/Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch (100%) rename patches/{unapplied => }/server/Fix-custom-piglin-loved-items.patch (100%) rename patches/{unapplied => }/server/Fix-demo-flag-not-enabling-demo-mode.patch (100%) rename patches/{unapplied => }/server/Fix-destroying-beehive-without-any-players-nearby-th.patch (100%) rename patches/{unapplied => }/server/Fix-force-opening-enchantment-tables.patch (98%) rename patches/{unapplied => }/server/Fix-inconsistencies-in-dispense-events-regarding-sta.patch (98%) rename patches/{unapplied => }/server/Fix-player-kick-on-shutdown.patch (100%) rename patches/{unapplied => }/server/Fix-plugin-loggers-on-server-shutdown.patch (100%) rename patches/{unapplied => }/server/Fix-slime-spawners-not-spawning-outside-slime-chunks.patch (100%) rename patches/{unapplied => }/server/Fix-suggest-command-message-for-brigadier-syntax-exc.patch (100%) rename patches/{unapplied => }/server/Fix-text-display-error-on-spawn.patch (100%) rename patches/{unapplied => }/server/Fixes-and-additions-to-the-SpawnReason-API.patch (93%) rename patches/{unapplied => }/server/Flying-Fall-Damage.patch (100%) rename patches/{unapplied => }/server/Friction-API.patch (95%) rename patches/{unapplied => }/server/Ignore-impossible-spawn-tick.patch (100%) rename patches/{unapplied => }/server/Improve-PortalEvents.patch (100%) rename patches/{unapplied => }/server/Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch (100%) rename patches/{unapplied => }/server/Improve-logging-and-errors.patch (100%) rename patches/{unapplied => }/server/ItemStack-damage-API.patch (100%) rename patches/{unapplied => }/server/Limit-pet-look-distance.patch (100%) rename patches/{unapplied => }/server/Missing-eating-regain-reason.patch (100%) rename patches/{unapplied => }/server/Missing-effect-cause.patch (100%) rename patches/{unapplied => }/server/Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch (100%) rename patches/{unapplied => }/server/More-Teleport-API.patch (100%) rename patches/{unapplied => }/server/More-accurate-isInOpenWater-impl.patch (100%) rename patches/{unapplied => }/server/More-vanilla-friendly-methods-to-update-trades.patch (100%) rename patches/{unapplied => }/server/Nameable-Banner-API.patch (100%) rename patches/{unapplied => }/server/Optimise-recalcBlockCounts-for-empty-sections.patch (100%) rename patches/{unapplied => }/server/Optimize-Hoppers.patch (98%) rename patches/{unapplied => }/server/Pass-ServerLevel-for-gamerule-callbacks.patch (97%) rename patches/{unapplied => }/server/Player-Entity-Tracking-Events.patch (100%) rename patches/{unapplied => }/server/Prevent-GameEvents-being-fired-from-unloaded-chunks.patch (100%) rename patches/{unapplied => }/server/Prevent-causing-expired-keys-from-impacting-new-join.patch (100%) rename patches/{unapplied => }/server/Prevent-compass-from-loading-chunks.patch (100%) rename patches/{unapplied => }/server/Prevent-empty-items-from-being-added-to-world.patch (89%) rename patches/{unapplied => }/server/Prevent-entity-loading-causing-async-lookups.patch (98%) rename patches/{unapplied => }/server/Prevent-tile-entity-copies-loading-chunks.patch (89%) rename patches/{unapplied => }/server/Properly-resend-entities.patch (98%) rename patches/{unapplied => }/server/Refresh-ProjectileSource-for-projectiles.patch (95%) rename patches/{unapplied => }/server/Remove-CraftItemStack-setAmount-null-assignment.patch (100%) rename patches/{unapplied => }/server/Remove-invalid-signature-login-stacktrace.patch (100%) rename patches/{unapplied => }/server/Remove-unnecessary-onTrackingStart-during-navigation.patch (100%) rename patches/{unapplied => }/server/Sanitize-Sent-BlockEntity-NBT.patch (100%) rename patches/{unapplied => }/server/Send-block-entities-after-destroy-prediction.patch (96%) rename patches/{unapplied => }/server/Stop-large-look-changes-from-crashing-the-server.patch (95%) rename patches/{unapplied => }/server/Sync-offhand-slot-in-menus.patch (100%) rename patches/{unapplied => }/server/Throw-exception-on-world-create-while-being-ticked.patch (100%) rename patches/{unapplied => }/server/Track-projectile-source-for-fireworks-from-dispenser.patch (100%) rename patches/{unapplied => }/server/Treat-sequence-violations-like-they-should-be.patch (100%) rename patches/{unapplied => }/server/Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch (100%) rename patches/{unapplied => }/server/Update-the-flag-when-a-captured-block-state-is-outda.patch (100%) rename patches/{unapplied => }/server/Use-array-for-gamerule-storage.patch (100%) rename patches/{unapplied => }/server/Use-single-player-info-update-packet-on-join.patch (97%) rename patches/{unapplied => }/server/Use-thread-safe-random-in-ServerLoginPacketListenerI.patch (100%) rename patches/{unapplied => }/server/Use-username-instead-of-display-name-in-PlayerList-g.patch (100%) rename patches/{unapplied => }/server/Warn-on-plugins-accessing-faraway-chunks.patch (100%) rename patches/{unapplied => }/server/Win-Screen-API.patch (100%) rename patches/{unapplied => }/server/WorldCreator-keepSpawnLoaded.patch (100%) rename patches/{unapplied => }/server/cache-resource-keys.patch (100%) rename patches/{unapplied => }/server/check-global-player-list-where-appropriate.patch (84%) rename patches/{unapplied => }/server/config-for-disabling-entity-tag-tags.patch (100%) rename patches/{unapplied => }/server/ensure-reset-EnderDragon-boss-event-name.patch (90%) rename patches/{unapplied => }/server/fix-Instruments.patch (100%) rename patches/{unapplied => }/server/fix-Jigsaw-block-kicking-user.patch (100%) rename patches/{unapplied => }/server/fix-MC-252817-green-map-markers-do-not-disappear.patch (99%) rename patches/{unapplied => }/server/fix-powder-snow-cauldrons-not-turning-to-water.patch (100%) rename patches/{unapplied => }/server/fixed-entity-vehicle-collision-event-not-called.patch (100%) rename patches/{unapplied => }/server/optimized-dirt-and-snow-spreading.patch (100%) rename patches/{unapplied => }/server/remove-duplicate-animate-packet-for-records.patch (100%) rename patches/{unapplied => }/server/use-BlockFormEvent-for-mud-converting-into-clay.patch (100%) delete mode 100644 patches/unapplied/server/Disable-allowListing-before-received-from-client.patch delete mode 100644 patches/unapplied/server/Fix-EndDragonFight-killed-statuses-should-be-false-f.patch delete mode 100644 patches/unapplied/server/Fix-MapLike-Codec-missing-key-selector.patch delete mode 100644 patches/unapplied/server/Fix-block-place-logic.patch delete mode 100644 patches/unapplied/server/Set-position-before-player-sending-on-dimension-chan.patch delete mode 100644 patches/unapplied/server/Workaround-for-client-lag-spikes-MC-162253.patch diff --git a/patches/unapplied/server/Ability-to-control-player-s-insomnia-and-phantoms.patch b/patches/server/Ability-to-control-player-s-insomnia-and-phantoms.patch similarity index 100% rename from patches/unapplied/server/Ability-to-control-player-s-insomnia-and-phantoms.patch rename to patches/server/Ability-to-control-player-s-insomnia-and-phantoms.patch diff --git a/patches/unapplied/server/Add-Alternate-Current-redstone-implementation.patch b/patches/server/Add-Alternate-Current-redstone-implementation.patch similarity index 99% rename from patches/unapplied/server/Add-Alternate-Current-redstone-implementation.patch rename to patches/server/Add-Alternate-Current-redstone-implementation.patch index 5fe7eb1121..2766ebb502 100644 --- a/patches/unapplied/server/Add-Alternate-Current-redstone-implementation.patch +++ b/patches/server/Add-Alternate-Current-redstone-implementation.patch @@ -2020,7 +2020,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 final Throwable thr = new Throwable(entity + " Added to world at " + new java.util.Date()); io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(thr); @@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel { - return this.server.getWorldData().enabledFeatures(); + return this.randomSequences; } + // Paper start - optimize redstone (Alternate Current) diff --git a/patches/unapplied/server/Add-BlockLockCheckEvent.patch b/patches/server/Add-BlockLockCheckEvent.patch similarity index 100% rename from patches/unapplied/server/Add-BlockLockCheckEvent.patch rename to patches/server/Add-BlockLockCheckEvent.patch diff --git a/patches/unapplied/server/Add-CompostItemEvent-and-EntityCompostItemEvent.patch b/patches/server/Add-CompostItemEvent-and-EntityCompostItemEvent.patch similarity index 100% rename from patches/unapplied/server/Add-CompostItemEvent-and-EntityCompostItemEvent.patch rename to patches/server/Add-CompostItemEvent-and-EntityCompostItemEvent.patch diff --git a/patches/unapplied/server/Add-Entity-Body-Yaw-API.patch b/patches/server/Add-Entity-Body-Yaw-API.patch similarity index 100% rename from patches/unapplied/server/Add-Entity-Body-Yaw-API.patch rename to patches/server/Add-Entity-Body-Yaw-API.patch diff --git a/patches/unapplied/server/Add-EntityDyeEvent-and-CollarColorable-interface.patch b/patches/server/Add-EntityDyeEvent-and-CollarColorable-interface.patch similarity index 68% rename from patches/unapplied/server/Add-EntityDyeEvent-and-CollarColorable-interface.patch rename to patches/server/Add-EntityDyeEvent-and-CollarColorable-interface.patch index 7f2644376e..2de80e5fa9 100644 --- a/patches/unapplied/server/Add-EntityDyeEvent-and-CollarColorable-interface.patch +++ b/patches/server/Add-EntityDyeEvent-and-CollarColorable-interface.patch @@ -27,16 +27,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java +++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java @@ -0,0 +0,0 @@ public class Wolf extends TamableAnimal implements NeutralMob { - DyeColor enumcolor = ((DyeItem) item).getDyeColor(); + DyeColor enumcolor = itemdye.getDyeColor(); - if (enumcolor != this.getCollarColor()) { -+ // Paper start -+ final io.papermc.paper.event.entity.EntityDyeEvent event = new io.papermc.paper.event.entity.EntityDyeEvent(this.getBukkitEntity(), org.bukkit.DyeColor.getByWoolData((byte) enumcolor.getId()), ((net.minecraft.server.level.ServerPlayer) player).getBukkitEntity()); -+ if (!event.callEvent()) { -+ return InteractionResult.FAIL; -+ } -+ enumcolor = DyeColor.byId(event.getColor().getWoolData()); -+ // Paper end - this.setCollarColor(enumcolor); - if (!player.getAbilities().instabuild) { - itemstack.shrink(1); + if (enumcolor != this.getCollarColor()) { ++ // Paper start ++ final io.papermc.paper.event.entity.EntityDyeEvent event = new io.papermc.paper.event.entity.EntityDyeEvent(this.getBukkitEntity(), org.bukkit.DyeColor.getByWoolData((byte) enumcolor.getId()), ((net.minecraft.server.level.ServerPlayer) player).getBukkitEntity()); ++ if (!event.callEvent()) { ++ return InteractionResult.FAIL; ++ } ++ enumcolor = DyeColor.byId(event.getColor().getWoolData()); ++ // Paper end ++ + this.setCollarColor(enumcolor); + if (!player.getAbilities().instabuild) { + itemstack.shrink(1); diff --git a/patches/unapplied/server/Add-EntityFertilizeEggEvent.patch b/patches/server/Add-EntityFertilizeEggEvent.patch similarity index 53% rename from patches/unapplied/server/Add-EntityFertilizeEggEvent.patch rename to patches/server/Add-EntityFertilizeEggEvent.patch index ac705d4dfd..e7ed3b45a0 100644 --- a/patches/unapplied/server/Add-EntityFertilizeEggEvent.patch +++ b/patches/server/Add-EntityFertilizeEggEvent.patch @@ -39,36 +39,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } } -diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java -+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java -@@ -0,0 +0,0 @@ public class Frog extends Animal implements VariantHolder { - serverPlayer = other.getLoveCause(); - } - -+ // Paper start -+ int experience = this.getRandom().nextInt(7) + 1; -+ io.papermc.paper.event.entity.EntityFertilizeEggEvent event = new io.papermc.paper.event.entity.EntityFertilizeEggEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity(), (org.bukkit.entity.LivingEntity) other.getBukkitEntity(), serverPlayer == null ? null : serverPlayer.getBukkitEntity(), this.breedItem == null ? null : org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(this.breedItem).clone(), experience); -+ if (!event.callEvent()) { -+ resetLove(); -+ other.resetLove(); // stop the pathfinding to avoid infinite loop -+ return; -+ } -+ experience = event.getExperience(); -+ // Paper end -+ - if (serverPlayer != null) { - serverPlayer.awardStat(Stats.ANIMALS_BRED); - CriteriaTriggers.BRED_ANIMALS.trigger(serverPlayer, this, other, (AgeableMob)null); -@@ -0,0 +0,0 @@ public class Frog extends Animal implements VariantHolder { - other.resetLove(); - this.getBrain().setMemory(MemoryModuleType.IS_PREGNANT, Unit.INSTANCE); - world.broadcastEntityEvent(this, (byte)18); -- if (world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { -- world.addFreshEntity(new ExperienceOrb(world, this.getX(), this.getY(), this.getZ(), this.getRandom().nextInt(7) + 1, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, serverPlayer)); // Paper -+ if (experience > 0 && world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { // Paper -+ world.addFreshEntity(new ExperienceOrb(world, this.getX(), this.getY(), this.getZ(), experience, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, serverPlayer)); // Paper - } - - } diff --git a/patches/unapplied/server/Add-EntityPortalReadyEvent.patch b/patches/server/Add-EntityPortalReadyEvent.patch similarity index 93% rename from patches/unapplied/server/Add-EntityPortalReadyEvent.patch rename to patches/server/Add-EntityPortalReadyEvent.patch index febe8dd07b..8a6b7558f0 100644 --- a/patches/unapplied/server/Add-EntityPortalReadyEvent.patch +++ b/patches/server/Add-EntityPortalReadyEvent.patch @@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit - this.level.getProfiler().push("portal"); + this.level().getProfiler().push("portal"); this.portalTime = i; + // Paper start + io.papermc.paper.event.entity.EntityPortalReadyEvent event = new io.papermc.paper.event.entity.EntityPortalReadyEvent(this.getBukkitEntity(), worldserver1 == null ? null : worldserver1.getWorld(), org.bukkit.PortalType.NETHER); @@ -28,5 +28,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } + } // Paper // CraftBukkit end - this.level.getProfiler().pop(); + this.level().getProfiler().pop(); } diff --git a/patches/unapplied/server/Add-Mob-Experience-reward-API.patch b/patches/server/Add-Mob-Experience-reward-API.patch similarity index 100% rename from patches/unapplied/server/Add-Mob-Experience-reward-API.patch rename to patches/server/Add-Mob-Experience-reward-API.patch diff --git a/patches/unapplied/server/Add-Moving-Piston-API.patch b/patches/server/Add-Moving-Piston-API.patch similarity index 100% rename from patches/unapplied/server/Add-Moving-Piston-API.patch rename to patches/server/Add-Moving-Piston-API.patch diff --git a/patches/unapplied/server/Add-NamespacedKey-biome-methods.patch b/patches/server/Add-NamespacedKey-biome-methods.patch similarity index 100% rename from patches/unapplied/server/Add-NamespacedKey-biome-methods.patch rename to patches/server/Add-NamespacedKey-biome-methods.patch diff --git a/patches/unapplied/server/Add-Player-Warden-Warning-API.patch b/patches/server/Add-Player-Warden-Warning-API.patch similarity index 100% rename from patches/unapplied/server/Add-Player-Warden-Warning-API.patch rename to patches/server/Add-Player-Warden-Warning-API.patch diff --git a/patches/unapplied/server/Add-Player-getFishHook.patch b/patches/server/Add-Player-getFishHook.patch similarity index 100% rename from patches/unapplied/server/Add-Player-getFishHook.patch rename to patches/server/Add-Player-getFishHook.patch diff --git a/patches/unapplied/server/Add-PlayerInventorySlotChangeEvent.patch b/patches/server/Add-PlayerInventorySlotChangeEvent.patch similarity index 100% rename from patches/unapplied/server/Add-PlayerInventorySlotChangeEvent.patch rename to patches/server/Add-PlayerInventorySlotChangeEvent.patch diff --git a/patches/unapplied/server/Add-PlayerStopUsingItemEvent.patch b/patches/server/Add-PlayerStopUsingItemEvent.patch similarity index 91% rename from patches/unapplied/server/Add-PlayerStopUsingItemEvent.patch rename to patches/server/Add-PlayerStopUsingItemEvent.patch index db1620ca90..654fceca98 100644 --- a/patches/unapplied/server/Add-PlayerStopUsingItemEvent.patch +++ b/patches/server/Add-PlayerStopUsingItemEvent.patch @@ -13,6 +13,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public void releaseUsingItem() { if (!this.useItem.isEmpty()) { + if (this instanceof ServerPlayer) new io.papermc.paper.event.player.PlayerStopUsingItemEvent((Player) getBukkitEntity(), useItem.asBukkitMirror(), getTicksUsingItem()).callEvent(); // Paper - this.useItem.releaseUsing(this.level, this, this.getUseItemRemainingTicks()); + this.useItem.releaseUsing(this.level(), this, this.getUseItemRemainingTicks()); if (this.useItem.useOnRelease()) { this.updatingUsingItem(); diff --git a/patches/unapplied/server/Add-PrePlayerAttackEntityEvent.patch b/patches/server/Add-PrePlayerAttackEntityEvent.patch similarity index 100% rename from patches/unapplied/server/Add-PrePlayerAttackEntityEvent.patch rename to patches/server/Add-PrePlayerAttackEntityEvent.patch diff --git a/patches/unapplied/server/Add-Shearable-API.patch b/patches/server/Add-Shearable-API.patch similarity index 100% rename from patches/unapplied/server/Add-Shearable-API.patch rename to patches/server/Add-Shearable-API.patch diff --git a/patches/unapplied/server/Add-Sneaking-API-for-Entities.patch b/patches/server/Add-Sneaking-API-for-Entities.patch similarity index 100% rename from patches/unapplied/server/Add-Sneaking-API-for-Entities.patch rename to patches/server/Add-Sneaking-API-for-Entities.patch diff --git a/patches/unapplied/server/Add-Velocity-IP-Forwarding-Support.patch b/patches/server/Add-Velocity-IP-Forwarding-Support.patch similarity index 100% rename from patches/unapplied/server/Add-Velocity-IP-Forwarding-Support.patch rename to patches/server/Add-Velocity-IP-Forwarding-Support.patch diff --git a/patches/unapplied/server/Add-WardenAngerChangeEvent.patch b/patches/server/Add-WardenAngerChangeEvent.patch similarity index 98% rename from patches/unapplied/server/Add-WardenAngerChangeEvent.patch rename to patches/server/Add-WardenAngerChangeEvent.patch index 1ecbe8d3e3..257a5cf510 100644 --- a/patches/unapplied/server/Add-WardenAngerChangeEvent.patch +++ b/patches/server/Add-WardenAngerChangeEvent.patch @@ -21,7 +21,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java +++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java -@@ -0,0 +0,0 @@ public class Warden extends Monster implements VibrationListener.VibrationListen +@@ -0,0 +0,0 @@ public class Warden extends Monster implements VibrationSystem { @VisibleForTesting public void increaseAngerAt(@Nullable Entity entity, int amount, boolean listening) { if (!this.isNoAi() && this.canTargetEntity(entity)) { diff --git a/patches/unapplied/server/Add-a-consumer-parameter-to-ProjectileSource-launchP.patch b/patches/server/Add-a-consumer-parameter-to-ProjectileSource-launchP.patch similarity index 100% rename from patches/unapplied/server/Add-a-consumer-parameter-to-ProjectileSource-launchP.patch rename to patches/server/Add-a-consumer-parameter-to-ProjectileSource-launchP.patch diff --git a/patches/unapplied/server/Add-config-option-for-spider-worldborder-climbing.patch b/patches/server/Add-config-option-for-spider-worldborder-climbing.patch similarity index 94% rename from patches/unapplied/server/Add-config-option-for-spider-worldborder-climbing.patch rename to patches/server/Add-config-option-for-spider-worldborder-climbing.patch index 8a055c7827..8542ed94f2 100644 --- a/patches/unapplied/server/Add-config-option-for-spider-worldborder-climbing.patch +++ b/patches/server/Add-config-option-for-spider-worldborder-climbing.patch @@ -32,9 +32,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class Spider extends Monster { public void tick() { super.tick(); - if (!this.level.isClientSide) { + if (!this.level().isClientSide) { - this.setClimbing(this.horizontalCollision); -+ this.setClimbing(this.horizontalCollision && (this.level.paperConfig().entities.behavior.allowSpiderWorldBorderClimbing || !collidingWithWorldBorder)); // Paper ++ this.setClimbing(this.horizontalCollision && (this.level().paperConfig().entities.behavior.allowSpiderWorldBorderClimbing || !collidingWithWorldBorder)); // Paper } } diff --git a/patches/unapplied/server/Add-entity-knockback-API.patch b/patches/server/Add-entity-knockback-API.patch similarity index 100% rename from patches/unapplied/server/Add-entity-knockback-API.patch rename to patches/server/Add-entity-knockback-API.patch diff --git a/patches/unapplied/server/Add-exploded-block-state-to-BlockExplodeEvent.patch b/patches/server/Add-exploded-block-state-to-BlockExplodeEvent.patch similarity index 99% rename from patches/unapplied/server/Add-exploded-block-state-to-BlockExplodeEvent.patch rename to patches/server/Add-exploded-block-state-to-BlockExplodeEvent.patch index 183150bf2b..5ed94643e9 100644 --- a/patches/unapplied/server/Add-exploded-block-state-to-BlockExplodeEvent.patch +++ b/patches/server/Add-exploded-block-state-to-BlockExplodeEvent.patch @@ -37,7 +37,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return source; + // Paper end } - } + + public DamageSource outOfBorder() { diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java diff --git a/patches/unapplied/server/Add-fire-tick-delay-option.patch b/patches/server/Add-fire-tick-delay-option.patch similarity index 100% rename from patches/unapplied/server/Add-fire-tick-delay-option.patch rename to patches/server/Add-fire-tick-delay-option.patch diff --git a/patches/unapplied/server/Add-getDrops-to-BlockState.patch b/patches/server/Add-getDrops-to-BlockState.patch similarity index 100% rename from patches/unapplied/server/Add-getDrops-to-BlockState.patch rename to patches/server/Add-getDrops-to-BlockState.patch diff --git a/patches/unapplied/server/Add-missing-BlockFadeEvents.patch b/patches/server/Add-missing-BlockFadeEvents.patch similarity index 100% rename from patches/unapplied/server/Add-missing-BlockFadeEvents.patch rename to patches/server/Add-missing-BlockFadeEvents.patch diff --git a/patches/unapplied/server/Add-missing-SpigotConfig-logCommands-check.patch b/patches/server/Add-missing-SpigotConfig-logCommands-check.patch similarity index 100% rename from patches/unapplied/server/Add-missing-SpigotConfig-logCommands-check.patch rename to patches/server/Add-missing-SpigotConfig-logCommands-check.patch diff --git a/patches/unapplied/server/Add-missing-important-BlockStateListPopulator-method.patch b/patches/server/Add-missing-important-BlockStateListPopulator-method.patch similarity index 100% rename from patches/unapplied/server/Add-missing-important-BlockStateListPopulator-method.patch rename to patches/server/Add-missing-important-BlockStateListPopulator-method.patch diff --git a/patches/unapplied/server/Add-option-for-strict-advancement-dimension-checks.patch b/patches/server/Add-option-for-strict-advancement-dimension-checks.patch similarity index 92% rename from patches/unapplied/server/Add-option-for-strict-advancement-dimension-checks.patch rename to patches/server/Add-option-for-strict-advancement-dimension-checks.patch index fa95d0c4c4..746fbaa366 100644 --- a/patches/unapplied/server/Add-option-for-strict-advancement-dimension-checks.patch +++ b/patches/server/Add-option-for-strict-advancement-dimension-checks.patch @@ -17,13 +17,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class ServerPlayer extends Player { // CraftBukkit start ResourceKey maindimensionkey = CraftDimensionUtil.getMainDimensionKey(origin); - ResourceKey maindimensionkey1 = CraftDimensionUtil.getMainDimensionKey(this.level); + ResourceKey maindimensionkey1 = CraftDimensionUtil.getMainDimensionKey(this.level()); +- + // Paper start - config for strict advancement checks for dimensions + if (io.papermc.paper.configuration.GlobalConfiguration.get().misc.strictAdvancementDimensionCheck) { + maindimensionkey = resourcekey; + maindimensionkey1 = resourcekey1; + } + // Paper end - CriteriaTriggers.CHANGED_DIMENSION.trigger(this, maindimensionkey, maindimensionkey1); if (maindimensionkey != resourcekey || maindimensionkey1 != resourcekey1) { + CriteriaTriggers.CHANGED_DIMENSION.trigger(this, resourcekey, resourcekey1); diff --git a/patches/unapplied/server/Add-paper-dumplisteners-command.patch b/patches/server/Add-paper-dumplisteners-command.patch similarity index 100% rename from patches/unapplied/server/Add-paper-dumplisteners-command.patch rename to patches/server/Add-paper-dumplisteners-command.patch diff --git a/patches/unapplied/server/Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch b/patches/server/Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch similarity index 100% rename from patches/unapplied/server/Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch rename to patches/server/Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch diff --git a/patches/unapplied/server/Add-some-minimal-debug-information-to-chat-packet-er.patch b/patches/server/Add-some-minimal-debug-information-to-chat-packet-er.patch similarity index 100% rename from patches/unapplied/server/Add-some-minimal-debug-information-to-chat-packet-er.patch rename to patches/server/Add-some-minimal-debug-information-to-chat-packet-er.patch diff --git a/patches/unapplied/server/Add-support-for-Proxy-Protocol.patch b/patches/server/Add-support-for-Proxy-Protocol.patch similarity index 100% rename from patches/unapplied/server/Add-support-for-Proxy-Protocol.patch rename to patches/server/Add-support-for-Proxy-Protocol.patch diff --git a/patches/unapplied/server/Add-transient-modifier-API.patch b/patches/server/Add-transient-modifier-API.patch similarity index 100% rename from patches/unapplied/server/Add-transient-modifier-API.patch rename to patches/server/Add-transient-modifier-API.patch diff --git a/patches/unapplied/server/Add-various-missing-EntityDropItemEvent-calls.patch b/patches/server/Add-various-missing-EntityDropItemEvent-calls.patch similarity index 89% rename from patches/unapplied/server/Add-various-missing-EntityDropItemEvent-calls.patch rename to patches/server/Add-various-missing-EntityDropItemEvent-calls.patch index 2c4fcdb35c..9810525728 100644 --- a/patches/unapplied/server/Add-various-missing-EntityDropItemEvent-calls.patch +++ b/patches/server/Add-various-missing-EntityDropItemEvent-calls.patch @@ -31,7 +31,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 float f2 = 0.02F * Dolphin.this.random.nextFloat(); entityitem.setDeltaMovement((double) (0.3F * -Mth.sin(Dolphin.this.getYRot() * 0.017453292F) * Mth.cos(Dolphin.this.getXRot() * 0.017453292F) + Mth.cos(f1) * f2), (double) (0.3F * Mth.sin(Dolphin.this.getXRot() * 0.017453292F) * 1.5F), (double) (0.3F * Mth.cos(Dolphin.this.getYRot() * 0.017453292F) * Mth.cos(Dolphin.this.getXRot() * 0.017453292F) + Mth.sin(f1) * f2)); -- Dolphin.this.level.addFreshEntity(entityitem); +- Dolphin.this.level().addFreshEntity(entityitem); + Dolphin.this.spawnAtLocation(entityitem); // Paper - call EntityDropItemEvent } } @@ -44,15 +44,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 entityitem.setPickUpDelay(40); entityitem.setThrower(this.getUUID()); this.playSound(SoundEvents.FOX_SPIT, 1.0F, 1.0F); -- this.level.addFreshEntity(entityitem); +- this.level().addFreshEntity(entityitem); + this.spawnAtLocation(entityitem); // Paper - call EntityDropItemEvent } } private void dropItemStack(ItemStack stack) { - ItemEntity entityitem = new ItemEntity(this.level, this.getX(), this.getY(), this.getZ(), stack); + ItemEntity entityitem = new ItemEntity(this.level(), this.getX(), this.getY(), this.getZ(), stack); -- this.level.addFreshEntity(entityitem); +- this.level().addFreshEntity(entityitem); + this.spawnAtLocation(entityitem); // Paper - call EntityDropItemEvent } @@ -63,9 +63,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java @@ -0,0 +0,0 @@ public class Goat extends Animal { double d2 = (double) Mth.randomBetween(this.random, -0.2F, 0.2F); - ItemEntity entityitem = new ItemEntity(this.level, vec3d.x(), vec3d.y(), vec3d.z(), itemstack, d0, d1, d2); + ItemEntity entityitem = new ItemEntity(this.level(), vec3d.x(), vec3d.y(), vec3d.z(), itemstack, d0, d1, d2); -- this.level.addFreshEntity(entityitem); +- this.level().addFreshEntity(entityitem); - return true; + return this.spawnAtLocation(entityitem) != null; // Paper - call EntityDropItemEvent by calling spawnAtLocation. } diff --git a/patches/unapplied/server/Added-EntityToggleSitEvent.patch b/patches/server/Added-EntityToggleSitEvent.patch similarity index 94% rename from patches/unapplied/server/Added-EntityToggleSitEvent.patch rename to patches/server/Added-EntityToggleSitEvent.patch index 0ff6ab1e42..501c077227 100644 --- a/patches/unapplied/server/Added-EntityToggleSitEvent.patch +++ b/patches/server/Added-EntityToggleSitEvent.patch @@ -41,7 +41,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - this.setSitting(nbt.getBoolean("Sitting")); + this.setSitting(nbt.getBoolean("Sitting"), false); // Paper this.setIsCrouching(nbt.getBoolean("Crouching")); - if (this.level instanceof ServerLevel) { + if (this.level() instanceof ServerLevel) { this.setTargetGoals(); @@ -0,0 +0,0 @@ public class Fox extends Animal implements VariantHolder { } @@ -80,7 +80,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + if (!this.isCamelSitting() && new io.papermc.paper.event.entity.EntityToggleSitEvent(this.getBukkitEntity(), true).callEvent()) { // Paper this.playSound(SoundEvents.CAMEL_SIT, 1.0F, 1.0F); this.setPose(Pose.SITTING); - this.resetLastPoseChangeTick(-this.level.getGameTime()); + this.resetLastPoseChangeTick(-this.level().getGameTime()); @@ -0,0 +0,0 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider } @@ -89,12 +89,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + if (this.isCamelSitting() && new io.papermc.paper.event.entity.EntityToggleSitEvent(this.getBukkitEntity(), false).callEvent()) { // Paper this.playSound(SoundEvents.CAMEL_STAND, 1.0F, 1.0F); this.setPose(Pose.STANDING); - this.resetLastPoseChangeTick(this.level.getGameTime()); + this.resetLastPoseChangeTick(this.level().getGameTime()); @@ -0,0 +0,0 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider } - public void standUpPanic() { + public void standUpInstantly() { + if (this.isCamelSitting() && !new io.papermc.paper.event.entity.EntityToggleSitEvent(this.getBukkitEntity(), false).callEvent()) return; // Paper this.setPose(Pose.STANDING); - this.resetLastPoseChangeTickToFullStand(this.level.getGameTime()); + this.resetLastPoseChangeTickToFullStand(this.level().getGameTime()); } diff --git a/patches/unapplied/server/Added-byte-array-serialization-deserialization-for-P.patch b/patches/server/Added-byte-array-serialization-deserialization-for-P.patch similarity index 100% rename from patches/unapplied/server/Added-byte-array-serialization-deserialization-for-P.patch rename to patches/server/Added-byte-array-serialization-deserialization-for-P.patch diff --git a/patches/unapplied/server/Allow-changing-bed-s-occupied-property.patch b/patches/server/Allow-changing-bed-s-occupied-property.patch similarity index 100% rename from patches/unapplied/server/Allow-changing-bed-s-occupied-property.patch rename to patches/server/Allow-changing-bed-s-occupied-property.patch diff --git a/patches/unapplied/server/Allow-to-change-the-podium-for-the-EnderDragon.patch b/patches/server/Allow-to-change-the-podium-for-the-EnderDragon.patch similarity index 76% rename from patches/unapplied/server/Allow-to-change-the-podium-for-the-EnderDragon.patch rename to patches/server/Allow-to-change-the-podium-for-the-EnderDragon.patch index c3d1f2b7cc..ceb703ca6a 100644 --- a/patches/unapplied/server/Allow-to-change-the-podium-for-the-EnderDragon.patch +++ b/patches/server/Allow-to-change-the-podium-for-the-EnderDragon.patch @@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java @@ -0,0 +0,0 @@ public class EnderDragon extends Mob implements Enemy { - private final int[] nodeAdjacency = new int[24]; - private final BinaryHeap openSet = new BinaryHeap(); + private final int[] nodeAdjacency; + private final BinaryHeap openSet; private final Explosion explosionSource; // CraftBukkit - reusable source for CraftTNTPrimed.getSource() + // Paper start - add var for save custom podium + @Nullable @@ -43,8 +43,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 d0 = segment2[1] - segment1[1]; } } else { -- BlockPos blockposition = this.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.END_PODIUM_LOCATION); -+ BlockPos blockposition = this.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.getPodium()); // Paper - use custom podium +- BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.fightOrigin)); ++ BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.getPodium()); // Paper - use custom podium double d1 = Math.max(Math.sqrt(blockposition.distToCenterSqr(this.position())) / 4.0D, 1.0D); d0 = (double) segmentOffset / d1; @@ -52,8 +52,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 vec3d = this.getViewVector(tickDelta); } } else { -- BlockPos blockposition = this.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.END_PODIUM_LOCATION); -+ BlockPos blockposition = this.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.getPodium()); // Paper - use custom podium +- BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.fightOrigin)); ++ BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.getPodium()); // Paper - use custom podium f1 = Math.max((float) Math.sqrt(blockposition.distToCenterSqr(this.position())) / 4.0F, 1.0F); float f3 = 6.0F / f1; @@ -65,8 +65,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public void doServerTick() { ++this.time; if (this.targetLocation == null) { -- BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, EndPodiumFeature.END_PODIUM_LOCATION); -+ BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, this.dragon.getPodium()); // Paper - use custom podium +- BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())); ++ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, this.dragon.getPodium()); // Paper - use custom podium this.targetLocation = Vec3.atBottomCenterOf(blockPos); } @@ -78,8 +78,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private void findNewTarget() { if (this.currentPath != null && this.currentPath.isDone()) { -- BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, new BlockPos(EndPodiumFeature.END_PODIUM_LOCATION)); -+ BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium +- BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, new BlockPos(EndPodiumFeature.getLocation(this.dragon.getFightOrigin()))); ++ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium int i = this.dragon.getDragonFight() == null ? 0 : this.dragon.getDragonFight().getCrystalsAlive(); if (this.dragon.getRandom().nextInt(i + 3) == 0) { this.dragon.getPhaseManager().setPhase(EnderDragonPhase.LANDING_APPROACH); @@ -91,9 +91,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private void findNewTarget() { if (this.currentPath == null || this.currentPath.isDone()) { int i = this.dragon.findClosestNode(); -- BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.END_PODIUM_LOCATION); -+ BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium - Player player = this.dragon.level.getNearestPlayer(NEAR_EGG_TARGETING, this.dragon, (double)blockPos.getX(), (double)blockPos.getY(), (double)blockPos.getZ()); +- BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())); ++ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium + Player player = this.dragon.level().getNearestPlayer(NEAR_EGG_TARGETING, this.dragon, (double)blockPos.getX(), (double)blockPos.getY(), (double)blockPos.getZ()); int j; if (player != null) { diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java @@ -104,8 +104,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override public void doServerTick() { if (this.targetLocation == null) { -- this.targetLocation = Vec3.atBottomCenterOf(this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.END_PODIUM_LOCATION)); -+ this.targetLocation = Vec3.atBottomCenterOf(this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium())); // Paper - use custom podium +- this.targetLocation = Vec3.atBottomCenterOf(this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin()))); ++ this.targetLocation = Vec3.atBottomCenterOf(this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium())); // Paper - use custom podium } if (this.targetLocation.distanceToSqr(this.dragon.getX(), this.dragon.getY(), this.dragon.getZ()) < 1.0D) { @@ -117,8 +117,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override public void doServerTick() { if (!this.firstTick && this.currentPath != null) { -- BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.END_PODIUM_LOCATION); -+ BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium +- BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())); ++ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium if (!blockPos.closerToCenterThan(this.dragon.position(), 10.0D)) { this.dragon.getPhaseManager().setPhase(EnderDragonPhase.HOLDING_PATTERN); } diff --git a/patches/unapplied/server/Avoid-Lazy-Initialization-for-Enum-Fields.patch b/patches/server/Avoid-Lazy-Initialization-for-Enum-Fields.patch similarity index 100% rename from patches/unapplied/server/Avoid-Lazy-Initialization-for-Enum-Fields.patch rename to patches/server/Avoid-Lazy-Initialization-for-Enum-Fields.patch diff --git a/patches/unapplied/server/Block-Ticking-API.patch b/patches/server/Block-Ticking-API.patch similarity index 100% rename from patches/unapplied/server/Block-Ticking-API.patch rename to patches/server/Block-Ticking-API.patch diff --git a/patches/unapplied/server/Break-redstone-on-top-of-trap-doors-early.patch b/patches/server/Break-redstone-on-top-of-trap-doors-early.patch similarity index 100% rename from patches/unapplied/server/Break-redstone-on-top-of-trap-doors-early.patch rename to patches/server/Break-redstone-on-top-of-trap-doors-early.patch diff --git a/patches/unapplied/server/Call-BlockPhysicsEvent-more-often.patch b/patches/server/Call-BlockPhysicsEvent-more-often.patch similarity index 100% rename from patches/unapplied/server/Call-BlockPhysicsEvent-more-often.patch rename to patches/server/Call-BlockPhysicsEvent-more-often.patch diff --git a/patches/unapplied/server/Collision-API.patch b/patches/server/Collision-API.patch similarity index 100% rename from patches/unapplied/server/Collision-API.patch rename to patches/server/Collision-API.patch diff --git a/patches/unapplied/server/Configurable-chat-thread-limit.patch b/patches/server/Configurable-chat-thread-limit.patch similarity index 100% rename from patches/unapplied/server/Configurable-chat-thread-limit.patch rename to patches/server/Configurable-chat-thread-limit.patch diff --git a/patches/unapplied/server/Correctly-handle-ArmorStand-invisibility.patch b/patches/server/Correctly-handle-ArmorStand-invisibility.patch similarity index 100% rename from patches/unapplied/server/Correctly-handle-ArmorStand-invisibility.patch rename to patches/server/Correctly-handle-ArmorStand-invisibility.patch diff --git a/patches/unapplied/server/Correctly-handle-interactions-with-items-on-cooldown.patch b/patches/server/Correctly-handle-interactions-with-items-on-cooldown.patch similarity index 100% rename from patches/unapplied/server/Correctly-handle-interactions-with-items-on-cooldown.patch rename to patches/server/Correctly-handle-interactions-with-items-on-cooldown.patch diff --git a/patches/unapplied/server/Correctly-shrink-items-during-EntityResurrectEvent.patch b/patches/server/Correctly-shrink-items-during-EntityResurrectEvent.patch similarity index 96% rename from patches/unapplied/server/Correctly-shrink-items-during-EntityResurrectEvent.patch rename to patches/server/Correctly-shrink-items-during-EntityResurrectEvent.patch index ab8849c5de..11a784484d 100644 --- a/patches/unapplied/server/Correctly-shrink-items-during-EntityResurrectEvent.patch +++ b/patches/server/Correctly-shrink-items-during-EntityResurrectEvent.patch @@ -26,7 +26,7 @@ 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 implements Attackable { - this.level.getCraftServer().getPluginManager().callEvent(event); + this.level().getCraftServer().getPluginManager().callEvent(event); if (!event.isCancelled()) { - if (!itemstack1.isEmpty()) { diff --git a/patches/unapplied/server/Custom-Chat-Completion-Suggestions-API.patch b/patches/server/Custom-Chat-Completion-Suggestions-API.patch similarity index 100% rename from patches/unapplied/server/Custom-Chat-Completion-Suggestions-API.patch rename to patches/server/Custom-Chat-Completion-Suggestions-API.patch diff --git a/patches/unapplied/server/Detect-headless-JREs.patch b/patches/server/Detect-headless-JREs.patch similarity index 100% rename from patches/unapplied/server/Detect-headless-JREs.patch rename to patches/server/Detect-headless-JREs.patch diff --git a/patches/unapplied/server/Disable-component-selector-resolving-in-books-by-def.patch b/patches/server/Disable-component-selector-resolving-in-books-by-def.patch similarity index 100% rename from patches/unapplied/server/Disable-component-selector-resolving-in-books-by-def.patch rename to patches/server/Disable-component-selector-resolving-in-books-by-def.patch diff --git a/patches/unapplied/server/Do-not-accept-invalid-client-settings.patch b/patches/server/Do-not-accept-invalid-client-settings.patch similarity index 98% rename from patches/unapplied/server/Do-not-accept-invalid-client-settings.patch rename to patches/server/Do-not-accept-invalid-client-settings.patch index 3db8ab9f7d..37fdfc2251 100644 --- a/patches/unapplied/server/Do-not-accept-invalid-client-settings.patch +++ b/patches/server/Do-not-accept-invalid-client-settings.patch @@ -11,7 +11,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleClientInformation(ServerboundClientInformationPacket packet) { - PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); + PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); + // Paper start - do not accept invalid information + if (packet.viewDistance() < 0) { + LOGGER.warn("Disconnecting " + this.player.getScoreboardName() + " for invalid view distance: " + packet.viewDistance()); diff --git a/patches/unapplied/server/Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch b/patches/server/Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch similarity index 100% rename from patches/unapplied/server/Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch rename to patches/server/Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch diff --git a/patches/unapplied/server/Don-t-broadcast-messages-to-command-blocks.patch b/patches/server/Don-t-broadcast-messages-to-command-blocks.patch similarity index 100% rename from patches/unapplied/server/Don-t-broadcast-messages-to-command-blocks.patch rename to patches/server/Don-t-broadcast-messages-to-command-blocks.patch diff --git a/patches/unapplied/server/Don-t-print-component-in-resource-pack-rejection-mes.patch b/patches/server/Don-t-print-component-in-resource-pack-rejection-mes.patch similarity index 98% rename from patches/unapplied/server/Don-t-print-component-in-resource-pack-rejection-mes.patch rename to patches/server/Don-t-print-component-in-resource-pack-rejection-mes.patch index 585e444d08..4f8e2f296c 100644 --- a/patches/unapplied/server/Don-t-print-component-in-resource-pack-rejection-mes.patch +++ b/patches/server/Don-t-print-component-in-resource-pack-rejection-mes.patch @@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleResourcePackResponse(ServerboundResourcePackPacket packet) { - PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); + PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); if (packet.getAction() == ServerboundResourcePackPacket.Action.DECLINED && this.server.isResourcePackRequired()) { - ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName()); + ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getGameProfile().getName()); // Paper - Don't print component in resource pack rejection message diff --git a/patches/unapplied/server/Don-t-tick-markers.patch b/patches/server/Don-t-tick-markers.patch similarity index 100% rename from patches/unapplied/server/Don-t-tick-markers.patch rename to patches/server/Don-t-tick-markers.patch diff --git a/patches/unapplied/server/Don-t-use-level-random-in-entity-constructors.patch b/patches/server/Don-t-use-level-random-in-entity-constructors.patch similarity index 90% rename from patches/unapplied/server/Don-t-use-level-random-in-entity-constructors.patch rename to patches/server/Don-t-use-level-random-in-entity-constructors.patch index c349d2912c..15de06b0c5 100644 --- a/patches/unapplied/server/Don-t-use-level-random-in-entity-constructors.patch +++ b/patches/server/Don-t-use-level-random-in-entity-constructors.patch @@ -16,8 +16,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 BeeGoToHiveGoal() { super(); -- this.travellingTicks = Bee.this.level.random.nextInt(10); -+ this.travellingTicks = Bee.this./* level. */random.nextInt(10); // Paper - use entity random +- this.travellingTicks = Bee.this.level().random.nextInt(10); ++ this.travellingTicks = Bee.this./* level(). */random.nextInt(10); // Paper - use entity random this.blacklistedTargets = Lists.newArrayList(); this.setFlags(EnumSet.of(Goal.Flag.MOVE)); } @@ -25,8 +25,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 BeeGoToKnownFlowerGoal() { super(); -- this.travellingTicks = Bee.this.level.random.nextInt(10); -+ this.travellingTicks = Bee.this./* level. */random.nextInt(10); // Paper - use entity random +- this.travellingTicks = Bee.this.level().random.nextInt(10); ++ this.travellingTicks = Bee.this./* level(). */random.nextInt(10); // Paper - use entity random this.setFlags(EnumSet.of(Goal.Flag.MOVE)); } diff --git a/patches/unapplied/server/Dont-resent-entity-on-art-update.patch b/patches/server/Dont-resent-entity-on-art-update.patch similarity index 100% rename from patches/unapplied/server/Dont-resent-entity-on-art-update.patch rename to patches/server/Dont-resent-entity-on-art-update.patch diff --git a/patches/unapplied/server/Elder-Guardian-appearance-API.patch b/patches/server/Elder-Guardian-appearance-API.patch similarity index 100% rename from patches/unapplied/server/Elder-Guardian-appearance-API.patch rename to patches/server/Elder-Guardian-appearance-API.patch diff --git a/patches/unapplied/server/EntityPickupItemEvent-fixes.patch b/patches/server/EntityPickupItemEvent-fixes.patch similarity index 100% rename from patches/unapplied/server/EntityPickupItemEvent-fixes.patch rename to patches/server/EntityPickupItemEvent-fixes.patch diff --git a/patches/unapplied/server/Expand-PlayerItemMendEvent.patch b/patches/server/Expand-PlayerItemMendEvent.patch similarity index 100% rename from patches/unapplied/server/Expand-PlayerItemMendEvent.patch rename to patches/server/Expand-PlayerItemMendEvent.patch diff --git a/patches/unapplied/server/Expose-pre-collision-moving-velocity-to-VehicleBlock.patch b/patches/server/Expose-pre-collision-moving-velocity-to-VehicleBlock.patch similarity index 100% rename from patches/unapplied/server/Expose-pre-collision-moving-velocity-to-VehicleBlock.patch rename to patches/server/Expose-pre-collision-moving-velocity-to-VehicleBlock.patch diff --git a/patches/unapplied/server/FallingBlock-auto-expire-setting.patch b/patches/server/FallingBlock-auto-expire-setting.patch similarity index 71% rename from patches/unapplied/server/FallingBlock-auto-expire-setting.patch rename to patches/server/FallingBlock-auto-expire-setting.patch index f8008ef6fb..9252620a88 100644 --- a/patches/unapplied/server/FallingBlock-auto-expire-setting.patch +++ b/patches/server/FallingBlock-auto-expire-setting.patch @@ -19,38 +19,39 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class FallingBlockEntity extends Entity { } - if (!this.onGround && !flag1) { -- if (!this.level.isClientSide && (this.time > 100 && (blockposition.getY() <= this.level.getMinBuildHeight() || blockposition.getY() > this.level.getMaxBuildHeight()) || this.time > 600)) { -+ if (!this.level.isClientSide && ((this.time > 100 && autoExpire) && (blockposition.getY() <= this.level.getMinBuildHeight() || blockposition.getY() > this.level.getMaxBuildHeight()) || (this.time > 600 && autoExpire))) { // Paper - Auto expire setting - if (this.dropItem && this.level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) { + if (!this.onGround() && !flag1) { +- if (!this.level().isClientSide && (this.time > 100 && (blockposition.getY() <= this.level().getMinBuildHeight() || blockposition.getY() > this.level().getMaxBuildHeight()) || this.time > 600)) { ++ if (!this.level().isClientSide && ((this.time > 100 && autoExpire) && (blockposition.getY() <= this.level().getMinBuildHeight() || blockposition.getY() > this.level().getMaxBuildHeight()) || (this.time > 600 && autoExpire))) { // Paper - Auto expire setting + if (this.dropItem && this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) { this.spawnAtLocation((ItemLike) block); } @@ -0,0 +0,0 @@ public class FallingBlockEntity extends Entity { - if (this.blockData != null) { - nbt.put("TileEntityData", this.blockData); } -+ if (!autoExpire) {nbt.putBoolean("Paper.AutoExpire", false);} // Paper - AutoExpire setting + nbt.putBoolean("CancelDrop", this.cancelDrop); ++ if (!autoExpire) {nbt.putBoolean("Paper.AutoExpire", false);} // Paper - AutoExpire setting } + @Override @@ -0,0 +0,0 @@ public class FallingBlockEntity extends Entity { - int srcZ = nbt.getInt("SourceLoc_z"); this.setOrigin(new org.bukkit.Location(this.level().getWorld(), srcX, srcY, srcZ)); } -+ -+ if (nbt.contains("Paper.AutoExpire")) { -+ this.autoExpire = nbt.getBoolean("Paper.AutoExpire"); -+ } // Paper end ++ // Paper start ++ if (nbt.contains("Paper.AutoExpire")) { ++ this.autoExpire = nbt.getBoolean("Paper.AutoExpire"); ++ } ++ // Paper end } + public void setHurtsEntities(float fallHurtAmount, int fallHurtMax) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java @@ -0,0 +0,0 @@ public class CraftFallingBlock extends CraftEntity implements FallingBlock { - public void setHurtEntities(boolean hurtEntities) { - this.getHandle().hurtEntities = hurtEntities; + this.setHurtEntities(true); + } } + // Paper Start - Auto expire setting + @Override @@ -63,6 +64,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this.getHandle().autoExpire = autoExpires; + } + // Paper End - Auto expire setting - - @Override - public void setTicksLived(int value) { + } diff --git a/patches/unapplied/server/Fire-CauldronLevelChange-on-initial-fill.patch b/patches/server/Fire-CauldronLevelChange-on-initial-fill.patch similarity index 100% rename from patches/unapplied/server/Fire-CauldronLevelChange-on-initial-fill.patch rename to patches/server/Fire-CauldronLevelChange-on-initial-fill.patch diff --git a/patches/unapplied/server/Fire-EntityChangeBlockEvent-in-more-places.patch b/patches/server/Fire-EntityChangeBlockEvent-in-more-places.patch similarity index 98% rename from patches/unapplied/server/Fire-EntityChangeBlockEvent-in-more-places.patch rename to patches/server/Fire-EntityChangeBlockEvent-in-more-places.patch index 1154c0db7d..6c5e75a276 100644 --- a/patches/unapplied/server/Fire-EntityChangeBlockEvent-in-more-places.patch +++ b/patches/server/Fire-EntityChangeBlockEvent-in-more-places.patch @@ -13,8 +13,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } this.powerLightningRod(); -- LightningBolt.clearCopperOnLightningStrike(this.level, this.getStrikePosition()); -+ LightningBolt.clearCopperOnLightningStrike(this.level, this.getStrikePosition(), this); // Paper - transmit LightningBolt instance to call EntityChangeBlockEvent +- LightningBolt.clearCopperOnLightningStrike(this.level(), this.getStrikePosition()); ++ LightningBolt.clearCopperOnLightningStrike(this.level(), this.getStrikePosition(), this); // Paper - transmit LightningBolt instance to call EntityChangeBlockEvent this.gameEvent(GameEvent.LIGHTNING_STRIKE); } } @@ -131,7 +131,7 @@ diff --git a/src/main/java/net/minecraft/world/item/HoneycombItem.java b/src/mai index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/item/HoneycombItem.java +++ b/src/main/java/net/minecraft/world/item/HoneycombItem.java -@@ -0,0 +0,0 @@ public class HoneycombItem extends Item { +@@ -0,0 +0,0 @@ public class HoneycombItem extends Item implements SignApplicator { return getWaxed(blockState).map((state) -> { Player player = context.getPlayer(); ItemStack itemStack = context.getItemInHand(); diff --git a/patches/unapplied/server/Fix-Bee-flower-NPE.patch b/patches/server/Fix-Bee-flower-NPE.patch similarity index 100% rename from patches/unapplied/server/Fix-Bee-flower-NPE.patch rename to patches/server/Fix-Bee-flower-NPE.patch diff --git a/patches/unapplied/server/Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch b/patches/server/Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch similarity index 100% rename from patches/unapplied/server/Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch rename to patches/server/Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch diff --git a/patches/unapplied/server/Fix-DamageCause-for-Falling-Blocks.patch b/patches/server/Fix-DamageCause-for-Falling-Blocks.patch similarity index 95% rename from patches/unapplied/server/Fix-DamageCause-for-Falling-Blocks.patch rename to patches/server/Fix-DamageCause-for-Falling-Blocks.patch index f71aaabfcf..d8d2bd9fda 100644 --- a/patches/unapplied/server/Fix-DamageCause-for-Falling-Blocks.patch +++ b/patches/server/Fix-DamageCause-for-Falling-Blocks.patch @@ -19,4 +19,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end return CraftEventFactory.callEntityDamageEvent(damager, entity, cause, modifiers, modifierFunctions, cancelled, source.isCritical()); // Paper - add critical damage API - } else if (source.is(DamageTypes.OUT_OF_WORLD)) { + } else if (source.is(DamageTypes.FELL_OUT_OF_WORLD)) { diff --git a/patches/unapplied/server/Fix-EntityArgument-suggestion-permissions-to-align-w.patch b/patches/server/Fix-EntityArgument-suggestion-permissions-to-align-w.patch similarity index 100% rename from patches/unapplied/server/Fix-EntityArgument-suggestion-permissions-to-align-w.patch rename to patches/server/Fix-EntityArgument-suggestion-permissions-to-align-w.patch diff --git a/patches/unapplied/server/Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch b/patches/server/Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch similarity index 100% rename from patches/unapplied/server/Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch rename to patches/server/Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch diff --git a/patches/unapplied/server/Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch b/patches/server/Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch similarity index 100% rename from patches/unapplied/server/Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch rename to patches/server/Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch diff --git a/patches/unapplied/server/Fix-HumanEntity-drop-not-updating-the-client-inv.patch b/patches/server/Fix-HumanEntity-drop-not-updating-the-client-inv.patch similarity index 100% rename from patches/unapplied/server/Fix-HumanEntity-drop-not-updating-the-client-inv.patch rename to patches/server/Fix-HumanEntity-drop-not-updating-the-client-inv.patch diff --git a/patches/unapplied/server/Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch b/patches/server/Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch similarity index 100% rename from patches/unapplied/server/Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch rename to patches/server/Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch diff --git a/patches/unapplied/server/Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch b/patches/server/Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch similarity index 100% rename from patches/unapplied/server/Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch rename to patches/server/Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch diff --git a/patches/unapplied/server/Fix-NPE-for-BlockDataMeta-getBlockData.patch b/patches/server/Fix-NPE-for-BlockDataMeta-getBlockData.patch similarity index 100% rename from patches/unapplied/server/Fix-NPE-for-BlockDataMeta-getBlockData.patch rename to patches/server/Fix-NPE-for-BlockDataMeta-getBlockData.patch diff --git a/patches/unapplied/server/Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch b/patches/server/Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch similarity index 100% rename from patches/unapplied/server/Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch rename to patches/server/Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch diff --git a/patches/unapplied/server/Fix-OfflinePlayer-getBedSpawnLocation.patch b/patches/server/Fix-OfflinePlayer-getBedSpawnLocation.patch similarity index 100% rename from patches/unapplied/server/Fix-OfflinePlayer-getBedSpawnLocation.patch rename to patches/server/Fix-OfflinePlayer-getBedSpawnLocation.patch diff --git a/patches/unapplied/server/Fix-SpawnEggMeta-get-setSpawnedType.patch b/patches/server/Fix-SpawnEggMeta-get-setSpawnedType.patch similarity index 100% rename from patches/unapplied/server/Fix-SpawnEggMeta-get-setSpawnedType.patch rename to patches/server/Fix-SpawnEggMeta-get-setSpawnedType.patch diff --git a/patches/unapplied/server/Fix-Spigot-Config-not-using-commands.spam-exclusions.patch b/patches/server/Fix-Spigot-Config-not-using-commands.spam-exclusions.patch similarity index 100% rename from patches/unapplied/server/Fix-Spigot-Config-not-using-commands.spam-exclusions.patch rename to patches/server/Fix-Spigot-Config-not-using-commands.spam-exclusions.patch diff --git a/patches/unapplied/server/Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch b/patches/server/Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch similarity index 100% rename from patches/unapplied/server/Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch rename to patches/server/Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch diff --git a/patches/unapplied/server/Fix-a-bunch-of-vanilla-bugs.patch b/patches/server/Fix-a-bunch-of-vanilla-bugs.patch similarity index 85% rename from patches/unapplied/server/Fix-a-bunch-of-vanilla-bugs.patch rename to patches/server/Fix-a-bunch-of-vanilla-bugs.patch index 9c7dcc04b2..b5d7e8d366 100644 --- a/patches/unapplied/server/Fix-a-bunch-of-vanilla-bugs.patch +++ b/patches/server/Fix-a-bunch-of-vanilla-bugs.patch @@ -61,27 +61,27 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/commands/DeOpCommands.java +++ b/src/main/java/net/minecraft/server/commands/DeOpCommands.java @@ -0,0 +0,0 @@ public class DeOpCommands { - if (playerList.isOp(gameProfile)) { playerList.deop(gameProfile); ++i; -- source.sendSuccess(Component.translatable("commands.deop.success", targets.iterator().next().getName()), true); -+ source.sendSuccess(Component.translatable("commands.deop.success", gameProfile.getName()), true); // Paper - fixes MC-253721 + source.sendSuccess(() -> { +- return Component.translatable("commands.deop.success", targets.iterator().next().getName()); ++ return Component.translatable("commands.deop.success", gameProfile.getName()); // Paper - fixes MC-253721 + }, true); } } - diff --git a/src/main/java/net/minecraft/server/commands/OpCommand.java b/src/main/java/net/minecraft/server/commands/OpCommand.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/commands/OpCommand.java +++ b/src/main/java/net/minecraft/server/commands/OpCommand.java @@ -0,0 +0,0 @@ public class OpCommand { - if (!playerList.isOp(gameProfile)) { playerList.op(gameProfile); ++i; -- source.sendSuccess(Component.translatable("commands.op.success", targets.iterator().next().getName()), true); -+ source.sendSuccess(Component.translatable("commands.op.success", gameProfile.getName()), true); // Paper - fixes MC-253721 + source.sendSuccess(() -> { +- return Component.translatable("commands.op.success", targets.iterator().next().getName()); ++ return Component.translatable("commands.op.success", gameProfile.getName()); // Paper - fixes MC-253721 + }, true); } } - diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -148,14 +148,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java @@ -0,0 +0,0 @@ public class Goat extends Animal { player.setItemInHand(hand, itemstack1); - return InteractionResult.sidedSuccess(this.level.isClientSide); + return InteractionResult.sidedSuccess(this.level().isClientSide); } else { + boolean isFood = this.isFood(itemstack); // Paper - track before stack is possibly decreased to 0 (Fixes MC-244739) InteractionResult enuminteractionresult = super.mobInteract(player, hand); - if (enuminteractionresult.consumesAction() && this.isFood(itemstack)) { + if (enuminteractionresult.consumesAction() && isFood) { // Paper - this.level.playSound((Player) null, (Entity) this, this.getEatingSound(itemstack), SoundSource.NEUTRAL, 1.0F, Mth.randomBetween(this.level.random, 0.8F, 1.2F)); + this.level().playSound((Player) null, (Entity) this, this.getEatingSound(itemstack), SoundSource.NEUTRAL, 1.0F, Mth.randomBetween(this.level().random, 0.8F, 1.2F)); } diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java @@ -174,34 +174,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public void equipSaddle(@Nullable SoundSource sound, @Nullable ItemStack stack) { + this.inventory.setItem(0, stack != null ? stack : new ItemStack(Items.SADDLE)); + // Paper end - if (sound != null) { - this.level.playSound((Player) null, (Entity) this, this.getSaddleSoundEvent(), sound, 0.5F, 1.0F); - } -@@ -0,0 +0,0 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, + } public void equipArmor(Player player, ItemStack stack) { - if (this.isArmor(stack)) { -- this.inventory.setItem(1, new ItemStack(stack.getItem())); -+ this.inventory.setItem(1, stack.copyWithCount(1)); // Paper - fix equipping items with nbt - MC-258360, MC-191591 - if (!player.getAbilities().instabuild) { - stack.shrink(1); - } -diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -@@ -0,0 +0,0 @@ public class Sniffer extends Animal { - @Override - public InteractionResult mobInteract(Player player, InteractionHand hand) { - ItemStack itemstack = player.getItemInHand(hand); -+ boolean wasFood = this.isFood(itemstack); // Paper - Fix MC-260219 - InteractionResult enuminteractionresult = super.mobInteract(player, hand); - -- if (enuminteractionresult.consumesAction() && this.isFood(itemstack)) { -+ if (enuminteractionresult.consumesAction() && wasFood) { // Paper - Fix MC-260219 - this.level.playSound((Player) null, (Entity) this, this.getEatingSound(itemstack), SoundSource.NEUTRAL, 1.0F, Mth.randomBetween(this.level.random, 0.8F, 1.2F)); - } - diff --git a/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java b/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java @@ -245,10 +220,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class SaddleItem extends Item { if (entity instanceof Saddleable saddleable && entity.isAlive()) { if (!saddleable.isSaddled() && saddleable.isSaddleable()) { - if (!user.level.isClientSide) { + if (!user.level().isClientSide) { - saddleable.equipSaddle(SoundSource.NEUTRAL); + saddleable.equipSaddle(SoundSource.NEUTRAL, stack.copyWithCount(1)); // Paper - Fix saddles losing nbt data - MC-191591 - entity.level.gameEvent(entity, GameEvent.EQUIP, entity.position()); + entity.level().gameEvent(entity, GameEvent.EQUIP, entity.position()); stack.shrink(1); } diff --git a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java diff --git a/patches/unapplied/server/Fix-a-couple-of-upstream-bed-issues.patch b/patches/server/Fix-a-couple-of-upstream-bed-issues.patch similarity index 100% rename from patches/unapplied/server/Fix-a-couple-of-upstream-bed-issues.patch rename to patches/server/Fix-a-couple-of-upstream-bed-issues.patch diff --git a/patches/unapplied/server/Fix-advancement-triggers-for-entity-damage.patch b/patches/server/Fix-advancement-triggers-for-entity-damage.patch similarity index 100% rename from patches/unapplied/server/Fix-advancement-triggers-for-entity-damage.patch rename to patches/server/Fix-advancement-triggers-for-entity-damage.patch diff --git a/patches/unapplied/server/Fix-api-checking-banned-ips.patch b/patches/server/Fix-api-checking-banned-ips.patch similarity index 100% rename from patches/unapplied/server/Fix-api-checking-banned-ips.patch rename to patches/server/Fix-api-checking-banned-ips.patch diff --git a/patches/unapplied/server/Fix-async-entity-add-due-to-fungus-trees.patch b/patches/server/Fix-async-entity-add-due-to-fungus-trees.patch similarity index 100% rename from patches/unapplied/server/Fix-async-entity-add-due-to-fungus-trees.patch rename to patches/server/Fix-async-entity-add-due-to-fungus-trees.patch diff --git a/patches/unapplied/server/Fix-beehives-generating-from-using-bonemeal.patch b/patches/server/Fix-beehives-generating-from-using-bonemeal.patch similarity index 100% rename from patches/unapplied/server/Fix-beehives-generating-from-using-bonemeal.patch rename to patches/server/Fix-beehives-generating-from-using-bonemeal.patch diff --git a/patches/unapplied/server/Fix-certain-inventories-returning-null-Locations.patch b/patches/server/Fix-certain-inventories-returning-null-Locations.patch similarity index 100% rename from patches/unapplied/server/Fix-certain-inventories-returning-null-Locations.patch rename to patches/server/Fix-certain-inventories-returning-null-Locations.patch diff --git a/patches/unapplied/server/Fix-chiseled-bookshelf-and-jukebox-setItem-with-air.patch b/patches/server/Fix-chiseled-bookshelf-and-jukebox-setItem-with-air.patch similarity index 100% rename from patches/unapplied/server/Fix-chiseled-bookshelf-and-jukebox-setItem-with-air.patch rename to patches/server/Fix-chiseled-bookshelf-and-jukebox-setItem-with-air.patch diff --git a/patches/unapplied/server/Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch b/patches/server/Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch similarity index 100% rename from patches/unapplied/server/Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch rename to patches/server/Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch diff --git a/patches/unapplied/server/Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch b/patches/server/Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch similarity index 100% rename from patches/unapplied/server/Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch rename to patches/server/Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch diff --git a/patches/unapplied/server/Fix-custom-piglin-loved-items.patch b/patches/server/Fix-custom-piglin-loved-items.patch similarity index 100% rename from patches/unapplied/server/Fix-custom-piglin-loved-items.patch rename to patches/server/Fix-custom-piglin-loved-items.patch diff --git a/patches/unapplied/server/Fix-demo-flag-not-enabling-demo-mode.patch b/patches/server/Fix-demo-flag-not-enabling-demo-mode.patch similarity index 100% rename from patches/unapplied/server/Fix-demo-flag-not-enabling-demo-mode.patch rename to patches/server/Fix-demo-flag-not-enabling-demo-mode.patch diff --git a/patches/unapplied/server/Fix-destroying-beehive-without-any-players-nearby-th.patch b/patches/server/Fix-destroying-beehive-without-any-players-nearby-th.patch similarity index 100% rename from patches/unapplied/server/Fix-destroying-beehive-without-any-players-nearby-th.patch rename to patches/server/Fix-destroying-beehive-without-any-players-nearby-th.patch diff --git a/patches/unapplied/server/Fix-force-opening-enchantment-tables.patch b/patches/server/Fix-force-opening-enchantment-tables.patch similarity index 98% rename from patches/unapplied/server/Fix-force-opening-enchantment-tables.patch rename to patches/server/Fix-force-opening-enchantment-tables.patch index f3bd1d1682..0e65fd6629 100644 --- a/patches/unapplied/server/Fix-force-opening-enchantment-tables.patch +++ b/patches/server/Fix-force-opening-enchantment-tables.patch @@ -12,9 +12,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // If there isn't an enchant table we can force create one, won't be very useful though. BlockPos pos = CraftLocation.toBlockPosition(location); -- this.getHandle().openMenu(((EnchantmentTableBlock) Blocks.ENCHANTING_TABLE).getMenuProvider(null, this.getHandle().level, pos)); +- this.getHandle().openMenu(((EnchantmentTableBlock) Blocks.ENCHANTING_TABLE).getMenuProvider(null, this.getHandle().level(), pos)); + // Paper start -+ MenuProvider menuProvider = ((EnchantmentTableBlock) Blocks.ENCHANTING_TABLE).getMenuProvider(null, this.getHandle().level, pos); ++ MenuProvider menuProvider = ((EnchantmentTableBlock) Blocks.ENCHANTING_TABLE).getMenuProvider(null, this.getHandle().level(), pos); + if (menuProvider == null) { + if (!force) { + return null; diff --git a/patches/unapplied/server/Fix-inconsistencies-in-dispense-events-regarding-sta.patch b/patches/server/Fix-inconsistencies-in-dispense-events-regarding-sta.patch similarity index 98% rename from patches/unapplied/server/Fix-inconsistencies-in-dispense-events-regarding-sta.patch rename to patches/server/Fix-inconsistencies-in-dispense-events-regarding-sta.patch index 7b7e32b54c..e463536343 100644 --- a/patches/unapplied/server/Fix-inconsistencies-in-dispense-events-regarding-sta.patch +++ b/patches/server/Fix-inconsistencies-in-dispense-events-regarding-sta.patch @@ -52,7 +52,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java @@ -0,0 +0,0 @@ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior { - // EntityBoat entityboat = new EntityBoat(worldserver, d0, d1 + d3, d2); + // Object object = this.isChestBoat ? new ChestBoat(worldserver, d1, d2 + d4, d3) : new EntityBoat(worldserver, d1, d2 + d4, d3); // CraftBukkit start - ItemStack itemstack1 = stack.split(1); + ItemStack itemstack1 = stack.copyWithCount(1); // Paper - shrink at end and single item in event @@ -325,8 +325,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return stack; } @@ -0,0 +0,0 @@ public interface DispenseItemBehavior { - Material material = iblockdata.getMaterial(); - if (worldserver.isEmptyBlock(blockposition) || !material.isSolid() || material.isReplaceable() || (dispensiblecontaineritem instanceof BucketItem && iblockdata.getBlock() instanceof LiquidBlockContainer && ((LiquidBlockContainer) iblockdata.getBlock()).canPlaceLiquid(worldserver, blockposition, iblockdata, ((BucketItem) dispensiblecontaineritem).content))) { + BlockState iblockdata = worldserver.getBlockState(blockposition); + if (iblockdata.isAir() || iblockdata.canBeReplaced() || (dispensiblecontaineritem instanceof BucketItem && iblockdata.getBlock() instanceof LiquidBlockContainer && ((LiquidBlockContainer) iblockdata.getBlock()).canPlaceLiquid(worldserver, blockposition, iblockdata, ((BucketItem) dispensiblecontaineritem).content))) { org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ()); - CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack); + CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack.copyWithCount(1)); // Paper - single item in event diff --git a/patches/unapplied/server/Fix-player-kick-on-shutdown.patch b/patches/server/Fix-player-kick-on-shutdown.patch similarity index 100% rename from patches/unapplied/server/Fix-player-kick-on-shutdown.patch rename to patches/server/Fix-player-kick-on-shutdown.patch diff --git a/patches/unapplied/server/Fix-plugin-loggers-on-server-shutdown.patch b/patches/server/Fix-plugin-loggers-on-server-shutdown.patch similarity index 100% rename from patches/unapplied/server/Fix-plugin-loggers-on-server-shutdown.patch rename to patches/server/Fix-plugin-loggers-on-server-shutdown.patch diff --git a/patches/unapplied/server/Fix-slime-spawners-not-spawning-outside-slime-chunks.patch b/patches/server/Fix-slime-spawners-not-spawning-outside-slime-chunks.patch similarity index 100% rename from patches/unapplied/server/Fix-slime-spawners-not-spawning-outside-slime-chunks.patch rename to patches/server/Fix-slime-spawners-not-spawning-outside-slime-chunks.patch diff --git a/patches/unapplied/server/Fix-suggest-command-message-for-brigadier-syntax-exc.patch b/patches/server/Fix-suggest-command-message-for-brigadier-syntax-exc.patch similarity index 100% rename from patches/unapplied/server/Fix-suggest-command-message-for-brigadier-syntax-exc.patch rename to patches/server/Fix-suggest-command-message-for-brigadier-syntax-exc.patch diff --git a/patches/unapplied/server/Fix-text-display-error-on-spawn.patch b/patches/server/Fix-text-display-error-on-spawn.patch similarity index 100% rename from patches/unapplied/server/Fix-text-display-error-on-spawn.patch rename to patches/server/Fix-text-display-error-on-spawn.patch diff --git a/patches/unapplied/server/Fixes-and-additions-to-the-SpawnReason-API.patch b/patches/server/Fixes-and-additions-to-the-SpawnReason-API.patch similarity index 93% rename from patches/unapplied/server/Fixes-and-additions-to-the-SpawnReason-API.patch rename to patches/server/Fixes-and-additions-to-the-SpawnReason-API.patch index 145b555dc4..397ac1ffd7 100644 --- a/patches/unapplied/server/Fixes-and-additions-to-the-SpawnReason-API.patch +++ b/patches/server/Fixes-and-additions-to-the-SpawnReason-API.patch @@ -27,9 +27,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class DragonFireball extends AbstractHurtingProjectile { if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), list.stream().map(LivingEntity::getBukkitLivingEntity).collect(java.util.stream.Collectors.toList()), (org.bukkit.entity.AreaEffectCloud) areaEffectCloud.getBukkitEntity()).callEvent()) { // Paper - this.level.levelEvent(2006, this.blockPosition(), this.isSilent() ? -1 : 1); -- this.level.addFreshEntity(areaEffectCloud); -+ this.level.addFreshEntity(areaEffectCloud, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.EXPLOSION); // Paper + this.level().levelEvent(2006, this.blockPosition(), this.isSilent() ? -1 : 1); +- this.level().addFreshEntity(areaEffectCloud); ++ this.level().addFreshEntity(areaEffectCloud, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.EXPLOSION); // Paper } else areaEffectCloud.discard(); // Paper this.discard(); } @@ -37,7 +37,7 @@ diff --git a/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.ja index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java -@@ -0,0 +0,0 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock implements Eq +@@ -0,0 +0,0 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock { // clearPatternBlocks(world, shapedetector_shapedetectorcollection); // CraftBukkit - moved down entity.moveTo((double) pos.getX() + 0.5D, (double) pos.getY() + 0.05D, (double) pos.getZ() + 0.5D, 0.0F, 0.0F); // CraftBukkit start diff --git a/patches/unapplied/server/Flying-Fall-Damage.patch b/patches/server/Flying-Fall-Damage.patch similarity index 100% rename from patches/unapplied/server/Flying-Fall-Damage.patch rename to patches/server/Flying-Fall-Damage.patch diff --git a/patches/unapplied/server/Friction-API.patch b/patches/server/Friction-API.patch similarity index 95% rename from patches/unapplied/server/Friction-API.patch rename to patches/server/Friction-API.patch index 9e12e15c08..7e9a3095eb 100644 --- a/patches/unapplied/server/Friction-API.patch +++ b/patches/server/Friction-API.patch @@ -51,7 +51,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + } // Paper end - if (nbt.contains("Attributes", 9) && this.level != null && !this.level.isClientSide) { + if (nbt.contains("Attributes", 9) && this.level() != null && !this.level().isClientSide) { this.getAttributes().load(nbt.getList("Attributes", 10)); diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 @@ -69,13 +69,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.move(MoverType.SELF, this.getDeltaMovement()); float f1 = 0.98F; -- if (this.onGround) { +- if (this.onGround()) { + // Paper start + if (frictionState == net.kyori.adventure.util.TriState.FALSE) { + f1 = 1F; -+ } else if (this.onGround) { ++ } else if (this.onGround()) { + // Paper end - f1 = this.level.getBlockState(BlockPos.containing(this.getX(), this.getY() - 1.0D, this.getZ())).getBlock().getFriction() * 0.98F; + f1 = this.level().getBlockState(this.getBlockPosBelowThatAffectsMyMovement()).getBlock().getFriction() * 0.98F; } @@ -0,0 +0,0 @@ public class ItemEntity extends Entity implements TraceableEntity { diff --git a/patches/unapplied/server/Ignore-impossible-spawn-tick.patch b/patches/server/Ignore-impossible-spawn-tick.patch similarity index 100% rename from patches/unapplied/server/Ignore-impossible-spawn-tick.patch rename to patches/server/Ignore-impossible-spawn-tick.patch diff --git a/patches/unapplied/server/Improve-PortalEvents.patch b/patches/server/Improve-PortalEvents.patch similarity index 100% rename from patches/unapplied/server/Improve-PortalEvents.patch rename to patches/server/Improve-PortalEvents.patch diff --git a/patches/unapplied/server/Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch b/patches/server/Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch similarity index 100% rename from patches/unapplied/server/Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch rename to patches/server/Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch diff --git a/patches/unapplied/server/Improve-logging-and-errors.patch b/patches/server/Improve-logging-and-errors.patch similarity index 100% rename from patches/unapplied/server/Improve-logging-and-errors.patch rename to patches/server/Improve-logging-and-errors.patch diff --git a/patches/unapplied/server/ItemStack-damage-API.patch b/patches/server/ItemStack-damage-API.patch similarity index 100% rename from patches/unapplied/server/ItemStack-damage-API.patch rename to patches/server/ItemStack-damage-API.patch diff --git a/patches/unapplied/server/Limit-pet-look-distance.patch b/patches/server/Limit-pet-look-distance.patch similarity index 100% rename from patches/unapplied/server/Limit-pet-look-distance.patch rename to patches/server/Limit-pet-look-distance.patch diff --git a/patches/unapplied/server/Missing-eating-regain-reason.patch b/patches/server/Missing-eating-regain-reason.patch similarity index 100% rename from patches/unapplied/server/Missing-eating-regain-reason.patch rename to patches/server/Missing-eating-regain-reason.patch diff --git a/patches/unapplied/server/Missing-effect-cause.patch b/patches/server/Missing-effect-cause.patch similarity index 100% rename from patches/unapplied/server/Missing-effect-cause.patch rename to patches/server/Missing-effect-cause.patch diff --git a/patches/unapplied/server/Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch b/patches/server/Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch similarity index 100% rename from patches/unapplied/server/Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch rename to patches/server/Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch diff --git a/patches/unapplied/server/More-Teleport-API.patch b/patches/server/More-Teleport-API.patch similarity index 100% rename from patches/unapplied/server/More-Teleport-API.patch rename to patches/server/More-Teleport-API.patch diff --git a/patches/unapplied/server/More-accurate-isInOpenWater-impl.patch b/patches/server/More-accurate-isInOpenWater-impl.patch similarity index 100% rename from patches/unapplied/server/More-accurate-isInOpenWater-impl.patch rename to patches/server/More-accurate-isInOpenWater-impl.patch diff --git a/patches/unapplied/server/More-vanilla-friendly-methods-to-update-trades.patch b/patches/server/More-vanilla-friendly-methods-to-update-trades.patch similarity index 100% rename from patches/unapplied/server/More-vanilla-friendly-methods-to-update-trades.patch rename to patches/server/More-vanilla-friendly-methods-to-update-trades.patch diff --git a/patches/unapplied/server/Nameable-Banner-API.patch b/patches/server/Nameable-Banner-API.patch similarity index 100% rename from patches/unapplied/server/Nameable-Banner-API.patch rename to patches/server/Nameable-Banner-API.patch diff --git a/patches/unapplied/server/Optimise-recalcBlockCounts-for-empty-sections.patch b/patches/server/Optimise-recalcBlockCounts-for-empty-sections.patch similarity index 100% rename from patches/unapplied/server/Optimise-recalcBlockCounts-for-empty-sections.patch rename to patches/server/Optimise-recalcBlockCounts-for-empty-sections.patch diff --git a/patches/unapplied/server/Optimize-Hoppers.patch b/patches/server/Optimize-Hoppers.patch similarity index 98% rename from patches/unapplied/server/Optimize-Hoppers.patch rename to patches/server/Optimize-Hoppers.patch index c2515c95cc..5d51b0b67c 100644 --- a/patches/unapplied/server/Optimize-Hoppers.patch +++ b/patches/server/Optimize-Hoppers.patch @@ -496,7 +496,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // CraftBukkit start - InventoryPickupItemEvent event = new InventoryPickupItemEvent(inventory.getOwner().getInventory(), (org.bukkit.entity.Item) itemEntity.getBukkitEntity()); + InventoryPickupItemEvent event = new InventoryPickupItemEvent(getInventory(inventory), (org.bukkit.entity.Item) itemEntity.getBukkitEntity()); // Paper - use getInventory() to avoid snapshot creation - itemEntity.level.getCraftServer().getPluginManager().callEvent(event); + itemEntity.level().getCraftServer().getPluginManager().callEvent(event); if (event.isCancelled()) { return false; @@ -0,0 +0,0 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen @@ -555,8 +555,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } private static boolean canMergeItems(ItemStack first, ItemStack second) { -- return !first.is(second.getItem()) ? false : (first.getDamageValue() != second.getDamageValue() ? false : (first.getCount() > first.getMaxStackSize() ? false : ItemStack.tagMatches(first, second))); -+ return first.is(second.getItem()) && first.getDamageValue() == second.getDamageValue() && first.getCount() < first.getMaxStackSize() && ItemStack.tagMatches(first, second); // Paper - used to return true for full itemstacks?! +- return first.getCount() <= first.getMaxStackSize() && ItemStack.isSameItemSameTags(first, second); ++ return first.is(second.getItem()) && first.getDamageValue() == second.getDamageValue() && first.getCount() < first.getMaxStackSize() && ItemStack.isSameItemSameTags(first, second); // Paper - used to return true for full itemstacks?! } @Override diff --git a/patches/unapplied/server/Pass-ServerLevel-for-gamerule-callbacks.patch b/patches/server/Pass-ServerLevel-for-gamerule-callbacks.patch similarity index 97% rename from patches/unapplied/server/Pass-ServerLevel-for-gamerule-callbacks.patch rename to patches/server/Pass-ServerLevel-for-gamerule-callbacks.patch index ef10a6d41e..27a1f1f683 100644 --- a/patches/unapplied/server/Pass-ServerLevel-for-gamerule-callbacks.patch +++ b/patches/server/Pass-ServerLevel-for-gamerule-callbacks.patch @@ -25,8 +25,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.player = this.server.getPlayerList().respawn(this.player, false, RespawnReason.DEATH); if (this.server.isHardcore()) { this.player.setGameMode(GameType.SPECTATOR, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.HARDCORE_DEATH, null); // Paper -- ((GameRules.BooleanValue) this.player.getLevel().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.server); -+ ((GameRules.BooleanValue) this.player.getLevel().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.player.getLevel()); // Paper +- ((GameRules.BooleanValue) this.player.level().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.server); ++ ((GameRules.BooleanValue) this.player.level().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.player.getLevel()); // Paper } } break; diff --git a/patches/unapplied/server/Player-Entity-Tracking-Events.patch b/patches/server/Player-Entity-Tracking-Events.patch similarity index 100% rename from patches/unapplied/server/Player-Entity-Tracking-Events.patch rename to patches/server/Player-Entity-Tracking-Events.patch diff --git a/patches/unapplied/server/Prevent-GameEvents-being-fired-from-unloaded-chunks.patch b/patches/server/Prevent-GameEvents-being-fired-from-unloaded-chunks.patch similarity index 100% rename from patches/unapplied/server/Prevent-GameEvents-being-fired-from-unloaded-chunks.patch rename to patches/server/Prevent-GameEvents-being-fired-from-unloaded-chunks.patch diff --git a/patches/unapplied/server/Prevent-causing-expired-keys-from-impacting-new-join.patch b/patches/server/Prevent-causing-expired-keys-from-impacting-new-join.patch similarity index 100% rename from patches/unapplied/server/Prevent-causing-expired-keys-from-impacting-new-join.patch rename to patches/server/Prevent-causing-expired-keys-from-impacting-new-join.patch diff --git a/patches/unapplied/server/Prevent-compass-from-loading-chunks.patch b/patches/server/Prevent-compass-from-loading-chunks.patch similarity index 100% rename from patches/unapplied/server/Prevent-compass-from-loading-chunks.patch rename to patches/server/Prevent-compass-from-loading-chunks.patch diff --git a/patches/unapplied/server/Prevent-empty-items-from-being-added-to-world.patch b/patches/server/Prevent-empty-items-from-being-added-to-world.patch similarity index 89% rename from patches/unapplied/server/Prevent-empty-items-from-being-added-to-world.patch rename to patches/server/Prevent-empty-items-from-being-added-to-world.patch index 330504fefb..3c8f5b5d86 100644 --- a/patches/unapplied/server/Prevent-empty-items-from-being-added-to-world.patch +++ b/patches/server/Prevent-empty-items-from-being-added-to-world.patch @@ -30,4 +30,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // com.google.common.base.Preconditions.checkArgument(!stack.isEmpty(), "Cannot drop air"); // CraftBukkit // Paper - Remove check this.getEntityData().set(ItemEntity.DATA_ITEM, stack); this.getEntityData().markDirty(ItemEntity.DATA_ITEM); // CraftBukkit - SPIGOT-4591, must mark dirty - this.despawnRate = level.paperConfig().entities.spawning.altItemDespawnRate.enabled ? level.paperConfig().entities.spawning.altItemDespawnRate.items.getOrDefault(stack.getItem(), level.spigotConfig.itemDespawnRate) : level.spigotConfig.itemDespawnRate; // Paper + this.despawnRate = this.level().paperConfig().entities.spawning.altItemDespawnRate.enabled ? this.level().paperConfig().entities.spawning.altItemDespawnRate.items.getOrDefault(stack.getItem(), this.level().spigotConfig.itemDespawnRate) : this.level().spigotConfig.itemDespawnRate; // Paper diff --git a/patches/unapplied/server/Prevent-entity-loading-causing-async-lookups.patch b/patches/server/Prevent-entity-loading-causing-async-lookups.patch similarity index 98% rename from patches/unapplied/server/Prevent-entity-loading-causing-async-lookups.patch rename to patches/server/Prevent-entity-loading-causing-async-lookups.patch index b54839b890..a979cfe696 100644 --- a/patches/unapplied/server/Prevent-entity-loading-causing-async-lookups.patch +++ b/patches/server/Prevent-entity-loading-causing-async-lookups.patch @@ -11,7 +11,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { public void baseTick() { - this.level.getProfiler().push("entityBaseTick"); + this.level().getProfiler().push("entityBaseTick"); + if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Update last hurt when ticking this.feetBlockState = null; if (this.isPassenger() && this.getVehicle().isRemoved()) { diff --git a/patches/unapplied/server/Prevent-tile-entity-copies-loading-chunks.patch b/patches/server/Prevent-tile-entity-copies-loading-chunks.patch similarity index 89% rename from patches/unapplied/server/Prevent-tile-entity-copies-loading-chunks.patch rename to patches/server/Prevent-tile-entity-copies-loading-chunks.patch index b010dbc6be..5f09774cfc 100644 --- a/patches/unapplied/server/Prevent-tile-entity-copies-loading-chunks.patch +++ b/patches/server/Prevent-tile-entity-copies-loading-chunks.patch @@ -11,8 +11,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic BlockPos blockposition = BlockEntity.getPosFromTag(nbttagcompound); - if (this.player.level.isLoaded(blockposition)) { -- BlockEntity tileentity = this.player.level.getBlockEntity(blockposition); + if (this.player.level().isLoaded(blockposition)) { +- BlockEntity tileentity = this.player.level().getBlockEntity(blockposition); + // Paper start + BlockEntity tileentity = null; + if (this.player.distanceToSqr(blockposition.getX(), blockposition.getY(), blockposition.getZ()) < 32 * 32 && this.player.getLevel().isLoadedAndInBounds(blockposition)) { diff --git a/patches/unapplied/server/Properly-resend-entities.patch b/patches/server/Properly-resend-entities.patch similarity index 98% rename from patches/unapplied/server/Properly-resend-entities.patch rename to patches/server/Properly-resend-entities.patch index 359fb77557..2ba286c5f0 100644 --- a/patches/unapplied/server/Properly-resend-entities.patch +++ b/patches/server/Properly-resend-entities.patch @@ -83,7 +83,7 @@ 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 { - ((ServerLevel)player.level).getChunkSource().chunkMap.addEntity(player); // Paper - track entity now + ((ServerLevel)player.level()).getChunkSource().chunkMap.addEntity(player); // Paper - track entity now // CraftBukkit end - player.getEntityData().refresh(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn diff --git a/patches/unapplied/server/Refresh-ProjectileSource-for-projectiles.patch b/patches/server/Refresh-ProjectileSource-for-projectiles.patch similarity index 95% rename from patches/unapplied/server/Refresh-ProjectileSource-for-projectiles.patch rename to patches/server/Refresh-ProjectileSource-for-projectiles.patch index 5c9d0c8a10..d8f994e1e5 100644 --- a/patches/unapplied/server/Refresh-ProjectileSource-for-projectiles.patch +++ b/patches/server/Refresh-ProjectileSource-for-projectiles.patch @@ -49,8 +49,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (this.cachedOwner != null && !this.cachedOwner.isRemoved()) { + this.refreshProjectileSource(false); // Paper return this.cachedOwner; - } else if (this.ownerUUID != null && this.level instanceof ServerLevel) { - this.cachedOwner = ((ServerLevel) this.level).getEntity(this.ownerUUID); + } else if (this.ownerUUID != null && this.level() instanceof ServerLevel) { + this.cachedOwner = ((ServerLevel) this.level()).getEntity(this.ownerUUID); @@ -0,0 +0,0 @@ public abstract class Projectile extends Entity implements TraceableEntity { } } diff --git a/patches/unapplied/server/Remove-CraftItemStack-setAmount-null-assignment.patch b/patches/server/Remove-CraftItemStack-setAmount-null-assignment.patch similarity index 100% rename from patches/unapplied/server/Remove-CraftItemStack-setAmount-null-assignment.patch rename to patches/server/Remove-CraftItemStack-setAmount-null-assignment.patch diff --git a/patches/unapplied/server/Remove-invalid-signature-login-stacktrace.patch b/patches/server/Remove-invalid-signature-login-stacktrace.patch similarity index 100% rename from patches/unapplied/server/Remove-invalid-signature-login-stacktrace.patch rename to patches/server/Remove-invalid-signature-login-stacktrace.patch diff --git a/patches/unapplied/server/Remove-unnecessary-onTrackingStart-during-navigation.patch b/patches/server/Remove-unnecessary-onTrackingStart-during-navigation.patch similarity index 100% rename from patches/unapplied/server/Remove-unnecessary-onTrackingStart-during-navigation.patch rename to patches/server/Remove-unnecessary-onTrackingStart-during-navigation.patch diff --git a/patches/unapplied/server/Sanitize-Sent-BlockEntity-NBT.patch b/patches/server/Sanitize-Sent-BlockEntity-NBT.patch similarity index 100% rename from patches/unapplied/server/Sanitize-Sent-BlockEntity-NBT.patch rename to patches/server/Sanitize-Sent-BlockEntity-NBT.patch diff --git a/patches/unapplied/server/Send-block-entities-after-destroy-prediction.patch b/patches/server/Send-block-entities-after-destroy-prediction.patch similarity index 96% rename from patches/unapplied/server/Send-block-entities-after-destroy-prediction.patch rename to patches/server/Send-block-entities-after-destroy-prediction.patch index 36812b640d..ca707eac8c 100644 --- a/patches/unapplied/server/Send-block-entities-after-destroy-prediction.patch +++ b/patches/server/Send-block-entities-after-destroy-prediction.patch @@ -68,7 +68,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this.player.gameMode.capturedBlockEntity = false; + this.player.gameMode.captureSentBlockEntities = true; + // Paper end - send block entities after prediction - this.player.gameMode.handleBlockBreakAction(blockposition, packetplayinblockdig_enumplayerdigtype, packet.getDirection(), this.player.level.getMaxBuildHeight(), packet.getSequence()); + this.player.gameMode.handleBlockBreakAction(blockposition, packetplayinblockdig_enumplayerdigtype, packet.getDirection(), this.player.level().getMaxBuildHeight(), packet.getSequence()); this.player.connection.ackBlockChangesUpTo(packet.getSequence()); + // Paper start - send block entities after prediction + this.player.gameMode.captureSentBlockEntities = false; @@ -80,7 +80,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this.player.connection.ackBlockChangesUpTo = -1; + + this.player.gameMode.capturedBlockEntity = false; -+ BlockEntity tileentity = this.player.level.getBlockEntity(blockposition); ++ BlockEntity tileentity = this.player.level().getBlockEntity(blockposition); + if (tileentity != null) { + this.player.connection.send(tileentity.getUpdatePacket()); + } diff --git a/patches/unapplied/server/Stop-large-look-changes-from-crashing-the-server.patch b/patches/server/Stop-large-look-changes-from-crashing-the-server.patch similarity index 95% rename from patches/unapplied/server/Stop-large-look-changes-from-crashing-the-server.patch rename to patches/server/Stop-large-look-changes-from-crashing-the-server.patch index c39710f4e1..8702ca755b 100644 --- a/patches/unapplied/server/Stop-large-look-changes-from-crashing-the-server.patch +++ b/patches/server/Stop-large-look-changes-from-crashing-the-server.patch @@ -10,8 +10,8 @@ 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 implements Attackable { - this.level.getProfiler().pop(); - this.level.getProfiler().push("rangeChecks"); + this.level().getProfiler().pop(); + this.level().getProfiler().push("rangeChecks"); - while (this.getYRot() - this.yRotO < -180.0F) { - this.yRotO -= 360.0F; @@ -51,7 +51,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this.yHeadRotO += Math.round((this.yHeadRot - this.yHeadRotO) / 360.0F) * 360.0F; + // Paper end - this.level.getProfiler().pop(); + this.level().getProfiler().pop(); this.animStep += f2; diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 diff --git a/patches/unapplied/server/Sync-offhand-slot-in-menus.patch b/patches/server/Sync-offhand-slot-in-menus.patch similarity index 100% rename from patches/unapplied/server/Sync-offhand-slot-in-menus.patch rename to patches/server/Sync-offhand-slot-in-menus.patch diff --git a/patches/unapplied/server/Throw-exception-on-world-create-while-being-ticked.patch b/patches/server/Throw-exception-on-world-create-while-being-ticked.patch similarity index 100% rename from patches/unapplied/server/Throw-exception-on-world-create-while-being-ticked.patch rename to patches/server/Throw-exception-on-world-create-while-being-ticked.patch diff --git a/patches/unapplied/server/Track-projectile-source-for-fireworks-from-dispenser.patch b/patches/server/Track-projectile-source-for-fireworks-from-dispenser.patch similarity index 100% rename from patches/unapplied/server/Track-projectile-source-for-fireworks-from-dispenser.patch rename to patches/server/Track-projectile-source-for-fireworks-from-dispenser.patch diff --git a/patches/unapplied/server/Treat-sequence-violations-like-they-should-be.patch b/patches/server/Treat-sequence-violations-like-they-should-be.patch similarity index 100% rename from patches/unapplied/server/Treat-sequence-violations-like-they-should-be.patch rename to patches/server/Treat-sequence-violations-like-they-should-be.patch diff --git a/patches/unapplied/server/Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch b/patches/server/Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch similarity index 100% rename from patches/unapplied/server/Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch rename to patches/server/Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch diff --git a/patches/unapplied/server/Update-the-flag-when-a-captured-block-state-is-outda.patch b/patches/server/Update-the-flag-when-a-captured-block-state-is-outda.patch similarity index 100% rename from patches/unapplied/server/Update-the-flag-when-a-captured-block-state-is-outda.patch rename to patches/server/Update-the-flag-when-a-captured-block-state-is-outda.patch diff --git a/patches/unapplied/server/Use-array-for-gamerule-storage.patch b/patches/server/Use-array-for-gamerule-storage.patch similarity index 100% rename from patches/unapplied/server/Use-array-for-gamerule-storage.patch rename to patches/server/Use-array-for-gamerule-storage.patch diff --git a/patches/unapplied/server/Use-single-player-info-update-packet-on-join.patch b/patches/server/Use-single-player-info-update-packet-on-join.patch similarity index 97% rename from patches/unapplied/server/Use-single-player-info-update-packet-on-join.patch rename to patches/server/Use-single-player-info-update-packet-on-join.patch index 08c33f4cf6..69b255cd9f 100644 --- a/patches/unapplied/server/Use-single-player-info-update-packet-on-join.patch +++ b/patches/server/Use-single-player-info-update-packet-on-join.patch @@ -57,4 +57,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end player.sentListPacket = true; player.supressTrackerForLogin = false; // Paper - ((ServerLevel)player.level).getChunkSource().chunkMap.addEntity(player); // Paper - track entity now + ((ServerLevel)player.level()).getChunkSource().chunkMap.addEntity(player); // Paper - track entity now diff --git a/patches/unapplied/server/Use-thread-safe-random-in-ServerLoginPacketListenerI.patch b/patches/server/Use-thread-safe-random-in-ServerLoginPacketListenerI.patch similarity index 100% rename from patches/unapplied/server/Use-thread-safe-random-in-ServerLoginPacketListenerI.patch rename to patches/server/Use-thread-safe-random-in-ServerLoginPacketListenerI.patch diff --git a/patches/unapplied/server/Use-username-instead-of-display-name-in-PlayerList-g.patch b/patches/server/Use-username-instead-of-display-name-in-PlayerList-g.patch similarity index 100% rename from patches/unapplied/server/Use-username-instead-of-display-name-in-PlayerList-g.patch rename to patches/server/Use-username-instead-of-display-name-in-PlayerList-g.patch diff --git a/patches/unapplied/server/Warn-on-plugins-accessing-faraway-chunks.patch b/patches/server/Warn-on-plugins-accessing-faraway-chunks.patch similarity index 100% rename from patches/unapplied/server/Warn-on-plugins-accessing-faraway-chunks.patch rename to patches/server/Warn-on-plugins-accessing-faraway-chunks.patch diff --git a/patches/unapplied/server/Win-Screen-API.patch b/patches/server/Win-Screen-API.patch similarity index 100% rename from patches/unapplied/server/Win-Screen-API.patch rename to patches/server/Win-Screen-API.patch diff --git a/patches/unapplied/server/WorldCreator-keepSpawnLoaded.patch b/patches/server/WorldCreator-keepSpawnLoaded.patch similarity index 100% rename from patches/unapplied/server/WorldCreator-keepSpawnLoaded.patch rename to patches/server/WorldCreator-keepSpawnLoaded.patch diff --git a/patches/unapplied/server/cache-resource-keys.patch b/patches/server/cache-resource-keys.patch similarity index 100% rename from patches/unapplied/server/cache-resource-keys.patch rename to patches/server/cache-resource-keys.patch diff --git a/patches/unapplied/server/check-global-player-list-where-appropriate.patch b/patches/server/check-global-player-list-where-appropriate.patch similarity index 84% rename from patches/unapplied/server/check-global-player-list-where-appropriate.patch rename to patches/server/check-global-player-list-where-appropriate.patch index f6d501e782..f4eafbba82 100644 --- a/patches/unapplied/server/check-global-player-list-where-appropriate.patch +++ b/patches/server/check-global-player-list-where-appropriate.patch @@ -36,19 +36,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (entity instanceof ServerPlayer) { CriteriaTriggers.THROWN_ITEM_PICKED_UP_BY_ENTITY.trigger((ServerPlayer) entity, item.getItem(), this); -diff --git a/src/main/java/net/minecraft/world/entity/animal/Animal.java b/src/main/java/net/minecraft/world/entity/animal/Animal.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/Animal.java -+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java -@@ -0,0 +0,0 @@ public abstract class Animal extends AgeableMob { - if (this.loveCause == null) { - return null; - } else { -- Player entityhuman = this.level.getPlayerByUUID(this.loveCause); -+ Player entityhuman = this.level.getGlobalPlayerByUUID(this.loveCause); // Paper - check all players - - return entityhuman instanceof ServerPlayer ? (ServerPlayer) entityhuman : null; - } diff --git a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java @@ -82,7 +69,7 @@ diff --git a/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerB index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java -@@ -0,0 +0,0 @@ public class SculkShriekerBlockEntity extends BlockEntity implements VibrationLi +@@ -0,0 +0,0 @@ public class SculkShriekerBlockEntity extends BlockEntity implements GameEventLi @Nullable public static ServerPlayer tryGetPlayer(@Nullable Entity entity) { diff --git a/patches/unapplied/server/config-for-disabling-entity-tag-tags.patch b/patches/server/config-for-disabling-entity-tag-tags.patch similarity index 100% rename from patches/unapplied/server/config-for-disabling-entity-tag-tags.patch rename to patches/server/config-for-disabling-entity-tag-tags.patch diff --git a/patches/unapplied/server/ensure-reset-EnderDragon-boss-event-name.patch b/patches/server/ensure-reset-EnderDragon-boss-event-name.patch similarity index 90% rename from patches/unapplied/server/ensure-reset-EnderDragon-boss-event-name.patch rename to patches/server/ensure-reset-EnderDragon-boss-event-name.patch index dce414fa1c..a17feefa65 100644 --- a/patches/unapplied/server/ensure-reset-EnderDragon-boss-event-name.patch +++ b/patches/server/ensure-reset-EnderDragon-boss-event-name.patch @@ -12,13 +12,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class EndDragonFight { private static final int GATEWAY_DISTANCE = 96; public static final int DRAGON_SPAWN_Y = 128; - private static final Predicate VALID_PLAYER = EntitySelector.ENTITY_STILL_ALIVE.and(EntitySelector.withinDistance(0.0D, 128.0D, 0.0D, 192.0D)); + private final Predicate validPlayer; - public final ServerBossEvent dragonEvent = (ServerBossEvent)(new ServerBossEvent(Component.translatable("entity.minecraft.ender_dragon"), BossEvent.BossBarColor.PINK, BossEvent.BossBarOverlay.PROGRESS)).setPlayBossMusic(true).setCreateWorldFog(true); + private static final Component DEFAULT_BOSS_EVENT_NAME = Component.translatable("entity.minecraft.ender_dragon"); // Paper + public final ServerBossEvent dragonEvent = (ServerBossEvent)(new ServerBossEvent(DEFAULT_BOSS_EVENT_NAME, BossEvent.BossBarColor.PINK, BossEvent.BossBarOverlay.PROGRESS)).setPlayBossMusic(true).setCreateWorldFog(true); // Paper public final ServerLevel level; + private final BlockPos origin; private final ObjectArrayList gateways = new ObjectArrayList<>(); - private final BlockPattern exitPortalPattern; @@ -0,0 +0,0 @@ public class EndDragonFight { this.ticksSinceDragonSeen = 0; if (dragon.hasCustomName()) { diff --git a/patches/unapplied/server/fix-Instruments.patch b/patches/server/fix-Instruments.patch similarity index 100% rename from patches/unapplied/server/fix-Instruments.patch rename to patches/server/fix-Instruments.patch diff --git a/patches/unapplied/server/fix-Jigsaw-block-kicking-user.patch b/patches/server/fix-Jigsaw-block-kicking-user.patch similarity index 100% rename from patches/unapplied/server/fix-Jigsaw-block-kicking-user.patch rename to patches/server/fix-Jigsaw-block-kicking-user.patch diff --git a/patches/unapplied/server/fix-MC-252817-green-map-markers-do-not-disappear.patch b/patches/server/fix-MC-252817-green-map-markers-do-not-disappear.patch similarity index 99% rename from patches/unapplied/server/fix-MC-252817-green-map-markers-do-not-disappear.patch rename to patches/server/fix-MC-252817-green-map-markers-do-not-disappear.patch index 2c87a76e23..bffeadf510 100644 --- a/patches/unapplied/server/fix-MC-252817-green-map-markers-do-not-disappear.patch +++ b/patches/server/fix-MC-252817-green-map-markers-do-not-disappear.patch @@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start - fix MC-252817 (green map markers do not disappear) + this.getFramedMapIdFromItem(itemstack).ifPresent((i) -> { + // Paper end - MapItemSavedData worldmap = MapItem.getSavedData(i, this.level); + MapItemSavedData worldmap = MapItem.getSavedData(i, this.level()); if (worldmap != null) { @@ -0,0 +0,0 @@ public class ItemFrame extends HangingEntity { diff --git a/patches/unapplied/server/fix-powder-snow-cauldrons-not-turning-to-water.patch b/patches/server/fix-powder-snow-cauldrons-not-turning-to-water.patch similarity index 100% rename from patches/unapplied/server/fix-powder-snow-cauldrons-not-turning-to-water.patch rename to patches/server/fix-powder-snow-cauldrons-not-turning-to-water.patch diff --git a/patches/unapplied/server/fixed-entity-vehicle-collision-event-not-called.patch b/patches/server/fixed-entity-vehicle-collision-event-not-called.patch similarity index 100% rename from patches/unapplied/server/fixed-entity-vehicle-collision-event-not-called.patch rename to patches/server/fixed-entity-vehicle-collision-event-not-called.patch diff --git a/patches/unapplied/server/optimized-dirt-and-snow-spreading.patch b/patches/server/optimized-dirt-and-snow-spreading.patch similarity index 100% rename from patches/unapplied/server/optimized-dirt-and-snow-spreading.patch rename to patches/server/optimized-dirt-and-snow-spreading.patch diff --git a/patches/unapplied/server/remove-duplicate-animate-packet-for-records.patch b/patches/server/remove-duplicate-animate-packet-for-records.patch similarity index 100% rename from patches/unapplied/server/remove-duplicate-animate-packet-for-records.patch rename to patches/server/remove-duplicate-animate-packet-for-records.patch diff --git a/patches/unapplied/server/use-BlockFormEvent-for-mud-converting-into-clay.patch b/patches/server/use-BlockFormEvent-for-mud-converting-into-clay.patch similarity index 100% rename from patches/unapplied/server/use-BlockFormEvent-for-mud-converting-into-clay.patch rename to patches/server/use-BlockFormEvent-for-mud-converting-into-clay.patch diff --git a/patches/unapplied/server/Disable-allowListing-before-received-from-client.patch b/patches/unapplied/server/Disable-allowListing-before-received-from-client.patch deleted file mode 100644 index fe2e1ad4de..0000000000 --- a/patches/unapplied/server/Disable-allowListing-before-received-from-client.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> -Date: Sun, 23 Apr 2023 18:22:50 -0400 -Subject: [PATCH] Disable allowListing before received from client - -The client does not send the packet needed to received this information until a little later, which can cause a condition where -despite a player having disabled listing, they are able to be seen for a brief moment. This causes the player to be listed as an Anonymous -Player until the actual configuration value is received from the client. - -diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- 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 { - this.recipeBook = new ServerRecipeBook(); - this.lastSectionPos = SectionPos.of(0, 0, 0); - this.respawnDimension = Level.OVERWORLD; -- this.allowsListing = true; -+ this.allowsListing = false; // Paper - Set to false by default... wait for packet sent by client to populate - this.wardenSpawnTracker = new WardenSpawnTracker(0, 0, 0); - this.containerSynchronizer = new ContainerSynchronizer() { - @Override diff --git a/patches/unapplied/server/Fix-EndDragonFight-killed-statuses-should-be-false-f.patch b/patches/unapplied/server/Fix-EndDragonFight-killed-statuses-should-be-false-f.patch deleted file mode 100644 index c0173a3d9c..0000000000 --- a/patches/unapplied/server/Fix-EndDragonFight-killed-statuses-should-be-false-f.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: elmital <54907162+elmital@users.noreply.github.com> -Date: Fri, 16 Sep 2022 17:44:34 +0200 -Subject: [PATCH] Fix: EndDragonFight killed statuses should be false for newly - created worlds - - -diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- 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 { - if (nbt.contains("ExitPortalLocation", 10)) { - this.portalLocation = NbtUtils.readBlockPos(nbt.getCompound("ExitPortalLocation")); - } -- } else { -- this.dragonKilled = true; -- this.previouslyKilled = true; -+ // Paper start - Killed statuses should be false for newly created worlds -+ // } else { -+ // this.dragonKilled = true; -+ // this.previouslyKilled = true; -+ // Paper end - } - - if (nbt.contains("Gateways", 9)) { diff --git a/patches/unapplied/server/Fix-MapLike-Codec-missing-key-selector.patch b/patches/unapplied/server/Fix-MapLike-Codec-missing-key-selector.patch deleted file mode 100644 index 6f62d5f985..0000000000 --- a/patches/unapplied/server/Fix-MapLike-Codec-missing-key-selector.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jake Potrebic -Date: Fri, 9 Dec 2022 12:11:39 -0800 -Subject: [PATCH] Fix MapLike Codec missing key 'selector' - - -diff --git a/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationListener.java b/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationListener.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationListener.java -+++ b/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationListener.java -@@ -0,0 +0,0 @@ public class VibrationListener implements GameEventListener { - return vibrationlistener.listenerRange; - }), VibrationInfo.CODEC.optionalFieldOf("event").forGetter((vibrationlistener) -> { - return Optional.ofNullable(vibrationlistener.currentVibration); -- }), VibrationSelector.CODEC.fieldOf("selector").forGetter((vibrationlistener) -> { -+ }), Codec.optionalField("selector", VibrationSelector.CODEC).xmap(o -> o.orElseGet(VibrationSelector::new), Optional::of).forGetter((vibrationlistener) -> { // Paper - fix MapLike spam for missing "selector" in 1.19.2 - return vibrationlistener.selectionStrategy; - }), ExtraCodecs.NON_NEGATIVE_INT.fieldOf("event_delay").orElse(0).forGetter((vibrationlistener) -> { - return vibrationlistener.travelTimeInTicks; diff --git a/patches/unapplied/server/Fix-block-place-logic.patch b/patches/unapplied/server/Fix-block-place-logic.patch deleted file mode 100644 index bddd0b7cc7..0000000000 --- a/patches/unapplied/server/Fix-block-place-logic.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> -Date: Mon, 3 Apr 2023 18:46:49 +0200 -Subject: [PATCH] Fix block place logic - - -diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/item/BlockItem.java -+++ b/src/main/java/net/minecraft/world/item/BlockItem.java -@@ -0,0 +0,0 @@ public class BlockItem extends Item { - - SoundType soundeffecttype = iblockdata1.getSoundType(); - -- // world.playSound(entityhuman, blockposition, this.getPlaceSound(iblockdata1), SoundCategory.BLOCKS, (soundeffecttype.getVolume() + 1.0F) / 2.0F, soundeffecttype.getPitch() * 0.8F); -+ if (entityhuman == null) world.playSound(entityhuman, blockposition, this.getPlaceSound(iblockdata1), net.minecraft.sounds.SoundSource.BLOCKS, (soundeffecttype.getVolume() + 1.0F) / 2.0F, soundeffecttype.getPitch() * 0.8F); // Paper - reintroduce this for the dispenser (i.e the shulker) - world.gameEvent(GameEvent.BLOCK_PLACE, blockposition, GameEvent.Context.of(entityhuman, iblockdata1)); - if ((entityhuman == null || !entityhuman.getAbilities().instabuild) && itemstack != ItemStack.EMPTY) { // CraftBukkit - itemstack.shrink(1); -diff --git a/src/main/java/net/minecraft/world/item/HangingSignItem.java b/src/main/java/net/minecraft/world/item/HangingSignItem.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/item/HangingSignItem.java -+++ b/src/main/java/net/minecraft/world/item/HangingSignItem.java -@@ -0,0 +0,0 @@ public class HangingSignItem extends StandingAndWallBlockItem { - protected boolean updateCustomBlockEntityTag(BlockPos pos, Level world, @Nullable Player player, ItemStack stack, BlockState state) { - boolean bl = super.updateCustomBlockEntityTag(pos, world, player, stack, state); - if (!world.isClientSide && !bl && player != null) { -- BlockEntity var8 = world.getBlockEntity(pos); -+ // Paper start - moved in ItemStack use handler for events cancellation -+ /*BlockEntity var8 = world.getBlockEntity(pos); - if (var8 instanceof SignBlockEntity) { - SignBlockEntity signBlockEntity = (SignBlockEntity)var8; - player.openTextEdit(signBlockEntity); -- } -+ }*/ -+ SignItem.openSign = pos; -+ // Paper end - } - - return bl; -diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/item/ItemStack.java -+++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -0,0 +0,0 @@ public final class ItemStack { - if (tileentity instanceof JukeboxBlockEntity) { - JukeboxBlockEntity tileentityjukebox = (JukeboxBlockEntity) tileentity; - -- // There can only be one -- ItemStack record = this.copy(); -- if (!record.isEmpty()) { -- record.setCount(1); -- } -- -- tileentityjukebox.setFirstItem(record); -+ tileentityjukebox.setFirstItem(this.copy()); // Paper - sync this with record item, jukebox has now an inventory - world.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(entityhuman, world.getBlockState(blockposition))); - } - -@@ -0,0 +0,0 @@ public final class ItemStack { - } - - // SPIGOT-4678 -- if (this.item instanceof SignItem && SignItem.openSign != null) { -+ if ((this.item instanceof SignItem || this.item instanceof HangingSignItem) && SignItem.openSign != null) { // Paper - trigger the hanging sign text editor now - try { - entityhuman.openTextEdit((SignBlockEntity) world.getBlockEntity(SignItem.openSign)); - } finally { diff --git a/patches/unapplied/server/Set-position-before-player-sending-on-dimension-chan.patch b/patches/unapplied/server/Set-position-before-player-sending-on-dimension-chan.patch deleted file mode 100644 index b6d6011b85..0000000000 --- a/patches/unapplied/server/Set-position-before-player-sending-on-dimension-chan.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> -Date: Sat, 6 Aug 2022 18:10:14 -0400 -Subject: [PATCH] Set position before player sending on dimension change - -This causes a moment where the player entity is sent with the previous location, and the -teleport packet which is sent shortly after is meant to correct that. - -diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- 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 { - - // CraftBukkit end - this.setLevel(worldserver); -+ this.moveTo(exit.getX(), exit.getY(), exit.getZ(), exit.getYaw(), exit.getPitch()); // Paper - Set the location before - this.connection.teleport(exit); // CraftBukkit - use internal teleport without event - this.connection.resetPosition(); - worldserver.addDuringPortalTeleport(this); diff --git a/patches/unapplied/server/Workaround-for-client-lag-spikes-MC-162253.patch b/patches/unapplied/server/Workaround-for-client-lag-spikes-MC-162253.patch deleted file mode 100644 index 089d558668..0000000000 --- a/patches/unapplied/server/Workaround-for-client-lag-spikes-MC-162253.patch +++ /dev/null @@ -1,114 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Brokkonaut -Date: Sat, 18 Dec 2021 19:43:36 +0100 -Subject: [PATCH] Workaround for client lag spikes (MC-162253) - -When crossing certain chunk boundaries, the client needlessly -calculates light maps for chunk neighbours. In some specific map -configurations, these calculations cause a 500ms+ freeze on the Client. - -This patch basically serves as a workaround by sending light maps -to the client, so that it doesn't attempt to calculate them. -This mitigates the frametime impact to a minimum (but it's still there). - -Original patch by: MeFisto94 -Co-authored-by: =?UTF-8?q?Dani=C3=ABl=20Goossens?= -Co-authored-by: Nassim Jahnke - -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 -+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - }); - } - -+ // Paper start - Fix MC-162253 -+ /** -+ * Returns the light mask for the given chunk consisting of all non-empty sections that may need sending. -+ */ -+ private BitSet lightMask(final LevelChunk chunk) { -+ final net.minecraft.world.level.chunk.LevelChunkSection[] sections = chunk.getSections(); -+ final BitSet mask = new BitSet(this.lightEngine.getLightSectionCount()); -+ -+ // There are 2 more light sections than chunk sections so when iterating over -+ // sections we have to increment the index by 1 -+ for (int i = 0; i < sections.length; i++) { -+ if (!sections[i].hasOnlyAir()) { -+ // Whenever a section is not empty, it can change lighting for the section itself (i + 1), the section below, and the section above -+ mask.set(i); -+ mask.set(i + 1); -+ mask.set(i + 2); -+ i++; // We can skip the already set upper section -+ } -+ } -+ return mask; -+ } -+ -+ /** -+ * Returns the ceiling light mask of all sections that are equal or lower to the highest non-empty section. -+ */ -+ private BitSet ceilingLightMask(final LevelChunk chunk) { -+ final net.minecraft.world.level.chunk.LevelChunkSection[] sections = chunk.getSections(); -+ for (int i = sections.length - 1; i >= 0; i--) { -+ if (!sections[i].hasOnlyAir()) { -+ // Add one to get the light section, one because blocks in the section above may change, and another because BitSet's toIndex is exclusive -+ final int highest = i + 3; -+ final BitSet mask = new BitSet(highest); -+ mask.set(0, highest); -+ return mask; -+ } -+ } -+ return new BitSet(); -+ } -+ // Paper end - Fix MC-162253 -+ - // Paper start - Anti-Xray - Bypass - private void playerLoadedChunk(ServerPlayer player, MutableObject> cachedDataPackets, LevelChunk chunk) { - if (cachedDataPackets.getValue() == null) { -@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - - Boolean shouldModify = chunk.getLevel().chunkPacketBlockController.shouldModify(player, chunk); - player.trackChunk(chunk.getPos(), (Packet) cachedDataPackets.getValue().computeIfAbsent(shouldModify, (s) -> { -+ // Paper start - Fix MC-162253 -+ final int viewDistance = getEffectiveViewDistance(); -+ final int playerChunkX = player.getBlockX() >> 4; -+ final int playerChunkZ = player.getBlockZ() >> 4; -+ -+ // For all loaded neighbours, send sky light for empty sections above highest non-empty section (+1) of the center chunk -+ // otherwise the client will try to calculate lighting there on its own -+ final BitSet lightMask = lightMask(chunk); -+ if (!lightMask.isEmpty()) { -+ for (int x = -1; x <= 1; x++) { -+ for (int z = -1; z <= 1; z++) { -+ if (x == 0 && z == 0) { -+ continue; -+ } -+ -+ if (!chunk.isNeighbourLoaded(x, z)) { -+ continue; -+ } -+ -+ final int neighborChunkX = chunk.getPos().x + x; -+ final int neighborChunkZ = chunk.getPos().z + z; -+ final int distX = Math.abs(playerChunkX - neighborChunkX); -+ final int distZ = Math.abs(playerChunkZ - neighborChunkZ); -+ if (Math.max(distX, distZ) > viewDistance) { -+ continue; -+ } -+ -+ final LevelChunk neighbor = chunk.getRelativeNeighbourIfLoaded(x, z); -+ final BitSet updateLightMask = (BitSet) lightMask.clone(); -+ updateLightMask.andNot(ceilingLightMask(neighbor)); -+ if (updateLightMask.isEmpty()) { -+ continue; -+ } -+ -+ player.connection.send(new net.minecraft.network.protocol.game.ClientboundLightUpdatePacket(new ChunkPos(neighborChunkX, neighborChunkZ), this.lightEngine, updateLightMask, null, true)); -+ } -+ } -+ } -+ // Paper end - Fix MC-162253 - return new ClientboundLevelChunkWithLightPacket(chunk, this.lightEngine, (BitSet) null, (BitSet) null, true, (Boolean) s); - })); - // Paper end