From 6f010858de5a91ce1ea2e7f7d6057990c7c57260 Mon Sep 17 00:00:00 2001 From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Date: Wed, 6 Dec 2023 11:34:54 -0500 Subject: [PATCH] Patches!!! MORE MORE MORE MOOOOORE --- .../API-for-an-entity-s-scoreboard-name.patch | 0 .../API-for-updating-recipes-on-clients.patch | 0 .../server/Add-Listing-API-for-Player.patch | 0 .../server/Add-PlayerPickItemEvent.patch | 0 .../Add-Sign-getInteractableSideFor.patch | 0 .../Add-event-for-player-editing-sign.patch | 0 ...-to-remove-all-active-potion-effects.patch | 0 ...sing-InventoryHolders-to-inventories.patch | 0 .../Add-option-to-disable-block-updates.patch | 6 ++-- ...ot-sanity-checks-in-container-clicks.patch | 10 ------ ...-titleOverride-to-InventoryOpenEvent.patch | 0 .../server/Add-whitelist-events.patch | 0 ...proper-checking-of-empty-item-stacks.patch | 0 .../server/Allow-trident-custom-damage.patch | 9 +++--- .../Array-backed-synched-entity-data.patch | 0 .../server/Bandaid-fix-for-Effect.patch | 0 .../server/Cache-map-ids-on-item-frames.patch | 0 ...ll-BlockGrowEvent-for-missing-blocks.patch | 0 ...all-BlockRedstoneEvents-for-lecterns.patch | 0 .../Call-missing-BlockDispenseEvent.patch | 0 ...nfigurable-Region-Compression-Format.patch | 0 ...ntity-tracking-range-by-Y-coordinate.patch | 0 .../Configure-sniffer-egg-hatch-time.patch | 0 .../Deep-clone-unhandled-nbt-tags.patch | 0 ...place-methods-with-old-StructureType.patch | 0 ...nd-water-fluid-explosion-resistance-.patch | 0 ...l-proximity-check-before-entity-look.patch | 0 ...-entities-in-chunks-that-are-positio.patch | 0 ...anhasbukkit-default-if-alias-block-e.patch | 0 ...d-chunks-for-supporting-block-checks.patch | 2 +- ...te-namespaced-commands-if-send-names.patch | 0 .../server/Don-t-tick-signs.patch | 0 .../server/Expand-Pose-API.patch | 4 +-- ...enceOrb-should-call-EntitySpawnEvent.patch | 6 ++-- ...ed-BlockFace-during-BlockDamageEvent.patch | 0 ...xpose-hand-during-BlockCanBuildEvent.patch | 0 ...-entity-death-event-for-ender-dragon.patch | 0 .../server/Fix-BanList-API.patch | 0 .../server/Fix-NPE-on-Boat-getStatus.patch | 0 ...x-custom-statistic-criteria-creation.patch | 0 ...crafting-result-amount-for-fireworks.patch | 0 .../server/Fix-inventory-desync.patch | 0 ...ix-possible-NPE-on-painting-creation.patch | 0 ...ation-when-spawning-display-entities.patch | 0 ...Fix-silent-equipment-change-for-mobs.patch | 0 .../Fix-sniffer-removeExploredLocation.patch | 0 .../server/Fix-spigot-s-Forced-Stats.patch | 0 ...Folia-scheduler-and-owned-region-API.patch | 6 ++-- .../Implement-OfflinePlayer-isConnected.patch | 0 .../Implement-PlayerFailMoveEvent.patch | 31 +++++++++++------- ...ng-PreCreatureSpawnEvent-with-per-pl.patch | 32 +++++++++---------- ...e-command-function-perm-level-checks.patch | 2 +- .../Improve-performance-of-mass-crafts.patch | 0 ...st-throw-both-Spread-and-Grow-Events.patch | 0 .../server/More-DragonBattle-API.patch | 0 .../Only-capture-actual-tree-growth.patch | 0 ...ase-allay-memory-on-non-item-targets.patch | 0 ...Timer-for-Wandering-Traders-spawned-.patch | 0 ...ck-item-frames-if-players-can-see-it.patch | 0 ...e-nearest-structure-border-iteration.patch | 0 .../Optimize-player-lookups-for-beacons.patch | 0 .../server/Properly-Cancel-Usable-Items.patch | 0 ...y-handle-BlockBreakEvent-isDropItems.patch | 10 +++--- ...ata-neighbour-ticks-outside-of-range.patch | 0 ...eData-on-more-entities-when-spawning.patch | 0 .../server/SculkCatalyst-bloom-API.patch | 0 ...Skip-POI-finding-if-stuck-in-vehicle.patch | 0 ...Suppress-Item-Meta-Validation-Checks.patch | 0 ...ayerChunkLoaderData-in-order-to-prep.patch | 0 .../Use-correct-seed-on-api-world-load.patch | 0 ...urce-for-mushroom-block-spread-event.patch | 0 ...apLike-spam-for-missing-key-selector.patch | 0 .../fix-item-meta-for-tadpole-buckets.patch | 0 73 files changed, 58 insertions(+), 60 deletions(-) rename patches/{unapplied => }/server/API-for-an-entity-s-scoreboard-name.patch (100%) rename patches/{unapplied => }/server/API-for-updating-recipes-on-clients.patch (100%) rename patches/{unapplied => }/server/Add-Listing-API-for-Player.patch (100%) rename patches/{unapplied => }/server/Add-PlayerPickItemEvent.patch (100%) rename patches/{unapplied => }/server/Add-Sign-getInteractableSideFor.patch (100%) rename patches/{unapplied => }/server/Add-event-for-player-editing-sign.patch (100%) rename patches/{unapplied => }/server/Add-method-to-remove-all-active-potion-effects.patch (100%) rename patches/{unapplied => }/server/Add-missing-InventoryHolders-to-inventories.patch (100%) rename patches/{unapplied => }/server/Add-option-to-disable-block-updates.patch (97%) rename patches/{unapplied => }/server/Add-slot-sanity-checks-in-container-clicks.patch (82%) rename patches/{unapplied => }/server/Add-titleOverride-to-InventoryOpenEvent.patch (100%) rename patches/{unapplied => }/server/Add-whitelist-events.patch (100%) rename patches/{unapplied => }/server/Allow-proper-checking-of-empty-item-stacks.patch (100%) rename patches/{unapplied => }/server/Allow-trident-custom-damage.patch (90%) rename patches/{unapplied => }/server/Array-backed-synched-entity-data.patch (100%) rename patches/{unapplied => }/server/Bandaid-fix-for-Effect.patch (100%) rename patches/{unapplied => }/server/Cache-map-ids-on-item-frames.patch (100%) rename patches/{unapplied => }/server/Call-BlockGrowEvent-for-missing-blocks.patch (100%) rename patches/{unapplied => }/server/Call-BlockRedstoneEvents-for-lecterns.patch (100%) rename patches/{unapplied => }/server/Call-missing-BlockDispenseEvent.patch (100%) rename patches/{unapplied => }/server/Configurable-Region-Compression-Format.patch (100%) rename patches/{unapplied => }/server/Configurable-entity-tracking-range-by-Y-coordinate.patch (100%) rename patches/{unapplied => }/server/Configure-sniffer-egg-hatch-time.patch (100%) rename patches/{unapplied => }/server/Deep-clone-unhandled-nbt-tags.patch (100%) rename patches/{unapplied => }/server/Deprecate-and-replace-methods-with-old-StructureType.patch (100%) rename patches/{unapplied => }/server/Determine-lava-and-water-fluid-explosion-resistance-.patch (100%) rename patches/{unapplied => }/server/Do-crystal-portal-proximity-check-before-entity-look.patch (100%) rename patches/{unapplied => }/server/Do-not-read-tile-entities-in-chunks-that-are-positio.patch (100%) rename patches/{unapplied => }/server/Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch (100%) rename patches/{unapplied => }/server/Don-t-load-chunks-for-supporting-block-checks.patch (96%) rename patches/{unapplied => }/server/Don-t-tab-complete-namespaced-commands-if-send-names.patch (100%) rename patches/{unapplied => }/server/Don-t-tick-signs.patch (100%) rename patches/{unapplied => }/server/Expand-Pose-API.patch (97%) rename patches/{unapplied => }/server/ExperienceOrb-should-call-EntitySpawnEvent.patch (84%) rename patches/{unapplied => }/server/Expose-clicked-BlockFace-during-BlockDamageEvent.patch (100%) rename patches/{unapplied => }/server/Expose-hand-during-BlockCanBuildEvent.patch (100%) rename patches/{unapplied => }/server/Fire-entity-death-event-for-ender-dragon.patch (100%) rename patches/{unapplied => }/server/Fix-BanList-API.patch (100%) rename patches/{unapplied => }/server/Fix-NPE-on-Boat-getStatus.patch (100%) rename patches/{unapplied => }/server/Fix-custom-statistic-criteria-creation.patch (100%) rename patches/{unapplied => }/server/Fix-incorrect-crafting-result-amount-for-fireworks.patch (100%) rename patches/{unapplied => }/server/Fix-inventory-desync.patch (100%) rename patches/{unapplied => }/server/Fix-possible-NPE-on-painting-creation.patch (100%) rename patches/{unapplied => }/server/Fix-rotation-when-spawning-display-entities.patch (100%) rename patches/{unapplied => }/server/Fix-silent-equipment-change-for-mobs.patch (100%) rename patches/{unapplied => }/server/Fix-sniffer-removeExploredLocation.patch (100%) rename patches/{unapplied => }/server/Fix-spigot-s-Forced-Stats.patch (100%) rename patches/{unapplied => }/server/Folia-scheduler-and-owned-region-API.patch (99%) rename patches/{unapplied => }/server/Implement-OfflinePlayer-isConnected.patch (100%) rename patches/{unapplied => }/server/Implement-PlayerFailMoveEvent.patch (80%) rename patches/{unapplied => }/server/Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch (79%) rename patches/{unapplied => }/server/Improve-command-function-perm-level-checks.patch (93%) rename patches/{unapplied => }/server/Improve-performance-of-mass-crafts.patch (100%) rename patches/{unapplied => }/server/Make-Amethyst-throw-both-Spread-and-Grow-Events.patch (100%) rename patches/{unapplied => }/server/More-DragonBattle-API.patch (100%) rename patches/{unapplied => }/server/Only-capture-actual-tree-growth.patch (100%) rename patches/{unapplied => }/server/Only-erase-allay-memory-on-non-item-targets.patch (100%) rename patches/{unapplied => }/server/Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch (100%) rename patches/{unapplied => }/server/Only-tick-item-frames-if-players-can-see-it.patch (100%) rename patches/{unapplied => }/server/Optimize-nearest-structure-border-iteration.patch (100%) rename patches/{unapplied => }/server/Optimize-player-lookups-for-beacons.patch (100%) rename patches/{unapplied => }/server/Properly-Cancel-Usable-Items.patch (100%) rename patches/{unapplied => }/server/Properly-handle-BlockBreakEvent-isDropItems.patch (94%) rename patches/{unapplied => }/server/Remove-UpgradeData-neighbour-ticks-outside-of-range.patch (100%) rename patches/{unapplied => }/server/Respect-randomizeData-on-more-entities-when-spawning.patch (100%) rename patches/{unapplied => }/server/SculkCatalyst-bloom-API.patch (100%) rename patches/{unapplied => }/server/Skip-POI-finding-if-stuck-in-vehicle.patch (100%) rename patches/{unapplied => }/server/Suppress-Item-Meta-Validation-Checks.patch (100%) rename patches/{unapplied => }/server/Temp-Pre-init-PlayerChunkLoaderData-in-order-to-prep.patch (100%) rename patches/{unapplied => }/server/Use-correct-seed-on-api-world-load.patch (100%) rename patches/{unapplied => }/server/Use-correct-source-for-mushroom-block-spread-event.patch (100%) rename patches/{unapplied => }/server/fix-MapLike-spam-for-missing-key-selector.patch (100%) rename patches/{unapplied => }/server/fix-item-meta-for-tadpole-buckets.patch (100%) diff --git a/patches/unapplied/server/API-for-an-entity-s-scoreboard-name.patch b/patches/server/API-for-an-entity-s-scoreboard-name.patch similarity index 100% rename from patches/unapplied/server/API-for-an-entity-s-scoreboard-name.patch rename to patches/server/API-for-an-entity-s-scoreboard-name.patch diff --git a/patches/unapplied/server/API-for-updating-recipes-on-clients.patch b/patches/server/API-for-updating-recipes-on-clients.patch similarity index 100% rename from patches/unapplied/server/API-for-updating-recipes-on-clients.patch rename to patches/server/API-for-updating-recipes-on-clients.patch diff --git a/patches/unapplied/server/Add-Listing-API-for-Player.patch b/patches/server/Add-Listing-API-for-Player.patch similarity index 100% rename from patches/unapplied/server/Add-Listing-API-for-Player.patch rename to patches/server/Add-Listing-API-for-Player.patch diff --git a/patches/unapplied/server/Add-PlayerPickItemEvent.patch b/patches/server/Add-PlayerPickItemEvent.patch similarity index 100% rename from patches/unapplied/server/Add-PlayerPickItemEvent.patch rename to patches/server/Add-PlayerPickItemEvent.patch diff --git a/patches/unapplied/server/Add-Sign-getInteractableSideFor.patch b/patches/server/Add-Sign-getInteractableSideFor.patch similarity index 100% rename from patches/unapplied/server/Add-Sign-getInteractableSideFor.patch rename to patches/server/Add-Sign-getInteractableSideFor.patch diff --git a/patches/unapplied/server/Add-event-for-player-editing-sign.patch b/patches/server/Add-event-for-player-editing-sign.patch similarity index 100% rename from patches/unapplied/server/Add-event-for-player-editing-sign.patch rename to patches/server/Add-event-for-player-editing-sign.patch diff --git a/patches/unapplied/server/Add-method-to-remove-all-active-potion-effects.patch b/patches/server/Add-method-to-remove-all-active-potion-effects.patch similarity index 100% rename from patches/unapplied/server/Add-method-to-remove-all-active-potion-effects.patch rename to patches/server/Add-method-to-remove-all-active-potion-effects.patch diff --git a/patches/unapplied/server/Add-missing-InventoryHolders-to-inventories.patch b/patches/server/Add-missing-InventoryHolders-to-inventories.patch similarity index 100% rename from patches/unapplied/server/Add-missing-InventoryHolders-to-inventories.patch rename to patches/server/Add-missing-InventoryHolders-to-inventories.patch diff --git a/patches/unapplied/server/Add-option-to-disable-block-updates.patch b/patches/server/Add-option-to-disable-block-updates.patch similarity index 97% rename from patches/unapplied/server/Add-option-to-disable-block-updates.patch rename to patches/server/Add-option-to-disable-block-updates.patch index df8940b794..1d5e1aed44 100644 --- a/patches/unapplied/server/Add-option-to-disable-block-updates.patch +++ b/patches/server/Add-option-to-disable-block-updates.patch @@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override public BlockState getStateForPlacement(BlockPlaceContext ctx) { + if (io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableChorusPlantUpdates) return this.defaultBlockState(); // Paper - add option to disable block updates - return this.getStateForPlacement(ctx.getLevel(), ctx.getClickedPos()); + return getStateWithConnections(ctx.getLevel(), ctx.getClickedPos(), this.defaultBlockState()); } @@ -0,0 +0,0 @@ public class ChorusPlantBlock extends PipeBlock { @@ -144,8 +144,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class TripWireBlock extends Block { @Override - public void playerWillDestroy(Level world, BlockPos pos, BlockState state, Player player) { -+ if (io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates) return; // Paper - prevent disarming tripwires + public BlockState playerWillDestroy(Level world, BlockPos pos, BlockState state, Player player) { ++ if (io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates) return state; // Paper - prevent disarming tripwires if (!world.isClientSide && !player.getMainHandItem().isEmpty() && player.getMainHandItem().is(Items.SHEARS)) { world.setBlock(pos, (BlockState) state.setValue(TripWireBlock.DISARMED, true), 4); world.gameEvent((Entity) player, GameEvent.SHEAR, pos); diff --git a/patches/unapplied/server/Add-slot-sanity-checks-in-container-clicks.patch b/patches/server/Add-slot-sanity-checks-in-container-clicks.patch similarity index 82% rename from patches/unapplied/server/Add-slot-sanity-checks-in-container-clicks.patch rename to patches/server/Add-slot-sanity-checks-in-container-clicks.patch index b89a369e2d..386d645a0c 100644 --- a/patches/unapplied/server/Add-slot-sanity-checks-in-container-clicks.patch +++ b/patches/server/Add-slot-sanity-checks-in-container-clicks.patch @@ -33,13 +33,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 slot = (Slot) this.slots.get(slotIndex); itemstack = this.getCarried(); if (AbstractContainerMenu.canItemQuickReplace(slot, itemstack, true) && slot.mayPlace(itemstack) && (this.quickcraftType == 2 || itemstack.getCount() > this.quickcraftSlots.size()) && this.canDragTo(slot)) { -@@ -0,0 +0,0 @@ public abstract class AbstractContainerMenu { - Slot slot2; - int j2; - -- if (actionType == ClickType.SWAP) { -+ if (actionType == ClickType.SWAP && (button == 40 || button >= 0 && button < 9)) { // Paper -+ if (slotIndex < 0 || button < 0) return; // Paper - slot2 = (Slot) this.slots.get(slotIndex); - itemstack1 = playerinventory.getItem(button); - itemstack = slot2.getItem(); diff --git a/patches/unapplied/server/Add-titleOverride-to-InventoryOpenEvent.patch b/patches/server/Add-titleOverride-to-InventoryOpenEvent.patch similarity index 100% rename from patches/unapplied/server/Add-titleOverride-to-InventoryOpenEvent.patch rename to patches/server/Add-titleOverride-to-InventoryOpenEvent.patch diff --git a/patches/unapplied/server/Add-whitelist-events.patch b/patches/server/Add-whitelist-events.patch similarity index 100% rename from patches/unapplied/server/Add-whitelist-events.patch rename to patches/server/Add-whitelist-events.patch diff --git a/patches/unapplied/server/Allow-proper-checking-of-empty-item-stacks.patch b/patches/server/Allow-proper-checking-of-empty-item-stacks.patch similarity index 100% rename from patches/unapplied/server/Allow-proper-checking-of-empty-item-stacks.patch rename to patches/server/Allow-proper-checking-of-empty-item-stacks.patch diff --git a/patches/unapplied/server/Allow-trident-custom-damage.patch b/patches/server/Allow-trident-custom-damage.patch similarity index 90% rename from patches/unapplied/server/Allow-trident-custom-damage.patch rename to patches/server/Allow-trident-custom-damage.patch index b60b07ba10..ae30dd8712 100644 --- a/patches/unapplied/server/Allow-trident-custom-damage.patch +++ b/patches/server/Allow-trident-custom-damage.patch @@ -24,17 +24,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class ThrownTrident extends AbstractArrow { public ThrownTrident(EntityType type, Level world) { - super(type, world); + super(type, world, ThrownTrident.DEFAULT_ARROW_STACK); + this.baseDamage = net.minecraft.world.item.TridentItem.BASE_DAMAGE; // Paper - this.tridentItem = new ItemStack(Items.TRIDENT); } public ThrownTrident(Level world, LivingEntity owner, ItemStack stack) { - super(EntityType.TRIDENT, owner, world); + super(EntityType.TRIDENT, owner, world, stack); + this.baseDamage = net.minecraft.world.item.TridentItem.BASE_DAMAGE; // Paper - this.tridentItem = new ItemStack(Items.TRIDENT); - this.tridentItem = stack.copy(); this.entityData.set(ThrownTrident.ID_LOYALTY, (byte) EnchantmentHelper.getLoyalty(stack)); + this.entityData.set(ThrownTrident.ID_FOIL, stack.hasFoil()); + } @@ -0,0 +0,0 @@ public class ThrownTrident extends AbstractArrow { @Override protected void onHitEntity(EntityHitResult entityHitResult) { diff --git a/patches/unapplied/server/Array-backed-synched-entity-data.patch b/patches/server/Array-backed-synched-entity-data.patch similarity index 100% rename from patches/unapplied/server/Array-backed-synched-entity-data.patch rename to patches/server/Array-backed-synched-entity-data.patch diff --git a/patches/unapplied/server/Bandaid-fix-for-Effect.patch b/patches/server/Bandaid-fix-for-Effect.patch similarity index 100% rename from patches/unapplied/server/Bandaid-fix-for-Effect.patch rename to patches/server/Bandaid-fix-for-Effect.patch diff --git a/patches/unapplied/server/Cache-map-ids-on-item-frames.patch b/patches/server/Cache-map-ids-on-item-frames.patch similarity index 100% rename from patches/unapplied/server/Cache-map-ids-on-item-frames.patch rename to patches/server/Cache-map-ids-on-item-frames.patch diff --git a/patches/unapplied/server/Call-BlockGrowEvent-for-missing-blocks.patch b/patches/server/Call-BlockGrowEvent-for-missing-blocks.patch similarity index 100% rename from patches/unapplied/server/Call-BlockGrowEvent-for-missing-blocks.patch rename to patches/server/Call-BlockGrowEvent-for-missing-blocks.patch diff --git a/patches/unapplied/server/Call-BlockRedstoneEvents-for-lecterns.patch b/patches/server/Call-BlockRedstoneEvents-for-lecterns.patch similarity index 100% rename from patches/unapplied/server/Call-BlockRedstoneEvents-for-lecterns.patch rename to patches/server/Call-BlockRedstoneEvents-for-lecterns.patch diff --git a/patches/unapplied/server/Call-missing-BlockDispenseEvent.patch b/patches/server/Call-missing-BlockDispenseEvent.patch similarity index 100% rename from patches/unapplied/server/Call-missing-BlockDispenseEvent.patch rename to patches/server/Call-missing-BlockDispenseEvent.patch diff --git a/patches/unapplied/server/Configurable-Region-Compression-Format.patch b/patches/server/Configurable-Region-Compression-Format.patch similarity index 100% rename from patches/unapplied/server/Configurable-Region-Compression-Format.patch rename to patches/server/Configurable-Region-Compression-Format.patch diff --git a/patches/unapplied/server/Configurable-entity-tracking-range-by-Y-coordinate.patch b/patches/server/Configurable-entity-tracking-range-by-Y-coordinate.patch similarity index 100% rename from patches/unapplied/server/Configurable-entity-tracking-range-by-Y-coordinate.patch rename to patches/server/Configurable-entity-tracking-range-by-Y-coordinate.patch diff --git a/patches/unapplied/server/Configure-sniffer-egg-hatch-time.patch b/patches/server/Configure-sniffer-egg-hatch-time.patch similarity index 100% rename from patches/unapplied/server/Configure-sniffer-egg-hatch-time.patch rename to patches/server/Configure-sniffer-egg-hatch-time.patch diff --git a/patches/unapplied/server/Deep-clone-unhandled-nbt-tags.patch b/patches/server/Deep-clone-unhandled-nbt-tags.patch similarity index 100% rename from patches/unapplied/server/Deep-clone-unhandled-nbt-tags.patch rename to patches/server/Deep-clone-unhandled-nbt-tags.patch diff --git a/patches/unapplied/server/Deprecate-and-replace-methods-with-old-StructureType.patch b/patches/server/Deprecate-and-replace-methods-with-old-StructureType.patch similarity index 100% rename from patches/unapplied/server/Deprecate-and-replace-methods-with-old-StructureType.patch rename to patches/server/Deprecate-and-replace-methods-with-old-StructureType.patch diff --git a/patches/unapplied/server/Determine-lava-and-water-fluid-explosion-resistance-.patch b/patches/server/Determine-lava-and-water-fluid-explosion-resistance-.patch similarity index 100% rename from patches/unapplied/server/Determine-lava-and-water-fluid-explosion-resistance-.patch rename to patches/server/Determine-lava-and-water-fluid-explosion-resistance-.patch diff --git a/patches/unapplied/server/Do-crystal-portal-proximity-check-before-entity-look.patch b/patches/server/Do-crystal-portal-proximity-check-before-entity-look.patch similarity index 100% rename from patches/unapplied/server/Do-crystal-portal-proximity-check-before-entity-look.patch rename to patches/server/Do-crystal-portal-proximity-check-before-entity-look.patch diff --git a/patches/unapplied/server/Do-not-read-tile-entities-in-chunks-that-are-positio.patch b/patches/server/Do-not-read-tile-entities-in-chunks-that-are-positio.patch similarity index 100% rename from patches/unapplied/server/Do-not-read-tile-entities-in-chunks-that-are-positio.patch rename to patches/server/Do-not-read-tile-entities-in-chunks-that-are-positio.patch diff --git a/patches/unapplied/server/Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch b/patches/server/Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch similarity index 100% rename from patches/unapplied/server/Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch rename to patches/server/Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch diff --git a/patches/unapplied/server/Don-t-load-chunks-for-supporting-block-checks.patch b/patches/server/Don-t-load-chunks-for-supporting-block-checks.patch similarity index 96% rename from patches/unapplied/server/Don-t-load-chunks-for-supporting-block-checks.patch rename to patches/server/Don-t-load-chunks-for-supporting-block-checks.patch index 98d9648bb1..27da5ec9fb 100644 --- a/patches/unapplied/server/Don-t-load-chunks-for-supporting-block-checks.patch +++ b/patches/server/Don-t-load-chunks-for-supporting-block-checks.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } protected BlockPos getOnPos(float offset) { diff --git a/patches/unapplied/server/Don-t-tab-complete-namespaced-commands-if-send-names.patch b/patches/server/Don-t-tab-complete-namespaced-commands-if-send-names.patch similarity index 100% rename from patches/unapplied/server/Don-t-tab-complete-namespaced-commands-if-send-names.patch rename to patches/server/Don-t-tab-complete-namespaced-commands-if-send-names.patch diff --git a/patches/unapplied/server/Don-t-tick-signs.patch b/patches/server/Don-t-tick-signs.patch similarity index 100% rename from patches/unapplied/server/Don-t-tick-signs.patch rename to patches/server/Don-t-tick-signs.patch diff --git a/patches/unapplied/server/Expand-Pose-API.patch b/patches/server/Expand-Pose-API.patch similarity index 97% rename from patches/unapplied/server/Expand-Pose-API.patch rename to patches/server/Expand-Pose-API.patch index 4b0741d583..994dfdb784 100644 --- a/patches/unapplied/server/Expand-Pose-API.patch +++ b/patches/server/Expand-Pose-API.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S private UUID originWorld; public boolean freezeLocked = false; // Paper - Freeze Tick Lock API public boolean collidingWithWorldBorder; // Paper @@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public void setOrigin(@javax.annotation.Nonnull Location location) { this.origin = location.toVector(); -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S public void onClientRemoval() {} public void setPose(net.minecraft.world.entity.Pose pose) { diff --git a/patches/unapplied/server/ExperienceOrb-should-call-EntitySpawnEvent.patch b/patches/server/ExperienceOrb-should-call-EntitySpawnEvent.patch similarity index 84% rename from patches/unapplied/server/ExperienceOrb-should-call-EntitySpawnEvent.patch rename to patches/server/ExperienceOrb-should-call-EntitySpawnEvent.patch index 17fd860e90..9ca95e1f0b 100644 --- a/patches/unapplied/server/ExperienceOrb-should-call-EntitySpawnEvent.patch +++ b/patches/server/ExperienceOrb-should-call-EntitySpawnEvent.patch @@ -9,14 +9,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -0,0 +0,0 @@ public class CraftEventFactory { - } else if (entity instanceof net.minecraft.world.entity.ExperienceOrb) { - net.minecraft.world.entity.ExperienceOrb xp = (net.minecraft.world.entity.ExperienceOrb) entity; + // Spigot start - SPIGOT-7523: Merge after spawn event and only merge if the event was not cancelled (gets checked above) + if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) { double radius = world.spigotConfig.expMerge; - if (radius > 0) { + // Paper start - Call EntitySpawnEvent for ExperienceOrb entities. + event = CraftEventFactory.callEntitySpawnEvent(entity); + if (radius > 0 && !event.isCancelled() && !entity.isRemoved()) { -+ // Paper end ++ // Paper end // Paper start - Maximum exp value when merging - Whole section has been tweaked, see comments for specifics final int maxValue = world.paperConfig().entities.behavior.experienceMergeMaxValue; final boolean mergeUnconditionally = world.paperConfig().entities.behavior.experienceMergeMaxValue <= 0; diff --git a/patches/unapplied/server/Expose-clicked-BlockFace-during-BlockDamageEvent.patch b/patches/server/Expose-clicked-BlockFace-during-BlockDamageEvent.patch similarity index 100% rename from patches/unapplied/server/Expose-clicked-BlockFace-during-BlockDamageEvent.patch rename to patches/server/Expose-clicked-BlockFace-during-BlockDamageEvent.patch diff --git a/patches/unapplied/server/Expose-hand-during-BlockCanBuildEvent.patch b/patches/server/Expose-hand-during-BlockCanBuildEvent.patch similarity index 100% rename from patches/unapplied/server/Expose-hand-during-BlockCanBuildEvent.patch rename to patches/server/Expose-hand-during-BlockCanBuildEvent.patch diff --git a/patches/unapplied/server/Fire-entity-death-event-for-ender-dragon.patch b/patches/server/Fire-entity-death-event-for-ender-dragon.patch similarity index 100% rename from patches/unapplied/server/Fire-entity-death-event-for-ender-dragon.patch rename to patches/server/Fire-entity-death-event-for-ender-dragon.patch diff --git a/patches/unapplied/server/Fix-BanList-API.patch b/patches/server/Fix-BanList-API.patch similarity index 100% rename from patches/unapplied/server/Fix-BanList-API.patch rename to patches/server/Fix-BanList-API.patch diff --git a/patches/unapplied/server/Fix-NPE-on-Boat-getStatus.patch b/patches/server/Fix-NPE-on-Boat-getStatus.patch similarity index 100% rename from patches/unapplied/server/Fix-NPE-on-Boat-getStatus.patch rename to patches/server/Fix-NPE-on-Boat-getStatus.patch diff --git a/patches/unapplied/server/Fix-custom-statistic-criteria-creation.patch b/patches/server/Fix-custom-statistic-criteria-creation.patch similarity index 100% rename from patches/unapplied/server/Fix-custom-statistic-criteria-creation.patch rename to patches/server/Fix-custom-statistic-criteria-creation.patch diff --git a/patches/unapplied/server/Fix-incorrect-crafting-result-amount-for-fireworks.patch b/patches/server/Fix-incorrect-crafting-result-amount-for-fireworks.patch similarity index 100% rename from patches/unapplied/server/Fix-incorrect-crafting-result-amount-for-fireworks.patch rename to patches/server/Fix-incorrect-crafting-result-amount-for-fireworks.patch diff --git a/patches/unapplied/server/Fix-inventory-desync.patch b/patches/server/Fix-inventory-desync.patch similarity index 100% rename from patches/unapplied/server/Fix-inventory-desync.patch rename to patches/server/Fix-inventory-desync.patch diff --git a/patches/unapplied/server/Fix-possible-NPE-on-painting-creation.patch b/patches/server/Fix-possible-NPE-on-painting-creation.patch similarity index 100% rename from patches/unapplied/server/Fix-possible-NPE-on-painting-creation.patch rename to patches/server/Fix-possible-NPE-on-painting-creation.patch diff --git a/patches/unapplied/server/Fix-rotation-when-spawning-display-entities.patch b/patches/server/Fix-rotation-when-spawning-display-entities.patch similarity index 100% rename from patches/unapplied/server/Fix-rotation-when-spawning-display-entities.patch rename to patches/server/Fix-rotation-when-spawning-display-entities.patch diff --git a/patches/unapplied/server/Fix-silent-equipment-change-for-mobs.patch b/patches/server/Fix-silent-equipment-change-for-mobs.patch similarity index 100% rename from patches/unapplied/server/Fix-silent-equipment-change-for-mobs.patch rename to patches/server/Fix-silent-equipment-change-for-mobs.patch diff --git a/patches/unapplied/server/Fix-sniffer-removeExploredLocation.patch b/patches/server/Fix-sniffer-removeExploredLocation.patch similarity index 100% rename from patches/unapplied/server/Fix-sniffer-removeExploredLocation.patch rename to patches/server/Fix-sniffer-removeExploredLocation.patch diff --git a/patches/unapplied/server/Fix-spigot-s-Forced-Stats.patch b/patches/server/Fix-spigot-s-Forced-Stats.patch similarity index 100% rename from patches/unapplied/server/Fix-spigot-s-Forced-Stats.patch rename to patches/server/Fix-spigot-s-Forced-Stats.patch diff --git a/patches/unapplied/server/Folia-scheduler-and-owned-region-API.patch b/patches/server/Folia-scheduler-and-owned-region-API.patch similarity index 99% rename from patches/unapplied/server/Folia-scheduler-and-owned-region-API.patch rename to patches/server/Folia-scheduler-and-owned-region-API.patch index 7f10810e56..a95ee2c60c 100644 --- a/patches/unapplied/server/Folia-scheduler-and-owned-region-API.patch +++ b/patches/server/Folia-scheduler-and-owned-region-API.patch @@ -1161,7 +1161,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S public @Nullable Throwable addedToWorldStack; // Paper - entity debug public CraftEntity getBukkitEntity() { if (this.bukkitEntity == null) { @@ -1186,7 +1186,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override public CommandSender getBukkitSender(CommandSourceStack wrapper) { return this.getBukkitEntity(); -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S return; } // Paper end - rewrite chunk system @@ -1194,7 +1194,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (this.removalReason == null) { this.removalReason = reason; } -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S if (reason != RemovalReason.UNLOADED_TO_CHUNK) this.getPassengers().forEach(Entity::stopRiding); // Paper - chunk system - don't adjust passenger state when unloading, it's just not safe (and messes with our logic in entity chunk unload) this.levelCallback.onRemove(reason); diff --git a/patches/unapplied/server/Implement-OfflinePlayer-isConnected.patch b/patches/server/Implement-OfflinePlayer-isConnected.patch similarity index 100% rename from patches/unapplied/server/Implement-OfflinePlayer-isConnected.patch rename to patches/server/Implement-OfflinePlayer-isConnected.patch diff --git a/patches/unapplied/server/Implement-PlayerFailMoveEvent.patch b/patches/server/Implement-PlayerFailMoveEvent.patch similarity index 80% rename from patches/unapplied/server/Implement-PlayerFailMoveEvent.patch rename to patches/server/Implement-PlayerFailMoveEvent.patch index d361f1b402..789f07abfb 100644 --- a/patches/unapplied/server/Implement-PlayerFailMoveEvent.patch +++ b/patches/server/Implement-PlayerFailMoveEvent.patch @@ -20,7 +20,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (this.player.isPassenger()) { this.player.absMoveTo(this.player.getX(), this.player.getY(), this.player.getZ(), f, f1); @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl - } + } // Paper start - Prevent moving into unloaded chunks if (this.player.level().paperConfig().chunks.preventMovingIntoUnloadedChunks && (this.player.getX() != toX || this.player.getZ() != toZ) && !worldserver.areChunksLoadedForMove(this.player.getBoundingBox().expandTowards(new Vec3(toX, toY, toZ).subtract(this.player.position())))) { + // Paper start - Add fail move event @@ -36,21 +36,30 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl - if (d10 - d9 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) { - // CraftBukkit end -+ // Paper start - Add fail move event -+ io.papermc.paper.event.player.PlayerFailMoveEvent event = fireFailMove(io.papermc.paper.event.player.PlayerFailMoveEvent.FailReason.MOVED_TOO_QUICKLY, -+ toX, toY, toZ, toYaw, toPitch, true); -+ if (!event.isAllowed()) { -+ if (event.getLogWarning()) - ServerGamePacketListenerImpl.LOGGER.warn("{} moved too quickly! {},{},{}", new Object[]{this.player.getName().getString(), d6, d7, d8}); - this.teleport(this.player.getX(), this.player.getY(), this.player.getZ(), this.player.getYRot(), this.player.getXRot()); + if (d10 - d9 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) { + // CraftBukkit end ++ // Paper start - Add fail move event ++ io.papermc.paper.event.player.PlayerFailMoveEvent event = fireFailMove(io.papermc.paper.event.player.PlayerFailMoveEvent.FailReason.MOVED_TOO_QUICKLY, ++ toX, toY, toZ, toYaw, toPitch, true); ++ if (!event.isAllowed()) { ++ if (event.getLogWarning()) + ServerGamePacketListenerImpl.LOGGER.warn("{} moved too quickly! {},{},{}", new Object[]{this.player.getName().getString(), d6, d7, d8}); + this.teleport(this.player.getX(), this.player.getY(), this.player.getZ(), this.player.getYRot(), this.player.getXRot()); + return; ++ } ++ // Paper end + } + } + } +@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl + from = event.getFrom(); + this.internalTeleport(from.getX(), from.getY(), from.getZ(), from.getYaw(), from.getPitch(), Collections.emptySet()); return; + } + // Paper end } + // Paper end } - @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl boolean flag2 = false; diff --git a/patches/unapplied/server/Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch b/patches/server/Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch similarity index 79% rename from patches/unapplied/server/Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch rename to patches/server/Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch index 43c6096955..4ccf8da729 100644 --- a/patches/unapplied/server/Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch +++ b/patches/server/Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch @@ -42,24 +42,24 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource { - if ((this.spawnFriendlies || this.spawnEnemies) && this.level.paperConfig().entities.spawning.perPlayerMobSpawns) { // don't count mobs when animals and monsters are disabled - // re-set mob counts - for (ServerPlayer player : this.level.players) { -- Arrays.fill(player.mobCounts, 0); -+ // Paper start - per player mob spawning backoff -+ for (int ii = 0; ii < ServerPlayer.MOBCATEGORY_TOTAL_ENUMS; ii++) { -+ player.mobCounts[ii] = 0; + if ((this.spawnFriendlies || this.spawnEnemies) && this.level.paperConfig().entities.spawning.perPlayerMobSpawns) { // don't count mobs when animals and monsters are disabled + // re-set mob counts + for (ServerPlayer player : this.level.players) { +- Arrays.fill(player.mobCounts, 0); ++ // Paper start - per player mob spawning backoff ++ for (int ii = 0; ii < ServerPlayer.MOBCATEGORY_TOTAL_ENUMS; ii++) { ++ player.mobCounts[ii] = 0; + -+ int newBackoff = player.mobBackoffCounts[ii] - 1; // TODO make configurable bleed // TODO use nonlinear algorithm? -+ if (newBackoff < 0) { -+ newBackoff = 0; ++ int newBackoff = player.mobBackoffCounts[ii] - 1; // TODO make configurable bleed // TODO use nonlinear algorithm? ++ if (newBackoff < 0) { ++ newBackoff = 0; ++ } ++ player.mobBackoffCounts[ii] = newBackoff; + } -+ player.mobBackoffCounts[ii] = newBackoff; -+ } -+ // Paper end - per player mob spawning backoff - } - spawnercreature_d = NaturalSpawner.createState(l, this.level.getAllEntities(), this::getFullChunk, null, true); - } else { ++ // Paper end - per player mob spawning backoff + } + spawnercreature_d = NaturalSpawner.createState(naturalSpawnChunkCount, this.level.getAllEntities(), this::getFullChunk, null, true); + } else { 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 diff --git a/patches/unapplied/server/Improve-command-function-perm-level-checks.patch b/patches/server/Improve-command-function-perm-level-checks.patch similarity index 93% rename from patches/unapplied/server/Improve-command-function-perm-level-checks.patch rename to patches/server/Improve-command-function-perm-level-checks.patch index 84cd183774..6185167d56 100644 --- a/patches/unapplied/server/Improve-command-function-perm-level-checks.patch +++ b/patches/server/Improve-command-function-perm-level-checks.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/ index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/commands/CommandSourceStack.java +++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java -@@ -0,0 +0,0 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy +@@ -0,0 +0,0 @@ public class CommandSourceStack implements ExecutionCommandSource