From 4bc15f13aa210a361e2b163dd9e901b9129f3b17 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Sat, 15 Jun 2024 18:28:18 +0200 Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit) Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: e2160a18 Make MapCursor#type not depends on deprecated values CraftBukkit Changes: 6ce172642 SPIGOT-7761: Ender pearl does not damage or spawn endermites f5a63f734 SPIGOT-7759: Chunk not there when requested in ChunkUnloadEvent 28287259c Remove unused import eb9a7dde0 SPIGOT-7757: Cannot set item in Stonecutter Inventory f8be9d752 Move deserialized removed unhandled tags to dedicated removedTags a7e576186 Fix potential mutability issue with CraftMetaItem copy constructor 995885452 SPIGOT-7741: Vanilla ItemComponent in commands can't remove components 9ef69aa0b PR-1284: Move ItemType <-> ItemMeta linking to a centralized place 3e82eafbe PR-1420: Fix DirectEntity and CausingEntity Damager for Creepers ignited by Player c23daa71f SPIGOT-7751: Fix crash caused by arrows from trial spawners Make MapCursor#type not depends on deprecated values SPIGOT-7761: Ender pearl does not damage or spawn endermites --- patches/api/0006-Adventure.patch | 50 +-- .../0166-Fix-Spigot-annotation-mistakes.patch | 16 +- ...add-missing-Experimental-annotations.patch | 4 +- ...Allow-to-define-new-map-cursor-types.patch | 30 -- ...atch => 0474-General-ItemMeta-fixes.patch} | 0 ...475-Add-missing-fishing-event-state.patch} | 0 ...ate-InvAction-HOTBAR_MOVE_AND_READD.patch} | 0 patches/server/0004-Test-changes.patch | 6 +- patches/server/0009-MC-Utils.patch | 24 +- patches/server/0010-Adventure.patch | 20 +- patches/server/0019-Paper-Plugins.patch | 4 +- patches/server/0023-Timings-v2.patch | 6 +- .../0027-Support-components-in-ItemMeta.patch | 10 +- .../0052-Use-UserCache-for-player-heads.patch | 4 +- ...056-Improve-Player-chat-API-handling.patch | 2 +- ...oreboards-for-non-players-by-default.patch | 2 +- ...071-Handle-Item-Meta-Inconsistencies.patch | 18 +- ...urable-Non-Player-Arrow-Despawn-Rate.patch | 2 +- ...4-Custom-replacement-for-eaten-items.patch | 2 +- ...th-absorb-values-and-repair-bad-data.patch | 2 +- ...0084-Add-PlayerUseUnknownEntityEvent.patch | 2 +- ...ityRegainHealthEvent-isFastRegen-API.patch | 2 +- ...onfigurable-packet-in-spam-threshold.patch | 2 +- ...08-Configurable-flying-kick-messages.patch | 2 +- ...PI-for-Reason-Source-Triggering-play.patch | 2 +- .../server/0127-Cap-Entity-Collisions.patch | 2 +- ...ke-parrots-stay-on-shoulders-despite.patch | 2 +- ...urable-option-to-disable-creeper-lin.patch | 2 +- .../0144-ensureServerConversions-API.patch | 4 +- .../0145-Implement-getI18NDisplayName.patch | 4 +- patches/server/0152-Add-PlayerJumpEvent.patch | 2 +- .../0157-Add-PlayerArmorChangeEvent.patch | 2 +- .../server/0162-AsyncTabCompleteEvent.patch | 2 +- ...5-PlayerNaturallySpawnCreaturesEvent.patch | 2 +- ...-Add-setPlayerProfile-API-for-Skulls.patch | 10 +- .../0170-Add-ArmorStand-Item-Meta.patch | 33 +- .../0177-Player.setPlayerProfile-API.patch | 2 +- ...0194-ItemStack-getMaxItemUseDuration.patch | 2 +- ...ed-flag-on-cancel-of-Explosion-Event.patch | 2 +- ...e-shield-blocking-delay-configurable.patch | 2 +- .../0203-Add-entity-knockback-events.patch | 4 +- .../0209-InventoryCloseEvent-Reason-API.patch | 2 +- ...nventory-when-cancelling-PlayerInter.patch | 2 +- ...nd-make-tab-spam-limits-configurable.patch | 2 +- .../server/0239-Add-More-Creeper-API.patch | 2 +- ...-ray-tracing-methods-to-LivingEntity.patch | 2 +- .../server/0244-Improve-death-events.patch | 2 +- ...254-Add-LivingEntity-getTargetEntity.patch | 2 +- ...event-players-from-moving-into-unloa.patch | 2 +- ...store-custom-InventoryHolder-support.patch | 8 +- ...t-allow-digging-into-unloaded-chunks.patch | 2 +- ...entity-dismount-during-teleportation.patch | 2 +- patches/server/0271-Book-Size-Limits.patch | 2 +- .../server/0278-Brigadier-Mojang-API.patch | 2 +- .../0280-Limit-Client-Sign-length-more.patch | 2 +- ...revent-consuming-the-wrong-itemstack.patch | 2 +- ...e-getChunkAt-calls-for-loaded-chunks.patch | 2 +- .../0316-Add-debug-for-sync-chunk-loads.patch | 2 +- patches/server/0319-Entity-Jump-API.patch | 2 +- ...-entity-collision-code-if-not-needed.patch | 2 +- ...PlayerAttackEntityCooldownResetEvent.patch | 2 +- ...item-duplication-and-teleport-issues.patch | 2 +- ...PickItem-Packet-and-kick-for-invalid.patch | 2 +- ...55-Prevent-teleporting-dead-entities.patch | 2 +- ...t-position-desync-causing-tp-exploit.patch | 2 +- .../0372-Add-PlayerRecipeBookClickEvent.patch | 2 +- ...74-Add-permission-for-command-blocks.patch | 2 +- ...ld-Difficulty-Remembering-Difficulty.patch | 2 +- ...0-Add-BlockStateMeta-clearBlockState.patch | 4 +- ...nvert-legacy-attributes-in-Item-Meta.patch | 4 +- ...o-not-accept-invalid-client-settings.patch | 2 +- ...k-for-portal-on-world-gen-entity-add.patch | 2 +- ...ix-arrows-never-despawning-MC-125757.patch | 2 +- ...-Add-methods-to-get-translation-keys.patch | 8 +- ...ate-HoverEvent-from-ItemStack-Entity.patch | 4 +- ...ortation-and-cancel-velocity-if-tele.patch | 2 +- ...r-large-move-vectors-crashing-server.patch | 2 +- ...-should-not-bypass-cramming-gamerule.patch | 2 +- .../server/0445-Limit-recipe-packets.patch | 2 +- ...act-event-not-being-called-sometimes.patch | 2 +- ...gistryAccess-for-managing-Registries.patch | 8 +- patches/server/0489-Add-EntityMoveEvent.patch | 2 +- ...-using-signs-inside-spawn-protection.patch | 2 +- ...ignore-result-of-PlayerEditBookEvent.patch | 2 +- ...ItemConsumeEvent-cancelling-properly.patch | 2 +- ...fix-PlayerItemHeldEvent-firing-twice.patch | 2 +- ...536-Expand-PlayerGameModeChangeEvent.patch | 2 +- ...ove-range-check-for-block-placing-up.patch | 2 +- .../0542-Add-Unix-domain-socket-support.patch | 2 +- ...4-Improve-item-default-attribute-API.patch | 4 +- .../0548-Add-PlayerKickEvent-causes.patch | 2 +- .../server/0557-Line-Of-Sight-Changes.patch | 2 +- ...nect-for-book-edit-is-called-on-main.patch | 2 +- .../server/0567-Add-PlayerArmSwingEvent.patch | 2 +- ...k-event-leave-message-not-being-sent.patch | 2 +- ...-AFK-kick-while-watching-end-credits.patch | 2 +- ...0593-Add-ItemFactory-getSpawnEgg-API.patch | 4 +- .../server/0594-Add-critical-damage-API.patch | 6 +- ...0603-Improve-and-expand-AsyncCatcher.patch | 4 +- ...-ServerboundCommandSuggestionPacket-.patch | 2 +- ...rnColor-on-tropical-fish-bucket-meta.patch | 4 +- ...sive-velocity-through-repeated-crits.patch | 2 +- .../server/0661-Freeze-Tick-Lock-API.patch | 2 +- ...rojectileHitEvent-for-piercing-arrow.patch | 2 +- patches/server/0680-More-Projectile-API.patch | 29 +- ...cle-movement-from-players-while-tele.patch | 2 +- ...0685-Implement-enchantWithLevels-API.patch | 4 +- ...nt-tile-entity-copies-loading-chunks.patch | 2 +- .../0704-Add-PlayerStopUsingItemEvent.patch | 2 +- ...shPotion-and-LingeringPotion-spawnin.patch | 2 +- ...g-not-using-commands.spam-exclusions.patch | 2 +- patches/server/0727-More-Teleport-API.patch | 4 +- ...ck-entities-after-destroy-prediction.patch | 2 +- ...ook-changes-from-crashing-the-server.patch | 2 +- ...global-player-list-where-appropriate.patch | 2 +- patches/server/0777-Friction-API.patch | 2 +- .../0789-Improve-logging-and-errors.patch | 2 +- ...ssing-SpigotConfig-logCommands-check.patch | 2 +- ...le-player-info-update-packet-on-join.patch | 2 +- ...nk-items-during-EntityResurrectEvent.patch | 2 +- ...tItemStack-setAmount-null-assignment.patch | 2 +- ...vancement-triggers-for-entity-damage.patch | 2 +- ...-Fix-SpawnEggMeta-get-setSpawnedType.patch | 4 +- ...uence-violations-like-they-should-be.patch | 2 +- ...expired-keys-from-impacting-new-join.patch | 2 +- ...43-fix-item-meta-for-tadpole-buckets.patch | 37 +- .../0851-Implement-PlayerFailMoveEvent.patch | 2 +- ...te-namespaced-commands-if-send-names.patch | 2 +- .../server/0877-Add-PlayerPickItemEvent.patch | 2 +- ...ot-sanity-checks-in-container-clicks.patch | 2 +- ...proper-checking-of-empty-item-stacks.patch | 2 +- ...ta-when-attaching-firework-to-entity.patch | 2 +- ...tem-packets-with-collector-as-source.patch | 2 +- ...n-t-fire-sync-events-during-worldgen.patch | 2 +- ...m-getAttributeModifier-duplication-c.patch | 4 +- ...estore-vanilla-entity-drops-behavior.patch | 2 +- ...-on-null-loc-for-EntityTeleportEvent.patch | 2 +- .../0925-Add-drops-to-shear-events.patch | 2 +- ...date-ResourceLocation-in-NBT-reading.patch | 4 +- .../0929-Fixup-NamespacedKey-handling.patch | 12 +- .../0943-Deprecate-ItemStack-setType.patch | 4 +- .../0944-Add-CartographyItemEvent.patch | 2 +- .../server/0951-Fix-DamageSource-API.patch | 45 +- .../0954-Improve-tag-parser-handling.patch | 2 +- .../0961-Deep-clone-nbt-tags-in-PDC.patch | 12 +- ...963-Fix-shield-disable-inconsistency.patch | 2 +- ...-removed-data-components-in-ItemMeta.patch | 16 +- patches/server/0966-Fix-ItemFlags.patch | 57 ++- ...a-handling-of-LivingEntity-actuallyH.patch | 2 +- ...ve-checking-handled-tags-in-itemmeta.patch | 402 ++++++++++-------- .../server/0970-General-ItemMeta-fixes.patch | 221 +++++----- ...971-Expose-hasColor-to-leather-armor.patch | 8 +- .../0975-Brigadier-based-command-API.patch | 6 +- .../0976-Fix-issues-with-Recipe-API.patch | 4 +- ...977-Fix-equipment-slot-and-group-API.patch | 6 +- ...oversized-item-data-in-equipment-and.patch | 4 +- ...cate-InvAction-HOTBAR_MOVE_AND_READD.patch | 2 +- .../0986-Suspicious-Effect-Entry-API.patch | 18 +- ...Chunk-System-Starlight-from-Moonrise.patch | 55 +-- ...cing-for-EntityLiving-hasLineOfSight.patch | 2 +- .../0999-Optional-per-player-mob-spawns.patch | 4 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 163 files changed, 758 insertions(+), 725 deletions(-) delete mode 100644 patches/api/0474-Allow-to-define-new-map-cursor-types.patch rename patches/api/{0475-General-ItemMeta-fixes.patch => 0474-General-ItemMeta-fixes.patch} (100%) rename patches/api/{0476-Add-missing-fishing-event-state.patch => 0475-Add-missing-fishing-event-state.patch} (100%) rename patches/api/{0477-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch => 0476-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch} (100%) diff --git a/patches/api/0006-Adventure.patch b/patches/api/0006-Adventure.patch index 9e9943a174..f52397b4f8 100644 --- a/patches/api/0006-Adventure.patch +++ b/patches/api/0006-Adventure.patch @@ -4804,19 +4804,19 @@ index bd512a7840d4686759097ee4cbd8b375c530956b..f2242ddc4085f7e7cdd748d860857822 + // Paper end - adventure } diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java -index 7736ef1020b658206056af02fdb8c04de2d55541..4e84e3c5d0fa23bbb063d8429c18abcd7ee6b82a 100644 +index e645a65dbd3340a86f5325dbfd515e0a99f31ab0..940066ec529acc4cb9c8136f15345f100ea9467e 100644 --- a/src/main/java/org/bukkit/map/MapCursor.java +++ b/src/main/java/org/bukkit/map/MapCursor.java -@@ -12,7 +12,7 @@ public final class MapCursor { +@@ -13,7 +13,7 @@ public final class MapCursor { private byte x, y; - private byte direction, type; + private byte direction; private boolean visible; - private String caption; + private net.kyori.adventure.text.Component caption; // Paper + private Type type; /** - * Initialize the map cursor. -@@ -26,7 +26,7 @@ public final class MapCursor { +@@ -28,7 +28,7 @@ public final class MapCursor { */ @Deprecated public MapCursor(byte x, byte y, byte direction, byte type, boolean visible) { @@ -4825,7 +4825,7 @@ index 7736ef1020b658206056af02fdb8c04de2d55541..4e84e3c5d0fa23bbb063d8429c18abcd } /** -@@ -39,7 +39,7 @@ public final class MapCursor { +@@ -41,7 +41,7 @@ public final class MapCursor { * @param visible Whether the cursor is visible by default. */ public MapCursor(byte x, byte y, byte direction, @NotNull Type type, boolean visible) { @@ -4834,22 +4834,22 @@ index 7736ef1020b658206056af02fdb8c04de2d55541..4e84e3c5d0fa23bbb063d8429c18abcd } /** -@@ -51,7 +51,7 @@ public final class MapCursor { +@@ -53,7 +53,7 @@ public final class MapCursor { * @param type The type (color/style) of the map cursor. * @param visible Whether the cursor is visible by default. * @param caption cursor caption -- * @deprecated Magic value -+ * @deprecated Magic value. Use {@link #MapCursor(byte, byte, byte, byte, boolean, net.kyori.adventure.text.Component)} +- * @deprecated Magic value, use {@link #MapCursor(byte, byte, byte, Type, boolean, String)} ++ * @deprecated Magic value. Use {@link #MapCursor(byte, byte, byte, Type, boolean, net.kyori.adventure.text.Component)} */ @Deprecated public MapCursor(byte x, byte y, byte direction, byte type, boolean visible, @Nullable String caption) { -@@ -60,8 +60,42 @@ public final class MapCursor { +@@ -62,8 +62,42 @@ public final class MapCursor { setDirection(direction); setRawType(type); this.visible = visible; - this.caption = caption; + this.caption = caption == null ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(caption); // Paper - } ++ } + // Paper start + /** + * Initialize the map cursor. @@ -4867,7 +4867,7 @@ index 7736ef1020b658206056af02fdb8c04de2d55541..4e84e3c5d0fa23bbb063d8429c18abcd + this.x = x; this.y = y; this.visible = visible; this.caption = caption; + setDirection(direction); + setRawType(type); -+ } + } + /** + * Initialize the map cursor. + * @@ -4887,25 +4887,25 @@ index 7736ef1020b658206056af02fdb8c04de2d55541..4e84e3c5d0fa23bbb063d8429c18abcd /** * Initialize the map cursor. -@@ -79,7 +113,7 @@ public final class MapCursor { +@@ -81,7 +115,7 @@ public final class MapCursor { setDirection(direction); - setType(type); + this.type = type; this.visible = visible; - this.caption = caption; + this.caption = caption == null ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(caption); // Paper } /** -@@ -202,23 +236,45 @@ public final class MapCursor { +@@ -200,23 +234,45 @@ public final class MapCursor { this.visible = visible; } + // Paper start -+ /** -+ * Gets the caption on this cursor. -+ * -+ * @return caption -+ */ + /** + * Gets the caption on this cursor. + * + * @return caption + */ + public net.kyori.adventure.text.@Nullable Component caption() { + return this.caption; + } @@ -4918,12 +4918,12 @@ index 7736ef1020b658206056af02fdb8c04de2d55541..4e84e3c5d0fa23bbb063d8429c18abcd + this.caption = caption; + } + // Paper end - /** - * Gets the caption on this cursor. - * - * @return caption ++ /** ++ * Gets the caption on this cursor. ++ * ++ * @return caption + * @deprecated in favour of {@link #caption()} - */ ++ */ @Nullable + @Deprecated // Paper public String getCaption() { diff --git a/patches/api/0166-Fix-Spigot-annotation-mistakes.patch b/patches/api/0166-Fix-Spigot-annotation-mistakes.patch index 0f7be3c617..02217b6f29 100644 --- a/patches/api/0166-Fix-Spigot-annotation-mistakes.patch +++ b/patches/api/0166-Fix-Spigot-annotation-mistakes.patch @@ -1677,10 +1677,10 @@ index edef478786bb7456af29ca960009873095830050..e8ac449e6280827beb6d2699df75b1d5 /** diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java -index 4e84e3c5d0fa23bbb063d8429c18abcd7ee6b82a..a17b755da4eca0370680a9777ff3c7de422f5079 100644 +index 940066ec529acc4cb9c8136f15345f100ea9467e..82993302cb3cf62ad4a94a0ebaa7711cc4d8e550 100644 --- a/src/main/java/org/bukkit/map/MapCursor.java +++ b/src/main/java/org/bukkit/map/MapCursor.java -@@ -158,9 +158,9 @@ public final class MapCursor { +@@ -159,9 +159,9 @@ public final class MapCursor { * Get the type of this cursor. * * @return The type (color/style) of the map cursor. @@ -1690,9 +1690,9 @@ index 4e84e3c5d0fa23bbb063d8429c18abcd7ee6b82a..a17b755da4eca0370680a9777ff3c7de - @Deprecated + @org.jetbrains.annotations.ApiStatus.Internal // Paper public byte getRawType() { - return type; + return type.value; } -@@ -217,9 +217,9 @@ public final class MapCursor { +@@ -216,9 +216,9 @@ public final class MapCursor { * Set the type of this cursor. * * @param type The type (color/style) of the map cursor. @@ -1702,9 +1702,9 @@ index 4e84e3c5d0fa23bbb063d8429c18abcd7ee6b82a..a17b755da4eca0370680a9777ff3c7de - @Deprecated + @Deprecated(forRemoval = true, since = "1.20.2") // Paper public void setRawType(byte type) { - if (type < 0 || type > 34) { - throw new IllegalArgumentException("Type must be in the range 0-34"); -@@ -339,9 +339,9 @@ public final class MapCursor { + Type enumType = Type.byValue(type); + Preconditions.checkArgument(enumType != null, "Unknown type by id %s", type); +@@ -337,9 +337,9 @@ public final class MapCursor { * Gets the internal value of the cursor. * * @return the value @@ -1716,7 +1716,7 @@ index 4e84e3c5d0fa23bbb063d8429c18abcd7ee6b82a..a17b755da4eca0370680a9777ff3c7de public byte getValue() { return value; } -@@ -351,9 +351,9 @@ public final class MapCursor { +@@ -349,9 +349,9 @@ public final class MapCursor { * * @param value the value * @return the matching type diff --git a/patches/api/0432-add-missing-Experimental-annotations.patch b/patches/api/0432-add-missing-Experimental-annotations.patch index b21d99ebd5..5646e558f5 100644 --- a/patches/api/0432-add-missing-Experimental-annotations.patch +++ b/patches/api/0432-add-missing-Experimental-annotations.patch @@ -81,10 +81,10 @@ index e404cd1e2ba44e4c2d09524bc7cf730d8ffbdabd..cea0ebf50876dd32ab7fba6025b30f29 public interface BundleMeta extends ItemMeta { diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java -index a17b755da4eca0370680a9777ff3c7de422f5079..aa3b84ef523cd493b89159ed9d81fc19c2285709 100644 +index 82993302cb3cf62ad4a94a0ebaa7711cc4d8e550..44773ab211f11e924aadea14b965ec52b0483377 100644 --- a/src/main/java/org/bukkit/map/MapCursor.java +++ b/src/main/java/org/bukkit/map/MapCursor.java -@@ -311,12 +311,25 @@ public final class MapCursor { +@@ -309,12 +309,25 @@ public final class MapCursor { BANNER_RED(24, "banner_red"), BANNER_BLACK(25, "banner_black"), RED_X(26, "red_x"), diff --git a/patches/api/0474-Allow-to-define-new-map-cursor-types.patch b/patches/api/0474-Allow-to-define-new-map-cursor-types.patch deleted file mode 100644 index 4d94dad296..0000000000 --- a/patches/api/0474-Allow-to-define-new-map-cursor-types.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> -Date: Fri, 24 May 2024 20:19:07 +0200 -Subject: [PATCH] Allow to define new map cursor types - - -diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java -index aa3b84ef523cd493b89159ed9d81fc19c2285709..21bc42ea602c7cc4eab5f9ac59a7e539131a2254 100644 ---- a/src/main/java/org/bukkit/map/MapCursor.java -+++ b/src/main/java/org/bukkit/map/MapCursor.java -@@ -221,8 +221,8 @@ public final class MapCursor { - */ - @Deprecated(forRemoval = true, since = "1.20.2") // Paper - public void setRawType(byte type) { -- if (type < 0 || type > 34) { -- throw new IllegalArgumentException("Type must be in the range 0-34"); -+ if (type < 0 || type > Type.UPPER_MAP_CURSOR_TYPE_BOUND) { // Paper -+ throw new IllegalArgumentException("Type must be in the range 0-" + Type.UPPER_MAP_CURSOR_TYPE_BOUND); // Paper - } - this.type = type; - } -@@ -334,6 +334,8 @@ public final class MapCursor { - TRIAL_CHAMBERS(34, "trial_chambers") - ; - -+ static final int UPPER_MAP_CURSOR_TYPE_BOUND = Type.values().length - 1; // Paper - cached max value of Type -+ - private byte value; - private final NamespacedKey key; - diff --git a/patches/api/0475-General-ItemMeta-fixes.patch b/patches/api/0474-General-ItemMeta-fixes.patch similarity index 100% rename from patches/api/0475-General-ItemMeta-fixes.patch rename to patches/api/0474-General-ItemMeta-fixes.patch diff --git a/patches/api/0476-Add-missing-fishing-event-state.patch b/patches/api/0475-Add-missing-fishing-event-state.patch similarity index 100% rename from patches/api/0476-Add-missing-fishing-event-state.patch rename to patches/api/0475-Add-missing-fishing-event-state.patch diff --git a/patches/api/0477-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch b/patches/api/0476-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch similarity index 100% rename from patches/api/0477-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch rename to patches/api/0476-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch diff --git a/patches/server/0004-Test-changes.patch b/patches/server/0004-Test-changes.patch index f450279c36..7f25b74963 100644 --- a/patches/server/0004-Test-changes.patch +++ b/patches/server/0004-Test-changes.patch @@ -351,11 +351,11 @@ index ebcb65cb74acdb9d1bcf2b4b3551a2dc6d809bc9..7d9dbed7281099b78d7f898885b37cdc @Test diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java -index 4153866f3e630e54a23dc085aaac5e804344aa43..b8fe92fc75c611ee1efb82a8ab7089f28bf338ea 100644 +index 1acdf5bc439c073c1777c2c4f5743ae082f4a621..bd13fd46f79ab9000b708526acbadcc7210c8a92 100644 --- a/src/test/java/org/bukkit/support/DummyServer.java +++ b/src/test/java/org/bukkit/support/DummyServer.java -@@ -50,6 +50,15 @@ public final class DummyServer { - return registers.computeIfAbsent(aClass, key -> CraftRegistry.createRegistry(aClass, AbstractTestingBase.REGISTRY_CUSTOM)); +@@ -99,6 +99,15 @@ public final class DummyServer { + return null; }); + // Paper start - testing additions diff --git a/patches/server/0009-MC-Utils.patch b/patches/server/0009-MC-Utils.patch index 51373e4d16..1d50fab8f5 100644 --- a/patches/server/0009-MC-Utils.patch +++ b/patches/server/0009-MC-Utils.patch @@ -6132,7 +6132,7 @@ index 40adb6117b9e0d5f70103113202a07715e403e2a..b1325e090f2c7aff31d27fc38ca7173e } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Exception ticking world"); diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java -index 5d4336210e11ee39521b4096a5f0874329053cdc..09d7b416c02eb13c506e9dc92d78e983bf43f4f0 100644 +index f40a2f348c45a29168ca3d4eef07b5b628060bee..c643bb0daa5cd264fd6ebab7acf0a2bdd7fe7029 100644 --- a/src/main/java/net/minecraft/server/level/ChunkHolder.java +++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java @@ -37,9 +37,9 @@ public class ChunkHolder extends GenerationChunkHolder { @@ -6189,8 +6189,8 @@ index 5d4336210e11ee39521b4096a5f0874329053cdc..09d7b416c02eb13c506e9dc92d78e983 + // Paper end // CraftBukkit start public LevelChunk getFullChunkNow() { - return (LevelChunk) this.getChunkIfPresent(ChunkStatus.FULL); -@@ -86,20 +112,20 @@ public class ChunkHolder extends GenerationChunkHolder { + // Note: We use the oldTicketLevel for isLoaded checks. +@@ -88,20 +114,20 @@ public class ChunkHolder extends GenerationChunkHolder { } // CraftBukkit end @@ -6215,7 +6215,7 @@ index 5d4336210e11ee39521b4096a5f0874329053cdc..09d7b416c02eb13c506e9dc92d78e983 return (LevelChunk) ((ChunkResult) this.getTickingChunkFuture().getNow(ChunkHolder.UNLOADED_LEVEL_CHUNK)).orElse(null); // CraftBukkit - decompile error } -@@ -123,6 +149,20 @@ public class ChunkHolder extends GenerationChunkHolder { +@@ -125,6 +151,20 @@ public class ChunkHolder extends GenerationChunkHolder { } @@ -6236,7 +6236,7 @@ index 5d4336210e11ee39521b4096a5f0874329053cdc..09d7b416c02eb13c506e9dc92d78e983 public CompletableFuture getSaveSyncFuture() { return this.saveSync; } -@@ -266,7 +306,7 @@ public class ChunkHolder extends GenerationChunkHolder { +@@ -268,7 +308,7 @@ public class ChunkHolder extends GenerationChunkHolder { } @Override @@ -6245,7 +6245,7 @@ index 5d4336210e11ee39521b4096a5f0874329053cdc..09d7b416c02eb13c506e9dc92d78e983 return this.ticketLevel; } -@@ -335,12 +375,28 @@ public class ChunkHolder extends GenerationChunkHolder { +@@ -337,12 +377,28 @@ public class ChunkHolder extends GenerationChunkHolder { this.wasAccessibleSinceLastSave |= flag1; if (!flag && flag1) { @@ -6274,7 +6274,7 @@ index 5d4336210e11ee39521b4096a5f0874329053cdc..09d7b416c02eb13c506e9dc92d78e983 this.fullChunkFuture.complete(ChunkHolder.UNLOADED_LEVEL_CHUNK); this.fullChunkFuture = ChunkHolder.UNLOADED_LEVEL_CHUNK_FUTURE; } -@@ -351,11 +407,25 @@ public class ChunkHolder extends GenerationChunkHolder { +@@ -353,11 +409,25 @@ public class ChunkHolder extends GenerationChunkHolder { if (!flag2 && flag3) { this.tickingChunkFuture = chunkLoadingManager.prepareTickingChunk(this); this.scheduleFullChunkPromotion(chunkLoadingManager, this.tickingChunkFuture, executor, FullChunkStatus.BLOCK_TICKING); @@ -6301,7 +6301,7 @@ index 5d4336210e11ee39521b4096a5f0874329053cdc..09d7b416c02eb13c506e9dc92d78e983 this.tickingChunkFuture = ChunkHolder.UNLOADED_LEVEL_CHUNK_FUTURE; } -@@ -369,11 +439,24 @@ public class ChunkHolder extends GenerationChunkHolder { +@@ -371,11 +441,24 @@ public class ChunkHolder extends GenerationChunkHolder { this.entityTickingChunkFuture = chunkLoadingManager.prepareEntityTickingChunk(this); this.scheduleFullChunkPromotion(chunkLoadingManager, this.entityTickingChunkFuture, executor, FullChunkStatus.ENTITY_TICKING); @@ -6327,7 +6327,7 @@ index 5d4336210e11ee39521b4096a5f0874329053cdc..09d7b416c02eb13c506e9dc92d78e983 this.entityTickingChunkFuture = ChunkHolder.UNLOADED_LEVEL_CHUNK_FUTURE; } -@@ -423,4 +506,18 @@ public class ChunkHolder extends GenerationChunkHolder { +@@ -425,4 +508,18 @@ public class ChunkHolder extends GenerationChunkHolder { List getPlayers(ChunkPos chunkPos, boolean onlyOnWatchDistanceEdge); } @@ -6655,7 +6655,7 @@ index b6cc33943fe7e4667944f3e6f868b3033ea9ca18..27065ffc5473c518acee3a3096b83fac while (objectiterator.hasNext()) { diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 47ae79cb2a03b43cbb881bcdea7ca231082b6614..117aca5a73dca70cd38c15e028c79d74eb834e81 100644 +index d39268911ed7c4d60ee6a82178be23245aae58c4..ab57071cc6ce8b79d883f2426855c1abf577e90d 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -48,6 +48,7 @@ import net.minecraft.world.level.storage.LevelStorageSource; @@ -7043,7 +7043,7 @@ index 586acbb52b0fcb09cda195b49b6c737a29a4e35e..b0843917caedc32f800c50cc54706ace public Entity(EntityType type, Level world) { this.id = Entity.ENTITY_COUNTER.incrementAndGet(); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 791c647de951f996f25bcc4418a6e820ab0512c9..9deb6b90f3c4281280deb2f609a55923147a675a 100644 +index 726354da4a0008c0f09a0ac8a668378c75ee99b0..2345d79ebf1562054cb071ff1786392a937c8243 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -282,6 +282,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -7866,7 +7866,7 @@ index 91539582b65a87e2ed9901f2837c3148455d2669..c025542b1073ce7e6e30a43744276fd1 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 9e8526a1d1f4f66031903cac7eecbc4edc22a33b..c557a54f15943e07d272c3ad41ca4f90c4dc82ac 100644 +index 48e3923347341f1bb2027cf48b0dea9d0dcd20cf..21ed720118073b14bc8b5d1d665b0e17a8bbc1d2 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -22,6 +22,20 @@ import org.bukkit.material.MaterialData; diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch index 2f8513c1e5..de30f92944 100644 --- a/patches/server/0010-Adventure.patch +++ b/patches/server/0010-Adventure.patch @@ -2861,7 +2861,7 @@ index e7c407039fef88ef01ba9b6be9ae5bcc3edc026f..5457358bc76889153036818fdfd70a04 @Override diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 65b23aad3ea71d409253d3365fc1e37480b8e5ee..27cf5dceba5835f94f5397ec011f409e7b226ad5 100644 +index 5da00b79af81aa879f58ffa62ecfe51c075c314b..1d2a281da755ccc2c89ad2d7dbe3407ced83ee89 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -45,6 +45,7 @@ import net.minecraft.nbt.CompoundTag; @@ -4638,10 +4638,10 @@ index 889af27e3fe5ce98b68b3177639c338ca287b024..a29dfbe7aa06113358a2078d927fc536 return event; } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java -index d47b248535882bb58ae6c1b6ef756464a1989918..39be45585835eabc8d8bcae0158c094c3dcb1aa3 100644 +index 834d871c84af392d16ffd1f88931326cfe24146d..b3ea06b088eedc2f852cc8b27c407963be10af37 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java -@@ -73,6 +73,13 @@ public class CraftContainer extends AbstractContainerMenu { +@@ -72,6 +72,13 @@ public class CraftContainer extends AbstractContainerMenu { return inventory.getType(); } @@ -4760,10 +4760,10 @@ index 4dd9a80af9901287ab6740b072f2b89678c3d0cb..b2586684295b295a3196a2a9cf724cec public String getTitle() { return this.title; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index a24a397f7e2bc2293aee290b3fc39087c79388ac..78c96b43d611f70814b80a05dfded794858e2eda 100644 +index 500bfe5dd745327f953a314e863f7318953bf3bc..e2daeeba1bacbb5c5ca2aa922fa67b02cd050755 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -510,4 +510,21 @@ public final class CraftItemFactory implements ItemFactory { +@@ -206,4 +206,21 @@ public final class CraftItemFactory implements ItemFactory { Optional> optional = (allowTreasures) ? Optional.empty() : registry.registryOrThrow(Registries.ENCHANTMENT).getTag(EnchantmentTags.IN_ENCHANTING_TABLE); return CraftItemStack.asCraftMirror(EnchantmentHelper.enchantItem(source, craft.handle, level, registry, optional)); } @@ -5117,11 +5117,11 @@ index 2e6f0a0f4bbe4ae3c7c85e679f6187e89d1298ff..c7360e2b2d6e50abc371c21b09cdadd6 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 23b6575326446441a3fa3cb5788d7068e49705af..fd147ea7fb5d143c11e7e2bf09f31bcb6e513f76 100644 +index 607456854e6bce3f7b58469af4ce42b8bacb72fc..9ecbdd50aa2eb7851ce1716946fa31e5db8765b4 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -906,6 +906,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { - return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null); +@@ -952,6 +952,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null); } + // Paper start @@ -5139,7 +5139,7 @@ index 23b6575326446441a3fa3cb5788d7068e49705af..fd147ea7fb5d143c11e7e2bf09f31bcb @Override public String getDisplayName() { return CraftChatMessage.fromComponent(this.displayName); -@@ -936,6 +948,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -982,6 +994,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return this.itemName != null; } @@ -5158,7 +5158,7 @@ index 23b6575326446441a3fa3cb5788d7068e49705af..fd147ea7fb5d143c11e7e2bf09f31bcb @Override public String getLocalizedName() { return this.getDisplayName(); -@@ -955,6 +979,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1001,6 +1025,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return this.lore != null && !this.lore.isEmpty(); } diff --git a/patches/server/0019-Paper-Plugins.patch b/patches/server/0019-Paper-Plugins.patch index 84a4fe0f8f..5629b3f527 100644 --- a/patches/server/0019-Paper-Plugins.patch +++ b/patches/server/0019-Paper-Plugins.patch @@ -8151,10 +8151,10 @@ index 0000000000000000000000000000000000000000..ba271c35eb2804f94cfc893bf94affb9 + } +} diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java -index b8fe92fc75c611ee1efb82a8ab7089f28bf338ea..c94dae13e8edfdb0adf73a5b3fda4eb1bc97f4bc 100644 +index bd13fd46f79ab9000b708526acbadcc7210c8a92..c2aa05f6e03b99b1e5c0a4539420be2ca93f1c3f 100644 --- a/src/test/java/org/bukkit/support/DummyServer.java +++ b/src/test/java/org/bukkit/support/DummyServer.java -@@ -54,7 +54,7 @@ public final class DummyServer { +@@ -103,7 +103,7 @@ public final class DummyServer { final Thread currentThread = Thread.currentThread(); when(instance.isPrimaryThread()).thenAnswer(ignored -> Thread.currentThread().equals(currentThread)); diff --git a/patches/server/0023-Timings-v2.patch b/patches/server/0023-Timings-v2.patch index 22c3be7c19..35f5d89d02 100644 --- a/patches/server/0023-Timings-v2.patch +++ b/patches/server/0023-Timings-v2.patch @@ -1019,7 +1019,7 @@ index 319f51eb8adde7584c74780ac0539f4b8ef8fe7f..ddadb0f13b96a39ec89cdaeea7bc02ee } diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 117aca5a73dca70cd38c15e028c79d74eb834e81..c0808b6026b94676c1c6457e4bb44dcbc5e2a55b 100644 +index ab57071cc6ce8b79d883f2426855c1abf577e90d..c627d32e7dbc83b9fc60b89c73bff5c9992ad548 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -269,13 +269,15 @@ public class ServerChunkCache extends ChunkSource { @@ -1230,7 +1230,7 @@ index eea8bafd98e3a8d82b3216488537ab898cc4ae7a..9675d91e4e7ed46147c3f7a11dd65122 this.entityManager.saveAll(); } else { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 27cf5dceba5835f94f5397ec011f409e7b226ad5..4f50e2f5de529813c269b7670a47e06306575b60 100644 +index 1d2a281da755ccc2c89ad2d7dbe3407ced83ee89..c2a22dda4767ec71318cadee8198e8f69a57b56b 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -330,7 +330,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -1379,7 +1379,7 @@ index e465aaa4fd29b4966ea8d88316c6d8f217da2e73..474f020371bb9e5fd2c5b22e44d79029 } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 9deb6b90f3c4281280deb2f609a55923147a675a..fe52b8c57f652fcd49a2282f7a8f1041909b35cf 100644 +index 2345d79ebf1562054cb071ff1786392a937c8243..bb5e2fd7b8d9b8bec71d8c945d266765c42d3927 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -156,7 +156,7 @@ import org.bukkit.event.entity.EntityTeleportEvent; diff --git a/patches/server/0027-Support-components-in-ItemMeta.patch b/patches/server/0027-Support-components-in-ItemMeta.patch index 1086398de1..4d78040952 100644 --- a/patches/server/0027-Support-components-in-ItemMeta.patch +++ b/patches/server/0027-Support-components-in-ItemMeta.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Support components in ItemMeta diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index fd147ea7fb5d143c11e7e2bf09f31bcb6e513f76..7381f0dac6dd0ec716e3b3475bbf8f5aae049e28 100644 +index 9ecbdd50aa2eb7851ce1716946fa31e5db8765b4..f13c703a0acafec7e6772f83ae4f5fda988cd15f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -923,11 +923,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -969,11 +969,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return CraftChatMessage.fromComponent(this.displayName); } @@ -32,7 +32,7 @@ index fd147ea7fb5d143c11e7e2bf09f31bcb6e513f76..7381f0dac6dd0ec716e3b3475bbf8f5a @Override public boolean hasDisplayName() { return this.displayName != null; -@@ -1101,6 +1113,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1147,6 +1159,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return this.lore == null ? null : new ArrayList(Lists.transform(this.lore, CraftChatMessage::fromComponent)); } @@ -47,7 +47,7 @@ index fd147ea7fb5d143c11e7e2bf09f31bcb6e513f76..7381f0dac6dd0ec716e3b3475bbf8f5a @Override public void setLore(List lore) { if (lore == null || lore.isEmpty()) { -@@ -1115,6 +1135,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1161,6 +1181,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -69,7 +69,7 @@ index fd147ea7fb5d143c11e7e2bf09f31bcb6e513f76..7381f0dac6dd0ec716e3b3475bbf8f5a @Override public boolean hasCustomModelData() { return this.customModelData != null; -@@ -1810,6 +1845,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1873,6 +1908,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } for (Object object : addFrom) { diff --git a/patches/server/0052-Use-UserCache-for-player-heads.patch b/patches/server/0052-Use-UserCache-for-player-heads.patch index f13d9d9f3e..e0b11bcf11 100644 --- a/patches/server/0052-Use-UserCache-for-player-heads.patch +++ b/patches/server/0052-Use-UserCache-for-player-heads.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Use UserCache for player heads diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -index 06dc866071742b513109cf065a312d3e58d2d66d..b5a287349a3a200cc030ef6c2e76c24727ccfb5b 100644 +index f6a53ac07ff2decf4bcd35d1a9d7352965f75e7f..a36fcd9bfcbd2b37d7cf40b32abc0aea2761ce15 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -@@ -202,7 +202,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { +@@ -177,7 +177,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { if (name == null) { this.setProfile(null); } else { diff --git a/patches/server/0056-Improve-Player-chat-API-handling.patch b/patches/server/0056-Improve-Player-chat-API-handling.patch index 301c60040f..3c9059a43f 100644 --- a/patches/server/0056-Improve-Player-chat-API-handling.patch +++ b/patches/server/0056-Improve-Player-chat-API-handling.patch @@ -17,7 +17,7 @@ Co-authored-by: Jake Potrebic Co-authored-by: SoSeDiK diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 4f50e2f5de529813c269b7670a47e06306575b60..f9050a1d255780d5131200e8b31bd91154907af6 100644 +index c2a22dda4767ec71318cadee8198e8f69a57b56b..6d31f4a9950b526a05fa508ec9da12c1a7fef306 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2013,7 +2013,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0064-Disable-Scoreboards-for-non-players-by-default.patch b/patches/server/0064-Disable-Scoreboards-for-non-players-by-default.patch index ccfdea7f04..fd8fbeaa15 100644 --- a/patches/server/0064-Disable-Scoreboards-for-non-players-by-default.patch +++ b/patches/server/0064-Disable-Scoreboards-for-non-players-by-default.patch @@ -23,7 +23,7 @@ index d5f5864b7c1ad4c30f37b360b317b63c129e3a3f..82e57978b79b5275b98a1fa7731c6a23 } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index fe52b8c57f652fcd49a2282f7a8f1041909b35cf..f8b771a10b9bf123b55b8f3097bb8c6da607c413 100644 +index bb5e2fd7b8d9b8bec71d8c945d266765c42d3927..6e2233785fae170efb4c9611a6507dbd072416e8 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -847,6 +847,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0071-Handle-Item-Meta-Inconsistencies.patch b/patches/server/0071-Handle-Item-Meta-Inconsistencies.patch index c7ad83198c..33c444cddb 100644 --- a/patches/server/0071-Handle-Item-Meta-Inconsistencies.patch +++ b/patches/server/0071-Handle-Item-Meta-Inconsistencies.patch @@ -80,7 +80,7 @@ index a4f8cb2c9dc464e94483f5574cddab85ef407048..8ac485d82c2d2b32f4d54e02c18c2cb2 public Mutable(ItemEnchantments enchantmentsComponent) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index c557a54f15943e07d272c3ad41ca4f90c4dc82ac..f3f567bf61e655862fbeea4be87241d6f7f15785 100644 +index 21ed720118073b14bc8b5d1d665b0e17a8bbc1d2..9fa993ac05092170794911394c994fcad33d648f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -191,16 +191,13 @@ public final class CraftItemStack extends ItemStack { @@ -149,7 +149,7 @@ index c557a54f15943e07d272c3ad41ca4f90c4dc82ac..f3f567bf61e655862fbeea4be87241d6 static Map getEnchantments(net.minecraft.world.item.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 7381f0dac6dd0ec716e3b3475bbf8f5aae049e28..d04af9ea23c2fd62febce4b8d4b3fd49df542095 100644 +index f13c703a0acafec7e6772f83ae4f5fda988cd15f..38596695282157e3ff0a53a1185d211268854c15 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList; @@ -168,7 +168,7 @@ index 7381f0dac6dd0ec716e3b3475bbf8f5aae049e28..d04af9ea23c2fd62febce4b8d4b3fd49 import java.util.EnumSet; import java.util.HashMap; import java.util.Iterator; -@@ -248,7 +250,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -250,7 +252,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { private List lore; // null and empty are two different states internally private Integer customModelData; private Map blockData; @@ -177,7 +177,7 @@ index 7381f0dac6dd0ec716e3b3475bbf8f5aae049e28..d04af9ea23c2fd62febce4b8d4b3fd49 private Multimap attributeModifiers; private int repairCost; private int hideFlag; -@@ -289,7 +291,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -292,7 +294,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.blockData = meta.blockData; if (meta.enchantments != null) { @@ -186,7 +186,7 @@ index 7381f0dac6dd0ec716e3b3475bbf8f5aae049e28..d04af9ea23c2fd62febce4b8d4b3fd49 } if (meta.hasAttributeModifiers()) { -@@ -432,8 +434,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -438,8 +440,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -197,7 +197,7 @@ index 7381f0dac6dd0ec716e3b3475bbf8f5aae049e28..d04af9ea23c2fd62febce4b8d4b3fd49 tag.entrySet().forEach((entry) -> { Holder id = entry.getKey(); -@@ -697,13 +699,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -729,13 +731,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return modifiers; } @@ -213,7 +213,7 @@ index 7381f0dac6dd0ec716e3b3475bbf8f5aae049e28..d04af9ea23c2fd62febce4b8d4b3fd49 for (Map.Entry entry : ench.entrySet()) { Enchantment enchantment = CraftEnchantment.stringToBukkit(entry.getKey().toString()); if ((enchantment != null) && (entry.getValue() instanceof Integer)) { -@@ -1026,14 +1028,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1072,14 +1074,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public Map getEnchants() { @@ -230,7 +230,7 @@ index 7381f0dac6dd0ec716e3b3475bbf8f5aae049e28..d04af9ea23c2fd62febce4b8d4b3fd49 } if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { -@@ -1631,7 +1633,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1679,7 +1681,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.customModelData = this.customModelData; clone.blockData = this.blockData; if (this.enchantments != null) { @@ -239,7 +239,7 @@ index 7381f0dac6dd0ec716e3b3475bbf8f5aae049e28..d04af9ea23c2fd62febce4b8d4b3fd49 } if (this.hasAttributeModifiers()) { clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers); -@@ -1966,4 +1968,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -2029,4 +2031,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return (result != null) ? result : Optional.empty(); } diff --git a/patches/server/0072-Configurable-Non-Player-Arrow-Despawn-Rate.patch b/patches/server/0072-Configurable-Non-Player-Arrow-Despawn-Rate.patch index d5af9016ea..dc61f01685 100644 --- a/patches/server/0072-Configurable-Non-Player-Arrow-Despawn-Rate.patch +++ b/patches/server/0072-Configurable-Non-Player-Arrow-Despawn-Rate.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Configurable Non Player Arrow Despawn Rate Can set a much shorter despawn rate for arrows that players can not pick up. diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index 5c906d7e611e6148cb68413421490f71ac1fafd8..2783c60dee6ddb3fddfd86b72bdb57552c7a3e45 100644 +index e6179330ee742ba6653a57b014badfed0e62495f..727d40d42240ac42a245cd64b1c7fd5b3eb7a387 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java @@ -356,7 +356,7 @@ public abstract class AbstractArrow extends Projectile { diff --git a/patches/server/0074-Custom-replacement-for-eaten-items.patch b/patches/server/0074-Custom-replacement-for-eaten-items.patch index 7e68f3e59e..5734dd9921 100644 --- a/patches/server/0074-Custom-replacement-for-eaten-items.patch +++ b/patches/server/0074-Custom-replacement-for-eaten-items.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Custom replacement for eaten items diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index f8b771a10b9bf123b55b8f3097bb8c6da607c413..d63d72d5cafdcdf3e8d8f5e837bf7aeb0ce18c74 100644 +index 6e2233785fae170efb4c9611a6507dbd072416e8..13748a5a1b2bbb8ad1ebf3c3f3d1250d9df643ea 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3830,10 +3830,11 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0075-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/patches/server/0075-handle-NaN-health-absorb-values-and-repair-bad-data.patch index 70070cfdac..18e8700307 100644 --- a/patches/server/0075-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/patches/server/0075-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -5,7 +5,7 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index d63d72d5cafdcdf3e8d8f5e837bf7aeb0ce18c74..ac0d3cc8c8a13921576a12fd7fb444980ce5b085 100644 +index 13748a5a1b2bbb8ad1ebf3c3f3d1250d9df643ea..7703a5a8af59a1ebfdad49da97fbd70f838409fd 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -807,7 +807,13 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0084-Add-PlayerUseUnknownEntityEvent.patch b/patches/server/0084-Add-PlayerUseUnknownEntityEvent.patch index 37a2ba872a..f8c81a181a 100644 --- a/patches/server/0084-Add-PlayerUseUnknownEntityEvent.patch +++ b/patches/server/0084-Add-PlayerUseUnknownEntityEvent.patch @@ -28,7 +28,7 @@ index 1e9c68cd1868d083e6a790d56006dd4aa432010a..8a0ee9564fc36a2badf1357f7e6c47b5 + // Paper end - PlayerUseUnknownEntityEvent } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index f9050a1d255780d5131200e8b31bd91154907af6..fc196fc89502b8006dba0f15380d866882f934ce 100644 +index 6d31f4a9950b526a05fa508ec9da12c1a7fef306..c955c9f542da4256b0900efe59f96a82ba437855 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2493,7 +2493,26 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0092-EntityRegainHealthEvent-isFastRegen-API.patch b/patches/server/0092-EntityRegainHealthEvent-isFastRegen-API.patch index bddc59a1f4..308c3d6d6a 100644 --- a/patches/server/0092-EntityRegainHealthEvent-isFastRegen-API.patch +++ b/patches/server/0092-EntityRegainHealthEvent-isFastRegen-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API Don't even get me started diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index ac0d3cc8c8a13921576a12fd7fb444980ce5b085..258e99365fd3c51c60b8adba46645f04111d96c2 100644 +index 7703a5a8af59a1ebfdad49da97fbd70f838409fd..369666bdbb3a68a223a75c3c519d6838bc658c40 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1320,10 +1320,16 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0107-Configurable-packet-in-spam-threshold.patch b/patches/server/0107-Configurable-packet-in-spam-threshold.patch index a41c0dcfcd..6ab9ca6ebc 100644 --- a/patches/server/0107-Configurable-packet-in-spam-threshold.patch +++ b/patches/server/0107-Configurable-packet-in-spam-threshold.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable packet in spam threshold diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index fc196fc89502b8006dba0f15380d866882f934ce..c90717ede7331188197d67b72192addb8dd7dc0b 100644 +index c955c9f542da4256b0900efe59f96a82ba437855..4a4cb573b8b8bddea5e34ca4c3ba4ee4bb6be386 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1534,13 +1534,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0108-Configurable-flying-kick-messages.patch b/patches/server/0108-Configurable-flying-kick-messages.patch index 59f2733181..a913098324 100644 --- a/patches/server/0108-Configurable-flying-kick-messages.patch +++ b/patches/server/0108-Configurable-flying-kick-messages.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable flying kick messages diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c90717ede7331188197d67b72192addb8dd7dc0b..be42d98848e79eca79fed0ee42a1b25b50347226 100644 +index 4a4cb573b8b8bddea5e34ca4c3ba4ee4bb6be386..f348efd1c295451ec734cdc89d33eaa72b8b159e 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -346,7 +346,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0126-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/patches/server/0126-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index b0df3a6a52..8fc035b6bf 100644 --- a/patches/server/0126-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/patches/server/0126-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -127,7 +127,7 @@ index 25a45e680f9fdea90f43d59de87a3a500f4ee8c0..0330a62a6a0060d2a96de191db687745 @Override diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 258e99365fd3c51c60b8adba46645f04111d96c2..65f75b10460563c1305d97fa5337f035ba915e4b 100644 +index 369666bdbb3a68a223a75c3c519d6838bc658c40..cacada8cfbe171cdb10aa2a78483ef3b613b414a 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1788,7 +1788,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0127-Cap-Entity-Collisions.patch b/patches/server/0127-Cap-Entity-Collisions.patch index 5e1b93cb75..0c7b93037a 100644 --- a/patches/server/0127-Cap-Entity-Collisions.patch +++ b/patches/server/0127-Cap-Entity-Collisions.patch @@ -24,7 +24,7 @@ index bd17157631a74f80e3b5ce50bb1f681abe1dd6a7..46a21ed2408a42aafd16647e17e55673 @javax.annotation.Nullable private org.bukkit.util.Vector origin; diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 65f75b10460563c1305d97fa5337f035ba915e4b..57ba53cf9f84b21185bbaefd482f9d6dea2cb772 100644 +index cacada8cfbe171cdb10aa2a78483ef3b613b414a..51dadc6d3ea7f0b7b5eb5117b58df0e532c65eb9 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3474,10 +3474,12 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0130-Add-option-to-make-parrots-stay-on-shoulders-despite.patch b/patches/server/0130-Add-option-to-make-parrots-stay-on-shoulders-despite.patch index 08f175db14..4624e402d2 100644 --- a/patches/server/0130-Add-option-to-make-parrots-stay-on-shoulders-despite.patch +++ b/patches/server/0130-Add-option-to-make-parrots-stay-on-shoulders-despite.patch @@ -14,7 +14,7 @@ To be converted into a Paper-API event at some point in the future? public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index be42d98848e79eca79fed0ee42a1b25b50347226..934faa4f5f40f3b0b63bc8be970b92d5219d9aeb 100644 +index f348efd1c295451ec734cdc89d33eaa72b8b159e..d3e60e2313eb7a339ad01929776076c8ac2ebdb3 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2259,6 +2259,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0132-provide-a-configurable-option-to-disable-creeper-lin.patch b/patches/server/0132-provide-a-configurable-option-to-disable-creeper-lin.patch index ecfd29e5c4..c9bce539cf 100644 --- a/patches/server/0132-provide-a-configurable-option-to-disable-creeper-lin.patch +++ b/patches/server/0132-provide-a-configurable-option-to-disable-creeper-lin.patch @@ -6,7 +6,7 @@ Subject: [PATCH] provide a configurable option to disable creeper lingering diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java -index 918051756c9adf8c01ddbbc5298269419d7f23ba..57e758616b0a82113168a3bd9f46efd353707a11 100644 +index 0b7e329505ecb9064a56b23171ae823e00b146c2..0ac3cff0bc159169c644d8f770671c55775c5fdb 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java +++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java @@ -287,7 +287,7 @@ public class Creeper extends Monster implements PowerableMob { diff --git a/patches/server/0144-ensureServerConversions-API.patch b/patches/server/0144-ensureServerConversions-API.patch index 6d2efdb422..ba8fe15e57 100644 --- a/patches/server/0144-ensureServerConversions-API.patch +++ b/patches/server/0144-ensureServerConversions-API.patch @@ -7,10 +7,10 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr to ensure it meets latest minecraft expectations. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 78c96b43d611f70814b80a05dfded794858e2eda..612991750c89936790a4db64f9cc0e236d283d57 100644 +index e2daeeba1bacbb5c5ca2aa922fa67b02cd050755..07df02997d95275cbf26ab9b76eb587da7117d37 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -527,4 +527,12 @@ public final class CraftItemFactory implements ItemFactory { +@@ -223,4 +223,12 @@ public final class CraftItemFactory implements ItemFactory { return io.papermc.paper.adventure.PaperAdventure.asAdventure(CraftItemStack.asNMSCopy(itemStack).getDisplayName()); } // Paper end - Adventure diff --git a/patches/server/0145-Implement-getI18NDisplayName.patch b/patches/server/0145-Implement-getI18NDisplayName.patch index 08fbbf2a7d..6dfc69b23c 100644 --- a/patches/server/0145-Implement-getI18NDisplayName.patch +++ b/patches/server/0145-Implement-getI18NDisplayName.patch @@ -8,10 +8,10 @@ Currently the server only supports the English language. To override this, You must replace the language file embedded in the server jar. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 612991750c89936790a4db64f9cc0e236d283d57..d1a214e8d8fd7fd774a9629d5ca2d9f7a14de0e7 100644 +index 07df02997d95275cbf26ab9b76eb587da7117d37..fd0df053cd5e8802991e665185e7f90f8001d80c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -535,4 +535,19 @@ public final class CraftItemFactory implements ItemFactory { +@@ -231,4 +231,19 @@ public final class CraftItemFactory implements ItemFactory { return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item)); } // Paper end - ensure server conversions API diff --git a/patches/server/0152-Add-PlayerJumpEvent.patch b/patches/server/0152-Add-PlayerJumpEvent.patch index 51e51eed46..9b6beb77d3 100644 --- a/patches/server/0152-Add-PlayerJumpEvent.patch +++ b/patches/server/0152-Add-PlayerJumpEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerJumpEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 934faa4f5f40f3b0b63bc8be970b92d5219d9aeb..3425921cc7b0ccfc10dbb52da54d39e7f0d701e5 100644 +index d3e60e2313eb7a339ad01929776076c8ac2ebdb3..7db4625917b6052746eba8a9ed491aed086aad5c 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1199,7 +1199,34 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0157-Add-PlayerArmorChangeEvent.patch b/patches/server/0157-Add-PlayerArmorChangeEvent.patch index 87c9ce36ee..8e7a7da4ed 100644 --- a/patches/server/0157-Add-PlayerArmorChangeEvent.patch +++ b/patches/server/0157-Add-PlayerArmorChangeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmorChangeEvent diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 57ba53cf9f84b21185bbaefd482f9d6dea2cb772..1d26fd55cd841c0f3ab4769a5a46a149fdc30b21 100644 +index 51dadc6d3ea7f0b7b5eb5117b58df0e532c65eb9..71696a99a99573aa54c11ee9b490bb292d59f753 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3140,6 +3140,13 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0162-AsyncTabCompleteEvent.patch b/patches/server/0162-AsyncTabCompleteEvent.patch index c00b7d4b3d..834410d8ad 100644 --- a/patches/server/0162-AsyncTabCompleteEvent.patch +++ b/patches/server/0162-AsyncTabCompleteEvent.patch @@ -16,7 +16,7 @@ Also adds isCommand and getLocation to the sync TabCompleteEvent Co-authored-by: Aikar diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 3425921cc7b0ccfc10dbb52da54d39e7f0d701e5..61f6a2449b6fa52eef597f8725ae076bd23cd8ea 100644 +index 7db4625917b6052746eba8a9ed491aed086aad5c..24b5ba35eb25a60d347713f235dde96c3c0018d6 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -711,21 +711,58 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0165-PlayerNaturallySpawnCreaturesEvent.patch b/patches/server/0165-PlayerNaturallySpawnCreaturesEvent.patch index 7c35678f45..06e70b667b 100644 --- a/patches/server/0165-PlayerNaturallySpawnCreaturesEvent.patch +++ b/patches/server/0165-PlayerNaturallySpawnCreaturesEvent.patch @@ -40,7 +40,7 @@ index ddadb0f13b96a39ec89cdaeea7bc02ee62ef2a06..d04b69838c6f5fd1808782cacb31c6e0 return true; diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index c0808b6026b94676c1c6457e4bb44dcbc5e2a55b..6e941ca68c2ca9d7753358f738704c4dc1a4d5bf 100644 +index c627d32e7dbc83b9fc60b89c73bff5c9992ad548..f4451bb402abbc8e6506132b9b9702bb5d75e097 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -535,6 +535,15 @@ public class ServerChunkCache extends ChunkSource { diff --git a/patches/server/0166-Add-setPlayerProfile-API-for-Skulls.patch b/patches/server/0166-Add-setPlayerProfile-API-for-Skulls.patch index 03a6ea1f26..108aa16286 100644 --- a/patches/server/0166-Add-setPlayerProfile-API-for-Skulls.patch +++ b/patches/server/0166-Add-setPlayerProfile-API-for-Skulls.patch @@ -48,10 +48,10 @@ index aa965ea05fb364e9cfc4bbf4241a47c3400355b0..45ac1d9193c3a0dc397d6e7ccfccec89 } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -index b5a287349a3a200cc030ef6c2e76c24727ccfb5b..a08c57770c658bb289c96b69b966d98af72eef67 100644 +index a36fcd9bfcbd2b37d7cf40b32abc0aea2761ce15..d6e161374e0235031128a6ee86d1ffa875ea48aa 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -@@ -178,6 +178,19 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { +@@ -153,6 +153,19 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { return this.hasOwner() ? this.profile.getName() : null; } @@ -71,7 +71,7 @@ index b5a287349a3a200cc030ef6c2e76c24727ccfb5b..a08c57770c658bb289c96b69b966d98a @Override public OfflinePlayer getOwningPlayer() { if (this.hasOwner()) { -@@ -228,6 +241,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { +@@ -203,6 +216,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { } @Override @@ -79,7 +79,7 @@ index b5a287349a3a200cc030ef6c2e76c24727ccfb5b..a08c57770c658bb289c96b69b966d98a public PlayerProfile getOwnerProfile() { if (!this.hasOwner()) { return null; -@@ -237,11 +251,12 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { +@@ -212,11 +226,12 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { } @Override @@ -93,7 +93,7 @@ index b5a287349a3a200cc030ef6c2e76c24727ccfb5b..a08c57770c658bb289c96b69b966d98a } } -@@ -296,7 +311,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { +@@ -271,7 +286,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { super.serialize(builder); if (this.profile != null) { diff --git a/patches/server/0170-Add-ArmorStand-Item-Meta.patch b/patches/server/0170-Add-ArmorStand-Item-Meta.patch index 345e7b4ffd..b6aa22ecaf 100644 --- a/patches/server/0170-Add-ArmorStand-Item-Meta.patch +++ b/patches/server/0170-Add-ArmorStand-Item-Meta.patch @@ -12,19 +12,26 @@ starting point for future additions in this area. Fixes GH-559 -diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java -index 3006a6d19de35e7e0d6e542e80eb0406c5422c3e..fc522ae106d1172172c496da543b8ca403e73456 100644 ---- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java -+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java -@@ -66,7 +66,7 @@ public class CraftItemType implements ItemType.Typed, Han - private Class getItemMetaClass(Item item) { - ItemMeta meta = new ItemStack(this.asMaterial()).getItemMeta(); - if (meta != null) { -- if (CraftMetaEntityTag.class != meta.getClass() && CraftMetaArmorStand.class != meta.getClass()) { -+ if (CraftMetaEntityTag.class != meta.getClass()/* && CraftMetaArmorStand.class != meta.getClass()*/) { // Paper - CraftMetaArmorStand is implemented in the API via ArmorStandMeta. - return (Class) meta.getClass().getInterfaces()[0]; - } - } +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java +index 85aab880fdb2f23d09096f8f2b1ede4f068fa023..4ae9930c2d74e5b1e3ad0c2ecf6556dc59cbf23c 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java +@@ -1,5 +1,6 @@ + package org.bukkit.craftbukkit.inventory; + ++import com.destroystokyo.paper.inventory.meta.ArmorStandMeta; + import java.util.function.BiFunction; + import java.util.function.Function; + import net.minecraft.world.item.ItemStack; +@@ -95,7 +96,7 @@ public final class CraftItemMetas { + item -> new CraftMetaSpawnEgg(item.getComponentsPatch()), + (type, meta) -> meta instanceof CraftMetaSpawnEgg spawnEgg ? spawnEgg : new CraftMetaSpawnEgg(meta)); + +- private static final ItemMetaData ARMOR_STAND_META_DATA = new ItemMetaData<>(ItemMeta.class, ++ private static final ItemMetaData ARMOR_STAND_META_DATA = new ItemMetaData<>(ArmorStandMeta.class, // paper + item -> new CraftMetaArmorStand(item.getComponentsPatch()), + (type, meta) -> meta instanceof CraftMetaArmorStand armorStand ? armorStand : new CraftMetaArmorStand(meta)); + diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java index c4f12f96e39cb6189799a796b4cb2cb4f0b92392..59bdac414e8205ed608f79ef0d1502acd826d216 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java diff --git a/patches/server/0177-Player.setPlayerProfile-API.patch b/patches/server/0177-Player.setPlayerProfile-API.patch index a0db34e61e..95521bd2e8 100644 --- a/patches/server/0177-Player.setPlayerProfile-API.patch +++ b/patches/server/0177-Player.setPlayerProfile-API.patch @@ -9,7 +9,7 @@ This can be useful for changing name or skins after a player has logged in. public-f net.minecraft.world.entity.player.Player gameProfile diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 61f6a2449b6fa52eef597f8725ae076bd23cd8ea..ecc2ce39629f6edbd09e96c85e14ab2196ac3173 100644 +index 24b5ba35eb25a60d347713f235dde96c3c0018d6..9e49636a77611966fdc73dcc1a094162038ec52d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1472,7 +1472,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0194-ItemStack-getMaxItemUseDuration.patch b/patches/server/0194-ItemStack-getMaxItemUseDuration.patch index 2131e2bf3a..8e84109de0 100644 --- a/patches/server/0194-ItemStack-getMaxItemUseDuration.patch +++ b/patches/server/0194-ItemStack-getMaxItemUseDuration.patch @@ -6,7 +6,7 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration Allows you to determine how long it takes to use a usable/consumable item diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index f3f567bf61e655862fbeea4be87241d6f7f15785..52622ed31fe2f3616a53681030cc01517b63e7ab 100644 +index 9fa993ac05092170794911394c994fcad33d648f..23d61d553be3ab0a62624e469b2782baa2b075db 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -7,14 +7,17 @@ import net.minecraft.core.Holder; diff --git a/patches/server/0196-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch b/patches/server/0196-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch index 803e8f5087..5b57f10fdc 100644 --- a/patches/server/0196-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch +++ b/patches/server/0196-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Unset Ignited flag on cancel of Explosion Event Otherwise the creeper infinite explodes diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java -index 57e758616b0a82113168a3bd9f46efd353707a11..36505d8c66f63191574b5a79b8ee15071587a931 100644 +index 0ac3cff0bc159169c644d8f770671c55775c5fdb..c3f59f4a2190327340df71c1283be490557a0a58 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java +++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java @@ -278,6 +278,7 @@ public class Creeper extends Monster implements PowerableMob { diff --git a/patches/server/0200-Make-shield-blocking-delay-configurable.patch b/patches/server/0200-Make-shield-blocking-delay-configurable.patch index 0a0ba03619..c072b62e7b 100644 --- a/patches/server/0200-Make-shield-blocking-delay-configurable.patch +++ b/patches/server/0200-Make-shield-blocking-delay-configurable.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make shield blocking delay configurable diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 1d26fd55cd841c0f3ab4769a5a46a149fdc30b21..6577b705e8ca04acc8cda85fbcc4088fd1302f60 100644 +index 71696a99a99573aa54c11ee9b490bb292d59f753..a054aaa3713f911512358cbd63c202a8a7bb8236 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3938,12 +3938,24 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0203-Add-entity-knockback-events.patch b/patches/server/0203-Add-entity-knockback-events.patch index 72f99637c6..4efd630e90 100644 --- a/patches/server/0203-Add-entity-knockback-events.patch +++ b/patches/server/0203-Add-entity-knockback-events.patch @@ -37,7 +37,7 @@ index d6017d9d71fb4b3a3df6eaa44da0ebda54c83da4..5e7cf17779685355011bb0f684c11080 this.hasImpulse = true; } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 6577b705e8ca04acc8cda85fbcc4088fd1302f60..170b4f796f0a495a635147dd62ad0ab51dd86a92 100644 +index a054aaa3713f911512358cbd63c202a8a7bb8236..ebd81b34d1fbb31ce0f9c92593154fdb6b62bf52 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1517,7 +1517,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -224,7 +224,7 @@ index d20389c6d73114810ab8dc20a02b09db4f1971f1..d4077e88910347fb332996ce88262a1a // CraftBukkit end Level world = this.level(); diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index 2783c60dee6ddb3fddfd86b72bdb57552c7a3e45..1e2d4af56ed7b3fece353b3031a965ff5798f4c5 100644 +index 727d40d42240ac42a245cd64b1c7fd5b3eb7a387..e856703687812520e1869c31892c2af36d3f1f15 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java @@ -519,7 +519,7 @@ public abstract class AbstractArrow extends Projectile { diff --git a/patches/server/0209-InventoryCloseEvent-Reason-API.patch b/patches/server/0209-InventoryCloseEvent-Reason-API.patch index 32d1943356..4f22c3cd2e 100644 --- a/patches/server/0209-InventoryCloseEvent-Reason-API.patch +++ b/patches/server/0209-InventoryCloseEvent-Reason-API.patch @@ -75,7 +75,7 @@ index 809a4f403695240b507528fb8fa3f7d390f86349..622f890d2613acf948b68d6febe0834c this.doCloseContainer(); } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index ecc2ce39629f6edbd09e96c85e14ab2196ac3173..75736ebe99e96a20c2c3e7ac5350ab55402fac81 100644 +index 9e49636a77611966fdc73dcc1a094162038ec52d..6ed3c4abb66002752d0e50040585363912ccd4bd 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2619,10 +2619,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0211-Refresh-player-inventory-when-cancelling-PlayerInter.patch b/patches/server/0211-Refresh-player-inventory-when-cancelling-PlayerInter.patch index 8fb8e6a5e0..5ce99f4b00 100644 --- a/patches/server/0211-Refresh-player-inventory-when-cancelling-PlayerInter.patch +++ b/patches/server/0211-Refresh-player-inventory-when-cancelling-PlayerInter.patch @@ -16,7 +16,7 @@ Refresh the player inventory when PlayerInteractEntityEvent is cancelled to avoid this problem. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 75736ebe99e96a20c2c3e7ac5350ab55402fac81..de22f6ce5e24e5deb5793ad1cc0f8187305903ab 100644 +index 6ed3c4abb66002752d0e50040585363912ccd4bd..1cebf1dc897345bdba7bcc7db24a793aa3773c12 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2496,6 +2496,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0224-Break-up-and-make-tab-spam-limits-configurable.patch b/patches/server/0224-Break-up-and-make-tab-spam-limits-configurable.patch index cc936a0591..d215803bca 100644 --- a/patches/server/0224-Break-up-and-make-tab-spam-limits-configurable.patch +++ b/patches/server/0224-Break-up-and-make-tab-spam-limits-configurable.patch @@ -22,7 +22,7 @@ to take the burden of this into their own hand without having to rely on plugins doing unsafe things. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index de22f6ce5e24e5deb5793ad1cc0f8187305903ab..3921f9d664ef629361d9ad2050cea97c2182e157 100644 +index 1cebf1dc897345bdba7bcc7db24a793aa3773c12..fc1726cd10c3b051154ca954580849745a9c086f 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -265,6 +265,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0239-Add-More-Creeper-API.patch b/patches/server/0239-Add-More-Creeper-API.patch index 5333854e85..9f68dfd41a 100644 --- a/patches/server/0239-Add-More-Creeper-API.patch +++ b/patches/server/0239-Add-More-Creeper-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add More Creeper API diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java -index 36505d8c66f63191574b5a79b8ee15071587a931..acc844c10db9cb42c0e70f3b467e620906b739f0 100644 +index c3f59f4a2190327340df71c1283be490557a0a58..2c01fbea62812f795111060d260f871cdf85e8bf 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java +++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java @@ -134,7 +134,7 @@ public class Creeper extends Monster implements PowerableMob { diff --git a/patches/server/0242-Add-ray-tracing-methods-to-LivingEntity.patch b/patches/server/0242-Add-ray-tracing-methods-to-LivingEntity.patch index 36b5210610..156b2c1079 100644 --- a/patches/server/0242-Add-ray-tracing-methods-to-LivingEntity.patch +++ b/patches/server/0242-Add-ray-tracing-methods-to-LivingEntity.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 170b4f796f0a495a635147dd62ad0ab51dd86a92..63c3bef55dae608ddd19cf6c8348b3027460e2af 100644 +index ebd81b34d1fbb31ce0f9c92593154fdb6b62bf52..4bf729db65070ac34f7dd84cf16a9475db2ff7c0 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3949,6 +3949,19 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0244-Improve-death-events.patch b/patches/server/0244-Improve-death-events.patch index cd6d8dd40f..b4abf99a98 100644 --- a/patches/server/0244-Improve-death-events.patch +++ b/patches/server/0244-Improve-death-events.patch @@ -80,7 +80,7 @@ index 622f890d2613acf948b68d6febe0834ceec23c80..5bf3f2faac0af6bddfd2ecb423a13cdf } } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 63c3bef55dae608ddd19cf6c8348b3027460e2af..d8681ace0ba74a6eb3b6abafe4915b5e753c02f0 100644 +index 4bf729db65070ac34f7dd84cf16a9475db2ff7c0..2c426a68f72b1ed234529b02d2e1d2c18563414b 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -283,6 +283,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0254-Add-LivingEntity-getTargetEntity.patch b/patches/server/0254-Add-LivingEntity-getTargetEntity.patch index 669cb9dedc..d1ac377090 100644 --- a/patches/server/0254-Add-LivingEntity-getTargetEntity.patch +++ b/patches/server/0254-Add-LivingEntity-getTargetEntity.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index d8681ace0ba74a6eb3b6abafe4915b5e753c02f0..bf493378dca5f9ebb4e098c7552d9fdb1ea1822d 100644 +index 2c426a68f72b1ed234529b02d2e1d2c18563414b..314fcbeffe3b0adcfbd59b744001b520d6d64a0c 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -127,6 +127,7 @@ import net.minecraft.world.level.storage.loot.LootTable; diff --git a/patches/server/0260-Add-option-to-prevent-players-from-moving-into-unloa.patch b/patches/server/0260-Add-option-to-prevent-players-from-moving-into-unloa.patch index 5a9df203e5..2b6b76069e 100644 --- a/patches/server/0260-Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/patches/server/0260-Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 3921f9d664ef629361d9ad2050cea97c2182e157..916334ec8be0f1c1e0a5694fca1695ae5a8f767f 100644 +index fc1726cd10c3b051154ca954580849745a9c086f..b1a0c0e2d02af3730293f4708ce50479ede2ccab 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -494,9 +494,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0265-Restore-custom-InventoryHolder-support.patch b/patches/server/0265-Restore-custom-InventoryHolder-support.patch index 99ca50730b..4fb2fe77ea 100644 --- a/patches/server/0265-Restore-custom-InventoryHolder-support.patch +++ b/patches/server/0265-Restore-custom-InventoryHolder-support.patch @@ -161,10 +161,10 @@ index 0000000000000000000000000000000000000000..224d4b2cc45b0d02230a76caee9c8857 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java -index 39be45585835eabc8d8bcae0158c094c3dcb1aa3..977b77547f7ba62cef3640cf8d4f1c8e7cded53a 100644 +index b3ea06b088eedc2f852cc8b27c407963be10af37..027d6d9c04dc4da5d978cc0c03a08a6efe93b4d9 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java -@@ -50,7 +50,7 @@ public class CraftContainer extends AbstractContainerMenu { +@@ -49,7 +49,7 @@ public class CraftContainer extends AbstractContainerMenu { public CraftContainer(final Inventory inventory, final Player player, int id) { this(new InventoryView() { @@ -173,7 +173,7 @@ index 39be45585835eabc8d8bcae0158c094c3dcb1aa3..977b77547f7ba62cef3640cf8d4f1c8e private String title = this.originalTitle; @Override -@@ -76,7 +76,7 @@ public class CraftContainer extends AbstractContainerMenu { +@@ -75,7 +75,7 @@ public class CraftContainer extends AbstractContainerMenu { // Paper start @Override public net.kyori.adventure.text.Component title() { @@ -182,7 +182,7 @@ index 39be45585835eabc8d8bcae0158c094c3dcb1aa3..977b77547f7ba62cef3640cf8d4f1c8e } // Paper end -@@ -253,6 +253,10 @@ public class CraftContainer extends AbstractContainerMenu { +@@ -252,6 +252,10 @@ public class CraftContainer extends AbstractContainerMenu { this.lastSlots = this.delegate.lastSlots; this.slots = this.delegate.slots; this.remoteSlots = this.delegate.remoteSlots; diff --git a/patches/server/0267-Don-t-allow-digging-into-unloaded-chunks.patch b/patches/server/0267-Don-t-allow-digging-into-unloaded-chunks.patch index cbd69b64be..1592c5abc6 100644 --- a/patches/server/0267-Don-t-allow-digging-into-unloaded-chunks.patch +++ b/patches/server/0267-Don-t-allow-digging-into-unloaded-chunks.patch @@ -59,7 +59,7 @@ index a5b0efd6142075ca1ecb604afbc1d0162199e7a4..da9e864520150acd8027545672aa476b this.level.destroyBlockProgress(this.player.getId(), pos, -1); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 916334ec8be0f1c1e0a5694fca1695ae5a8f767f..5d81aa23c7b1810df5d70b9972f233d84f5154eb 100644 +index b1a0c0e2d02af3730293f4708ce50479ede2ccab..9b255f9551fa66efa21944e284a40a03aefc3040 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1595,6 +1595,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0269-force-entity-dismount-during-teleportation.patch b/patches/server/0269-force-entity-dismount-during-teleportation.patch index 518c1501a3..0f859b2a2c 100644 --- a/patches/server/0269-force-entity-dismount-during-teleportation.patch +++ b/patches/server/0269-force-entity-dismount-during-teleportation.patch @@ -106,7 +106,7 @@ index 3830440b913bd2693f2922483e57419c76117315..5b3de422b07f680e6639ee84f076bffb if (this.valid) { Bukkit.getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index bf493378dca5f9ebb4e098c7552d9fdb1ea1822d..d73f3ca9ff9584628ab9b0434d76368a20bca51e 100644 +index 314fcbeffe3b0adcfbd59b744001b520d6d64a0c..1ac5e457257748261088f582ed26b94e0e18eced 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3591,9 +3591,15 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0271-Book-Size-Limits.patch b/patches/server/0271-Book-Size-Limits.patch index 5e517ed05e..b7ea9e7370 100644 --- a/patches/server/0271-Book-Size-Limits.patch +++ b/patches/server/0271-Book-Size-Limits.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Book Size Limits Puts some limits on the size of books. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 5d81aa23c7b1810df5d70b9972f233d84f5154eb..202994eca830b753dbe07fea21dfdc2326147c89 100644 +index 9b255f9551fa66efa21944e284a40a03aefc3040..23f033e16e2210970e6b01672873670578f426f4 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1043,6 +1043,45 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0278-Brigadier-Mojang-API.patch b/patches/server/0278-Brigadier-Mojang-API.patch index b738c0155a..8b333ef51e 100644 --- a/patches/server/0278-Brigadier-Mojang-API.patch +++ b/patches/server/0278-Brigadier-Mojang-API.patch @@ -119,7 +119,7 @@ index a05aea8561ac102476ee1b3068942b095950a86a..2b5235aea933462ca711abb5b59b6715 if (commandnode2.canUse(source)) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 202994eca830b753dbe07fea21dfdc2326147c89..e8be3b9f538c688b510a490aee94628681d2f546 100644 +index 23f033e16e2210970e6b01672873670578f426f4..cb6c447899d7080f14abecdb0cc84dc256a5bceb 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -769,19 +769,34 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0280-Limit-Client-Sign-length-more.patch b/patches/server/0280-Limit-Client-Sign-length-more.patch index f19f2bc59d..31dcd1fbb0 100644 --- a/patches/server/0280-Limit-Client-Sign-length-more.patch +++ b/patches/server/0280-Limit-Client-Sign-length-more.patch @@ -22,7 +22,7 @@ it only impacts data sent from the client. Set -DPaper.maxSignLength=XX to change limit or -1 to disable diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index e8be3b9f538c688b510a490aee94628681d2f546..0d6cdd7e52bffe392a668a0885855b9ca7cb4368 100644 +index cb6c447899d7080f14abecdb0cc84dc256a5bceb..39e273ada6225a4a5deb4830185a957e4ae9ab0d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -299,6 +299,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0298-Prevent-consuming-the-wrong-itemstack.patch b/patches/server/0298-Prevent-consuming-the-wrong-itemstack.patch index 82cf04e36c..de0a5f77d5 100644 --- a/patches/server/0298-Prevent-consuming-the-wrong-itemstack.patch +++ b/patches/server/0298-Prevent-consuming-the-wrong-itemstack.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent consuming the wrong itemstack diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index d73f3ca9ff9584628ab9b0434d76368a20bca51e..545d4c481a785dc7f795ee0fa41d6343f2967d44 100644 +index 1ac5e457257748261088f582ed26b94e0e18eced..94492da51fe2a6343ab3c41d26ca2a195e14bc62 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3827,9 +3827,14 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0315-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/patches/server/0315-Optimise-getChunkAt-calls-for-loaded-chunks.patch index e331ac40d1..e832698085 100644 --- a/patches/server/0315-Optimise-getChunkAt-calls-for-loaded-chunks.patch +++ b/patches/server/0315-Optimise-getChunkAt-calls-for-loaded-chunks.patch @@ -7,7 +7,7 @@ bypass the need to get a player chunk, then get the either, then unwrap it... diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 6e941ca68c2ca9d7753358f738704c4dc1a4d5bf..cc899988e65907ab6bc49e864e3334ff36f07576 100644 +index f4451bb402abbc8e6506132b9b9702bb5d75e097..ef35e5a9fc0bfcd13f02f9193fdd1e7a811e88fd 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -253,6 +253,12 @@ public class ServerChunkCache extends ChunkSource { diff --git a/patches/server/0316-Add-debug-for-sync-chunk-loads.patch b/patches/server/0316-Add-debug-for-sync-chunk-loads.patch index 885540cab2..b6f89a4792 100644 --- a/patches/server/0316-Add-debug-for-sync-chunk-loads.patch +++ b/patches/server/0316-Add-debug-for-sync-chunk-loads.patch @@ -300,7 +300,7 @@ index 0000000000000000000000000000000000000000..95d6022c9cfb2e36ec5a71be6e343540 + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index cc899988e65907ab6bc49e864e3334ff36f07576..6f506ed8c8052f56356f60c5987cca8aa34d1d78 100644 +index ef35e5a9fc0bfcd13f02f9193fdd1e7a811e88fd..a94833f58eb823332890d07c147161e9e0a938e9 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -280,6 +280,7 @@ public class ServerChunkCache extends ChunkSource { diff --git a/patches/server/0319-Entity-Jump-API.patch b/patches/server/0319-Entity-Jump-API.patch index 6e26dbe6c5..9d3bf218cf 100644 --- a/patches/server/0319-Entity-Jump-API.patch +++ b/patches/server/0319-Entity-Jump-API.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Entity Jump API public net.minecraft.world.entity.LivingEntity jumping diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 545d4c481a785dc7f795ee0fa41d6343f2967d44..a2ea54c4a3aedbc3b8ec775851ebfba889e855cf 100644 +index 94492da51fe2a6343ab3c41d26ca2a195e14bc62..9d924c48dedf9a61f555bf7c9d658e925169ccd2 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3405,8 +3405,10 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0342-Don-t-run-entity-collision-code-if-not-needed.patch b/patches/server/0342-Don-t-run-entity-collision-code-if-not-needed.patch index dfd1354b1e..6495c29c30 100644 --- a/patches/server/0342-Don-t-run-entity-collision-code-if-not-needed.patch +++ b/patches/server/0342-Don-t-run-entity-collision-code-if-not-needed.patch @@ -12,7 +12,7 @@ The entity's current team collision rule causes them to NEVER collide. Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index a2ea54c4a3aedbc3b8ec775851ebfba889e855cf..4210c822f067041833f9d3845806d5ecf50501ba 100644 +index 9d924c48dedf9a61f555bf7c9d658e925169ccd2..24ec68cecd11b8faa8bff11989b64985c26707cc 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3516,10 +3516,24 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0347-Add-PlayerAttackEntityCooldownResetEvent.patch b/patches/server/0347-Add-PlayerAttackEntityCooldownResetEvent.patch index 304ad615ed..90c43e9e4d 100644 --- a/patches/server/0347-Add-PlayerAttackEntityCooldownResetEvent.patch +++ b/patches/server/0347-Add-PlayerAttackEntityCooldownResetEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 4210c822f067041833f9d3845806d5ecf50501ba..d475a0f36a7c302fc5cf23ab2ad6d0b835710abb 100644 +index 24ec68cecd11b8faa8bff11989b64985c26707cc..045cfadc67c597f4607ed3ba6a5c9b06e95814ba 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -2248,7 +2248,16 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0350-Fix-item-duplication-and-teleport-issues.patch b/patches/server/0350-Fix-item-duplication-and-teleport-issues.patch index 66b9f096ef..7188b06b94 100644 --- a/patches/server/0350-Fix-item-duplication-and-teleport-issues.patch +++ b/patches/server/0350-Fix-item-duplication-and-teleport-issues.patch @@ -69,7 +69,7 @@ index 2ce2926f4e3a79a1a329cdd684852970f6f104f2..b1d870b9a3b414ed49b4674afc2c6088 public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) { diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index d475a0f36a7c302fc5cf23ab2ad6d0b835710abb..96894dba3ddbf1d52266e5df0c280cc30d54d5de 100644 +index 045cfadc67c597f4607ed3ba6a5c9b06e95814ba..2fb30b4841cbbbe388c28477e13d882446ff73e7 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1717,9 +1717,9 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0352-Validate-PickItem-Packet-and-kick-for-invalid.patch b/patches/server/0352-Validate-PickItem-Packet-and-kick-for-invalid.patch index 41621adc9a..d07183ae92 100644 --- a/patches/server/0352-Validate-PickItem-Packet-and-kick-for-invalid.patch +++ b/patches/server/0352-Validate-PickItem-Packet-and-kick-for-invalid.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 0d6cdd7e52bffe392a668a0885855b9ca7cb4368..ca4dd5aa34188e121eb92d58305a2979b3797a12 100644 +index 39e273ada6225a4a5deb4830185a957e4ae9ab0d..9ca934b6f24d6a8d5e32f6c4cf728bee4b3f3e36 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -895,7 +895,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0355-Prevent-teleporting-dead-entities.patch b/patches/server/0355-Prevent-teleporting-dead-entities.patch index 0f97cd7b32..569c4dde7e 100644 --- a/patches/server/0355-Prevent-teleporting-dead-entities.patch +++ b/patches/server/0355-Prevent-teleporting-dead-entities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent teleporting dead entities diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index ca4dd5aa34188e121eb92d58305a2979b3797a12..081d916a82a456ebbb56e7255768f4631e0ec797 100644 +index 9ca934b6f24d6a8d5e32f6c4cf728bee4b3f3e36..ebeada0d62a71123e70fbafe3cb3232866e915f1 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1553,6 +1553,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0370-Prevent-position-desync-causing-tp-exploit.patch b/patches/server/0370-Prevent-position-desync-causing-tp-exploit.patch index fc79db536a..ecf670b677 100644 --- a/patches/server/0370-Prevent-position-desync-causing-tp-exploit.patch +++ b/patches/server/0370-Prevent-position-desync-causing-tp-exploit.patch @@ -13,7 +13,7 @@ behaviour, we need to move all of this dangerous logic outside of the move call and into an appropriate place in the tick method. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 081d916a82a456ebbb56e7255768f4631e0ec797..b6895f7f6df5519f6cc550f154ecc2c3b9043b8f 100644 +index ebeada0d62a71123e70fbafe3cb3232866e915f1..97059c8199bc80f3982556a4094f02b03138dc6c 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1350,6 +1350,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0372-Add-PlayerRecipeBookClickEvent.patch b/patches/server/0372-Add-PlayerRecipeBookClickEvent.patch index b625834ac3..8a7facd949 100644 --- a/patches/server/0372-Add-PlayerRecipeBookClickEvent.patch +++ b/patches/server/0372-Add-PlayerRecipeBookClickEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerRecipeBookClickEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index b6895f7f6df5519f6cc550f154ecc2c3b9043b8f..5e27b8c2ba4ba009f4c1f155760d0c1d93e220c5 100644 +index 97059c8199bc80f3982556a4094f02b03138dc6c..c210c7632efd40a81432faa51bedabeac095e5c6 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -3058,16 +3058,40 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0374-Add-permission-for-command-blocks.patch b/patches/server/0374-Add-permission-for-command-blocks.patch index fb8720b998..5b2d948df0 100644 --- a/patches/server/0374-Add-permission-for-command-blocks.patch +++ b/patches/server/0374-Add-permission-for-command-blocks.patch @@ -18,7 +18,7 @@ index da9e864520150acd8027545672aa476be414bb4d..d4bd44210d58b30696feeea48e190947 return false; } else if (this.player.blockActionRestricted(this.level, pos, this.gameModeForPlayer)) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 5e27b8c2ba4ba009f4c1f155760d0c1d93e220c5..9c59b0f1945bb767d2040e86fe935e77bf89cd3c 100644 +index c210c7632efd40a81432faa51bedabeac095e5c6..d823d32285b84c3775361d28f39b2c321b6b2f66 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -806,7 +806,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0376-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0376-Fix-Per-World-Difficulty-Remembering-Difficulty.patch index 38766f86dc..9efd6dc19f 100644 --- a/patches/server/0376-Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/patches/server/0376-Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -76,7 +76,7 @@ index d6dc8c983d26ce89f17a990be4284fdc78ad164b..2b1d7a2360a9ee7bca9d93a2dc8c61d1 @Override diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 9c59b0f1945bb767d2040e86fe935e77bf89cd3c..73119348397ee18d43f84faafd62926379608328 100644 +index d823d32285b84c3775361d28f39b2c321b6b2f66..ad8b76b4b39442500de82653fe736bec32330ca0 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -3261,7 +3261,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0380-Add-BlockStateMeta-clearBlockState.patch b/patches/server/0380-Add-BlockStateMeta-clearBlockState.patch index 88d5b8fb28..802f698e6f 100644 --- a/patches/server/0380-Add-BlockStateMeta-clearBlockState.patch +++ b/patches/server/0380-Add-BlockStateMeta-clearBlockState.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add BlockStateMeta#clearBlockState diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java -index a72a3ea995a874150325189e11dc2bd338bd3bbf..9034905aabf057f387b65957a254d056b12e0519 100644 +index 80ace77a9b11d63a1b2271c868c59711f5d2f89d..4faada5f974214f3054dc1bec9c79e2600c8df48 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java -@@ -292,6 +292,13 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta +@@ -195,6 +195,13 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta return this.blockEntityTag != null; } diff --git a/patches/server/0381-Convert-legacy-attributes-in-Item-Meta.patch b/patches/server/0381-Convert-legacy-attributes-in-Item-Meta.patch index 1ee422c71c..94ddf33189 100644 --- a/patches/server/0381-Convert-legacy-attributes-in-Item-Meta.patch +++ b/patches/server/0381-Convert-legacy-attributes-in-Item-Meta.patch @@ -30,10 +30,10 @@ index de40e522960469b98f987bd688489740446d9f85..5678d2007d5adf45dec0638c5dd848b6 public CraftAttributeMap(AttributeMap handle) { this.handle = handle; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index d04af9ea23c2fd62febce4b8d4b3fd49df542095..fab1e47d0faffe83366687e4ec3ae02d4887ff8a 100644 +index 38596695282157e3ff0a53a1185d211268854c15..24ebc5841ed16129c0e9305da6cf1d8fb67d42ec 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -663,7 +663,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -695,7 +695,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { AttributeModifier attribMod = CraftAttributeInstance.convert(nmsModifier); diff --git a/patches/server/0382-Do-not-accept-invalid-client-settings.patch b/patches/server/0382-Do-not-accept-invalid-client-settings.patch index adb4669019..44c3888851 100644 --- a/patches/server/0382-Do-not-accept-invalid-client-settings.patch +++ b/patches/server/0382-Do-not-accept-invalid-client-settings.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Do not accept invalid client settings diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 73119348397ee18d43f84faafd62926379608328..07e517d7a01f80afd85a1fe2cfb40d5c0821cd98 100644 +index ad8b76b4b39442500de82653fe736bec32330ca0..602991cc2a2fbbca990a6c35137bdd01f1027d6c 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -3253,6 +3253,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0386-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch b/patches/server/0386-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch index 8f99a0e26e..5be503cd7d 100644 --- a/patches/server/0386-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch +++ b/patches/server/0386-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't check chunk for portal on world gen entity add diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 96894dba3ddbf1d52266e5df0c280cc30d54d5de..3d4417af63e36c45175f8663f95c00ed9e9c6c5d 100644 +index 2fb30b4841cbbbe388c28477e13d882446ff73e7..2ca4bb4784e3ef6760e1f2e1eab93cfbc5b27a0f 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3630,7 +3630,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0387-Fix-arrows-never-despawning-MC-125757.patch b/patches/server/0387-Fix-arrows-never-despawning-MC-125757.patch index 21d9b7def7..5a611c79e6 100644 --- a/patches/server/0387-Fix-arrows-never-despawning-MC-125757.patch +++ b/patches/server/0387-Fix-arrows-never-despawning-MC-125757.patch @@ -9,7 +9,7 @@ instead of getting stuck in a never despawn state (bubble columns, etc). diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index 1e2d4af56ed7b3fece353b3031a965ff5798f4c5..e8004c0689918a81369b404ab2a4143c26aa2b07 100644 +index e856703687812520e1869c31892c2af36d3f1f15..f7dab560a1f98e494303ba4c5fd3d82fb78e9503 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java @@ -238,6 +238,7 @@ public abstract class AbstractArrow extends Projectile { diff --git a/patches/server/0408-Add-methods-to-get-translation-keys.patch b/patches/server/0408-Add-methods-to-get-translation-keys.patch index d5d4dd918c..7bc6ab009f 100644 --- a/patches/server/0408-Add-methods-to-get-translation-keys.patch +++ b/patches/server/0408-Add-methods-to-get-translation-keys.patch @@ -58,10 +58,10 @@ index 97a7dc31fe7a2defed2202ccc518c66b7ff4b0da..3ea6e6678432957c5caaff15ba20f8a8 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java -index fc522ae106d1172172c496da543b8ca403e73456..761d943658de9c7faadf24584baf63057e99d04a 100644 +index 47b5a4aeb3e67e7009962c610f8f45a496671b89..3ad2d93fa4b5174531349e9dfce4f48944ee8cc5 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java -@@ -237,4 +237,11 @@ public class CraftItemType implements ItemType.Typed, Han +@@ -236,4 +236,11 @@ public class CraftItemType implements ItemType.Typed, Han public Material asMaterial() { return Registry.MATERIAL.get(this.key); } @@ -74,10 +74,10 @@ index fc522ae106d1172172c496da543b8ca403e73456..761d943658de9c7faadf24584baf6305 + // Paper end - add Translatable } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java -index ebdb19d7ee0460d50c082b0a41b3a6a57a3534ee..b444bd26d6c3def3494d3cc0520e462408272be3 100644 +index 11960a5433675c25d7ba061be753815746dd0142..f2cecd01f7f214a023e1bdeecc14359f696fb9d4 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java -@@ -111,7 +111,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { +@@ -110,7 +110,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { return new FireworkExplosion(CraftMetaFirework.getNBT(effect.getType()), colors, fadeColors, effect.hasTrail(), effect.hasFlicker()); } diff --git a/patches/server/0409-Create-HoverEvent-from-ItemStack-Entity.patch b/patches/server/0409-Create-HoverEvent-from-ItemStack-Entity.patch index d7b9b11116..081d6c07e5 100644 --- a/patches/server/0409-Create-HoverEvent-from-ItemStack-Entity.patch +++ b/patches/server/0409-Create-HoverEvent-from-ItemStack-Entity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Create HoverEvent from ItemStack Entity diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index d1a214e8d8fd7fd774a9629d5ca2d9f7a14de0e7..a96a09bb39fc35f3c4dfcd0da0ce1fe283b8377e 100644 +index fd0df053cd5e8802991e665185e7f90f8001d80c..eabb8b42b890224dd19b879ff276e9908674310d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -550,4 +550,44 @@ public final class CraftItemFactory implements ItemFactory { +@@ -246,4 +246,44 @@ public final class CraftItemFactory implements ItemFactory { return nms != null ? net.minecraft.locale.Language.getInstance().getOrDefault(nms.getItem().getDescriptionId(nms)) : null; } // Paper end - add getI18NDisplayName diff --git a/patches/server/0411-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch b/patches/server/0411-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch index 8793d95a79..8cec90b208 100644 --- a/patches/server/0411-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch +++ b/patches/server/0411-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch @@ -9,7 +9,7 @@ as this is how Vanilla teleports entities. Cancel any pending motion when teleported. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 07e517d7a01f80afd85a1fe2cfb40d5c0821cd98..ee552bc754010c0f64ae67848c1ed6038e7e3746 100644 +index 602991cc2a2fbbca990a6c35137bdd01f1027d6c..28a210e76ba9f61ca88dea345e6d89f73e2a1ceb 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -679,7 +679,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0421-Fix-for-large-move-vectors-crashing-server.patch b/patches/server/0421-Fix-for-large-move-vectors-crashing-server.patch index 4215392549..910593a782 100644 --- a/patches/server/0421-Fix-for-large-move-vectors-crashing-server.patch +++ b/patches/server/0421-Fix-for-large-move-vectors-crashing-server.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix for large move vectors crashing server Check movement distance also based on current position. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index ee552bc754010c0f64ae67848c1ed6038e7e3746..509cad3fe33a35ee22db173d84f7d8d35df4910c 100644 +index 28a210e76ba9f61ca88dea345e6d89f73e2a1ceb..e03d49f10f624cf09b65f5c43afcc70c4ccb4900 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -492,9 +492,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0442-Climbing-should-not-bypass-cramming-gamerule.patch b/patches/server/0442-Climbing-should-not-bypass-cramming-gamerule.patch index 3ccfacc9e5..b5fa5d3303 100644 --- a/patches/server/0442-Climbing-should-not-bypass-cramming-gamerule.patch +++ b/patches/server/0442-Climbing-should-not-bypass-cramming-gamerule.patch @@ -44,7 +44,7 @@ index ee4495b67c46cf1282cdd6ad15b224b0b7b10bfb..e382a29b441b656f35bc24cb90f95cb4 } else if (entity.level().isClientSide && (!(entity1 instanceof Player) || !((Player) entity1).isLocalPlayer())) { return false; diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 3d4417af63e36c45175f8663f95c00ed9e9c6c5d..c16bc3afe2a1d90c761c43fc534a385009dd13db 100644 +index 2ca4bb4784e3ef6760e1f2e1eab93cfbc5b27a0f..536625307d7b820bd5293e70274e4d3885b04cba 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3544,7 +3544,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0445-Limit-recipe-packets.patch b/patches/server/0445-Limit-recipe-packets.patch index a4c87098fa..07d4663966 100644 --- a/patches/server/0445-Limit-recipe-packets.patch +++ b/patches/server/0445-Limit-recipe-packets.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Limit recipe packets diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 509cad3fe33a35ee22db173d84f7d8d35df4910c..e7a683ee53e44815d262a0d8c7a9c2ce2ca7a2b3 100644 +index e03d49f10f624cf09b65f5c43afcc70c4ccb4900..caf21de44bf2a39e28080f9cb9a9f2c658964633 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -266,6 +266,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0460-Fix-interact-event-not-being-called-sometimes.patch b/patches/server/0460-Fix-interact-event-not-being-called-sometimes.patch index 579eae9915..e534eb6443 100644 --- a/patches/server/0460-Fix-interact-event-not-being-called-sometimes.patch +++ b/patches/server/0460-Fix-interact-event-not-being-called-sometimes.patch @@ -11,7 +11,7 @@ Subject: [PATCH] Fix interact event not being called sometimes Co-authored-by: Moulberry diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index e7a683ee53e44815d262a0d8c7a9c2ce2ca7a2b3..98661e4aba2112fec2f2beaf6b719f38de1551ed 100644 +index caf21de44bf2a39e28080f9cb9a9f2c658964633..c0e42aafb33df84275938eccf9dd40c01cdf5404 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1771,7 +1771,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0475-Add-RegistryAccess-for-managing-Registries.patch b/patches/server/0475-Add-RegistryAccess-for-managing-Registries.patch index 808bc4c6c6..e99ffb23f3 100644 --- a/patches/server/0475-Add-RegistryAccess-for-managing-Registries.patch +++ b/patches/server/0475-Add-RegistryAccess-for-managing-Registries.patch @@ -1057,10 +1057,10 @@ index e48536683889cdea197746c55b0e67e7e4b9dc68..3216a3549011659a91cc4a0c656a56cd this.checkValidMinecraftToBukkit(clazz); diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java -index c94dae13e8edfdb0adf73a5b3fda4eb1bc97f4bc..f8e363e9c10e30598185a91cbb5cafc00b79ad3d 100644 +index c2aa05f6e03b99b1e5c0a4539420be2ca93f1c3f..41dcf87d945a0acb7806cb1704ee12f7f447daf7 100644 --- a/src/test/java/org/bukkit/support/DummyServer.java +++ b/src/test/java/org/bukkit/support/DummyServer.java -@@ -45,10 +45,7 @@ public final class DummyServer { +@@ -54,10 +54,7 @@ public final class DummyServer { when(instance.getLootTable(any())).then(mock -> new CraftLootTable(mock.getArgument(0), AbstractTestingBase.DATA_PACK.fullRegistries().getLootTable(ResourceKey.create(Registries.LOOT_TABLE, CraftNamespacedKey.toMinecraft(mock.getArgument(0)))))); @@ -1070,8 +1070,8 @@ index c94dae13e8edfdb0adf73a5b3fda4eb1bc97f4bc..f8e363e9c10e30598185a91cbb5cafc0 - }); + // Paper - RegistryAccess - // Paper start - testing additions - final Thread currentThread = Thread.currentThread(); + when(instance.getTag(any(), any(), any())).then(mock -> { + String registry = mock.getArgument(0); diff --git a/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java b/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java index 23819f05563a1d8c9f13335bc9a77964e3f8b7c6..a480944e1fc1b79b91be7e8d3e3799b9168cf5a0 100644 --- a/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java diff --git a/patches/server/0489-Add-EntityMoveEvent.patch b/patches/server/0489-Add-EntityMoveEvent.patch index ed5994857e..999a3c35ff 100644 --- a/patches/server/0489-Add-EntityMoveEvent.patch +++ b/patches/server/0489-Add-EntityMoveEvent.patch @@ -29,7 +29,7 @@ index deabbf30a550ff1835530257177b8f47e4710414..6b2d00878a373680bc3d59e19ae11a2d public LevelChunk getChunkIfLoaded(int x, int z) { return this.chunkSource.getChunk(x, z, false); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index c16bc3afe2a1d90c761c43fc534a385009dd13db..32ffca96dd3647f657bc63c212904c8d46324201 100644 +index 536625307d7b820bd5293e70274e4d3885b04cba..9153119e21c75b3d523e10897935d931f633f1a5 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3481,6 +3481,20 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0504-Allow-using-signs-inside-spawn-protection.patch b/patches/server/0504-Allow-using-signs-inside-spawn-protection.patch index 9350df5f61..745076e6ce 100644 --- a/patches/server/0504-Allow-using-signs-inside-spawn-protection.patch +++ b/patches/server/0504-Allow-using-signs-inside-spawn-protection.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow using signs inside spawn protection diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 98661e4aba2112fec2f2beaf6b719f38de1551ed..6d00c6931f5d52d037ff84242426772b73d58fd8 100644 +index c0e42aafb33df84275938eccf9dd40c01cdf5404..21544ad90171e3705ee23174a6fbff173a3ef23c 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1759,8 +1759,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0509-Don-t-ignore-result-of-PlayerEditBookEvent.patch b/patches/server/0509-Don-t-ignore-result-of-PlayerEditBookEvent.patch index 086d9c426c..eb2493e8e3 100644 --- a/patches/server/0509-Don-t-ignore-result-of-PlayerEditBookEvent.patch +++ b/patches/server/0509-Don-t-ignore-result-of-PlayerEditBookEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't ignore result of PlayerEditBookEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 6d00c6931f5d52d037ff84242426772b73d58fd8..2d7d6f0bdac54d23ed6ba718c16f99c7d1fc86b6 100644 +index 21544ad90171e3705ee23174a6fbff173a3ef23c..e89a87500c81da73a8a8b698303c4300c49fd95a 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1155,7 +1155,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0512-Fix-PlayerItemConsumeEvent-cancelling-properly.patch b/patches/server/0512-Fix-PlayerItemConsumeEvent-cancelling-properly.patch index 9263944a8d..d9b5121ed1 100644 --- a/patches/server/0512-Fix-PlayerItemConsumeEvent-cancelling-properly.patch +++ b/patches/server/0512-Fix-PlayerItemConsumeEvent-cancelling-properly.patch @@ -9,7 +9,7 @@ till their item is switched. This patch clears the active item when the event is cancelled diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 32ffca96dd3647f657bc63c212904c8d46324201..32e82bd01bcbbedd6609a482be6c7f2f35fccc10 100644 +index 9153119e21c75b3d523e10897935d931f633f1a5..cabbe2ee01b5da681ab14cfa76063f04fba0953c 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3982,6 +3982,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0519-fix-PlayerItemHeldEvent-firing-twice.patch b/patches/server/0519-fix-PlayerItemHeldEvent-firing-twice.patch index 98082daee6..b896158e96 100644 --- a/patches/server/0519-fix-PlayerItemHeldEvent-firing-twice.patch +++ b/patches/server/0519-fix-PlayerItemHeldEvent-firing-twice.patch @@ -5,7 +5,7 @@ Subject: [PATCH] fix PlayerItemHeldEvent firing twice diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 2d7d6f0bdac54d23ed6ba718c16f99c7d1fc86b6..756be0985dad9cd52394ec0144be20d1d34f9d7a 100644 +index e89a87500c81da73a8a8b698303c4300c49fd95a..98798ede3297312ca2bb164a6320f26f8169f4a5 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1934,6 +1934,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0536-Expand-PlayerGameModeChangeEvent.patch b/patches/server/0536-Expand-PlayerGameModeChangeEvent.patch index 46de1ba9ee..27ddc44a4a 100644 --- a/patches/server/0536-Expand-PlayerGameModeChangeEvent.patch +++ b/patches/server/0536-Expand-PlayerGameModeChangeEvent.patch @@ -134,7 +134,7 @@ index 5de472df78940d1b8320f73d18b2edf3a796227e..073cf184a0e7af41048ae67a9b17b4cd } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 756be0985dad9cd52394ec0144be20d1d34f9d7a..644cf792a1d04b8674d54be627f1fafc759fcb22 100644 +index 98798ede3297312ca2bb164a6320f26f8169f4a5..9acceb918c8e390d8b132a2ffb181f1cede34667 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2732,7 +2732,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0539-Move-range-check-for-block-placing-up.patch b/patches/server/0539-Move-range-check-for-block-placing-up.patch index eb20c018aa..5f6bc9c449 100644 --- a/patches/server/0539-Move-range-check-for-block-placing-up.patch +++ b/patches/server/0539-Move-range-check-for-block-placing-up.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Move range check for block placing up diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 644cf792a1d04b8674d54be627f1fafc759fcb22..2adca0a31845c1e01591b4d486514c77f7531389 100644 +index 9acceb918c8e390d8b132a2ffb181f1cede34667..0ca2cb7b3daacc55308e12604344214cc83a4084 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1746,6 +1746,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0542-Add-Unix-domain-socket-support.patch b/patches/server/0542-Add-Unix-domain-socket-support.patch index a2b93364e7..c31eb1bd29 100644 --- a/patches/server/0542-Add-Unix-domain-socket-support.patch +++ b/patches/server/0542-Add-Unix-domain-socket-support.patch @@ -87,7 +87,7 @@ index d6d7f1c446ba5507f67038ff27775ba75156f4a7..c63c194c44646e6bc1a5942655278701 } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 2adca0a31845c1e01591b4d486514c77f7531389..54a370e3cf9f7fd1fa32ee8c76d45f0769a6e612 100644 +index 0ca2cb7b3daacc55308e12604344214cc83a4084..1b9d530de9e69935eafe86c56e07b80e1128d680 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2551,6 +2551,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0544-Improve-item-default-attribute-API.patch b/patches/server/0544-Improve-item-default-attribute-API.patch index cce3124b76..76145fcd23 100644 --- a/patches/server/0544-Improve-item-default-attribute-API.patch +++ b/patches/server/0544-Improve-item-default-attribute-API.patch @@ -21,10 +21,10 @@ index de0eba19c0c963adb4f17cea22333240021fd801..3b171a08bd0bedfe224905feb5838d25 } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java -index 761d943658de9c7faadf24584baf63057e99d04a..c0ef1c99fa384fa4f898ef020ec16060a7675e84 100644 +index 3ad2d93fa4b5174531349e9dfce4f48944ee8cc5..431910368e6d5487456e8430ad7b027d19429b58 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java -@@ -198,15 +198,34 @@ public class CraftItemType implements ItemType.Typed, Han +@@ -197,15 +197,34 @@ public class CraftItemType implements ItemType.Typed, Han // return CraftEquipmentSlot.getSlot(EntityInsentient.getEquipmentSlotForItem(CraftItemStack.asNMSCopy(ItemStack.of(this)))); // } diff --git a/patches/server/0548-Add-PlayerKickEvent-causes.patch b/patches/server/0548-Add-PlayerKickEvent-causes.patch index 394d6fdcf6..097bf055a4 100644 --- a/patches/server/0548-Add-PlayerKickEvent-causes.patch +++ b/patches/server/0548-Add-PlayerKickEvent-causes.patch @@ -218,7 +218,7 @@ index 24bf661e76fb421a8be565d9ea68edf7205254d2..feb529adf2168025c785ab92d95a3246 if (this.cserver.getServer().isRunning()) { this.cserver.getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 54a370e3cf9f7fd1fa32ee8c76d45f0769a6e612..472e46503df2d3f330e2f8a7f987255d883ba10c 100644 +index 1b9d530de9e69935eafe86c56e07b80e1128d680..6feee492addc939015c6c16c2aaa2c1c4a42bde3 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -349,7 +349,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0557-Line-Of-Sight-Changes.patch b/patches/server/0557-Line-Of-Sight-Changes.patch index d9f57b6dfd..c8c316bce3 100644 --- a/patches/server/0557-Line-Of-Sight-Changes.patch +++ b/patches/server/0557-Line-Of-Sight-Changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Line Of Sight Changes diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 32e82bd01bcbbedd6609a482be6c7f2f35fccc10..9aa38a42d41a5092186c4eb6188752b5729796e9 100644 +index cabbe2ee01b5da681ab14cfa76063f04fba0953c..ca2d7db39d4f4ef485e1e4a49f2fe6b1c310baf7 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3726,7 +3726,8 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0563-Ensure-disconnect-for-book-edit-is-called-on-main.patch b/patches/server/0563-Ensure-disconnect-for-book-edit-is-called-on-main.patch index fdbd6154ca..baea885801 100644 --- a/patches/server/0563-Ensure-disconnect-for-book-edit-is-called-on-main.patch +++ b/patches/server/0563-Ensure-disconnect-for-book-edit-is-called-on-main.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Ensure disconnect for book edit is called on main diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 472e46503df2d3f330e2f8a7f987255d883ba10c..c8d99f686aa498ab34189888597166a255a659c2 100644 +index 6feee492addc939015c6c16c2aaa2c1c4a42bde3..014b8357f430309bc0d32c7f4e1a5d689305a917 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1118,7 +1118,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0567-Add-PlayerArmSwingEvent.patch b/patches/server/0567-Add-PlayerArmSwingEvent.patch index 14199e4997..3812bcc970 100644 --- a/patches/server/0567-Add-PlayerArmSwingEvent.patch +++ b/patches/server/0567-Add-PlayerArmSwingEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmSwingEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c8d99f686aa498ab34189888597166a255a659c2..d4917f507b5602bd1cc5e0cc6dc1ca166888f21e 100644 +index 014b8357f430309bc0d32c7f4e1a5d689305a917..6da81426bf358ccc80ab3cff4b96dc0ed6e068c9 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2413,7 +2413,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0568-Fix-kick-event-leave-message-not-being-sent.patch b/patches/server/0568-Fix-kick-event-leave-message-not-being-sent.patch index f833e4de3d..c4ff8571e9 100644 --- a/patches/server/0568-Fix-kick-event-leave-message-not-being-sent.patch +++ b/patches/server/0568-Fix-kick-event-leave-message-not-being-sent.patch @@ -55,7 +55,7 @@ index feb529adf2168025c785ab92d95a3246e73c0236..b43f87ff4b9853b5d4bbea5ff9686d64 MinecraftServer minecraftserver = this.server; Connection networkmanager = this.connection; diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index d4917f507b5602bd1cc5e0cc6dc1ca166888f21e..63830e8dd1a91836b8b6830f0f5758e5d0e9956f 100644 +index 6da81426bf358ccc80ab3cff4b96dc0ed6e068c9..444584160d0d0fdbe359b31851028a65cbd09a8c 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1895,6 +1895,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0574-Prevent-AFK-kick-while-watching-end-credits.patch b/patches/server/0574-Prevent-AFK-kick-while-watching-end-credits.patch index ec264e9e98..c0178fb452 100644 --- a/patches/server/0574-Prevent-AFK-kick-while-watching-end-credits.patch +++ b/patches/server/0574-Prevent-AFK-kick-while-watching-end-credits.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent AFK kick while watching end credits diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 63830e8dd1a91836b8b6830f0f5758e5d0e9956f..a241e4dfd8ca37365a4fa64f66cc57059492cef1 100644 +index 444584160d0d0fdbe359b31851028a65cbd09a8c..dc84854a94d4ba83645aa03e81b9b07a4a4ebc0d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -397,7 +397,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0593-Add-ItemFactory-getSpawnEgg-API.patch b/patches/server/0593-Add-ItemFactory-getSpawnEgg-API.patch index 6b1d0721f9..12ea03ddb7 100644 --- a/patches/server/0593-Add-ItemFactory-getSpawnEgg-API.patch +++ b/patches/server/0593-Add-ItemFactory-getSpawnEgg-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add ItemFactory#getSpawnEgg API diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index a96a09bb39fc35f3c4dfcd0da0ce1fe283b8377e..cd0b6819da81978b9186c83ee926e1fed5ee6fe4 100644 +index eabb8b42b890224dd19b879ff276e9908674310d..803a19063c03627dbea79cb1c395ae35aaef2834 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java @@ -9,6 +9,7 @@ import net.minecraft.core.HolderSet; @@ -16,7 +16,7 @@ index a96a09bb39fc35f3c4dfcd0da0ce1fe283b8377e..cd0b6819da81978b9186c83ee926e1fe import net.minecraft.server.MinecraftServer; import net.minecraft.tags.EnchantmentTags; import net.minecraft.util.RandomSource; -@@ -590,4 +591,19 @@ public final class CraftItemFactory implements ItemFactory { +@@ -286,4 +287,19 @@ public final class CraftItemFactory implements ItemFactory { new net.md_5.bungee.api.chat.TextComponent(customName)); } // Paper end - bungee hover events diff --git a/patches/server/0594-Add-critical-damage-API.patch b/patches/server/0594-Add-critical-damage-API.patch index 8215f698f2..8ca64270cb 100644 --- a/patches/server/0594-Add-critical-damage-API.patch +++ b/patches/server/0594-Add-critical-damage-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add critical damage API diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSource.java b/src/main/java/net/minecraft/world/damagesource/DamageSource.java -index 20c3cd89deaa0aa9f9b1b60cde5644e49301d2cb..10bee9b217fae9170af9d66dac9741046be1cab6 100644 +index c1d121d83591ca1b5bf9d9406c9622b4f24eafef..aee26dd78953ff43306aaa64161f5b9edcdd4b83 100644 --- a/src/main/java/net/minecraft/world/damagesource/DamageSource.java +++ b/src/main/java/net/minecraft/world/damagesource/DamageSource.java -@@ -260,4 +260,18 @@ public class DamageSource { +@@ -276,4 +276,18 @@ public class DamageSource { public Holder typeHolder() { return this.type; } @@ -49,7 +49,7 @@ index c89b7cf63d067895bbd07f43eef467ff1861f625..536a4e3c26e83f359083bde19832a962 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index e8004c0689918a81369b404ab2a4143c26aa2b07..a2efc49f2b14c78991a3fa5b3e2cefee0209bcc1 100644 +index f7dab560a1f98e494303ba4c5fd3d82fb78e9503..64bc4a668f635a6765ededd22246294e50c5297f 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java @@ -422,6 +422,7 @@ public abstract class AbstractArrow extends Projectile { diff --git a/patches/server/0603-Improve-and-expand-AsyncCatcher.patch b/patches/server/0603-Improve-and-expand-AsyncCatcher.patch index b181efb0b4..09db2442ff 100644 --- a/patches/server/0603-Improve-and-expand-AsyncCatcher.patch +++ b/patches/server/0603-Improve-and-expand-AsyncCatcher.patch @@ -17,7 +17,7 @@ Async catch modifications to critical entity state Co-authored-by: Jake Potrebic diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a241e4dfd8ca37365a4fa64f66cc57059492cef1..84ca8fbab4a7ef905a312d4bdee6182bb5ffeafd 100644 +index dc84854a94d4ba83645aa03e81b9b07a4a4ebc0d..5757e26cad9d53ab80865bb0d113555c6aa158c2 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1578,6 +1578,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -29,7 +29,7 @@ index a241e4dfd8ca37365a4fa64f66cc57059492cef1..84ca8fbab4a7ef905a312d4bdee6182b if (player.isRemoved()) { LOGGER.info("Attempt to teleport removed player {} restricted", player.getScoreboardName()); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 9aa38a42d41a5092186c4eb6188752b5729796e9..01bf2ae30885aefa7cd1ba3c79be4860bc355640 100644 +index ca2d7db39d4f4ef485e1e4a49f2fe6b1c310baf7..94e26d8ba0eb32e241ae4018eee767120192a80d 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1121,7 +1121,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0617-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch b/patches/server/0617-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch index 940ce06e1e..177e43f073 100644 --- a/patches/server/0617-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch +++ b/patches/server/0617-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Don't respond to ServerboundCommandSuggestionPacket when diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 84ca8fbab4a7ef905a312d4bdee6182bb5ffeafd..24ca951ed7b5b6a38e54893902a899409f0c7888 100644 +index 5757e26cad9d53ab80865bb0d113555c6aa158c2..c72153d59c5c444706173dcd8daf85dd57bc56dd 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -748,6 +748,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0619-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch b/patches/server/0619-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch index d9f19d0199..0b139a1e02 100644 --- a/patches/server/0619-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch +++ b/patches/server/0619-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch @@ -11,10 +11,10 @@ This commit hence simply fixes this by using the proper body colour value when updating the pattern color. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java -index c815dfdf2088830b4dfc8e82f818cc89a8d9439b..911bdce0795a6b11cd1d5ad5211202456e5225d4 100644 +index 8169d08c1bccf7c9896bb083eba388f918fac6c9..a514fe98d3d2b65d2cfd029079c69189bcb99c01 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java -@@ -134,7 +134,7 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB +@@ -128,7 +128,7 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB if (this.variant == null) { this.variant = 0; } diff --git a/patches/server/0633-Prevent-excessive-velocity-through-repeated-crits.patch b/patches/server/0633-Prevent-excessive-velocity-through-repeated-crits.patch index 6cad6a1123..d6ec443589 100644 --- a/patches/server/0633-Prevent-excessive-velocity-through-repeated-crits.patch +++ b/patches/server/0633-Prevent-excessive-velocity-through-repeated-crits.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent excessive velocity through repeated crits diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 01bf2ae30885aefa7cd1ba3c79be4860bc355640..7aa26994e5740399ebe560840c5e0e8693a1d5de 100644 +index 94e26d8ba0eb32e241ae4018eee767120192a80d..0ede1e49dc05596b8a2551dbed26f363105b3fe3 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -2744,17 +2744,29 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0661-Freeze-Tick-Lock-API.patch b/patches/server/0661-Freeze-Tick-Lock-API.patch index b8d9e5813b..fe59902cdc 100644 --- a/patches/server/0661-Freeze-Tick-Lock-API.patch +++ b/patches/server/0661-Freeze-Tick-Lock-API.patch @@ -46,7 +46,7 @@ index 038c22d09818c9a8310a8457d87b7e61119bb0dd..ad049687cd6c6c98bd08b512c6233b72 } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 7aa26994e5740399ebe560840c5e0e8693a1d5de..547ab66ef905767ed0e7a1b10046070630de711b 100644 +index 0ede1e49dc05596b8a2551dbed26f363105b3fe3..dfe58b1e3bab7ec8e8b12dba8d613a842f462cbb 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3468,7 +3468,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0679-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch b/patches/server/0679-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch index 17d61012f7..be3f076c4d 100644 --- a/patches/server/0679-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch +++ b/patches/server/0679-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch @@ -15,7 +15,7 @@ piercing arrows to avoid duplicate damage being applied. protected net.minecraft.world.entity.projectile.Projectile hitCancelled diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index a2efc49f2b14c78991a3fa5b3e2cefee0209bcc1..114add343370700a7dbd438432635c76a0cbb871 100644 +index 64bc4a668f635a6765ededd22246294e50c5297f..1d90e9cac17e3cb2af25acad7b335447bc0a3253 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java @@ -329,6 +329,19 @@ public abstract class AbstractArrow extends Projectile { diff --git a/patches/server/0680-More-Projectile-API.patch b/patches/server/0680-More-Projectile-API.patch index 65d96303ec..1fb10f32a5 100644 --- a/patches/server/0680-More-Projectile-API.patch +++ b/patches/server/0680-More-Projectile-API.patch @@ -346,7 +346,7 @@ index 1b084d63bdbb24dad45d28eed1693eb6e26e24dc..43d7bea201a52cfeacf60c75caa28dfd @Override public Vector getDirection() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java -index c9e15a9d82dee935293b2e7e233f5b9b2d822448..3c31ff72f3e77ee0d9231fec5f15267c56799a7c 100644 +index c9e15a9d82dee935293b2e7e233f5b9b2d822448..2d54cf6f3d9696c55335f0a2057025e2034d4e13 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java @@ -15,24 +15,26 @@ import org.bukkit.inventory.meta.FireworkMeta; @@ -395,7 +395,7 @@ index c9e15a9d82dee935293b2e7e233f5b9b2d822448..3c31ff72f3e77ee0d9231fec5f15267c @Override public FireworkMeta getFireworkMeta() { - return (FireworkMeta) this.item.getItemMeta(); -+ return (FireworkMeta) CraftItemStack.getItemMeta(this.getHandle().getEntityData().get(FireworkRocketEntity.DATA_ID_FIREWORKS_ITEM), Material.FIREWORK_ROCKET); // Paper - Expose firework item directly ++ return (FireworkMeta) CraftItemStack.getItemMeta(this.getHandle().getEntityData().get(FireworkRocketEntity.DATA_ID_FIREWORKS_ITEM), org.bukkit.inventory.ItemType.FIREWORK_ROCKET); // Paper - Expose firework item directly } @Override @@ -625,7 +625,7 @@ index d685d09cae5f862c0004f148298c800736d2139e..636c4481e3afdf20197e502cf221f5d3 public String toString() { return "CraftShulkerBullet"; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java -index d67a80161b3e7c1fe02a6ed9d341c00dc7c2847a..408a0a0433b97d7f97d758fd1dfa7975dbf8eccd 100644 +index d67a80161b3e7c1fe02a6ed9d341c00dc7c2847a..f6fa6f1ac50b757dd3bc9a8dee9f6085446182c8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java @@ -36,11 +36,31 @@ public class CraftThrownPotion extends CraftThrowableProjectile implements Throw @@ -643,7 +643,7 @@ index d67a80161b3e7c1fe02a6ed9d341c00dc7c2847a..408a0a0433b97d7f97d758fd1dfa7975 + // Paper start - Projectile API + @Override + public org.bukkit.inventory.meta.PotionMeta getPotionMeta() { -+ return (org.bukkit.inventory.meta.PotionMeta) CraftItemStack.getItemMeta(this.getHandle().getItem(), Material.SPLASH_POTION); ++ return (org.bukkit.inventory.meta.PotionMeta) CraftItemStack.getItemMeta(this.getHandle().getItem(), org.bukkit.inventory.ItemType.SPLASH_POTION); + } + + @Override @@ -733,10 +733,10 @@ index 76e262cc2d6686096eb7b58b6e7343c2a0ecafe5..f47c881aada65e91a6a433b0d2df031f } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 52622ed31fe2f3616a53681030cc01517b63e7ab..7fd33fa4b3b0d9faf603c0f17ecd035e5a620bb1 100644 +index 23d61d553be3ab0a62624e469b2782baa2b075db..a147b54668854668b02bbe39c9eae22bb98dc217 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -@@ -306,12 +306,22 @@ public final class CraftItemStack extends ItemStack { +@@ -306,12 +306,23 @@ public final class CraftItemStack extends ItemStack { public ItemMeta getItemMeta() { return CraftItemStack.getItemMeta(this.handle); } @@ -748,16 +748,15 @@ index 52622ed31fe2f3616a53681030cc01517b63e7ab..7fd33fa4b3b0d9faf603c0f17ecd035e + } public static ItemMeta getItemMeta(net.minecraft.world.item.ItemStack item) { -+ return getItemMeta(item, CraftItemStack.getType(item)); ++ return getItemMeta(item, null); + } -+ public static ItemMeta getItemMeta(net.minecraft.world.item.ItemStack item, Material material) { ++ public static ItemMeta getItemMeta(net.minecraft.world.item.ItemStack item, org.bukkit.inventory.ItemType metaForType) { + // Paper end if (!CraftItemStack.hasItemMeta(item)) { -- return CraftItemFactory.instance().getItemMeta(CraftItemStack.getType(item)); -+ return CraftItemFactory.instance().getItemMeta(material); // Paper + return CraftItemFactory.instance().getItemMeta(CraftItemStack.getType(item)); } -- switch (CraftItemStack.getType(item)) { -+ switch (material) { // Paper - case WRITTEN_BOOK: - return new CraftMetaBookSigned(item.getComponentsPatch()); - case WRITABLE_BOOK: + ++ if (metaForType != null) { return ((CraftItemType) metaForType).getItemMeta(item); } // Paper + return ((CraftItemType) CraftItemType.minecraftToBukkitNew(item.getItem())).getItemMeta(item); + } + diff --git a/patches/server/0682-Don-t-allow-vehicle-movement-from-players-while-tele.patch b/patches/server/0682-Don-t-allow-vehicle-movement-from-players-while-tele.patch index 1e7c828a4a..ceb39c1064 100644 --- a/patches/server/0682-Don-t-allow-vehicle-movement-from-players-while-tele.patch +++ b/patches/server/0682-Don-t-allow-vehicle-movement-from-players-while-tele.patch @@ -7,7 +7,7 @@ Bring the vehicle move packet behavior in line with the regular player move packet. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 24ca951ed7b5b6a38e54893902a899409f0c7888..dfbff79f8ae30ad17b80096aa93c7355655b2d35 100644 +index c72153d59c5c444706173dcd8daf85dd57bc56dd..3b1ca4e17360599ff22408a79c813f95318861ab 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -484,6 +484,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0685-Implement-enchantWithLevels-API.patch b/patches/server/0685-Implement-enchantWithLevels-API.patch index f8d9bb82f2..e228c3dfc4 100644 --- a/patches/server/0685-Implement-enchantWithLevels-API.patch +++ b/patches/server/0685-Implement-enchantWithLevels-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement enchantWithLevels API diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index cd0b6819da81978b9186c83ee926e1fed5ee6fe4..6d1eab448f368be8e1d768712f80f2c4d93c5e1a 100644 +index 803a19063c03627dbea79cb1c395ae35aaef2834..aeb72f7c1bef0407eb00f1116948a0d96ff2ea7b 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -606,4 +606,29 @@ public final class CraftItemFactory implements ItemFactory { +@@ -302,4 +302,29 @@ public final class CraftItemFactory implements ItemFactory { return eggItem == null ? null : new net.minecraft.world.item.ItemStack(eggItem).asBukkitMirror(); } // Paper end - old getSpawnEgg API diff --git a/patches/server/0695-Prevent-tile-entity-copies-loading-chunks.patch b/patches/server/0695-Prevent-tile-entity-copies-loading-chunks.patch index b695517b43..cd9b866ad6 100644 --- a/patches/server/0695-Prevent-tile-entity-copies-loading-chunks.patch +++ b/patches/server/0695-Prevent-tile-entity-copies-loading-chunks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent tile entity copies loading chunks diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index dfbff79f8ae30ad17b80096aa93c7355655b2d35..eb00ba3bf983093917b5872d56415838f38c042d 100644 +index 3b1ca4e17360599ff22408a79c813f95318861ab..d46fbc276bf4e751988384f876260264b91b13c5 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -3202,7 +3202,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0704-Add-PlayerStopUsingItemEvent.patch b/patches/server/0704-Add-PlayerStopUsingItemEvent.patch index fde5fa1e6a..a2453612cc 100644 --- a/patches/server/0704-Add-PlayerStopUsingItemEvent.patch +++ b/patches/server/0704-Add-PlayerStopUsingItemEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerStopUsingItemEvent diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 547ab66ef905767ed0e7a1b10046070630de711b..5775ab650946548cc90c09da39fa8baf0dfb4f2e 100644 +index dfe58b1e3bab7ec8e8b12dba8d613a842f462cbb..8e11b085d2159b1df8bbe536beb66d9bed915373 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -4044,6 +4044,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0721-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch b/patches/server/0721-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch index 56d5a7ad9e..c2e21a749e 100644 --- a/patches/server/0721-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch +++ b/patches/server/0721-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch @@ -7,7 +7,7 @@ Remove in 1.19 along with the SplashPotion and LingeringPotion interfaces diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java -index 408a0a0433b97d7f97d758fd1dfa7975dbf8eccd..42462fac097aeb1cfd367f8c240da63f513ec5a8 100644 +index f6fa6f1ac50b757dd3bc9a8dee9f6085446182c8..65b6de9d21da6843d7c7087f0dea98d3b75f24cf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java @@ -14,7 +14,7 @@ import org.bukkit.entity.ThrownPotion; diff --git a/patches/server/0726-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch b/patches/server/0726-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch index 1d13098f80..cb793fb08e 100644 --- a/patches/server/0726-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch +++ b/patches/server/0726-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix Spigot Config not using commands.spam-exclusions diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index eb00ba3bf983093917b5872d56415838f38c042d..c3acf78c9df1108ea89d84d135b1784f6c96418d 100644 +index d46fbc276bf4e751988384f876260264b91b13c5..ce466ccf573f69738813e947f6c6c6d0db6d82b7 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2384,7 +2384,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0727-More-Teleport-API.patch b/patches/server/0727-More-Teleport-API.patch index 4fe9942d06..732ed40fc2 100644 --- a/patches/server/0727-More-Teleport-API.patch +++ b/patches/server/0727-More-Teleport-API.patch @@ -5,11 +5,11 @@ Subject: [PATCH] More Teleport API diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c3acf78c9df1108ea89d84d135b1784f6c96418d..3f452f8f5e85a4f86ff53420ceae237abf97643b 100644 +index ce466ccf573f69738813e947f6c6c6d0db6d82b7..6044a84fd9a3b07e418b8e308b3d6faeb152170c 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1566,11 +1566,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl - return false; // CraftBukkit - Return event status + return true; // CraftBukkit - Return event status } - PlayerTeleportEvent event = new PlayerTeleportEvent(player, from.clone(), to.clone(), cause); diff --git a/patches/server/0730-Send-block-entities-after-destroy-prediction.patch b/patches/server/0730-Send-block-entities-after-destroy-prediction.patch index 9ae630db23..a7c1fdde0f 100644 --- a/patches/server/0730-Send-block-entities-after-destroy-prediction.patch +++ b/patches/server/0730-Send-block-entities-after-destroy-prediction.patch @@ -57,7 +57,7 @@ index 4d024956156aefde7df308642dfd0a40779e0633..6abecaac8407b992d208a9108e11fd49 } } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 3f452f8f5e85a4f86ff53420ceae237abf97643b..df30166a5b1b8b2c43bbe96406452fa7630b5bba 100644 +index 6044a84fd9a3b07e418b8e308b3d6faeb152170c..bebbf173d846337fb2a0887c1a0f9a4afca570f8 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1712,8 +1712,28 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0740-Stop-large-look-changes-from-crashing-the-server.patch b/patches/server/0740-Stop-large-look-changes-from-crashing-the-server.patch index 83fe0e5640..63adf0fc72 100644 --- a/patches/server/0740-Stop-large-look-changes-from-crashing-the-server.patch +++ b/patches/server/0740-Stop-large-look-changes-from-crashing-the-server.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Stop large look changes from crashing the server Co-authored-by: Jaren Knodel diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 5775ab650946548cc90c09da39fa8baf0dfb4f2e..680695f5827d541bd9ec64721dd3067101843a48 100644 +index 8e11b085d2159b1df8bbe536beb66d9bed915373..1d6179d54ff2264d3489770b23fc7ba479c17f25 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3129,37 +3129,15 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0774-check-global-player-list-where-appropriate.patch b/patches/server/0774-check-global-player-list-where-appropriate.patch index 412ae0a7f3..63bb71842c 100644 --- a/patches/server/0774-check-global-player-list-where-appropriate.patch +++ b/patches/server/0774-check-global-player-list-where-appropriate.patch @@ -24,7 +24,7 @@ index 15607da2883653cd757a3220ddf79833afd39330..b9d3a98824fc146128f35244f5f15bba + // Paper end - check global player list where appropriate } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 680695f5827d541bd9ec64721dd3067101843a48..7f7e1054b57a25a004ab70ee9bac02602a38e8f4 100644 +index 1d6179d54ff2264d3489770b23fc7ba479c17f25..532f954a052eca3279f974450c2133837410282e 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3694,7 +3694,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0777-Friction-API.patch b/patches/server/0777-Friction-API.patch index b7a6ac55da..f5dba5cb62 100644 --- a/patches/server/0777-Friction-API.patch +++ b/patches/server/0777-Friction-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Friction API diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 7f7e1054b57a25a004ab70ee9bac02602a38e8f4..f1e61796d54bcdf797b9350623fb61eabfd9d12d 100644 +index 532f954a052eca3279f974450c2133837410282e..c64fb799f2f40831cd25a409713c9b5081c76002 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -285,6 +285,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0789-Improve-logging-and-errors.patch b/patches/server/0789-Improve-logging-and-errors.patch index f0f15d3d4f..42d1e7b166 100644 --- a/patches/server/0789-Improve-logging-and-errors.patch +++ b/patches/server/0789-Improve-logging-and-errors.patch @@ -52,7 +52,7 @@ index aa39bdb0a4ba8fedf5052ea9700afa7d4d2a4300..b4af03c4bdd1ce0861f36c3b75fc7e89 } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index df30166a5b1b8b2c43bbe96406452fa7630b5bba..5c53ea359f84db08170b951d8b683f7cac2b4d3a 100644 +index bebbf173d846337fb2a0887c1a0f9a4afca570f8..0e2d8a4bd05dc8bf7b79e268a6985b025f3296fa 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -3400,7 +3400,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0792-Add-missing-SpigotConfig-logCommands-check.patch b/patches/server/0792-Add-missing-SpigotConfig-logCommands-check.patch index 34b8d7f80a..c3885506e8 100644 --- a/patches/server/0792-Add-missing-SpigotConfig-logCommands-check.patch +++ b/patches/server/0792-Add-missing-SpigotConfig-logCommands-check.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add missing SpigotConfig logCommands check Co-authored-by: david diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 5c53ea359f84db08170b951d8b683f7cac2b4d3a..70ad2f0370ec1d5b4f829d0b624e31a54ba53e64 100644 +index 0e2d8a4bd05dc8bf7b79e268a6985b025f3296fa..f525e120fa1e36d756e5e8bd96bf2d0bdce51a65 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2058,7 +2058,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0797-Use-single-player-info-update-packet-on-join.patch b/patches/server/0797-Use-single-player-info-update-packet-on-join.patch index 1eab622611..e88e6c54b9 100644 --- a/patches/server/0797-Use-single-player-info-update-packet-on-join.patch +++ b/patches/server/0797-Use-single-player-info-update-packet-on-join.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Use single player info update packet on join diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 70ad2f0370ec1d5b4f829d0b624e31a54ba53e64..4950d3a1abe346680e4047bad835c7bfb848664b 100644 +index f525e120fa1e36d756e5e8bd96bf2d0bdce51a65..249b94b75fd1007e491fd1de4377e06880175a7f 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -3438,7 +3438,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0798-Correctly-shrink-items-during-EntityResurrectEvent.patch b/patches/server/0798-Correctly-shrink-items-during-EntityResurrectEvent.patch index 2bb49f6ef4..58b1a31cc8 100644 --- a/patches/server/0798-Correctly-shrink-items-during-EntityResurrectEvent.patch +++ b/patches/server/0798-Correctly-shrink-items-during-EntityResurrectEvent.patch @@ -22,7 +22,7 @@ This patch corrects this behaviour by only shrinking the item if a totem of undying was found and the event was called uncancelled. diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index f1e61796d54bcdf797b9350623fb61eabfd9d12d..a0953db6207864208c97a0c0b961424baedc6be7 100644 +index c64fb799f2f40831cd25a409713c9b5081c76002..8ec08a30875816d2b8258b56ee37a4938aed50fb 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1621,7 +1621,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0800-Remove-CraftItemStack-setAmount-null-assignment.patch b/patches/server/0800-Remove-CraftItemStack-setAmount-null-assignment.patch index 04050cfc0f..80397182f2 100644 --- a/patches/server/0800-Remove-CraftItemStack-setAmount-null-assignment.patch +++ b/patches/server/0800-Remove-CraftItemStack-setAmount-null-assignment.patch @@ -16,7 +16,7 @@ with less than zero amounts, so this code doesn't create a problem with operations on the vanilla ItemStack. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 7fd33fa4b3b0d9faf603c0f17ecd035e5a620bb1..f6f08debfa85e39225463125279e8113999cbcf3 100644 +index a147b54668854668b02bbe39c9eae22bb98dc217..8d7e7e831792422d6e9f3210496c577fb64d597f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -163,7 +163,7 @@ public final class CraftItemStack extends ItemStack { diff --git a/patches/server/0808-Fix-advancement-triggers-for-entity-damage.patch b/patches/server/0808-Fix-advancement-triggers-for-entity-damage.patch index 3ad297e9ed..e4afda05dd 100644 --- a/patches/server/0808-Fix-advancement-triggers-for-entity-damage.patch +++ b/patches/server/0808-Fix-advancement-triggers-for-entity-damage.patch @@ -23,7 +23,7 @@ index 2ebbf7954dc5e0d6c9d53327d05b725eec310086..c5bd2e90ad74ba08910f65a2e07b6f76 return !this.getResponse(); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index a0953db6207864208c97a0c0b961424baedc6be7..17d567f7555c155949d70a8d3365a883c244c981 100644 +index 8ec08a30875816d2b8258b56ee37a4938aed50fb..c8c52514777a97b35bd4fb2ac84565f07c8921d7 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -2359,7 +2359,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0812-Fix-SpawnEggMeta-get-setSpawnedType.patch b/patches/server/0812-Fix-SpawnEggMeta-get-setSpawnedType.patch index c0fda16f78..f3afed07e4 100644 --- a/patches/server/0812-Fix-SpawnEggMeta-get-setSpawnedType.patch +++ b/patches/server/0812-Fix-SpawnEggMeta-get-setSpawnedType.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix SpawnEggMeta#get/setSpawnedType diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java -index 686816a1fb9f918b13c0a589c5c5c95a1c7ffe3a..1c2b0407b51906a255e6d240fab969578743938e 100644 +index ea9937ad27817112f71e8a0a816865961ce19a61..2c6ee95edea9dc959d8d31d689dc27fea4080467 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java -@@ -185,6 +185,30 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta { +@@ -94,6 +94,30 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta { public void setSpawnedType(EntityType type) { throw new UnsupportedOperationException("Must change item type to set spawned type"); } diff --git a/patches/server/0814-Treat-sequence-violations-like-they-should-be.patch b/patches/server/0814-Treat-sequence-violations-like-they-should-be.patch index 4fb5d800bb..0c1ccc268b 100644 --- a/patches/server/0814-Treat-sequence-violations-like-they-should-be.patch +++ b/patches/server/0814-Treat-sequence-violations-like-they-should-be.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Treat sequence violations like they should be diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 4950d3a1abe346680e4047bad835c7bfb848664b..ad01869fdf83b1678c336e88549c910ee86071a4 100644 +index 249b94b75fd1007e491fd1de4377e06880175a7f..6485780c3fe2ad866c7c93419fde1e96f6f0bddc 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1977,6 +1977,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0815-Prevent-causing-expired-keys-from-impacting-new-join.patch b/patches/server/0815-Prevent-causing-expired-keys-from-impacting-new-join.patch index b30fcefb55..11aa4b82b7 100644 --- a/patches/server/0815-Prevent-causing-expired-keys-from-impacting-new-join.patch +++ b/patches/server/0815-Prevent-causing-expired-keys-from-impacting-new-join.patch @@ -26,7 +26,7 @@ index 68c062cbaa030d62d97c9c003651f8fc17a00a6b..6247a21c9c391abf1f6db3482c659593 UPDATE_GAME_MODE((serialized, buf) -> serialized.gameMode = GameType.byId(buf.readVarInt()), (buf, entry) -> buf.writeVarInt(entry.gameMode().getId())), UPDATE_LISTED((serialized, buf) -> serialized.listed = buf.readBoolean(), (buf, entry) -> buf.writeBoolean(entry.listed())), diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index ad01869fdf83b1678c336e88549c910ee86071a4..730c7d28e3a3494feec6a94492b2b1b00412d94e 100644 +index 6485780c3fe2ad866c7c93419fde1e96f6f0bddc..3ec08f9206274a857f6999faa4e5db0ac46b6a5f 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -295,6 +295,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0843-fix-item-meta-for-tadpole-buckets.patch b/patches/server/0843-fix-item-meta-for-tadpole-buckets.patch index b3fab8868c..0fc39b3ea1 100644 --- a/patches/server/0843-fix-item-meta-for-tadpole-buckets.patch +++ b/patches/server/0843-fix-item-meta-for-tadpole-buckets.patch @@ -4,30 +4,19 @@ Date: Tue, 11 Jul 2023 11:22:30 -0700 Subject: [PATCH] fix item meta for tadpole buckets -diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 6d1eab448f368be8e1d768712f80f2c4d93c5e1a..c4ec0165dc0d2bba829c2310596e70a1b224e225 100644 ---- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -377,6 +377,7 @@ public final class CraftItemFactory implements ItemFactory { - case COD_BUCKET: - case PUFFERFISH_BUCKET: - case SALMON_BUCKET: -+ case TADPOLE_BUCKET: // Paper - case ITEM_FRAME: - case GLOW_ITEM_FRAME: - case PAINTING: -diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index f6f08debfa85e39225463125279e8113999cbcf3..fa5639fca9298738e73f12f1225d9c3a3e7a7055 100644 ---- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -@@ -615,6 +615,7 @@ public final class CraftItemStack extends ItemStack { - case COD_BUCKET: - case PUFFERFISH_BUCKET: - case SALMON_BUCKET: -+ case TADPOLE_BUCKET: // Paper - case ITEM_FRAME: - case GLOW_ITEM_FRAME: - case PAINTING: +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java +index 4ae9930c2d74e5b1e3ad0c2ecf6556dc59cbf23c..a6c78854c10362864c2297de903ab9594cdb1eb6 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java +@@ -286,7 +286,7 @@ public final class CraftItemMetas { + if (itemType == ItemType.SUSPICIOUS_STEW) { + return CraftItemMetas.asType(CraftItemMetas.SUSPICIOUS_STEW_META_DATA); + } +- if (itemType == ItemType.COD_BUCKET || itemType == ItemType.PUFFERFISH_BUCKET ++ if (itemType == ItemType.COD_BUCKET || itemType == ItemType.PUFFERFISH_BUCKET || itemType == ItemType.TADPOLE_BUCKET // Paper + || itemType == ItemType.SALMON_BUCKET || itemType == ItemType.ITEM_FRAME + || itemType == ItemType.GLOW_ITEM_FRAME || itemType == ItemType.PAINTING) { + return CraftItemMetas.asType(CraftItemMetas.ENTITY_TAG_META_DATA); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEntityTag.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEntityTag.java index 27af7ca9d62bdb4a24be5af139c181d7bc271ba5..3ff0340c40e9dc9a6e690de15ccade7a0c4e8f02 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEntityTag.java diff --git a/patches/server/0851-Implement-PlayerFailMoveEvent.patch b/patches/server/0851-Implement-PlayerFailMoveEvent.patch index 179c8b53b4..8cda03ce44 100644 --- a/patches/server/0851-Implement-PlayerFailMoveEvent.patch +++ b/patches/server/0851-Implement-PlayerFailMoveEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement PlayerFailMoveEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 730c7d28e3a3494feec6a94492b2b1b00412d94e..97c0fe8b90776ba8335bf322e8a74872468aae58 100644 +index 3ec08f9206274a857f6999faa4e5db0ac46b6a5f..2ee205375250456c89aae7a472014f9598c2359e 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1261,8 +1261,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0867-Don-t-tab-complete-namespaced-commands-if-send-names.patch b/patches/server/0867-Don-t-tab-complete-namespaced-commands-if-send-names.patch index 9e3d20928c..b082ac2c42 100644 --- a/patches/server/0867-Don-t-tab-complete-namespaced-commands-if-send-names.patch +++ b/patches/server/0867-Don-t-tab-complete-namespaced-commands-if-send-names.patch @@ -11,7 +11,7 @@ This patch prevents server from sending namespaced commands when player requests tab-complete only commands. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 97c0fe8b90776ba8335bf322e8a74872468aae58..d78f760d220869f83ab5f7576d69d637150a9e82 100644 +index 2ee205375250456c89aae7a472014f9598c2359e..61f379d456f2774f9b95435db4467a9835d9c2f6 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -820,6 +820,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0877-Add-PlayerPickItemEvent.patch b/patches/server/0877-Add-PlayerPickItemEvent.patch index 542c0e535f..909407b450 100644 --- a/patches/server/0877-Add-PlayerPickItemEvent.patch +++ b/patches/server/0877-Add-PlayerPickItemEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerPickItemEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index d78f760d220869f83ab5f7576d69d637150a9e82..f2ecbaa180029eb52602b81d1e351721cc2ddf3b 100644 +index 61f379d456f2774f9b95435db4467a9835d9c2f6..7cfbcd661488b45e07b3869f2bb55dcd3b671285 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -935,8 +935,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0887-Add-slot-sanity-checks-in-container-clicks.patch b/patches/server/0887-Add-slot-sanity-checks-in-container-clicks.patch index 4f1058e85b..3e89e648da 100644 --- a/patches/server/0887-Add-slot-sanity-checks-in-container-clicks.patch +++ b/patches/server/0887-Add-slot-sanity-checks-in-container-clicks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add slot sanity checks in container clicks diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index f2ecbaa180029eb52602b81d1e351721cc2ddf3b..518b64a3c18ea003109c9b1a1bfe12e29c78e099 100644 +index 7cfbcd661488b45e07b3869f2bb55dcd3b671285..2e96486ddd9eca0e26fa645628f2ec00992dc020 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2987,6 +2987,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0889-Allow-proper-checking-of-empty-item-stacks.patch b/patches/server/0889-Allow-proper-checking-of-empty-item-stacks.patch index 62401e7f99..4e10b7651f 100644 --- a/patches/server/0889-Allow-proper-checking-of-empty-item-stacks.patch +++ b/patches/server/0889-Allow-proper-checking-of-empty-item-stacks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow proper checking of empty item stacks diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index fa5639fca9298738e73f12f1225d9c3a3e7a7055..b5902c2262b59ffd321bf8b9324d7946d0fda305 100644 +index 8d7e7e831792422d6e9f3210496c577fb64d597f..41c0cfc88f2ec48c1bb8ac10a78f89bf1f2f2319 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -39,12 +39,19 @@ public final class CraftItemStack extends ItemStack { diff --git a/patches/server/0899-Update-entity-data-when-attaching-firework-to-entity.patch b/patches/server/0899-Update-entity-data-when-attaching-firework-to-entity.patch index 35494c32ed..f2c094976f 100644 --- a/patches/server/0899-Update-entity-data-when-attaching-firework-to-entity.patch +++ b/patches/server/0899-Update-entity-data-when-attaching-firework-to-entity.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Update entity data when attaching firework to entity public net.minecraft.world.entity.projectile.FireworkRocketEntity DATA_ATTACHED_TO_TARGET diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java -index 3c31ff72f3e77ee0d9231fec5f15267c56799a7c..95e35c223f2ad9b6de6749544abd68de71e4f1ab 100644 +index 2d54cf6f3d9696c55335f0a2057025e2034d4e13..759b6e54db93792c9862b1f1625118ac6fa49d7a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java @@ -69,6 +69,10 @@ public class CraftFirework extends CraftProjectile implements Firework { diff --git a/patches/server/0908-Broadcast-take-item-packets-with-collector-as-source.patch b/patches/server/0908-Broadcast-take-item-packets-with-collector-as-source.patch index dc40dd2151..f114e5e960 100644 --- a/patches/server/0908-Broadcast-take-item-packets-with-collector-as-source.patch +++ b/patches/server/0908-Broadcast-take-item-packets-with-collector-as-source.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Broadcast take item packets with collector as source This fixes players (which can't view the collector) seeing item pickups with themselves as the target. diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 17d567f7555c155949d70a8d3365a883c244c981..25af0dd807e258453ae419abcb6dcc245b997bb7 100644 +index c8c52514777a97b35bd4fb2ac84565f07c8921d7..9a2b874594e2f04f59b7d2be389223604d56219a 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3720,7 +3720,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0916-Don-t-fire-sync-events-during-worldgen.patch b/patches/server/0916-Don-t-fire-sync-events-during-worldgen.patch index aa4e2240b4..db1332ce1b 100644 --- a/patches/server/0916-Don-t-fire-sync-events-during-worldgen.patch +++ b/patches/server/0916-Don-t-fire-sync-events-during-worldgen.patch @@ -68,7 +68,7 @@ index 5fb3279342506611882b5780cfbee0371919c93c..b98f9246b60daf31460f41ce214dfa7c }, () -> { EntityType.LOGGER.warn("Skipping Entity with id {}", nbt.getString("id")); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 25af0dd807e258453ae419abcb6dcc245b997bb7..bfbdc0f4a707e81c6d62ebb208b97def186e6e73 100644 +index 9a2b874594e2f04f59b7d2be389223604d56219a..3f788e88604b77761c5add39450cf1640604c0f0 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1137,6 +1137,11 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0918-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch b/patches/server/0918-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch index fd122481de..d7613db46b 100644 --- a/patches/server/0918-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch +++ b/patches/server/0918-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix CraftMetaItem#getAttributeModifier duplication check diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index fab1e47d0faffe83366687e4ec3ae02d4887ff8a..758e01a05f5ca88f72ea3d54a7cdc49bbfadfaf5 100644 +index 24ebc5841ed16129c0e9305da6cf1d8fb67d42ec..529e20fcbf0e7ba22a3f0e7a60ae540c21fed424 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -1359,7 +1359,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1405,7 +1405,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { Preconditions.checkNotNull(modifier, "AttributeModifier cannot be null"); this.checkAttributeList(); for (Map.Entry entry : this.attributeModifiers.entries()) { diff --git a/patches/server/0919-Restore-vanilla-entity-drops-behavior.patch b/patches/server/0919-Restore-vanilla-entity-drops-behavior.patch index 471b19c764..6594619e44 100644 --- a/patches/server/0919-Restore-vanilla-entity-drops-behavior.patch +++ b/patches/server/0919-Restore-vanilla-entity-drops-behavior.patch @@ -104,7 +104,7 @@ index e4ad97071ed0e82fc910c34e700c6c6eee99deea..3d150ed6c3f7313628ccf110c1a67aa7 return this.spawnAtLocation(entityitem); } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index bfbdc0f4a707e81c6d62ebb208b97def186e6e73..4bb6788adb78b8ac5ebbb1f7bea2c623d60990a0 100644 +index 3f788e88604b77761c5add39450cf1640604c0f0..3e58fa4160fd4e4e5b5d00ba8f963b1b74be2663 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -278,7 +278,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0923-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch b/patches/server/0923-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch index 1c9f726e07..4c7c476e6d 100644 --- a/patches/server/0923-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch +++ b/patches/server/0923-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch @@ -26,7 +26,7 @@ index a306b30af19277386a2f3e560b4902a8b5796f2a..54851f6cc0d5fddb32a9a1e84a4f5ae4 x = to.getX(); y = to.getY(); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 4bb6788adb78b8ac5ebbb1f7bea2c623d60990a0..bc8ee398dfe4fb15cb513e52dd3da7347be0544a 100644 +index 3e58fa4160fd4e4e5b5d00ba8f963b1b74be2663..a7eec0a1f053d0f4b68604c48aba95420049cfdd 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -4200,7 +4200,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0925-Add-drops-to-shear-events.patch b/patches/server/0925-Add-drops-to-shear-events.patch index c29c4f4212..31dda33340 100644 --- a/patches/server/0925-Add-drops-to-shear-events.patch +++ b/patches/server/0925-Add-drops-to-shear-events.patch @@ -306,7 +306,7 @@ index bec1f62559b42acee6c955baf7851aecb9179e16..1af662ca881d656b17697fce837f6593 public static Cancellable handleStatisticsIncrease(net.minecraft.world.entity.player.Player entityHuman, net.minecraft.stats.Stat statistic, int current, int newValue) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index b5902c2262b59ffd321bf8b9324d7946d0fda305..1740b24516193a918623467ce88df3ad60814e28 100644 +index 41c0cfc88f2ec48c1bb8ac10a78f89bf1f2f2319..62b5ba0cafd3a09229648b1205679148b476edcc 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -68,6 +68,16 @@ public final class CraftItemStack extends ItemStack { diff --git a/patches/server/0927-Validate-ResourceLocation-in-NBT-reading.patch b/patches/server/0927-Validate-ResourceLocation-in-NBT-reading.patch index a054908025..bf1d2d2ddf 100644 --- a/patches/server/0927-Validate-ResourceLocation-in-NBT-reading.patch +++ b/patches/server/0927-Validate-ResourceLocation-in-NBT-reading.patch @@ -66,7 +66,7 @@ index b98f9246b60daf31460f41ce214dfa7c011f5684..842b0cec0397d7ae5166617627340ffa @Nullable diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index bc8ee398dfe4fb15cb513e52dd3da7347be0544a..d89f6f6546b351334eb99e7dc554262fc86329a8 100644 +index a7eec0a1f053d0f4b68604c48aba95420049cfdd..09336e1e21b7bbed7d9730967d5a799c9029332e 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -886,11 +886,13 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -97,7 +97,7 @@ index 56873752ae1ae0d2a36cb171d2de6884e15c01a5..5bac748649f43d74b13e7c0b4d355e67 } diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index 114add343370700a7dbd438432635c76a0cbb871..0bf0e1586c80076a41b9f75b5e59e806b91bf825 100644 +index 1d90e9cac17e3cb2af25acad7b335447bc0a3253..3c71f3a538c3a5f885fc468b0060c366be9cf2d2 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java @@ -649,7 +649,7 @@ public abstract class AbstractArrow extends Projectile { diff --git a/patches/server/0929-Fixup-NamespacedKey-handling.patch b/patches/server/0929-Fixup-NamespacedKey-handling.patch index 95e2943521..42c433ad7f 100644 --- a/patches/server/0929-Fixup-NamespacedKey-handling.patch +++ b/patches/server/0929-Fixup-NamespacedKey-handling.patch @@ -102,10 +102,10 @@ index 65a9213ce8197d50a58f94edfd60c25c2be848be..28d8fd2e3eb87e989621ffa6b0e5005b } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java -index 12b95c4455e741b65b844eab362f02bce54eb525..13b91cddffbe8ae6f07ce5c0ae45beba151e1aca 100644 +index 2c57fd269484ed79814d974877585f9f7e6393d3..865977ce17fbb8793a1eefd71079729e83f5cfaf 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java -@@ -69,8 +69,9 @@ public class CraftMetaArmor extends CraftMetaItem implements ArmorMeta { +@@ -38,8 +38,9 @@ public class CraftMetaArmor extends CraftMetaItem implements ArmorMeta { super(tag); getOrEmpty(tag, CraftMetaArmor.TRIM).ifPresent((trimCompound) -> { @@ -118,10 +118,10 @@ index 12b95c4455e741b65b844eab362f02bce54eb525..13b91cddffbe8ae6f07ce5c0ae45beba this.trim = new ArmorTrim(trimMaterial, trimPattern); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java -index 524aadad91c855f6c201999831824f7ce06f9ed6..d53df6f114c285b880167385807775e400c80fc9 100644 +index 1c1a2d66d1ebcbe2ded732e759d0f9d471d43b56..c56fb1eeea79176c4dbb1e9c0a8023f86220fe6a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java -@@ -80,7 +80,7 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta { +@@ -42,7 +42,7 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta { for (int i = 0; i < Math.min(patterns.size(), 20); i++) { BannerPatternLayers.Layer p = patterns.get(i); DyeColor color = DyeColor.getByWoolData((byte) p.color().getId()); @@ -131,10 +131,10 @@ index 524aadad91c855f6c201999831824f7ce06f9ed6..d53df6f114c285b880167385807775e4 if (color != null && pattern != null) { this.patterns.add(new Pattern(color, pattern)); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMusicInstrument.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMusicInstrument.java -index 67905f804ccc102faa942499f5ba218f710ab9cc..4eb2993903f5fa9fb9fd65282a42f26b3aa1e7bd 100644 +index 478059eb3ad76b41e6a20e9b489a2a4fb19e7c7c..3599ef1675b6091e9b67fb5241886460f106f9b4 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMusicInstrument.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMusicInstrument.java -@@ -31,7 +31,7 @@ public class CraftMetaMusicInstrument extends CraftMetaItem implements MusicInst +@@ -30,7 +30,7 @@ public class CraftMetaMusicInstrument extends CraftMetaItem implements MusicInst super(tag); getOrEmpty(tag, CraftMetaMusicInstrument.GOAT_HORN_INSTRUMENT).ifPresent((instrument) -> { diff --git a/patches/server/0943-Deprecate-ItemStack-setType.patch b/patches/server/0943-Deprecate-ItemStack-setType.patch index a909fcfb22..cb0f3585a3 100644 --- a/patches/server/0943-Deprecate-ItemStack-setType.patch +++ b/patches/server/0943-Deprecate-ItemStack-setType.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Deprecate ItemStack#setType diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 1740b24516193a918623467ce88df3ad60814e28..6816f32ba7bd2e639901330057dfd9a3f2ed0caf 100644 +index 62b5ba0cafd3a09229648b1205679148b476edcc..ef56ebc8060da1d416d91299b03ff0a8f6901ac1 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -@@ -722,4 +722,24 @@ public final class CraftItemStack extends ItemStack { +@@ -415,4 +415,24 @@ public final class CraftItemStack extends ItemStack { static boolean hasItemMeta(net.minecraft.world.item.ItemStack item) { return !(item == null || item.getComponentsPatch().isEmpty()); } diff --git a/patches/server/0944-Add-CartographyItemEvent.patch b/patches/server/0944-Add-CartographyItemEvent.patch index 56311c8376..3ca5095c48 100644 --- a/patches/server/0944-Add-CartographyItemEvent.patch +++ b/patches/server/0944-Add-CartographyItemEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add CartographyItemEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 518b64a3c18ea003109c9b1a1bfe12e29c78e099..dbf67171da1c9eeef65daec6607214174c9d2f64 100644 +index 2e96486ddd9eca0e26fa645628f2ec00992dc020..6231e2fee613562b7ea991be19760f82edee84a8 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -3109,6 +3109,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0951-Fix-DamageSource-API.patch b/patches/server/0951-Fix-DamageSource-API.patch index 1cf932b9ac..a9af537493 100644 --- a/patches/server/0951-Fix-DamageSource-API.patch +++ b/patches/server/0951-Fix-DamageSource-API.patch @@ -7,42 +7,58 @@ Uses the correct entity in the EntityDamageByEntity event Returns the correct entity for API's DamageSource#getCausingEntity diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSource.java b/src/main/java/net/minecraft/world/damagesource/DamageSource.java -index 10bee9b217fae9170af9d66dac9741046be1cab6..bb1a60180e58c1333e7bb33e8acf1b0225eda8a8 100644 +index aee26dd78953ff43306aaa64161f5b9edcdd4b83..bb1a60180e58c1333e7bb33e8acf1b0225eda8a8 100644 --- a/src/main/java/net/minecraft/world/damagesource/DamageSource.java +++ b/src/main/java/net/minecraft/world/damagesource/DamageSource.java -@@ -29,7 +29,8 @@ public class DamageSource { +@@ -29,8 +29,8 @@ public class DamageSource { private boolean sweep = false; private boolean melting = false; private boolean poison = false; -- private Entity customEntityDamager = null; // This field is a helper for when causing entity damage is not set by vanilla +- private Entity customEntityDamager = null; // This field is a helper for when direct entity damage is not set by vanilla +- private Entity customCausingEntityDamager = null; // This field is a helper for when causing entity damage is not set by vanilla + @Nullable + private Entity customEventDamager = null; // This field is a helper for when causing entity damage is not set by vanilla // Paper - fix DamageSource API public DamageSource sweep() { this.sweep = true; -@@ -58,18 +59,19 @@ public class DamageSource { +@@ -59,33 +59,19 @@ public class DamageSource { return this.poison; } - public Entity getDamager() { - return (this.customEntityDamager != null) ? this.customEntityDamager : this.directEntity; +- } +- +- public Entity getCausingDamager() { +- return (this.customCausingEntityDamager != null) ? this.customCausingEntityDamager : this.causingEntity; +- } +- +- public DamageSource customEntityDamager(Entity entity) { +- // This method is not intended for change the causing entity if is already set +- // also is only necessary if the entity passed is not the direct entity or different from the current causingEntity +- if (this.customEntityDamager != null || this.directEntity == entity || this.causingEntity == entity) { +- return this; +- } +- DamageSource damageSource = this.cloneInstance(); +- damageSource.customEntityDamager = entity; +- return damageSource; + // Paper start - fix DamageSource API + @Nullable + public Entity getCustomEventDamager() { + return (this.customEventDamager != null) ? this.customEventDamager : this.directEntity; } -- public DamageSource customEntityDamager(Entity entity) { +- public DamageSource customCausingEntityDamager(Entity entity) { - // This method is not intended for change the causing entity if is already set - // also is only necessary if the entity passed is not the direct entity or different from the current causingEntity -- if (this.customEntityDamager != null || this.directEntity == entity || this.causingEntity == entity) { +- if (this.customCausingEntityDamager != null || this.directEntity == entity || this.causingEntity == entity) { - return this; + public DamageSource customEventDamager(Entity entity) { + if (this.directEntity != null) { + throw new IllegalStateException("Cannot set custom event damager when direct entity is already set (report a bug to Paper)"); } DamageSource damageSource = this.cloneInstance(); -- damageSource.customEntityDamager = entity; +- damageSource.customCausingEntityDamager = entity; + damageSource.customEventDamager = entity; + // Paper end - fix DamageSource API return damageSource; @@ -107,14 +123,14 @@ index 7bc612890f941177da11da0ce047d5a74d8ebb33..270acce7411e5ada71eaa04c05efc888 if (damager != null) { event = new HangingBreakByEntityEvent((Hanging) this.getBukkitEntity(), damager.getBukkitEntity(), source.is(DamageTypeTags.IS_EXPLOSION) ? HangingBreakEvent.RemoveCause.EXPLOSION : HangingBreakEvent.RemoveCause.ENTITY); diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java -index acc844c10db9cb42c0e70f3b467e620906b739f0..cb1b19e2e0d8f0744b2355b8f4da0206b196b19c 100644 +index 2c01fbea62812f795111060d260f871cdf85e8bf..cb1b19e2e0d8f0744b2355b8f4da0206b196b19c 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java +++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java @@ -271,7 +271,7 @@ public class Creeper extends Monster implements PowerableMob { if (!event.isCancelled()) { // CraftBukkit end this.dead = true; -- this.level().explode(this, net.minecraft.world.level.Explosion.getDefaultDamageSource(this.level(), this).customEntityDamager(this.entityIgniter), null, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); // CraftBukkit +- this.level().explode(this, net.minecraft.world.level.Explosion.getDefaultDamageSource(this.level(), this).customCausingEntityDamager(this.entityIgniter), null, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); // CraftBukkit + this.level().explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); // CraftBukkit // Paper - fix DamageSource API (revert to vanilla, no, just no, don't change this) this.spawnLingeringCloud(); this.triggerOnDeathMobEffects(Entity.RemovalReason.KILLED); @@ -159,10 +175,17 @@ index 60eac9df10a9a395a1568925515d010eb51a64e5..55fd997a4e894eeab24de269d59e4861 if (flag && entity instanceof LivingEntity entityliving) { diff --git a/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageSource.java b/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageSource.java -index ab67c5caaff6e8c7de293b528636f53254b805bd..98e5ec1cc2dba2512650ba706393d1abe0c95591 100644 +index 5572c50cac4968e3ec75fe1fc98442407bc3b905..3c5e937ade4bbf6a2f5f123ce53001eb915d51eb 100644 --- a/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageSource.java +++ b/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageSource.java -@@ -47,7 +47,7 @@ public class CraftDamageSource implements DamageSource { +@@ -41,13 +41,13 @@ public class CraftDamageSource implements DamageSource { + + @Override + public org.bukkit.entity.Entity getCausingEntity() { +- net.minecraft.world.entity.Entity entity = this.getHandle().getCausingDamager(); ++ net.minecraft.world.entity.Entity entity = this.getHandle().getCustomEventDamager(); // Paper + return (entity != null) ? entity.getBukkitEntity() : null; + } @Override public org.bukkit.entity.Entity getDirectEntity() { diff --git a/patches/server/0954-Improve-tag-parser-handling.patch b/patches/server/0954-Improve-tag-parser-handling.patch index b89772ccad..011715a67c 100644 --- a/patches/server/0954-Improve-tag-parser-handling.patch +++ b/patches/server/0954-Improve-tag-parser-handling.patch @@ -169,7 +169,7 @@ index 898b19887ed34c87003fc63cb5905df2ba6234a5..b47eeb23055b135d5567552ba983bfbc private void write(FriendlyByteBuf buf) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index dbf67171da1c9eeef65daec6607214174c9d2f64..c5b25c70ed435deafcee0a64b4260090b4cfc2e7 100644 +index 6231e2fee613562b7ea991be19760f82edee84a8..146d42ba446c2f7aaa728bcb73679c07e8c4a65a 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -766,6 +766,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0961-Deep-clone-nbt-tags-in-PDC.patch b/patches/server/0961-Deep-clone-nbt-tags-in-PDC.patch index 6a8a671064..bc3f0b3278 100644 --- a/patches/server/0961-Deep-clone-nbt-tags-in-PDC.patch +++ b/patches/server/0961-Deep-clone-nbt-tags-in-PDC.patch @@ -5,22 +5,22 @@ Subject: [PATCH] Deep clone nbt tags in PDC diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 758e01a05f5ca88f72ea3d54a7cdc49bbfadfaf5..737b325f87bcaa8871dbed5deec01215a1f11bf7 100644 +index 529e20fcbf0e7ba22a3f0e7a60ae540c21fed424..64457318250c8ab1dcefdbd1f3373b891d859a7a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -318,7 +318,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { - this.damage = meta.damage; +@@ -322,7 +322,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.maxDamage = meta.maxDamage; - this.unhandledTags = meta.unhandledTags; + this.unhandledTags.copy(meta.unhandledTags.build()); + this.removedTags.addAll(meta.removedTags); - this.persistentDataContainer.putAll(meta.persistentDataContainer.getRaw()); + this.persistentDataContainer.putAll(meta.persistentDataContainer.getTagsCloned()); // Paper - deep clone NBT tags this.customTag = meta.customTag; -@@ -1641,7 +1641,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { - if (this.customTag != null) { +@@ -1690,7 +1690,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.customTag = this.customTag.copy(); } + clone.removedTags = Sets.newHashSet(this.removedTags); - clone.persistentDataContainer = new CraftPersistentDataContainer(this.persistentDataContainer.getRaw(), CraftMetaItem.DATA_TYPE_REGISTRY); + clone.persistentDataContainer = new CraftPersistentDataContainer(this.persistentDataContainer.getTagsCloned(), CraftMetaItem.DATA_TYPE_REGISTRY); // Paper - deep clone NBT tags clone.hideFlag = this.hideFlag; diff --git a/patches/server/0963-Fix-shield-disable-inconsistency.patch b/patches/server/0963-Fix-shield-disable-inconsistency.patch index 5653036c7f..69826053ae 100644 --- a/patches/server/0963-Fix-shield-disable-inconsistency.patch +++ b/patches/server/0963-Fix-shield-disable-inconsistency.patch @@ -8,7 +8,7 @@ it will not disable the shield if the attacker is holding an axe item. diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index d89f6f6546b351334eb99e7dc554262fc86329a8..e01090e078373f24e158a2dad0d0641ad0403d4d 100644 +index 09336e1e21b7bbed7d9730967d5a799c9029332e..fd6b21f7a196e1232c0bb03335bd78417f55c5bb 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -2325,7 +2325,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0964-Don-t-lose-removed-data-components-in-ItemMeta.patch b/patches/server/0964-Don-t-lose-removed-data-components-in-ItemMeta.patch index a46f8877b4..7f6bc352fa 100644 --- a/patches/server/0964-Don-t-lose-removed-data-components-in-ItemMeta.patch +++ b/patches/server/0964-Don-t-lose-removed-data-components-in-ItemMeta.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't lose removed data components in ItemMeta diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 737b325f87bcaa8871dbed5deec01215a1f11bf7..8a5785565d71f3f74a9ce0179a26dbff5530023d 100644 +index 64457318250c8ab1dcefdbd1f3373b891d859a7a..b5103f318b685145d10337c833f0026d4785f05f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -196,6 +196,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -198,6 +198,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return this; } @@ -22,18 +22,20 @@ index 737b325f87bcaa8871dbed5deec01215a1f11bf7..8a5785565d71f3f74a9ce0179a26dbff DataComponentPatch build() { return this.builder.build(); } -@@ -424,7 +431,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -428,7 +435,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { Set, Optional>> keys = tag.entrySet(); for (Map.Entry, Optional> key : keys) { - if (!CraftMetaItem.getHandledTags().contains(key.getKey())) { ++ // Paper start - don't lose unhandled tags + if (key.getValue().isEmpty()) { + this.unhandledTags.remove(key.getKey()); + } else if (!CraftMetaItem.getHandledTags().contains(key.getKey())) { - key.getValue().ifPresentOrElse((value) -> { ++ // Paper end - don't lose unhandled tags + key.getValue().ifPresent((value) -> { this.unhandledTags.set((DataComponentType) key.getKey(), value); - }, () -> { -@@ -832,9 +841,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + }); +@@ -864,9 +875,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } for (Map.Entry, Optional> e : this.unhandledTags.build().entrySet()) { @@ -44,4 +46,4 @@ index 737b325f87bcaa8871dbed5deec01215a1f11bf7..8a5785565d71f3f74a9ce0179a26dbff + }, () -> itemTag.remove(e.getKey())); } - CompoundTag customTag = (this.customTag != null) ? this.customTag.copy() : null; + for (DataComponentType removed : this.removedTags) { diff --git a/patches/server/0966-Fix-ItemFlags.patch b/patches/server/0966-Fix-ItemFlags.patch index 249bd1854a..7be17295bf 100644 --- a/patches/server/0966-Fix-ItemFlags.patch +++ b/patches/server/0966-Fix-ItemFlags.patch @@ -11,10 +11,10 @@ which was split from HIDE_ADDITIONAL_TOOLTIP. public net.minecraft.world.item.AdventureModePredicate predicates diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java -index fca0cfba14dd2cc6f24b56eaf269594b2d87fd04..8734f0b777432cd8639094b75a3da1b9595823ed 100644 +index 73fe41322e0349ad1d46a760f621b6c91112e90e..19af55ec2bf62b70bd3be44f499b32f5efe71ab1 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java -@@ -39,7 +39,7 @@ class CraftMetaEnchantedBook extends CraftMetaItem implements EnchantmentStorage +@@ -38,7 +38,7 @@ class CraftMetaEnchantedBook extends CraftMetaItem implements EnchantmentStorage getOrEmpty(tag, CraftMetaEnchantedBook.STORED_ENCHANTMENTS).ifPresent((itemEnchantments) -> { this.enchantments = buildEnchantments(itemEnchantments); if (!itemEnchantments.showInTooltip) { @@ -23,7 +23,7 @@ index fca0cfba14dd2cc6f24b56eaf269594b2d87fd04..8734f0b777432cd8639094b75a3da1b9 } }); } -@@ -54,7 +54,7 @@ class CraftMetaEnchantedBook extends CraftMetaItem implements EnchantmentStorage +@@ -53,7 +53,7 @@ class CraftMetaEnchantedBook extends CraftMetaItem implements EnchantmentStorage void applyToItem(CraftMetaItem.Applicator itemTag) { super.applyToItem(itemTag); @@ -33,10 +33,10 @@ index fca0cfba14dd2cc6f24b56eaf269594b2d87fd04..8734f0b777432cd8639094b75a3da1b9 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 8a5785565d71f3f74a9ce0179a26dbff5530023d..dbcf9a27112ac525722fd9b80ec736797864bfdf 100644 +index b5103f318b685145d10337c833f0026d4785f05f..1b7d4bea50730f97804f1b9a4ac8896a365bae26 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -250,6 +250,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -252,6 +252,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { static final ItemMetaKeyType HIDE_ADDITIONAL_TOOLTIP = new ItemMetaKeyType(DataComponents.HIDE_ADDITIONAL_TOOLTIP); @Specific(Specific.To.NBT) static final ItemMetaKeyType CUSTOM_DATA = new ItemMetaKeyType<>(DataComponents.CUSTOM_DATA); @@ -49,7 +49,7 @@ index 8a5785565d71f3f74a9ce0179a26dbff5530023d..dbcf9a27112ac525722fd9b80ec73679 // We store the raw original JSON representation of all text data. See SPIGOT-5063, SPIGOT-5656, SPIGOT-5304 private Component displayName; -@@ -330,6 +336,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -334,6 +340,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.customTag = meta.customTag; this.version = meta.version; @@ -60,7 +60,7 @@ index 8a5785565d71f3f74a9ce0179a26dbff5530023d..dbcf9a27112ac525722fd9b80ec73679 } CraftMetaItem(DataComponentPatch tag) { -@@ -428,6 +438,20 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -432,6 +442,20 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.customTag = null; } }); @@ -81,25 +81,24 @@ index 8a5785565d71f3f74a9ce0179a26dbff5530023d..dbcf9a27112ac525722fd9b80ec73679 Set, Optional>> keys = tag.entrySet(); for (Map.Entry, Optional> key : keys) { -@@ -622,7 +646,16 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { - ByteArrayInputStream buf = new ByteArrayInputStream(Base64.getDecoder().decode(unhandled)); +@@ -631,7 +655,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { try { CompoundTag unhandledTag = NbtIo.readCompressed(buf, NbtAccounter.unlimitedHeap()); -- this.unhandledTags.copy(DataComponentPatch.CODEC.parse(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), unhandledTag).result().get()); + DataComponentPatch unhandledPatch = DataComponentPatch.CODEC.parse(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), unhandledTag).result().get(); +- this.unhandledTags.copy(unhandledPatch); + // Paper start -+ final net.minecraft.core.component.DataComponentPatch patch = net.minecraft.core.component.DataComponentPatch.CODEC.parse(net.minecraft.server.MinecraftServer.getDefaultRegistryAccess().createSerializationContext(net.minecraft.nbt.NbtOps.INSTANCE), unhandledTag).result().get(); -+ CraftMetaItem.getOrEmpty(patch, CraftMetaItem.CAN_PLACE_ON).ifPresent(data -> { ++ CraftMetaItem.getOrEmpty(unhandledPatch, CraftMetaItem.CAN_PLACE_ON).ifPresent(data -> { + this.canPlaceOnPredicates = List.copyOf(data.predicates); + }); -+ CraftMetaItem.getOrEmpty(patch, CraftMetaItem.CAN_BREAK).ifPresent(data -> { ++ CraftMetaItem.getOrEmpty(unhandledPatch, CraftMetaItem.CAN_BREAK).ifPresent(data -> { + this.canBreakPredicates = List.copyOf(data.predicates); + }); -+ this.unhandledTags.copy(patch.forget(type -> type == CraftMetaItem.CAN_PLACE_ON.TYPE || type == CraftMetaItem.CAN_BREAK.TYPE)); ++ this.unhandledTags.copy(unhandledPatch.forget(type -> type == CraftMetaItem.CAN_PLACE_ON.TYPE || type == CraftMetaItem.CAN_BREAK.TYPE)); + // Paper end - } catch (IOException ex) { - Logger.getLogger(CraftMetaItem.class.getName()).log(Level.SEVERE, null, ex); - } -@@ -840,6 +873,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + + for (Entry, Optional> entry : unhandledPatch.entrySet()) { + // Move removed unhandled tags to dedicated removedTags +@@ -874,6 +906,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { itemTag.put(CraftMetaItem.MAX_DAMAGE, this.maxDamage); } @@ -115,16 +114,16 @@ index 8a5785565d71f3f74a9ce0179a26dbff5530023d..dbcf9a27112ac525722fd9b80ec73679 for (Map.Entry, Optional> e : this.unhandledTags.build().entrySet()) { e.getValue().ifPresentOrElse((value) -> { itemTag.builder.set((DataComponentType) e.getKey(), value); -@@ -914,7 +956,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -962,7 +1003,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Overridden boolean isEmpty() { -- return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null); -+ return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null || this.canPlaceOnPredicates != null || this.canBreakPredicates != null); // Paper +- return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null); ++ return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null || this.canPlaceOnPredicates != null || this.canBreakPredicates != null); // Paper } // Paper start -@@ -1583,6 +1625,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1632,6 +1673,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { && (this.hasJukeboxPlayable() ? that.hasJukeboxPlayable() && this.jukebox.equals(that.jukebox) : !that.hasJukeboxPlayable()) && (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage()) && (this.hasMaxDamage() ? that.hasMaxDamage() && this.maxDamage.equals(that.maxDamage) : !that.hasMaxDamage()) @@ -133,7 +132,7 @@ index 8a5785565d71f3f74a9ce0179a26dbff5530023d..dbcf9a27112ac525722fd9b80ec73679 && (this.version == that.version); } -@@ -1627,6 +1671,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1677,6 +1720,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { hash = 61 * hash + (this.hasDamage() ? this.damage : 0); hash = 61 * hash + (this.hasMaxDamage() ? 1231 : 1237); hash = 61 * hash + (this.hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0); @@ -142,7 +141,7 @@ index 8a5785565d71f3f74a9ce0179a26dbff5530023d..dbcf9a27112ac525722fd9b80ec73679 hash = 61 * hash + this.version; return hash; } -@@ -1670,6 +1716,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1721,6 +1766,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.damage = this.damage; clone.maxDamage = this.maxDamage; clone.version = this.version; @@ -157,7 +156,7 @@ index 8a5785565d71f3f74a9ce0179a26dbff5530023d..dbcf9a27112ac525722fd9b80ec73679 return clone; } catch (CloneNotSupportedException e) { throw new Error(e); -@@ -1787,6 +1841,16 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1838,6 +1891,16 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -174,7 +173,7 @@ index 8a5785565d71f3f74a9ce0179a26dbff5530023d..dbcf9a27112ac525722fd9b80ec73679 if (!this.unhandledTags.isEmpty()) { Tag unhandled = DataComponentPatch.CODEC.encodeStart(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), this.unhandledTags.build()).getOrThrow(IllegalStateException::new); try { -@@ -1797,6 +1861,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1848,6 +1911,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { Logger.getLogger(CraftMetaItem.class.getName()).log(Level.SEVERE, null, ex); } } @@ -187,9 +186,9 @@ index 8a5785565d71f3f74a9ce0179a26dbff5530023d..dbcf9a27112ac525722fd9b80ec73679 + } + // Paper end - if (!this.persistentDataContainer.isEmpty()) { // Store custom tags, wrapped in their compound - builder.put(CraftMetaItem.BUKKIT_CUSTOM_TAG.BUKKIT, this.persistentDataContainer.serialize()); -@@ -1936,6 +2008,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + if (!this.removedTags.isEmpty()) { + RegistryAccess registryAccess = CraftRegistry.getMinecraftRegistry(); +@@ -2001,6 +2072,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { CraftMetaItem.MAX_DAMAGE.TYPE, CraftMetaItem.CUSTOM_DATA.TYPE, CraftMetaItem.ATTRIBUTES.TYPE, diff --git a/patches/server/0968-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch b/patches/server/0968-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch index 4e3efb9b25..58c69c8939 100644 --- a/patches/server/0968-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch +++ b/patches/server/0968-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Revert to vanilla handling of LivingEntity#actuallyHurt diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index e01090e078373f24e158a2dad0d0641ad0403d4d..3a23338e07afa8554d95729a98d731a02dbfcad7 100644 +index fd6b21f7a196e1232c0bb03335bd78417f55c5bb..66707853328b6b23771c88abd0cf5a7ef766bb71 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -2210,7 +2210,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0969-improve-checking-handled-tags-in-itemmeta.patch b/patches/server/0969-improve-checking-handled-tags-in-itemmeta.patch index 955dfaca5d..53502b4dc8 100644 --- a/patches/server/0969-improve-checking-handled-tags-in-itemmeta.patch +++ b/patches/server/0969-improve-checking-handled-tags-in-itemmeta.patch @@ -4,8 +4,157 @@ Date: Mon, 10 Jul 2023 16:10:15 -0700 Subject: [PATCH] improve checking handled tags in itemmeta +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java +index a6c78854c10362864c2297de903ab9594cdb1eb6..251aac8690f15be2ad0e3f6399676205b7d7860c 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java +@@ -32,116 +32,116 @@ import org.bukkit.inventory.meta.TropicalFishBucketMeta; + + public final class CraftItemMetas { + +- public record ItemMetaData(Class metaClass, Function fromItemStack, ++ public record ItemMetaData(Class metaClass, BiFunction>, I> fromItemStack, + BiFunction, CraftMetaItem, I> fromItemMeta) { + } + + private static final ItemMetaData EMPTY_META_DATA = new ItemMetaData<>(ItemMeta.class, +- item -> null, ++ (item, extras) -> null, + (type, meta) -> null); + + private static final ItemMetaData ITEM_META_DATA = new ItemMetaData<>(ItemMeta.class, +- item -> new CraftMetaItem(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaItem(item.getComponentsPatch(), extras), + (type, meta) -> new CraftMetaItem(meta)); + + private static final ItemMetaData SIGNED_BOOK_META_DATA = new ItemMetaData<>(BookMeta.class, +- item -> new CraftMetaBookSigned(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaBookSigned(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaBookSigned signed ? signed : new CraftMetaBookSigned(meta)); + + private static final ItemMetaData WRITABLE_BOOK_META_DATA = new ItemMetaData<>(BookMeta.class, +- item -> new CraftMetaBook(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaBook(item.getComponentsPatch(), extras), + (type, meta) -> meta != null && meta.getClass().equals(CraftMetaBook.class) ? (BookMeta) meta : new CraftMetaBook(meta)); + + private static final ItemMetaData SKULL_META_DATA = new ItemMetaData<>(SkullMeta.class, +- item -> new CraftMetaSkull(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaSkull(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaSkull skull ? skull : new CraftMetaSkull(meta)); + + private static final ItemMetaData ARMOR_META_DATA = new ItemMetaData<>(ArmorMeta.class, +- item -> new CraftMetaArmor(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaArmor(item.getComponentsPatch(), extras), + (type, meta) -> meta != null && meta.getClass().equals(CraftMetaArmor.class) ? (ArmorMeta) meta : new CraftMetaArmor(meta)); + + private static final ItemMetaData COLORABLE_ARMOR_META_DATA = new ItemMetaData<>(ColorableArmorMeta.class, +- item -> new CraftMetaColorableArmor(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaColorableArmor(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof ColorableArmorMeta colorable ? colorable : new CraftMetaColorableArmor(meta)); + + private static final ItemMetaData LEATHER_ARMOR_META_DATA = new ItemMetaData<>(LeatherArmorMeta.class, +- item -> new CraftMetaLeatherArmor(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaLeatherArmor(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaLeatherArmor leather ? leather : new CraftMetaLeatherArmor(meta)); + + private static final ItemMetaData POTION_META_DATA = new ItemMetaData<>(PotionMeta.class, +- item -> new CraftMetaPotion(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaPotion(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaPotion potion ? potion : new CraftMetaPotion(meta)); + + private static final ItemMetaData MAP_META_DATA = new ItemMetaData<>(MapMeta.class, +- item -> new CraftMetaMap(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaMap(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaMap map ? map : new CraftMetaMap(meta)); + + private static final ItemMetaData FIREWORK_META_DATA = new ItemMetaData<>(FireworkMeta.class, +- item -> new CraftMetaFirework(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaFirework(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaFirework firework ? firework : new CraftMetaFirework(meta)); + + private static final ItemMetaData CHARGE_META_DATA = new ItemMetaData<>(FireworkEffectMeta.class, +- item -> new CraftMetaCharge(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaCharge(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaCharge charge ? charge : new CraftMetaCharge(meta)); + + private static final ItemMetaData ENCHANTED_BOOK_META_DATA = new ItemMetaData<>(EnchantmentStorageMeta.class, +- item -> new CraftMetaEnchantedBook(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaEnchantedBook(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaEnchantedBook enchantedBook ? enchantedBook : new CraftMetaEnchantedBook(meta)); + + private static final ItemMetaData BANNER_META_DATA = new ItemMetaData<>(BannerMeta.class, +- item -> new CraftMetaBanner(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaBanner(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaBanner banner ? banner : new CraftMetaBanner(meta)); + + private static final ItemMetaData SPAWN_EGG_META_DATA = new ItemMetaData<>(SpawnEggMeta.class, +- item -> new CraftMetaSpawnEgg(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaSpawnEgg(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaSpawnEgg spawnEgg ? spawnEgg : new CraftMetaSpawnEgg(meta)); + + private static final ItemMetaData ARMOR_STAND_META_DATA = new ItemMetaData<>(ArmorStandMeta.class, // paper +- item -> new CraftMetaArmorStand(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaArmorStand(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaArmorStand armorStand ? armorStand : new CraftMetaArmorStand(meta)); + + private static final ItemMetaData KNOWLEDGE_BOOK_META_DATA = new ItemMetaData<>(KnowledgeBookMeta.class, +- item -> new CraftMetaKnowledgeBook(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaKnowledgeBook(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaKnowledgeBook knowledgeBook ? knowledgeBook : new CraftMetaKnowledgeBook(meta)); + + private static final ItemMetaData BLOCK_STATE_META_DATA = new ItemMetaData<>(BlockStateMeta.class, +- item -> new CraftMetaBlockState(item.getComponentsPatch(), CraftItemType.minecraftToBukkit(item.getItem())), ++ (item, extras) -> new CraftMetaBlockState(item.getComponentsPatch(), CraftItemType.minecraftToBukkit(item.getItem()), extras), + (type, meta) -> new CraftMetaBlockState(meta, type.asMaterial())); + + private static final ItemMetaData TROPICAL_FISH_BUCKET_META_DATA = new ItemMetaData<>(TropicalFishBucketMeta.class, +- item -> new CraftMetaTropicalFishBucket(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaTropicalFishBucket(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaTropicalFishBucket tropicalFishBucket ? tropicalFishBucket : new CraftMetaTropicalFishBucket(meta)); + + private static final ItemMetaData AXOLOTL_BUCKET_META_DATA = new ItemMetaData<>(AxolotlBucketMeta.class, +- item -> new CraftMetaAxolotlBucket(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaAxolotlBucket(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaAxolotlBucket axolotlBucket ? axolotlBucket : new CraftMetaAxolotlBucket(meta)); + + private static final ItemMetaData CROSSBOW_META_DATA = new ItemMetaData<>(CrossbowMeta.class, +- item -> new CraftMetaCrossbow(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaCrossbow(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaCrossbow crossbow ? crossbow : new CraftMetaCrossbow(meta)); + + private static final ItemMetaData SUSPICIOUS_STEW_META_DATA = new ItemMetaData<>(SuspiciousStewMeta.class, +- item -> new CraftMetaSuspiciousStew(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaSuspiciousStew(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaSuspiciousStew suspiciousStew ? suspiciousStew : new CraftMetaSuspiciousStew(meta)); + + private static final ItemMetaData ENTITY_TAG_META_DATA = new ItemMetaData<>(ItemMeta.class, +- item -> new CraftMetaEntityTag(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaEntityTag(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaEntityTag entityTag ? entityTag : new CraftMetaEntityTag(meta)); + + private static final ItemMetaData COMPASS_META_DATA = new ItemMetaData<>(CompassMeta.class, +- item -> new CraftMetaCompass(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaCompass(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaCompass compass ? compass : new CraftMetaCompass(meta)); + + private static final ItemMetaData BUNDLE_META_DATA = new ItemMetaData<>(BundleMeta.class, +- item -> new CraftMetaBundle(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaBundle(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaBundle bundle ? bundle : new CraftMetaBundle(meta)); + + private static final ItemMetaData MUSIC_INSTRUMENT_META_DATA = new ItemMetaData<>(MusicInstrumentMeta.class, +- item -> new CraftMetaMusicInstrument(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaMusicInstrument(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaMusicInstrument musicInstrument ? musicInstrument : new CraftMetaMusicInstrument(meta)); + + private static final ItemMetaData OMINOUS_BOTTLE_META_DATA = new ItemMetaData<>(OminousBottleMeta.class, +- item -> new CraftMetaOminousBottle(item.getComponentsPatch()), ++ (item, extras) -> new CraftMetaOminousBottle(item.getComponentsPatch(), extras), + (type, meta) -> meta instanceof CraftMetaOminousBottle musicInstrument ? musicInstrument : new CraftMetaOminousBottle(meta)); + + // We use if instead of a set, since the result gets cached in CraftItemType, diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 6816f32ba7bd2e639901330057dfd9a3f2ed0caf..886f86bd20f6d2fea954d7d01bb05311bc3ec4d9 100644 +index ef56ebc8060da1d416d91299b03ff0a8f6901ac1..7672128ecca3052f2dc422349a863484c301310e 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -159,10 +159,11 @@ public final class CraftItemStack extends ItemStack { @@ -33,7 +182,7 @@ index 6816f32ba7bd2e639901330057dfd9a3f2ed0caf..886f86bd20f6d2fea954d7d01bb05311 + newMeta = getItemMeta(this.handle); + } else { + final java.util.Set> extraHandledDcts = new java.util.HashSet<>(CraftMetaItem.getTopLevelHandledDcts(oldMeta.getClass())); -+ newMeta = getItemMeta(this.handle, CraftItemStack.getType(this.handle), extraHandledDcts); ++ newMeta = getItemMeta(this.handle, CraftItemType.minecraftToBukkitNew(this.handle.getItem()), extraHandledDcts); + } + this.setItemMeta(newMeta); + } @@ -41,148 +190,46 @@ index 6816f32ba7bd2e639901330057dfd9a3f2ed0caf..886f86bd20f6d2fea954d7d01bb05311 // Paper start public static void applyMetaToItem(net.minecraft.world.item.ItemStack itemStack, ItemMeta itemMeta) { final CraftMetaItem.Applicator tag = new CraftMetaItem.Applicator(); -@@ -335,14 +349,19 @@ public final class CraftItemStack extends ItemStack { +@@ -335,12 +349,17 @@ public final class CraftItemStack extends ItemStack { } - public static ItemMeta getItemMeta(net.minecraft.world.item.ItemStack item, Material material) { + public static ItemMeta getItemMeta(net.minecraft.world.item.ItemStack item, org.bukkit.inventory.ItemType metaForType) { // Paper end + // Paper start - handled tags on type change -+ return getItemMeta(item, material, null); ++ return getItemMeta(item, metaForType, null); + } -+ public static ItemMeta getItemMeta(net.minecraft.world.item.ItemStack item, Material material, final java.util.Set> extraHandledDcts) { ++ public static ItemMeta getItemMeta(net.minecraft.world.item.ItemStack item, org.bukkit.inventory.ItemType metaForType, final java.util.Set> extraHandledDcts) { + // Paper end - handled tags on type change if (!CraftItemStack.hasItemMeta(item)) { - return CraftItemFactory.instance().getItemMeta(material); // Paper - } - switch (material) { // Paper - case WRITTEN_BOOK: -- return new CraftMetaBookSigned(item.getComponentsPatch()); -+ return new CraftMetaBookSigned(item.getComponentsPatch(), extraHandledDcts); // Paper - case WRITABLE_BOOK: -- return new CraftMetaBook(item.getComponentsPatch()); -+ return new CraftMetaBook(item.getComponentsPatch(), extraHandledDcts); // Paper - case CREEPER_HEAD: - case CREEPER_WALL_HEAD: - case DRAGON_HEAD: -@@ -357,7 +376,7 @@ public final class CraftItemStack extends ItemStack { - case WITHER_SKELETON_WALL_SKULL: - case ZOMBIE_HEAD: - case ZOMBIE_WALL_HEAD: -- return new CraftMetaSkull(item.getComponentsPatch()); -+ return new CraftMetaSkull(item.getComponentsPatch(), extraHandledDcts); // Paper - case CHAINMAIL_HELMET: - case CHAINMAIL_CHESTPLATE: - case CHAINMAIL_LEGGINGS: -@@ -379,28 +398,28 @@ public final class CraftItemStack extends ItemStack { - case NETHERITE_LEGGINGS: - case NETHERITE_BOOTS: - case TURTLE_HELMET: -- return new CraftMetaArmor(item.getComponentsPatch()); -+ return new CraftMetaArmor(item.getComponentsPatch(), extraHandledDcts); // Paper - case LEATHER_HELMET: - case LEATHER_CHESTPLATE: - case LEATHER_LEGGINGS: - case LEATHER_BOOTS: - case WOLF_ARMOR: -- return new CraftMetaColorableArmor(item.getComponentsPatch()); -+ return new CraftMetaColorableArmor(item.getComponentsPatch(), extraHandledDcts); // Paper - case LEATHER_HORSE_ARMOR: -- return new CraftMetaLeatherArmor(item.getComponentsPatch()); -+ return new CraftMetaLeatherArmor(item.getComponentsPatch(), extraHandledDcts); // Paper - case POTION: - case SPLASH_POTION: - case LINGERING_POTION: - case TIPPED_ARROW: -- return new CraftMetaPotion(item.getComponentsPatch()); -+ return new CraftMetaPotion(item.getComponentsPatch(), extraHandledDcts); // Paper - case FILLED_MAP: -- return new CraftMetaMap(item.getComponentsPatch()); -+ return new CraftMetaMap(item.getComponentsPatch(), extraHandledDcts); // Paper - case FIREWORK_ROCKET: -- return new CraftMetaFirework(item.getComponentsPatch()); -+ return new CraftMetaFirework(item.getComponentsPatch(), extraHandledDcts); // Paper - case FIREWORK_STAR: -- return new CraftMetaCharge(item.getComponentsPatch()); -+ return new CraftMetaCharge(item.getComponentsPatch(), extraHandledDcts); // Paper; - case ENCHANTED_BOOK: -- return new CraftMetaEnchantedBook(item.getComponentsPatch()); -+ return new CraftMetaEnchantedBook(item.getComponentsPatch(), extraHandledDcts); // Paper - case BLACK_BANNER: - case BLACK_WALL_BANNER: - case BLUE_BANNER: -@@ -433,7 +452,7 @@ public final class CraftItemStack extends ItemStack { - case WHITE_WALL_BANNER: - case YELLOW_BANNER: - case YELLOW_WALL_BANNER: -- return new CraftMetaBanner(item.getComponentsPatch()); -+ return new CraftMetaBanner(item.getComponentsPatch(), extraHandledDcts); // Paper - case ARMADILLO_SPAWN_EGG: - case ALLAY_SPAWN_EGG: - case AXOLOTL_SPAWN_EGG: -@@ -514,11 +533,11 @@ public final class CraftItemStack extends ItemStack { - case ZOMBIE_SPAWN_EGG: - case ZOMBIE_VILLAGER_SPAWN_EGG: - case ZOMBIFIED_PIGLIN_SPAWN_EGG: -- return new CraftMetaSpawnEgg(item.getComponentsPatch()); -+ return new CraftMetaSpawnEgg(item.getComponentsPatch(), extraHandledDcts); // Paper - case ARMOR_STAND: -- return new CraftMetaArmorStand(item.getComponentsPatch()); -+ return new CraftMetaArmorStand(item.getComponentsPatch(), extraHandledDcts); // Paper - case KNOWLEDGE_BOOK: -- return new CraftMetaKnowledgeBook(item.getComponentsPatch()); -+ return new CraftMetaKnowledgeBook(item.getComponentsPatch(), extraHandledDcts); // Paper - case FURNACE: - case CHEST: - case TRAPPED_CHEST: -@@ -620,15 +639,15 @@ public final class CraftItemStack extends ItemStack { - case CRAFTER: - case TRIAL_SPAWNER: - case VAULT: -- return new CraftMetaBlockState(item.getComponentsPatch(), CraftItemType.minecraftToBukkit(item.getItem())); -+ return new CraftMetaBlockState(item.getComponentsPatch(), CraftItemType.minecraftToBukkit(item.getItem()), extraHandledDcts); // Paper - case TROPICAL_FISH_BUCKET: -- return new CraftMetaTropicalFishBucket(item.getComponentsPatch()); -+ return new CraftMetaTropicalFishBucket(item.getComponentsPatch(), extraHandledDcts); // Paper - case AXOLOTL_BUCKET: -- return new CraftMetaAxolotlBucket(item.getComponentsPatch()); -+ return new CraftMetaAxolotlBucket(item.getComponentsPatch(), extraHandledDcts); // Paper - case CROSSBOW: -- return new CraftMetaCrossbow(item.getComponentsPatch()); -+ return new CraftMetaCrossbow(item.getComponentsPatch(), extraHandledDcts); // Paper - case SUSPICIOUS_STEW: -- return new CraftMetaSuspiciousStew(item.getComponentsPatch()); -+ return new CraftMetaSuspiciousStew(item.getComponentsPatch(), extraHandledDcts); // Paper - case COD_BUCKET: - case PUFFERFISH_BUCKET: - case SALMON_BUCKET: -@@ -636,17 +655,17 @@ public final class CraftItemStack extends ItemStack { - case ITEM_FRAME: - case GLOW_ITEM_FRAME: - case PAINTING: -- return new CraftMetaEntityTag(item.getComponentsPatch()); -+ return new CraftMetaEntityTag(item.getComponentsPatch(), extraHandledDcts); // Paper - case COMPASS: -- return new CraftMetaCompass(item.getComponentsPatch()); -+ return new CraftMetaCompass(item.getComponentsPatch(), extraHandledDcts); // Paper - case BUNDLE: -- return new CraftMetaBundle(item.getComponentsPatch()); -+ return new CraftMetaBundle(item.getComponentsPatch(), extraHandledDcts); // Paper - case GOAT_HORN: -- return new CraftMetaMusicInstrument(item.getComponentsPatch()); -+ return new CraftMetaMusicInstrument(item.getComponentsPatch(), extraHandledDcts); // Paper - case OMINOUS_BOTTLE: -- return new CraftMetaOminousBottle(item.getComponentsPatch()); -+ return new CraftMetaOminousBottle(item.getComponentsPatch(), extraHandledDcts); // Paper - default: -- return new CraftMetaItem(item.getComponentsPatch()); -+ return new CraftMetaItem(item.getComponentsPatch(), extraHandledDcts); // Paper + return CraftItemFactory.instance().getItemMeta(CraftItemStack.getType(item)); } + +- if (metaForType != null) { return ((CraftItemType) metaForType).getItemMeta(item); } // Paper +- return ((CraftItemType) CraftItemType.minecraftToBukkitNew(item.getItem())).getItemMeta(item); ++ if (metaForType != null) { return ((CraftItemType) metaForType).getItemMeta(item, extraHandledDcts); } // Paper ++ return ((CraftItemType) CraftItemType.minecraftToBukkitNew(item.getItem())).getItemMeta(item, extraHandledDcts); // Paper } + static Material getType(net.minecraft.world.item.ItemStack item) { +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java +index 431910368e6d5487456e8430ad7b027d19429b58..9d2feff3df87cfeefe7105d954854af05cef6f69 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java +@@ -114,8 +114,8 @@ public class CraftItemType implements ItemType.Typed, Han + return this.item; + } + +- public M getItemMeta(net.minecraft.world.item.ItemStack itemStack) { +- return this.itemMetaData.get().fromItemStack().apply(itemStack); ++ public M getItemMeta(net.minecraft.world.item.ItemStack itemStack, final java.util.Set> extraHandledDcts) { ++ return this.itemMetaData.get().fromItemStack().apply(itemStack, extraHandledDcts); + } + + public M getItemMeta(ItemMeta itemMeta) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java -index 13b91cddffbe8ae6f07ce5c0ae45beba151e1aca..569f7157a625b981bff43650e9dd0a8c1831a29d 100644 +index 865977ce17fbb8793a1eefd71079729e83f5cfaf..889d43acf4cf7a5917f110105ed05838e24c8cf7 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java -@@ -65,8 +65,8 @@ public class CraftMetaArmor extends CraftMetaItem implements ArmorMeta { +@@ -34,8 +34,8 @@ public class CraftMetaArmor extends CraftMetaItem implements ArmorMeta { } } @@ -209,10 +256,10 @@ index 59bdac414e8205ed608f79ef0d1502acd826d216..53df7e876c9f3e67aa2326fa1a5ce5e9 getOrEmpty(tag, CraftMetaArmorStand.ENTITY_TAG).ifPresent((nbt) -> { this.entityTag = nbt.copyTag(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaAxolotlBucket.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaAxolotlBucket.java -index 3377fdd445db33b2ee1735942b391c6bfa92ab91..44d8aa7123ac22cf9a22720ecadc8c5f63bafc0a 100644 +index c4beb94d8e5448e69f31f30299448f344b5d8f59..169fefb64e1af444f7c2efb1234cb6e7779fb717 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaAxolotlBucket.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaAxolotlBucket.java -@@ -37,8 +37,8 @@ public class CraftMetaAxolotlBucket extends CraftMetaItem implements AxolotlBuck +@@ -36,8 +36,8 @@ public class CraftMetaAxolotlBucket extends CraftMetaItem implements AxolotlBuck this.bucketEntityTag = bucket.bucketEntityTag; } @@ -224,10 +271,10 @@ index 3377fdd445db33b2ee1735942b391c6bfa92ab91..44d8aa7123ac22cf9a22720ecadc8c5f getOrEmpty(tag, CraftMetaAxolotlBucket.ENTITY_TAG).ifPresent((nbt) -> { this.entityTag = nbt.copyTag(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java -index d53df6f114c285b880167385807775e400c80fc9..1ac3bec02fce28d5ce698305a7482a9eccbb1867 100644 +index c56fb1eeea79176c4dbb1e9c0a8023f86220fe6a..1c17fb294d83d99ae657eff6a8a986bf72c6ec47 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java -@@ -72,8 +72,8 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta { +@@ -34,8 +34,8 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta { this.patterns = new ArrayList(banner.patterns); } @@ -239,10 +286,10 @@ index d53df6f114c285b880167385807775e400c80fc9..1ac3bec02fce28d5ce698305a7482a9e getOrEmpty(tag, CraftMetaBanner.PATTERNS).ifPresent((entityTag) -> { List patterns = entityTag.layers(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java -index 9034905aabf057f387b65957a254d056b12e0519..12911233c01d0ac1af9adbd157d56d28361fc76f 100644 +index 4faada5f974214f3054dc1bec9c79e2600c8df48..d7e5491cc0296563fb9fdf28d64b21a10c08ea4a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java -@@ -161,8 +161,8 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta +@@ -69,8 +69,8 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta this.blockEntityTag = te.blockEntityTag; } @@ -284,10 +331,10 @@ index c7360e2b2d6e50abc371c21b09cdadd63892f439..3f78a0935d738854182254b345064e3c getOrEmpty(tag, CraftMetaBookSigned.BOOK_CONTENT).ifPresent((written) -> { this.title = written.title().raw(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBundle.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBundle.java -index dfaec374cf35107714b6f49d58c508dba94e7d3d..f8c02fe01fd95aa5de8523c9ad452d91f5d3c16f 100644 +index 30533ce683e0471742b27d1d31df20def8ea169c..2736a87a6c481da0575e6e29ea08faa539c24378 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBundle.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBundle.java -@@ -35,8 +35,8 @@ public class CraftMetaBundle extends CraftMetaItem implements BundleMeta { +@@ -34,8 +34,8 @@ public class CraftMetaBundle extends CraftMetaItem implements BundleMeta { } } @@ -299,10 +346,10 @@ index dfaec374cf35107714b6f49d58c508dba94e7d3d..f8c02fe01fd95aa5de8523c9ad452d91 getOrEmpty(tag, CraftMetaBundle.ITEMS).ifPresent((bundle) -> { bundle.items().forEach((item) -> { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java -index 40d55374a78bcbaa958cf0010c46071c6dc833f9..12d128e0246e66aa4e53fef870ee9125fa1687bf 100644 +index 72340e7269a5464d72abe8370c8113f3de9573d2..56c6784e29cecf8655282235959de536d07c1e08 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java -@@ -30,8 +30,8 @@ class CraftMetaCharge extends CraftMetaItem implements FireworkEffectMeta { +@@ -29,8 +29,8 @@ class CraftMetaCharge extends CraftMetaItem implements FireworkEffectMeta { this.setEffect(SerializableMeta.getObject(FireworkEffect.class, map, CraftMetaCharge.EXPLOSION.BUKKIT, true)); } @@ -314,10 +361,10 @@ index 40d55374a78bcbaa958cf0010c46071c6dc833f9..12d128e0246e66aa4e53fef870ee9125 getOrEmpty(tag, CraftMetaCharge.EXPLOSION).ifPresent((f) -> { try { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java -index c74d597633d023bd12c10bd4801bc103eb2beef1..2c9ca54267579a210d4ea192517fc0fbce8e467a 100644 +index 366fec1aee66de4031727a1383acebd319eeef88..6517ec4933b0eae761fceb117ea1db175755d0b1 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java -@@ -29,8 +29,8 @@ public class CraftMetaColorableArmor extends CraftMetaArmor implements Colorable +@@ -18,8 +18,8 @@ public class CraftMetaColorableArmor extends CraftMetaArmor implements Colorable CraftMetaLeatherArmor.readColor(this, meta); } @@ -329,10 +376,10 @@ index c74d597633d023bd12c10bd4801bc103eb2beef1..2c9ca54267579a210d4ea192517fc0fb } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCompass.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCompass.java -index 820b4e611342fb62c61a8b3b19e19967da35cbe0..bbca26f5debb263b04516e68f6e49f68a38fa5b1 100644 +index 607e23040383576b2805c25947a69f6efe6d2c88..69a112b3a9726966aecbe687d905fd1a11cfa1e3 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCompass.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCompass.java -@@ -51,8 +51,8 @@ public class CraftMetaCompass extends CraftMetaItem implements CompassMeta { +@@ -50,8 +50,8 @@ public class CraftMetaCompass extends CraftMetaItem implements CompassMeta { this.tracked = compassMeta.tracked; } @@ -344,7 +391,7 @@ index 820b4e611342fb62c61a8b3b19e19967da35cbe0..bbca26f5debb263b04516e68f6e49f68 lodestoneTarget.target().ifPresent((target) -> { this.lodestoneWorld = target.dimension(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCrossbow.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCrossbow.java -index de7b06f9da17418cf0065249438a4182043160e6..a3fa95377e083e51ad7596d21eeb08172bdb18b2 100644 +index c278af519308c84ad76fc2312046980c01c528ba..0807c2172c5a4bee675cef265a45a9350e98b880 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCrossbow.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCrossbow.java @@ -36,8 +36,8 @@ public class CraftMetaCrossbow extends CraftMetaItem implements CrossbowMeta { @@ -359,10 +406,10 @@ index de7b06f9da17418cf0065249438a4182043160e6..a3fa95377e083e51ad7596d21eeb0817 getOrEmpty(tag, CraftMetaCrossbow.CHARGED_PROJECTILES).ifPresent((p) -> { List list = p.getItems(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java -index 8734f0b777432cd8639094b75a3da1b9595823ed..eb80239949e54c0a698ad4e2d9262242ecb28e41 100644 +index 19af55ec2bf62b70bd3be44f499b32f5efe71ab1..c93f769ee6c55022653696da45de568fcf7589fe 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java -@@ -33,8 +33,8 @@ class CraftMetaEnchantedBook extends CraftMetaItem implements EnchantmentStorage +@@ -32,8 +32,8 @@ class CraftMetaEnchantedBook extends CraftMetaItem implements EnchantmentStorage } } @@ -389,10 +436,10 @@ index 3ff0340c40e9dc9a6e690de15ccade7a0c4e8f02..3f6c5cbbf63631e4b72dc43558651ea9 getOrEmpty(tag, CraftMetaEntityTag.ENTITY_TAG).ifPresent((nbt) -> { this.entityTag = nbt.copyTag(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java -index b444bd26d6c3def3494d3cc0520e462408272be3..8e0dd4b7a7a25a8beb27b507047bc48d8227627c 100644 +index f2cecd01f7f214a023e1bdeecc14359f696fb9d4..97b7085250d749c5e46352b372068b51de89bc7f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java -@@ -60,8 +60,8 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { +@@ -59,8 +59,8 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { } } @@ -404,10 +451,10 @@ index b444bd26d6c3def3494d3cc0520e462408272be3..8e0dd4b7a7a25a8beb27b507047bc48d getOrEmpty(tag, CraftMetaFirework.FIREWORKS).ifPresent((fireworks) -> { this.power = fireworks.flightDuration(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index dbcf9a27112ac525722fd9b80ec736797864bfdf..5cdb9e07f79355e4590984b32be554053754ef5b 100644 +index 1b7d4bea50730f97804f1b9a4ac8896a365bae26..8cfce9c557c4411914adffd10872bf3129435423 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -342,7 +342,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -346,7 +346,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { // Paper end } @@ -416,7 +463,7 @@ index dbcf9a27112ac525722fd9b80ec736797864bfdf..5cdb9e07f79355e4590984b32be55405 CraftMetaItem.getOrEmpty(tag, CraftMetaItem.NAME).ifPresent((component) -> { this.displayName = component; }); -@@ -453,11 +453,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -457,12 +457,19 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { }); // Paper end - fix ItemFlags @@ -429,14 +476,15 @@ index dbcf9a27112ac525722fd9b80ec736797864bfdf..5cdb9e07f79355e4590984b32be55405 + // Paper end - improve checking handled data component types Set, Optional>> keys = tag.entrySet(); for (Map.Entry, Optional> key : keys) { + // Paper start - don't lose unhandled tags if (key.getValue().isEmpty()) { this.unhandledTags.remove(key.getKey()); - } else if (!CraftMetaItem.getHandledTags().contains(key.getKey())) { + } else if (!handledTags.contains(key.getKey())) { // Paper - improve checking handled data component types - key.getValue().ifPresentOrElse((value) -> { + // Paper end - don't lose unhandled tags + key.getValue().ifPresent((value) -> { this.unhandledTags.set((DataComponentType) key.getKey(), value); - }, () -> { -@@ -1983,68 +1990,75 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -2047,68 +2054,75 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.version = version; } @@ -573,10 +621,10 @@ index dbcf9a27112ac525722fd9b80ec736797864bfdf..5cdb9e07f79355e4590984b32be55405 protected static Optional getOrEmpty(DataComponentPatch tag, ItemMetaKeyType type) { Optional result = tag.get(type.TYPE); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java -index bd44481a7d794943cb8695bea2a773a4562f0fae..20638aa593e0a6c78e4bfdb936e69f3d36e18f4e 100644 +index 573806b9200282f9842ab5289af4e2987905cafc..e47c1b9a52c938b145b721d9c088f4a916a01424 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java -@@ -31,8 +31,8 @@ public class CraftMetaKnowledgeBook extends CraftMetaItem implements KnowledgeBo +@@ -30,8 +30,8 @@ public class CraftMetaKnowledgeBook extends CraftMetaItem implements KnowledgeBo } } @@ -588,10 +636,10 @@ index bd44481a7d794943cb8695bea2a773a4562f0fae..20638aa593e0a6c78e4bfdb936e69f3d getOrEmpty(tag, CraftMetaKnowledgeBook.BOOK_RECIPES).ifPresent((pages) -> { for (int i = 0; i < pages.size(); i++) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java -index b97e9a8f163adbb30d2e7db16aeb99544fcb2916..157a7b7351f48e68d2923c72ed3bbe3dcae21383 100644 +index 75a8ad69902103a2e33a457c3225a33860d075ed..e8c950aa74d31bf7a9128f4acc4bccee26bbcd7f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java -@@ -35,8 +35,8 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta { +@@ -25,8 +25,8 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta { CraftMetaLeatherArmor.readColor(this, meta); } @@ -603,10 +651,10 @@ index b97e9a8f163adbb30d2e7db16aeb99544fcb2916..157a7b7351f48e68d2923c72ed3bbe3d } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java -index 6b34a8d33faa49ffa9082995e67af10d3cb38c03..d829f4da371b44e7480896118547734be400a314 100644 +index 08e18dcabbf52aae5c3843d49a72d1d52baa729b..149356981e586e4f67d4543d3df94a2ea99333fc 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java -@@ -45,8 +45,8 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta { +@@ -44,8 +44,8 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta { this.color = map.color; } @@ -618,10 +666,10 @@ index 6b34a8d33faa49ffa9082995e67af10d3cb38c03..d829f4da371b44e7480896118547734b getOrEmpty(tag, CraftMetaMap.MAP_ID).ifPresent((mapId) -> { this.mapId = mapId.id(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMusicInstrument.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMusicInstrument.java -index 4eb2993903f5fa9fb9fd65282a42f26b3aa1e7bd..f33f1d250a3a4068df79cd1eb37baffda981aab3 100644 +index 3599ef1675b6091e9b67fb5241886460f106f9b4..2664d0dbe0d828a67ef551aa341a497a8bd0ea14 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMusicInstrument.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMusicInstrument.java -@@ -27,8 +27,8 @@ public class CraftMetaMusicInstrument extends CraftMetaItem implements MusicInst +@@ -26,8 +26,8 @@ public class CraftMetaMusicInstrument extends CraftMetaItem implements MusicInst } } @@ -633,10 +681,10 @@ index 4eb2993903f5fa9fb9fd65282a42f26b3aa1e7bd..f33f1d250a3a4068df79cd1eb37baffd getOrEmpty(tag, CraftMetaMusicInstrument.GOAT_HORN_INSTRUMENT).ifPresent((instrument) -> { this.instrument = org.bukkit.craftbukkit.CraftRegistry.unwrapAndConvertHolder(org.bukkit.Registry.INSTRUMENT, instrument).orElse(null); // Paper - fix upstream not handling custom instruments diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaOminousBottle.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaOminousBottle.java -index 19f1425ae86e1b8b8fd46a5c6a193d1b77aeefe9..7197c4f5698fd041c4db6d0f6a80c55f77661789 100644 +index 17336c177a969f04c51ff12de4599ef261d79fef..90c554dcbfe2bcca3f742379499f1e8e8665c512 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaOminousBottle.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaOminousBottle.java -@@ -24,8 +24,8 @@ public class CraftMetaOminousBottle extends CraftMetaItem implements OminousBott +@@ -23,8 +23,8 @@ public class CraftMetaOminousBottle extends CraftMetaItem implements OminousBott this.ominousBottleAmplifier = bottleMeta.ominousBottleAmplifier; } @@ -648,10 +696,10 @@ index 19f1425ae86e1b8b8fd46a5c6a193d1b77aeefe9..7197c4f5698fd041c4db6d0f6a80c55f this.ominousBottleAmplifier = amplifier; }); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java -index e2aa305dcaf94d76fa3b74fc33b4d8bbc6d92b2b..db7f71af22d904de08d4badaa7f66d1286d5bf16 100644 +index d1cb8d520b6d7b0981d70412def71e7aab04560a..7f9182809f6e67ff571db0f365bc7e05f600775a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java -@@ -61,8 +61,8 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta { +@@ -51,8 +51,8 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta { } } @@ -663,10 +711,10 @@ index e2aa305dcaf94d76fa3b74fc33b4d8bbc6d92b2b..db7f71af22d904de08d4badaa7f66d12 potionContents.potion().ifPresent((potion) -> { this.type = CraftPotionType.minecraftHolderToBukkit(potion); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -index a08c57770c658bb289c96b69b966d98af72eef67..7bdc94c3ba7d8a0d74c2d88edbb32112a90c5980 100644 +index d6e161374e0235031128a6ee86d1ffa875ea48aa..ab860f1179fa2618c8fbc30ac5f48ff78b8abb60 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -@@ -69,8 +69,8 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { +@@ -49,8 +49,8 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { this.noteBlockSound = skullMeta.noteBlockSound; } @@ -678,10 +726,10 @@ index a08c57770c658bb289c96b69b966d98af72eef67..7bdc94c3ba7d8a0d74c2d88edbb32112 getOrEmpty(tag, CraftMetaSkull.SKULL_PROFILE).ifPresent((resolvableProfile) -> { this.setProfile(resolvableProfile.gameProfile()); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java -index 1c2b0407b51906a255e6d240fab969578743938e..b98e656c0bb382667bd186a500c5505f1ed3f7cd 100644 +index 2c6ee95edea9dc959d8d31d689dc27fea4080467..e4b8637e6d82e2ce7cfee2130e6422f0ef4e1fbc 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java -@@ -119,8 +119,8 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta { +@@ -33,8 +33,8 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta { this.entityTag = egg.entityTag; } @@ -693,10 +741,10 @@ index 1c2b0407b51906a255e6d240fab969578743938e..b98e656c0bb382667bd186a500c5505f getOrEmpty(tag, CraftMetaSpawnEgg.ENTITY_TAG).ifPresent((nbt) -> { this.entityTag = nbt.copyTag(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSuspiciousStew.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSuspiciousStew.java -index 8fc3cd507d333d2bdea759d7c102a56e88ad5f5a..f6b3798cf06f94d7e3e76d1b6e83236ded5b21e0 100644 +index 248efddbad2bfee4f9aa33ec738b5353054eda61..7a43e326e51300306b9c5c23a16ffae92030bd2b 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSuspiciousStew.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSuspiciousStew.java -@@ -34,8 +34,8 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious +@@ -33,8 +33,8 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious } } @@ -708,10 +756,10 @@ index 8fc3cd507d333d2bdea759d7c102a56e88ad5f5a..f6b3798cf06f94d7e3e76d1b6e83236d List list = suspiciousStewEffects.effects(); int length = list.size(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java -index 911bdce0795a6b11cd1d5ad5211202456e5225d4..b5392a3a6f6f3d0a54549e6bb93f28590ee048f0 100644 +index a514fe98d3d2b65d2cfd029079c69189bcb99c01..17705059b81942e4df43a4a5180092e09c985ade 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java -@@ -39,8 +39,8 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB +@@ -38,8 +38,8 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB this.bucketEntityTag = bucket.bucketEntityTag; } diff --git a/patches/server/0970-General-ItemMeta-fixes.patch b/patches/server/0970-General-ItemMeta-fixes.patch index ee7ee45e11..7f64ec27a7 100644 --- a/patches/server/0970-General-ItemMeta-fixes.patch +++ b/patches/server/0970-General-ItemMeta-fixes.patch @@ -66,7 +66,7 @@ index 397eb1a101bd60f49dbb2fa8eddf28f6f233167f..2c61e8d5bbab59c691f4cb003041e7e5 protected void load(T tileEntity) { if (tileEntity != null && tileEntity != this.snapshot) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 886f86bd20f6d2fea954d7d01bb05311bc3ec4d9..42549c7e5c803e0fdcc0243e847d5d17c0aae18a 100644 +index 7672128ecca3052f2dc422349a863484c301310e..be36336a3c7d1ae88277f4ee1be70075001de7a7 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -339,7 +339,14 @@ public final class CraftItemStack extends ItemStack { @@ -85,7 +85,7 @@ index 886f86bd20f6d2fea954d7d01bb05311bc3ec4d9..42549c7e5c803e0fdcc0243e847d5d17 ((CraftMetaItem) itemMeta).applyToItem(tag); itemStack.applyComponents(tag.build()); } -@@ -694,15 +701,20 @@ public final class CraftItemStack extends ItemStack { +@@ -387,15 +394,20 @@ public final class CraftItemStack extends ItemStack { if (itemMeta == null) return true; if (!((CraftMetaItem) itemMeta).isEmpty()) { @@ -113,10 +113,10 @@ index 886f86bd20f6d2fea954d7d01bb05311bc3ec4d9..42549c7e5c803e0fdcc0243e847d5d17 return true; } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaAxolotlBucket.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaAxolotlBucket.java -index 44d8aa7123ac22cf9a22720ecadc8c5f63bafc0a..9665dc043b257bb0d6f7b40fd938ff549ab685c6 100644 +index 169fefb64e1af444f7c2efb1234cb6e7779fb717..cb49ff5c94f33f00f626a31d958d2025819d1da8 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaAxolotlBucket.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaAxolotlBucket.java -@@ -124,14 +124,13 @@ public class CraftMetaAxolotlBucket extends CraftMetaItem implements AxolotlBuck +@@ -118,14 +118,13 @@ public class CraftMetaAxolotlBucket extends CraftMetaItem implements AxolotlBuck @Override public Axolotl.Variant getVariant() { @@ -134,10 +134,10 @@ index 44d8aa7123ac22cf9a22720ecadc8c5f63bafc0a..9665dc043b257bb0d6f7b40fd938ff54 } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java -index 1ac3bec02fce28d5ce698305a7482a9eccbb1867..b494568f833dc21d4e2447ac3e5c5002288b5533 100644 +index 1c17fb294d83d99ae657eff6a8a986bf72c6ec47..b9d6a4a8f78a0e26d888b6bfdff25c3a3ac17e48 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java -@@ -107,6 +107,7 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta { +@@ -69,6 +69,7 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta { void applyToItem(CraftMetaItem.Applicator tag) { super.applyToItem(tag); @@ -146,10 +146,10 @@ index 1ac3bec02fce28d5ce698305a7482a9eccbb1867..b494568f833dc21d4e2447ac3e5c5002 for (Pattern p : this.patterns) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java -index 12911233c01d0ac1af9adbd157d56d28361fc76f..3faef745d9b5d3baaea8c20c6f8e06f7bb529665 100644 +index d7e5491cc0296563fb9fdf28d64b21a10c08ea4a..224ea52574b80bb087c5c62eaf1d46261c1252af 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java -@@ -142,9 +142,24 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta +@@ -50,9 +50,24 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta @ItemMetaKey.Specific(ItemMetaKey.Specific.To.NBT) static final ItemMetaKeyType BLOCK_ENTITY_TAG = new ItemMetaKeyType<>(DataComponents.BLOCK_ENTITY_DATA, "BlockEntityTag"); @@ -175,7 +175,7 @@ index 12911233c01d0ac1af9adbd157d56d28361fc76f..3faef745d9b5d3baaea8c20c6f8e06f7 private CompoundTag internalTag; CraftMetaBlockState(CraftMetaItem meta, Material material) { -@@ -153,41 +168,61 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta +@@ -61,41 +76,61 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta if (!(meta instanceof CraftMetaBlockState) || ((CraftMetaBlockState) meta).material != material) { @@ -250,7 +250,7 @@ index 12911233c01d0ac1af9adbd157d56d28361fc76f..3faef745d9b5d3baaea8c20c6f8e06f7 } } -@@ -200,7 +235,10 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta +@@ -108,7 +143,10 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta } else { this.material = Material.AIR; } @@ -262,7 +262,7 @@ index 12911233c01d0ac1af9adbd157d56d28361fc76f..3faef745d9b5d3baaea8c20c6f8e06f7 this.internalTag = null; } -@@ -208,13 +246,21 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta +@@ -116,13 +154,21 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta void applyToItem(CraftMetaItem.Applicator tag) { super.applyToItem(tag); @@ -289,7 +289,7 @@ index 12911233c01d0ac1af9adbd157d56d28361fc76f..3faef745d9b5d3baaea8c20c6f8e06f7 } @Override -@@ -223,14 +269,29 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta +@@ -131,14 +177,29 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta if (tag.contains(CraftMetaBlockState.BLOCK_ENTITY_TAG.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) { this.internalTag = tag.getCompound(CraftMetaBlockState.BLOCK_ENTITY_TAG.NBT); @@ -321,7 +321,7 @@ index 12911233c01d0ac1af9adbd157d56d28361fc76f..3faef745d9b5d3baaea8c20c6f8e06f7 } @Override -@@ -244,9 +305,10 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta +@@ -152,9 +213,10 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta int applyHash() { final int original; int hash = original = super.applyHash(); @@ -335,7 +335,7 @@ index 12911233c01d0ac1af9adbd157d56d28361fc76f..3faef745d9b5d3baaea8c20c6f8e06f7 return original != hash ? CraftMetaBlockState.class.hashCode() ^ hash : hash; } -@@ -258,19 +320,19 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta +@@ -166,45 +228,71 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta if (meta instanceof CraftMetaBlockState) { CraftMetaBlockState that = (CraftMetaBlockState) meta; @@ -358,8 +358,6 @@ index 12911233c01d0ac1af9adbd157d56d28361fc76f..3faef745d9b5d3baaea8c20c6f8e06f7 } @Override -@@ -281,27 +343,53 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta - @Override public CraftMetaBlockState clone() { CraftMetaBlockState meta = (CraftMetaBlockState) super.clone(); - if (this.blockEntityTag != null) { @@ -419,7 +417,7 @@ index 12911233c01d0ac1af9adbd157d56d28361fc76f..3faef745d9b5d3baaea8c20c6f8e06f7 } private static CraftBlockEntityState getBlockState(Material material, CompoundTag blockEntityTag) { -@@ -331,7 +419,23 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta +@@ -234,7 +322,23 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta Class blockStateType = CraftBlockStates.getBlockStateType(stateMaterial); Preconditions.checkArgument(blockStateType == blockState.getClass() && blockState instanceof CraftBlockEntityState, "Invalid blockState for " + this.material); @@ -497,10 +495,10 @@ index 3f78a0935d738854182254b345064e3c225dcd5f..218df87c596d47b431dbbf2aa42822ef if (this.resolved) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBundle.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBundle.java -index f8c02fe01fd95aa5de8523c9ad452d91f5d3c16f..4447c754458e9fdead003b4044bf2bee6fcbaaa2 100644 +index 2736a87a6c481da0575e6e29ea08faa539c24378..51da0db4da3549efd69f367e28450408968fa8d0 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBundle.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBundle.java -@@ -42,7 +42,7 @@ public class CraftMetaBundle extends CraftMetaItem implements BundleMeta { +@@ -41,7 +41,7 @@ public class CraftMetaBundle extends CraftMetaItem implements BundleMeta { bundle.items().forEach((item) -> { ItemStack itemStack = CraftItemStack.asCraftMirror(item); @@ -509,7 +507,7 @@ index f8c02fe01fd95aa5de8523c9ad452d91f5d3c16f..4447c754458e9fdead003b4044bf2bee this.addItem(itemStack); } }); -@@ -55,7 +55,7 @@ public class CraftMetaBundle extends CraftMetaItem implements BundleMeta { +@@ -54,7 +54,7 @@ public class CraftMetaBundle extends CraftMetaItem implements BundleMeta { Iterable items = SerializableMeta.getObject(Iterable.class, map, CraftMetaBundle.ITEMS.BUKKIT, true); if (items != null) { for (Object stack : items) { @@ -518,7 +516,7 @@ index f8c02fe01fd95aa5de8523c9ad452d91f5d3c16f..4447c754458e9fdead003b4044bf2bee this.addItem(itemStack); } } -@@ -116,7 +116,7 @@ public class CraftMetaBundle extends CraftMetaItem implements BundleMeta { +@@ -110,7 +110,7 @@ public class CraftMetaBundle extends CraftMetaItem implements BundleMeta { @Override public void addItem(ItemStack item) { @@ -528,12 +526,12 @@ index f8c02fe01fd95aa5de8523c9ad452d91f5d3c16f..4447c754458e9fdead003b4044bf2bee if (this.items == null) { this.items = new ArrayList<>(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java -index 2c9ca54267579a210d4ea192517fc0fbce8e467a..4e423c4790d7b03c283c9a5fa94bce4a1153445e 100644 +index 6517ec4933b0eae761fceb117ea1db175755d0b1..299f2f4f143f753f3cd8a020c8e6ae46298e0f6f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java -@@ -22,16 +22,30 @@ public class CraftMetaColorableArmor extends CraftMetaArmor implements Colorable - Material.WOLF_ARMOR - ); +@@ -11,16 +11,30 @@ import org.bukkit.inventory.meta.ColorableArmorMeta; + @DelegateDeserialization(SerializableMeta.class) + public class CraftMetaColorableArmor extends CraftMetaArmor implements ColorableArmorMeta { - private Color color = DEFAULT_LEATHER_COLOR; + private Integer color; // Paper - keep color component consistent with vanilla (top byte is ignored) @@ -565,7 +563,7 @@ index 2c9ca54267579a210d4ea192517fc0fbce8e467a..4e423c4790d7b03c283c9a5fa94bce4a } CraftMetaColorableArmor(Map map) { -@@ -42,7 +56,11 @@ public class CraftMetaColorableArmor extends CraftMetaArmor implements Colorable +@@ -31,7 +45,11 @@ public class CraftMetaColorableArmor extends CraftMetaArmor implements Colorable @Override void applyToItem(CraftMetaItem.Applicator itemTag) { super.applyToItem(itemTag); @@ -578,7 +576,7 @@ index 2c9ca54267579a210d4ea192517fc0fbce8e467a..4e423c4790d7b03c283c9a5fa94bce4a } @Override -@@ -68,16 +86,16 @@ public class CraftMetaColorableArmor extends CraftMetaArmor implements Colorable +@@ -52,16 +70,16 @@ public class CraftMetaColorableArmor extends CraftMetaArmor implements Colorable @Override public Color getColor() { @@ -598,7 +596,7 @@ index 2c9ca54267579a210d4ea192517fc0fbce8e467a..4e423c4790d7b03c283c9a5fa94bce4a } @Override -@@ -97,7 +115,7 @@ public class CraftMetaColorableArmor extends CraftMetaArmor implements Colorable +@@ -81,7 +99,7 @@ public class CraftMetaColorableArmor extends CraftMetaArmor implements Colorable if (meta instanceof CraftMetaColorableArmor) { CraftMetaColorableArmor that = (CraftMetaColorableArmor) meta; @@ -608,10 +606,10 @@ index 2c9ca54267579a210d4ea192517fc0fbce8e467a..4e423c4790d7b03c283c9a5fa94bce4a return true; } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCompass.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCompass.java -index bbca26f5debb263b04516e68f6e49f68a38fa5b1..aacc4d010f4dfa4d9d11332b802205a6f35b6de3 100644 +index 69a112b3a9726966aecbe687d905fd1a11cfa1e3..6362df65424e53098701b8d54c74b5905648b78a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCompass.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCompass.java -@@ -36,7 +36,7 @@ public class CraftMetaCompass extends CraftMetaItem implements CompassMeta { +@@ -35,7 +35,7 @@ public class CraftMetaCompass extends CraftMetaItem implements CompassMeta { private int lodestoneX; private int lodestoneY; private int lodestoneZ; @@ -620,7 +618,7 @@ index bbca26f5debb263b04516e68f6e49f68a38fa5b1..aacc4d010f4dfa4d9d11332b802205a6 CraftMetaCompass(CraftMetaItem meta) { super(meta); -@@ -80,7 +80,7 @@ public class CraftMetaCompass extends CraftMetaItem implements CompassMeta { +@@ -79,7 +79,7 @@ public class CraftMetaCompass extends CraftMetaItem implements CompassMeta { this.setLodestone(lodestone); } } @@ -629,7 +627,7 @@ index bbca26f5debb263b04516e68f6e49f68a38fa5b1..aacc4d010f4dfa4d9d11332b802205a6 } @Override -@@ -146,12 +146,12 @@ public class CraftMetaCompass extends CraftMetaItem implements CompassMeta { +@@ -140,12 +140,12 @@ public class CraftMetaCompass extends CraftMetaItem implements CompassMeta { } boolean hasLodestoneTracked() { @@ -645,10 +643,10 @@ index bbca26f5debb263b04516e68f6e49f68a38fa5b1..aacc4d010f4dfa4d9d11332b802205a6 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCrossbow.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCrossbow.java -index a3fa95377e083e51ad7596d21eeb08172bdb18b2..0f5a64fc5eb619e18f5eeb97f377c9d593e4a38f 100644 +index 0807c2172c5a4bee675cef265a45a9350e98b880..88ea260fb84a5f8eaab3a23a9a65d0411215a6a1 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCrossbow.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCrossbow.java -@@ -122,7 +122,7 @@ public class CraftMetaCrossbow extends CraftMetaItem implements CrossbowMeta { +@@ -117,7 +117,7 @@ public class CraftMetaCrossbow extends CraftMetaItem implements CrossbowMeta { @Override public void addChargedProjectile(ItemStack item) { Preconditions.checkArgument(item != null, "item"); @@ -671,10 +669,10 @@ index 3f6c5cbbf63631e4b72dc43558651ea94f31ca78..da474a5b963d8e6769d120e9091e60ed return true; } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java -index 8e0dd4b7a7a25a8beb27b507047bc48d8227627c..77489c3ffaa3a72d4cf105499a77150fca6d8526 100644 +index 97b7085250d749c5e46352b372068b51de89bc7f..7277e7ee566aabf6e01937072d949ed67c3e8e38 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java -@@ -55,7 +55,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { +@@ -54,7 +54,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { this.power = that.power; @@ -683,7 +681,7 @@ index 8e0dd4b7a7a25a8beb27b507047bc48d8227627c..77489c3ffaa3a72d4cf105499a77150f this.effects = new ArrayList<>(that.effects); } } -@@ -86,19 +86,14 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { +@@ -85,19 +85,14 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { .with(CraftMetaFirework.getEffectType(explosion.shape())); IntList colors = explosion.colors(); @@ -706,7 +704,7 @@ index 8e0dd4b7a7a25a8beb27b507047bc48d8227627c..77489c3ffaa3a72d4cf105499a77150f } return effect.build(); -@@ -154,7 +149,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { +@@ -153,7 +148,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { } Iterable effects = SerializableMeta.getObject(Iterable.class, map, CraftMetaFirework.EXPLOSIONS.BUKKIT, true); @@ -715,7 +713,7 @@ index 8e0dd4b7a7a25a8beb27b507047bc48d8227627c..77489c3ffaa3a72d4cf105499a77150f } @Override -@@ -162,7 +157,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { +@@ -161,7 +156,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { return !(this.effects == null || this.effects.isEmpty()); } @@ -724,7 +722,7 @@ index 8e0dd4b7a7a25a8beb27b507047bc48d8227627c..77489c3ffaa3a72d4cf105499a77150f if (collection == null || (collection instanceof Collection && ((Collection) collection).isEmpty())) { return; } -@@ -174,6 +169,15 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { +@@ -173,6 +168,15 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { for (Object obj : collection) { Preconditions.checkArgument(obj instanceof FireworkEffect, "%s in %s is not a FireworkEffect", obj, collection); @@ -740,7 +738,7 @@ index 8e0dd4b7a7a25a8beb27b507047bc48d8227627c..77489c3ffaa3a72d4cf105499a77150f effects.add((FireworkEffect) obj); } } -@@ -186,9 +190,13 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { +@@ -185,9 +189,13 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { } List effects = new ArrayList<>(); @@ -756,7 +754,7 @@ index 8e0dd4b7a7a25a8beb27b507047bc48d8227627c..77489c3ffaa3a72d4cf105499a77150f itemTag.put(CraftMetaFirework.FIREWORKS, new Fireworks(this.power, effects)); } -@@ -218,7 +226,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { +@@ -212,7 +220,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { } boolean isFireworkEmpty() { @@ -765,7 +763,7 @@ index 8e0dd4b7a7a25a8beb27b507047bc48d8227627c..77489c3ffaa3a72d4cf105499a77150f } boolean hasPower() { -@@ -234,7 +242,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { +@@ -228,7 +236,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { if (meta instanceof CraftMetaFirework that) { return (this.hasPower() ? that.hasPower() && this.power == that.power : !that.hasPower()) @@ -774,7 +772,7 @@ index 8e0dd4b7a7a25a8beb27b507047bc48d8227627c..77489c3ffaa3a72d4cf105499a77150f } return true; -@@ -252,7 +260,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { +@@ -246,7 +254,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { if (this.hasPower()) { hash = 61 * hash + this.power; } @@ -783,7 +781,7 @@ index 8e0dd4b7a7a25a8beb27b507047bc48d8227627c..77489c3ffaa3a72d4cf105499a77150f hash = 61 * hash + 13 * this.effects.hashCode(); } return hash != original ? CraftMetaFirework.class.hashCode() ^ hash : hash; -@@ -262,7 +270,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { +@@ -256,7 +264,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { Builder serialize(Builder builder) { super.serialize(builder); @@ -792,7 +790,7 @@ index 8e0dd4b7a7a25a8beb27b507047bc48d8227627c..77489c3ffaa3a72d4cf105499a77150f builder.put(CraftMetaFirework.EXPLOSIONS.BUKKIT, ImmutableList.copyOf(this.effects)); } -@@ -287,6 +295,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { +@@ -281,6 +289,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { @Override public void addEffect(FireworkEffect effect) { Preconditions.checkArgument(effect != null, "FireworkEffect cannot be null"); @@ -800,7 +798,7 @@ index 8e0dd4b7a7a25a8beb27b507047bc48d8227627c..77489c3ffaa3a72d4cf105499a77150f if (this.effects == null) { this.effects = new ArrayList(); } -@@ -296,6 +305,10 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { +@@ -290,6 +299,10 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { @Override public void addEffects(FireworkEffect... effects) { Preconditions.checkArgument(effects != null, "effects cannot be null"); @@ -811,7 +809,7 @@ index 8e0dd4b7a7a25a8beb27b507047bc48d8227627c..77489c3ffaa3a72d4cf105499a77150f if (effects.length == 0) { return; } -@@ -314,7 +327,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { +@@ -308,7 +321,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { @Override public void addEffects(Iterable effects) { Preconditions.checkArgument(effects != null, "effects cannot be null"); @@ -820,7 +818,7 @@ index 8e0dd4b7a7a25a8beb27b507047bc48d8227627c..77489c3ffaa3a72d4cf105499a77150f } @Override -@@ -349,7 +362,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { +@@ -343,7 +356,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { @Override public void setPower(int power) { Preconditions.checkArgument(power >= 0, "power cannot be less than zero: %s", power); @@ -830,10 +828,10 @@ index 8e0dd4b7a7a25a8beb27b507047bc48d8227627c..77489c3ffaa3a72d4cf105499a77150f } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddaef11cb236 100644 +index 8cfce9c557c4411914adffd10872bf3129435423..d2a7414f3ae9fb23a2f9f2ed7fd0a50a4aa3d7d9 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -180,9 +180,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -182,9 +182,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -846,7 +844,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae Applicator put(ItemMetaKeyType key, T value) { this.builder.set(key.TYPE, value); -@@ -307,7 +308,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -310,7 +311,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.enchantments = new EnchantmentMap(meta.enchantments); // Paper } @@ -855,7 +853,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae this.attributeModifiers = LinkedHashMultimap.create(meta.attributeModifiers); } -@@ -343,6 +344,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -347,6 +348,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } CraftMetaItem(DataComponentPatch tag, Set> extraHandledTags) { // Paper - improve handled tags on type changes @@ -867,7 +865,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae CraftMetaItem.getOrEmpty(tag, CraftMetaItem.NAME).ifPresent((component) -> { this.displayName = component; }); -@@ -769,7 +775,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -802,7 +808,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { Map mods = SerializableMeta.getObject(Map.class, map, key.BUKKIT, true); Multimap result = LinkedHashMultimap.create(); if (mods == null) { @@ -876,7 +874,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae } for (Object obj : mods.keySet()) { -@@ -931,10 +937,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -970,10 +976,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } void applyModifiers(Multimap modifiers, CraftMetaItem.Applicator tag) { @@ -889,16 +887,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae return; } -@@ -963,7 +967,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { - - @Overridden - boolean isEmpty() { -- return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null || this.canPlaceOnPredicates != null || this.canBreakPredicates != null); // Paper -+ return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasDamage() || this.hasMaxDamage() || this.attributeModifiers != null || this.customTag != null || this.canPlaceOnPredicates != null || this.canBreakPredicates != null); // Paper - } - - // Paper start -@@ -1059,6 +1063,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1106,6 +1110,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public void lore(final List lore) { @@ -906,7 +895,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae this.lore = lore != null ? io.papermc.paper.adventure.PaperAdventure.asVanilla(lore) : null; } // Paper end -@@ -1183,6 +1188,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1230,6 +1235,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { // Paper end @Override public void setLore(List lore) { @@ -914,7 +903,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae if (lore == null || lore.isEmpty()) { this.lore = null; } else { -@@ -1198,6 +1204,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1245,6 +1251,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { // Paper start @Override public void setLoreComponents(List lore) { @@ -922,7 +911,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae if (lore == null) { this.lore = null; } else { -@@ -1339,7 +1346,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1386,7 +1393,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public FoodComponent getFood() { @@ -931,7 +920,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae } @Override -@@ -1395,7 +1402,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1442,7 +1449,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public Multimap getAttributeModifiers(@Nullable EquipmentSlot slot) { @@ -940,7 +929,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae SetMultimap result = LinkedHashMultimap.create(); for (Map.Entry entry : this.attributeModifiers.entries()) { if (entry.getValue().getSlot() == null || entry.getValue().getSlot() == slot) { -@@ -1408,6 +1415,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1455,6 +1462,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public Collection getAttributeModifiers(@Nonnull Attribute attribute) { Preconditions.checkNotNull(attribute, "Attribute cannot be null"); @@ -948,7 +937,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae return this.attributeModifiers.containsKey(attribute) ? ImmutableList.copyOf(this.attributeModifiers.get(attribute)) : null; } -@@ -1415,10 +1423,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1462,10 +1470,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { public boolean addAttributeModifier(@Nonnull Attribute attribute, @Nonnull AttributeModifier modifier) { Preconditions.checkNotNull(attribute, "Attribute cannot be null"); Preconditions.checkNotNull(modifier, "AttributeModifier cannot be null"); @@ -962,7 +951,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae return this.attributeModifiers.put(attribute, modifier); } -@@ -1429,8 +1439,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1476,8 +1486,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return; } @@ -976,7 +965,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae Iterator> iterator = attributeModifiers.entries().iterator(); while (iterator.hasNext()) { -@@ -1440,6 +1453,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1487,6 +1500,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { iterator.remove(); continue; } @@ -984,7 +973,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae this.attributeModifiers.put(next.getKey(), next.getValue()); } } -@@ -1447,13 +1461,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1494,13 +1508,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public boolean removeAttributeModifier(@Nonnull Attribute attribute) { Preconditions.checkNotNull(attribute, "Attribute cannot be null"); @@ -1000,7 +989,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae int removed = 0; Iterator> iter = this.attributeModifiers.entries().iterator(); -@@ -1473,7 +1487,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1520,7 +1534,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { public boolean removeAttributeModifier(@Nonnull Attribute attribute, @Nonnull AttributeModifier modifier) { Preconditions.checkNotNull(attribute, "Attribute cannot be null"); Preconditions.checkNotNull(modifier, "AttributeModifier cannot be null"); @@ -1009,7 +998,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae int removed = 0; Iterator> iter = this.attributeModifiers.entries().iterator(); -@@ -1495,7 +1509,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1542,7 +1556,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public String getAsString() { @@ -1018,7 +1007,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae this.applyToItem(tag); DataComponentPatch patch = tag.build(); Tag nbt = DataComponentPatch.CODEC.encodeStart(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), patch).getOrThrow(); -@@ -1504,7 +1518,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1551,7 +1565,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public String getAsComponentString() { @@ -1027,7 +1016,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae this.applyToItem(tag); DataComponentPatch patch = tag.build(); -@@ -1544,6 +1558,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1591,6 +1605,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { if (first == null || second == null) { return false; } @@ -1035,7 +1024,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae for (Map.Entry entry : first.entries()) { if (!second.containsEntry(entry.getKey(), entry.getValue())) { return false; -@@ -1569,6 +1584,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1616,6 +1631,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public void setDamage(int damage) { @@ -1044,7 +1033,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae this.damage = damage; } -@@ -1585,6 +1602,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1632,6 +1649,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public void setMaxDamage(Integer maxDamage) { @@ -1052,16 +1041,16 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae this.maxDamage = maxDamage; } -@@ -1616,7 +1634,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1663,7 +1681,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { && (this.hasCustomModelData() ? that.hasCustomModelData() && this.customModelData.equals(that.customModelData) : !that.hasCustomModelData()) && (this.hasBlockData() ? that.hasBlockData() && this.blockData.equals(that.blockData) : !that.hasBlockData()) && (this.hasRepairCost() ? that.hasRepairCost() && this.repairCost == that.repairCost : !that.hasRepairCost()) - && (this.hasAttributeModifiers() ? that.hasAttributeModifiers() && CraftMetaItem.compareModifiers(this.attributeModifiers, that.attributeModifiers) : !that.hasAttributeModifiers()) + && (this.attributeModifiers != null ? that.attributeModifiers != null && CraftMetaItem.compareModifiers(this.attributeModifiers, that.attributeModifiers) : that.attributeModifiers == null) // Paper - track only null modifiers && (this.unhandledTags.equals(that.unhandledTags)) + && (this.removedTags.equals(that.removedTags)) && (Objects.equals(this.customTag, that.customTag)) - && (this.persistentDataContainer.equals(that.persistentDataContainer)) -@@ -1676,8 +1694,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1725,8 +1743,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { hash = 61 * hash + (this.hasTool() ? this.tool.hashCode() : 0); hash = 61 * hash + (this.hasJukeboxPlayable() ? this.jukebox.hashCode() : 0); hash = 61 * hash + (this.hasDamage() ? this.damage : 0); @@ -1072,7 +1061,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae hash = 61 * hash + (this.canPlaceOnPredicates != null ? this.canPlaceOnPredicates.hashCode() : 0); // Paper hash = 61 * hash + (this.canBreakPredicates != null ? this.canBreakPredicates.hashCode() : 0); // Paper hash = 61 * hash + this.version; -@@ -1697,7 +1715,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1746,7 +1764,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { if (this.enchantments != null) { clone.enchantments = new EnchantmentMap(this.enchantments); // Paper } @@ -1081,7 +1070,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers); } if (this.customTag != null) { -@@ -1911,7 +1929,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1975,7 +1993,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } static void serializeModifiers(Multimap modifiers, ImmutableMap.Builder builder, ItemMetaKey key) { @@ -1090,7 +1079,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae return; } -@@ -1993,7 +2011,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -2057,7 +2075,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { // Paper start - improve checking handled tags @org.jetbrains.annotations.VisibleForTesting public static final Map, Set>> HANDLED_DCTS_PER_TYPE = new HashMap<>(); @@ -1099,7 +1088,7 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae CraftMetaItem.NAME.TYPE, CraftMetaItem.ITEM_NAME.TYPE, CraftMetaItem.LORE.TYPE, -@@ -2061,7 +2079,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -2125,7 +2143,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { // Paper end - improve checking handled data component types protected static Optional getOrEmpty(DataComponentPatch tag, ItemMetaKeyType type) { @@ -1114,10 +1103,10 @@ index 5cdb9e07f79355e4590984b32be554053754ef5b..31972619256c09bce46312b55153ddae return (result != null) ? result : Optional.empty(); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java -index 157a7b7351f48e68d2923c72ed3bbe3dcae21383..70c0d4cc85c045d040a35cd406f3f7ce9b6a58fa 100644 +index e8c950aa74d31bf7a9128f4acc4bccee26bbcd7f..f1dbfba7ec11b12ead627f098a0b833f49be8000 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java -@@ -28,16 +28,30 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta { +@@ -18,16 +18,30 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta { static final ItemMetaKeyType COLOR = new ItemMetaKeyType<>(DataComponents.DYED_COLOR, "color"); @@ -1151,7 +1140,7 @@ index 157a7b7351f48e68d2923c72ed3bbe3dcae21383..70c0d4cc85c045d040a35cd406f3f7ce } CraftMetaLeatherArmor(Map map) { -@@ -48,7 +62,11 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta { +@@ -38,7 +52,11 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta { @Override void applyToItem(CraftMetaItem.Applicator itemTag) { super.applyToItem(itemTag); @@ -1164,7 +1153,7 @@ index 157a7b7351f48e68d2923c72ed3bbe3dcae21383..70c0d4cc85c045d040a35cd406f3f7ce } @Override -@@ -72,16 +90,16 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta { +@@ -66,16 +84,16 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta { @Override public Color getColor() { @@ -1184,7 +1173,7 @@ index 157a7b7351f48e68d2923c72ed3bbe3dcae21383..70c0d4cc85c045d040a35cd406f3f7ce } @Override -@@ -101,7 +119,7 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta { +@@ -95,7 +113,7 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta { if (meta instanceof CraftMetaLeatherArmor) { CraftMetaLeatherArmor that = (CraftMetaLeatherArmor) meta; @@ -1193,7 +1182,7 @@ index 157a7b7351f48e68d2923c72ed3bbe3dcae21383..70c0d4cc85c045d040a35cd406f3f7ce } return true; } -@@ -121,14 +139,16 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta { +@@ -115,14 +133,16 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta { return original != hash ? CraftMetaLeatherArmor.class.hashCode() ^ hash : hash; } @@ -1211,7 +1200,7 @@ index 157a7b7351f48e68d2923c72ed3bbe3dcae21383..70c0d4cc85c045d040a35cd406f3f7ce static void readColor(LeatherArmorMeta meta, DataComponentPatch tag) { getOrEmpty(tag, CraftMetaLeatherArmor.COLOR).ifPresent((dyedItemColor) -> { if (!dyedItemColor.showInTooltip()) { -@@ -151,6 +171,7 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta { +@@ -145,6 +165,7 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta { return !DEFAULT_LEATHER_COLOR.equals(meta.getColor()); } @@ -1220,10 +1209,10 @@ index 157a7b7351f48e68d2923c72ed3bbe3dcae21383..70c0d4cc85c045d040a35cd406f3f7ce if (CraftMetaLeatherArmor.hasColor(meta)) { tag.put(CraftMetaLeatherArmor.COLOR, new DyedItemColor(meta.getColor().asRGB(), !meta.hasItemFlag(ItemFlag.HIDE_DYE))); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java -index d829f4da371b44e7480896118547734be400a314..0ff40e10ce8bab8010222ef7697d585430aeda03 100644 +index 149356981e586e4f67d4543d3df94a2ea99333fc..06c72ed83dab9492b70bfd13f7f9c1a4cbef9e2f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java -@@ -30,7 +30,7 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta { +@@ -29,7 +29,7 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta { private Integer mapId; private byte scaling = CraftMetaMap.SCALING_EMPTY; @@ -1232,7 +1221,7 @@ index d829f4da371b44e7480896118547734be400a314..0ff40e10ce8bab8010222ef7697d5854 CraftMetaMap(CraftMetaItem meta) { super(meta); -@@ -58,7 +58,7 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta { +@@ -57,7 +57,7 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta { getOrEmpty(tag, CraftMetaMap.MAP_COLOR).ifPresent((mapColor) -> { try { @@ -1241,7 +1230,7 @@ index d829f4da371b44e7480896118547734be400a314..0ff40e10ce8bab8010222ef7697d5854 } catch (IllegalArgumentException ex) { // Invalid colour } -@@ -102,7 +102,7 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta { +@@ -101,7 +101,7 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta { } if (this.hasColor()) { @@ -1250,7 +1239,7 @@ index d829f4da371b44e7480896118547734be400a314..0ff40e10ce8bab8010222ef7697d5854 } } -@@ -127,6 +127,7 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta { +@@ -121,6 +121,7 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta { @Override public int getMapId() { @@ -1258,7 +1247,7 @@ index d829f4da371b44e7480896118547734be400a314..0ff40e10ce8bab8010222ef7697d5854 return this.mapId; } -@@ -187,12 +188,12 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta { +@@ -181,12 +182,12 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta { @Override public Color getColor() { @@ -1274,10 +1263,10 @@ index d829f4da371b44e7480896118547734be400a314..0ff40e10ce8bab8010222ef7697d5854 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaOminousBottle.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaOminousBottle.java -index 7197c4f5698fd041c4db6d0f6a80c55f77661789..062ef890b42075adb5663453806dda3ad89a6aa0 100644 +index 90c554dcbfe2bcca3f742379499f1e8e8665c512..14acdd2bd02de7e99b7f237151633ed71396db5f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaOminousBottle.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaOminousBottle.java -@@ -75,6 +75,7 @@ public class CraftMetaOminousBottle extends CraftMetaItem implements OminousBott +@@ -69,6 +69,7 @@ public class CraftMetaOminousBottle extends CraftMetaItem implements OminousBott @Override public int getAmplifier() { @@ -1286,10 +1275,10 @@ index 7197c4f5698fd041c4db6d0f6a80c55f77661789..062ef890b42075adb5663453806dda3a } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java -index db7f71af22d904de08d4badaa7f66d1286d5bf16..e32143e140db50a11cf602cf622d68b787c0d647 100644 +index 7f9182809f6e67ff571db0f365bc7e05f600775a..01c49df291f721bab3acb788ff2f27879b38bfc7 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java -@@ -47,7 +47,7 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta { +@@ -37,7 +37,7 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta { private PotionType type; private List customEffects; @@ -1298,7 +1287,7 @@ index db7f71af22d904de08d4badaa7f66d1286d5bf16..e32143e140db50a11cf602cf622d68b7 CraftMetaPotion(CraftMetaItem meta) { super(meta); -@@ -70,7 +70,7 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta { +@@ -60,7 +60,7 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta { potionContents.customColor().ifPresent((customColor) -> { try { @@ -1307,7 +1296,7 @@ index db7f71af22d904de08d4badaa7f66d1286d5bf16..e32143e140db50a11cf602cf622d68b7 } catch (IllegalArgumentException ex) { // Invalid colour } -@@ -126,7 +126,7 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta { +@@ -116,7 +116,7 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta { super.applyToItem(tag); Optional> defaultPotion = (this.hasBasePotionType()) ? Optional.of(CraftPotionType.bukkitToMinecraftHolder(this.type)) : Optional.empty(); @@ -1316,7 +1305,7 @@ index db7f71af22d904de08d4badaa7f66d1286d5bf16..e32143e140db50a11cf602cf622d68b7 List effectList = new ArrayList<>(); if (this.customEffects != null) { -@@ -295,12 +295,12 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta { +@@ -280,12 +280,12 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta { @Override public Color getColor() { @@ -1332,10 +1321,10 @@ index db7f71af22d904de08d4badaa7f66d1286d5bf16..e32143e140db50a11cf602cf622d68b7 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -index 7bdc94c3ba7d8a0d74c2d88edbb32112a90c5980..ab9b3279db914fb4d6666a4dacbf5e401d2bcb87 100644 +index ab860f1179fa2618c8fbc30ac5f48ff78b8abb60..7de2ed297d0b2bf8adf2058e75a9b594ec2197bd 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -@@ -137,10 +137,10 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { +@@ -117,10 +117,10 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { // Fill in textures PlayerProfile ownerProfile = new CraftPlayerProfile(this.profile); // getOwnerProfile may return null if (ownerProfile.getTextures().isEmpty()) { @@ -1350,10 +1339,10 @@ index 7bdc94c3ba7d8a0d74c2d88edbb32112a90c5980..ab9b3279db914fb4d6666a4dacbf5e40 } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java -index b98e656c0bb382667bd186a500c5505f1ed3f7cd..63088d50c1ec69d1a829fd0783cf109f7981f43f 100644 +index e4b8637e6d82e2ce7cfee2130e6422f0ef4e1fbc..49751354ecd3d401726e8989eb3c09b2de7ae4dc 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java -@@ -212,6 +212,7 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta { +@@ -121,6 +121,7 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta { @Override public EntitySnapshot getSpawnedEntity() { @@ -1361,7 +1350,7 @@ index b98e656c0bb382667bd186a500c5505f1ed3f7cd..63088d50c1ec69d1a829fd0783cf109f return CraftEntitySnapshot.create(this.entityTag); } -@@ -229,7 +230,7 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta { +@@ -138,7 +139,7 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta { if (meta instanceof CraftMetaSpawnEgg) { CraftMetaSpawnEgg that = (CraftMetaSpawnEgg) meta; @@ -1371,10 +1360,10 @@ index b98e656c0bb382667bd186a500c5505f1ed3f7cd..63088d50c1ec69d1a829fd0783cf109f return true; } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java -index b5392a3a6f6f3d0a54549e6bb93f28590ee048f0..7514aa6f206c4b82fecd112783f96bb9dd73c01f 100644 +index 17705059b81942e4df43a4a5180092e09c985ade..80e6b85a107d5236edba99540cb5074e2dc1485a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java -@@ -126,6 +126,7 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB +@@ -120,6 +120,7 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB @Override public DyeColor getPatternColor() { @@ -1382,7 +1371,7 @@ index b5392a3a6f6f3d0a54549e6bb93f28590ee048f0..7514aa6f206c4b82fecd112783f96bb9 return CraftTropicalFish.getPatternColor(this.variant); } -@@ -139,6 +140,7 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB +@@ -133,6 +134,7 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB @Override public DyeColor getBodyColor() { @@ -1390,7 +1379,7 @@ index b5392a3a6f6f3d0a54549e6bb93f28590ee048f0..7514aa6f206c4b82fecd112783f96bb9 return CraftTropicalFish.getBodyColor(this.variant); } -@@ -152,6 +154,7 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB +@@ -146,6 +148,7 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB @Override public TropicalFish.Pattern getPattern() { diff --git a/patches/server/0971-Expose-hasColor-to-leather-armor.patch b/patches/server/0971-Expose-hasColor-to-leather-armor.patch index 0cdf66fe04..fb4dc944de 100644 --- a/patches/server/0971-Expose-hasColor-to-leather-armor.patch +++ b/patches/server/0971-Expose-hasColor-to-leather-armor.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose #hasColor to leather armor diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java -index 4e423c4790d7b03c283c9a5fa94bce4a1153445e..1e8a76f6dd54931eec261653a7bd51b6d18d3c68 100644 +index 299f2f4f143f753f3cd8a020c8e6ae46298e0f6f..51d7263cdd34359d9cdf72cc01ba654b519f838d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java -@@ -134,4 +134,11 @@ public class CraftMetaColorableArmor extends CraftMetaArmor implements Colorable +@@ -118,4 +118,11 @@ public class CraftMetaColorableArmor extends CraftMetaArmor implements Colorable } return original != hash ? CraftMetaColorableArmor.class.hashCode() ^ hash : hash; } @@ -21,10 +21,10 @@ index 4e423c4790d7b03c283c9a5fa94bce4a1153445e..1e8a76f6dd54931eec261653a7bd51b6 + // Paper end - Expose #hasColor to leather armor } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java -index 70c0d4cc85c045d040a35cd406f3f7ce9b6a58fa..0860d85fb9c6d0567f678569efb3c560f58612a9 100644 +index f1dbfba7ec11b12ead627f098a0b833f49be8000..49889026661fb2a558e14569324016d637de27a0 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java -@@ -183,4 +183,11 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta { +@@ -177,4 +177,11 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta { builder.put(CraftMetaLeatherArmor.COLOR.BUKKIT, meta.getColor()); } } diff --git a/patches/server/0975-Brigadier-based-command-API.patch b/patches/server/0975-Brigadier-based-command-API.patch index e551e947aa..e548c59e56 100644 --- a/patches/server/0975-Brigadier-based-command-API.patch +++ b/patches/server/0975-Brigadier-based-command-API.patch @@ -2327,7 +2327,7 @@ index b4af03c4bdd1ce0861f36c3b75fc7e89d701c46a..0761d5bc5f2813bb4a9f664ac7a05b97 this.setPvpAllowed(dedicatedserverproperties.pvp); this.setFlightAllowed(dedicatedserverproperties.allowFlight); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c5b25c70ed435deafcee0a64b4260090b4cfc2e7..9a558ff3498f13d56156356d286f6c356c9a7afc 100644 +index 146d42ba446c2f7aaa728bcb73679c07e8c4a65a..08e6f49b1c3401225c59ff030551080f0bcaf99e 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2408,33 +2408,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -2817,10 +2817,10 @@ index 0000000000000000000000000000000000000000..6475510ea1084a003fb2c8645cb4538b + } +} diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java -index f8e363e9c10e30598185a91cbb5cafc00b79ad3d..d7e24766f383f75ed46123fff1bd0ec926a635b4 100644 +index 41dcf87d945a0acb7806cb1704ee12f7f447daf7..53b49a7ee1ae185e0def7c90cf11223f55a57e65 100644 --- a/src/test/java/org/bukkit/support/DummyServer.java +++ b/src/test/java/org/bukkit/support/DummyServer.java -@@ -51,7 +51,7 @@ public final class DummyServer { +@@ -100,7 +100,7 @@ public final class DummyServer { final Thread currentThread = Thread.currentThread(); when(instance.isPrimaryThread()).thenAnswer(ignored -> Thread.currentThread().equals(currentThread)); diff --git a/patches/server/0976-Fix-issues-with-Recipe-API.patch b/patches/server/0976-Fix-issues-with-Recipe-API.patch index b6f0cb1a91..9f8f34dc50 100644 --- a/patches/server/0976-Fix-issues-with-Recipe-API.patch +++ b/patches/server/0976-Fix-issues-with-Recipe-API.patch @@ -96,10 +96,10 @@ index 0000000000000000000000000000000000000000..b6816485a2360b936c049b398183658e + } +} diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java -index d7e24766f383f75ed46123fff1bd0ec926a635b4..a73c16bb7923957113e688fa6fe46cbd68837d3e 100644 +index 53b49a7ee1ae185e0def7c90cf11223f55a57e65..7862d578f53e48bc467cc4f475d32d9d6ea71e04 100644 --- a/src/test/java/org/bukkit/support/DummyServer.java +++ b/src/test/java/org/bukkit/support/DummyServer.java -@@ -56,6 +56,14 @@ public final class DummyServer { +@@ -105,6 +105,14 @@ public final class DummyServer { when(instance.getTag(anyString(), any(org.bukkit.NamespacedKey.class), any())).thenAnswer(ignored -> new io.papermc.paper.util.EmptyTag()); // paper end - testing additions diff --git a/patches/server/0977-Fix-equipment-slot-and-group-API.patch b/patches/server/0977-Fix-equipment-slot-and-group-API.patch index eaaf981851..637547f1ea 100644 --- a/patches/server/0977-Fix-equipment-slot-and-group-API.patch +++ b/patches/server/0977-Fix-equipment-slot-and-group-API.patch @@ -32,10 +32,10 @@ index 9d74577af071954e1e37201a96368c1360076209..eafa54c870c3e2aef30c3f9f96f51660 throw new IllegalArgumentException("Not implemented. This is a bug"); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 31972619256c09bce46312b55153ddaef11cb236..bcd108cf3a4d10e6bf2058f84c7aa591addd5ced 100644 +index d2a7414f3ae9fb23a2f9f2ed7fd0a50a4aa3d7d9..89c545d4390c7f717f496806fed1d5bc094db0f1 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -1405,7 +1405,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1452,7 +1452,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { if (this.attributeModifiers == null) return LinkedHashMultimap.create(); // Paper - don't change the components SetMultimap result = LinkedHashMultimap.create(); for (Map.Entry entry : this.attributeModifiers.entries()) { @@ -44,7 +44,7 @@ index 31972619256c09bce46312b55153ddaef11cb236..bcd108cf3a4d10e6bf2058f84c7aa591 result.put(entry.getKey(), entry.getValue()); } } -@@ -1473,9 +1473,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1520,9 +1520,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { while (iter.hasNext()) { Map.Entry entry = iter.next(); diff --git a/patches/server/0979-Prevent-sending-oversized-item-data-in-equipment-and.patch b/patches/server/0979-Prevent-sending-oversized-item-data-in-equipment-and.patch index b686bee3b0..037bfd2e95 100644 --- a/patches/server/0979-Prevent-sending-oversized-item-data-in-equipment-and.patch +++ b/patches/server/0979-Prevent-sending-oversized-item-data-in-equipment-and.patch @@ -201,7 +201,7 @@ index 0e7ace92522fbd4cef7b2c2b8a0f8b86c2cce192..1d849ce4e2c85f149af25318b8ffb6dc ((LivingEntity) this.entity).detectEquipmentUpdatesPublic(); // CraftBukkit - SPIGOT-3789: sync again immediately after sending } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 9a558ff3498f13d56156356d286f6c356c9a7afc..a21d4fc368f57023c00f9d114a3a43b032f3d8cb 100644 +index 08e6f49b1c3401225c59ff030551080f0bcaf99e..8900abed5147284f433efe45bb09f7d45c5b89bf 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2732,7 +2732,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -214,7 +214,7 @@ index 9a558ff3498f13d56156356d286f6c356c9a7afc..a21d4fc368f57023c00f9d114a3a43b0 } } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 3a23338e07afa8554d95729a98d731a02dbfcad7..23ce3f5fefceaeff5011f91f04ec8b200a503d21 100644 +index 66707853328b6b23771c88abd0cf5a7ef766bb71..7a6c8a64bd119fd1f2fc245f84cbb332ecd937e3 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3322,7 +3322,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0983-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch b/patches/server/0983-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch index b0f57581f4..749ee86186 100644 --- a/patches/server/0983-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch +++ b/patches/server/0983-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Deprecate InvAction#HOTBAR_MOVE_AND_READD diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a21d4fc368f57023c00f9d114a3a43b032f3d8cb..60f6f17aea41ffaa277bff380924cc752eb3e62a 100644 +index 8900abed5147284f433efe45bb09f7d45c5b89bf..be2e97e4de911ad9570a9b4e9f3c5fafa93f6203 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2998,14 +2998,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0986-Suspicious-Effect-Entry-API.patch b/patches/server/0986-Suspicious-Effect-Entry-API.patch index 42710c795a..bc26031199 100644 --- a/patches/server/0986-Suspicious-Effect-Entry-API.patch +++ b/patches/server/0986-Suspicious-Effect-Entry-API.patch @@ -91,10 +91,10 @@ index 9cc81bcccbf1141f66fedada1359b7c0dfa8e22a..5c5b64bd058684520fa175bfd10622ff public String toString() { return "CraftMushroomCow"; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSuspiciousStew.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSuspiciousStew.java -index f6b3798cf06f94d7e3e76d1b6e83236ded5b21e0..39cab624de062514358a2a2942aea0e58cbd6e3e 100644 +index 7a43e326e51300306b9c5c23a16ffae92030bd2b..192cd33f6276ea4928e29ac2cd4e45bf8bf82dcb 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSuspiciousStew.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSuspiciousStew.java -@@ -22,7 +22,7 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious +@@ -21,7 +21,7 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious static final ItemMetaKeyType EFFECTS = new ItemMetaKeyType<>(DataComponents.SUSPICIOUS_STEW_EFFECTS, "effects"); @@ -103,7 +103,7 @@ index f6b3798cf06f94d7e3e76d1b6e83236ded5b21e0..39cab624de062514358a2a2942aea0e5 CraftMetaSuspiciousStew(CraftMetaItem meta) { super(meta); -@@ -48,7 +48,7 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious +@@ -47,7 +47,7 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious continue; } int duration = effect.duration(); @@ -112,7 +112,7 @@ index f6b3798cf06f94d7e3e76d1b6e83236ded5b21e0..39cab624de062514358a2a2942aea0e5 } }); } -@@ -74,8 +74,8 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious +@@ -73,8 +73,8 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious if (this.customEffects != null) { List effectList = new ArrayList<>(); @@ -123,7 +123,7 @@ index f6b3798cf06f94d7e3e76d1b6e83236ded5b21e0..39cab624de062514358a2a2942aea0e5 } tag.put(CraftMetaSuspiciousStew.EFFECTS, new SuspiciousStewEffects(effectList)); } -@@ -112,7 +112,7 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious +@@ -106,7 +106,7 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious @Override public List getCustomEffects() { if (this.hasCustomEffects()) { @@ -132,7 +132,7 @@ index f6b3798cf06f94d7e3e76d1b6e83236ded5b21e0..39cab624de062514358a2a2942aea0e5 } return ImmutableList.of(); } -@@ -120,27 +120,47 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious +@@ -114,27 +114,47 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious @Override public boolean addCustomEffect(PotionEffect effect, boolean overwrite) { Preconditions.checkArgument(effect != null, "Potion effect cannot be null"); @@ -195,7 +195,7 @@ index f6b3798cf06f94d7e3e76d1b6e83236ded5b21e0..39cab624de062514358a2a2942aea0e5 @Override public boolean removeCustomEffect(PotionEffectType type) { -@@ -151,10 +171,12 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious +@@ -145,10 +165,12 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious } boolean changed = false; @@ -211,7 +211,7 @@ index f6b3798cf06f94d7e3e76d1b6e83236ded5b21e0..39cab624de062514358a2a2942aea0e5 iterator.remove(); changed = true; } -@@ -177,7 +199,7 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious +@@ -171,7 +193,7 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious } for (int i = 0; i < this.customEffects.size(); i++) { @@ -220,7 +220,7 @@ index f6b3798cf06f94d7e3e76d1b6e83236ded5b21e0..39cab624de062514358a2a2942aea0e5 return i; } } -@@ -222,7 +244,7 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious +@@ -216,7 +238,7 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious super.serialize(builder); if (this.hasCustomEffects()) { diff --git a/patches/server/0988-Chunk-System-Starlight-from-Moonrise.patch b/patches/server/0988-Chunk-System-Starlight-from-Moonrise.patch index d3df55cb84..de79cb6927 100644 --- a/patches/server/0988-Chunk-System-Starlight-from-Moonrise.patch +++ b/patches/server/0988-Chunk-System-Starlight-from-Moonrise.patch @@ -10995,7 +10995,7 @@ index 0000000000000000000000000000000000000000..f52e104b3e07825caf0d6d1bda2e45c8 +} diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java new file mode 100644 -index 0000000000000000000000000000000000000000..dd86394b4503dc47c17517b2c79e482fa683b3cf +index 0000000000000000000000000000000000000000..545624cfeefacc7bff3bb24adc9b6d52672db701 --- /dev/null +++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java @@ -0,0 +1,2014 @@ @@ -11605,7 +11605,7 @@ index 0000000000000000000000000000000000000000..dd86394b4503dc47c17517b2c79e482f + } + + // ticket level state -+ private int oldTicketLevel = ChunkHolderManager.MAX_TICKET_LEVEL + 1; ++ public int oldTicketLevel = ChunkHolderManager.MAX_TICKET_LEVEL + 1; + private int currentTicketLevel = ChunkHolderManager.MAX_TICKET_LEVEL + 1; + + public int getTicketLevel() { @@ -22461,7 +22461,7 @@ index 6915522f669631779c1fb8a8e2db330f4b9fb921..cd69971065b13353353eca55f6e14594 this.mayHaveDelayedTasks = true; this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos); diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java -index 09d7b416c02eb13c506e9dc92d78e983bf43f4f0..963a591e1031834cb6e98b5ed6f2ef307ba1ae78 100644 +index c643bb0daa5cd264fd6ebab7acf0a2bdd7fe7029..0048077dedd19adc6c5a88e7d916d88a71662115 100644 --- a/src/main/java/net/minecraft/server/level/ChunkHolder.java +++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java @@ -32,28 +32,20 @@ import net.minecraft.world.level.lighting.LevelLightEngine; @@ -22618,7 +22618,7 @@ index 09d7b416c02eb13c506e9dc92d78e983bf43f4f0..963a591e1031834cb6e98b5ed6f2ef30 this.setTicketLevel(level); this.changedBlocksPerSection = new ShortSet[world.getSectionsCount()]; this.chunkMap = (ChunkMap)playersWatchingChunkProvider; // Paper -@@ -91,15 +170,7 @@ public class ChunkHolder extends GenerationChunkHolder { +@@ -91,21 +170,13 @@ public class ChunkHolder extends GenerationChunkHolder { // Paper start public @Nullable ChunkAccess getAvailableChunkNow() { @@ -22635,7 +22635,14 @@ index 09d7b416c02eb13c506e9dc92d78e983bf43f4f0..963a591e1031834cb6e98b5ed6f2ef30 } // Paper end // CraftBukkit start -@@ -113,39 +184,46 @@ public class ChunkHolder extends GenerationChunkHolder { + public LevelChunk getFullChunkNow() { + // Note: We use the oldTicketLevel for isLoaded checks. +- if (!ChunkLevel.fullStatus(this.oldTicketLevel).isOrAfter(FullChunkStatus.FULL)) return null; ++ if (!ChunkLevel.fullStatus(this.newChunkHolder.oldTicketLevel).isOrAfter(FullChunkStatus.FULL)) return null; // Paper - rewrite chunk system + return this.getFullChunkNowUnchecked(); + } + +@@ -115,39 +186,46 @@ public class ChunkHolder extends GenerationChunkHolder { // CraftBukkit end public final CompletableFuture> getTickingChunkFuture() { // Paper - final for inline @@ -22695,7 +22702,7 @@ index 09d7b416c02eb13c506e9dc92d78e983bf43f4f0..963a591e1031834cb6e98b5ed6f2ef30 } -@@ -164,26 +242,20 @@ public class ChunkHolder extends GenerationChunkHolder { +@@ -166,26 +244,20 @@ public class ChunkHolder extends GenerationChunkHolder { // Paper end public CompletableFuture getSaveSyncFuture() { @@ -22726,7 +22733,7 @@ index 09d7b416c02eb13c506e9dc92d78e983bf43f4f0..963a591e1031834cb6e98b5ed6f2ef30 if (chunk != null) { int i = this.levelHeightAccessor.getSectionIndex(pos.getY()); -@@ -203,7 +275,7 @@ public class ChunkHolder extends GenerationChunkHolder { +@@ -205,7 +277,7 @@ public class ChunkHolder extends GenerationChunkHolder { if (ichunkaccess != null) { ichunkaccess.setUnsaved(true); @@ -22735,7 +22742,7 @@ index 09d7b416c02eb13c506e9dc92d78e983bf43f4f0..963a591e1031834cb6e98b5ed6f2ef30 if (chunk != null) { int j = this.lightEngine.getMinLightSection(); -@@ -229,7 +301,7 @@ public class ChunkHolder extends GenerationChunkHolder { +@@ -231,7 +303,7 @@ public class ChunkHolder extends GenerationChunkHolder { List list; if (!this.skyChangedLightSectionFilter.isEmpty() || !this.blockChangedLightSectionFilter.isEmpty()) { @@ -22744,7 +22751,7 @@ index 09d7b416c02eb13c506e9dc92d78e983bf43f4f0..963a591e1031834cb6e98b5ed6f2ef30 if (!list.isEmpty()) { ClientboundLightUpdatePacket packetplayoutlightupdate = new ClientboundLightUpdatePacket(chunk.getPos(), this.lightEngine, this.skyChangedLightSectionFilter, this.blockChangedLightSectionFilter); -@@ -241,7 +313,7 @@ public class ChunkHolder extends GenerationChunkHolder { +@@ -243,7 +315,7 @@ public class ChunkHolder extends GenerationChunkHolder { } if (this.hasChangedSections) { @@ -22753,7 +22760,7 @@ index 09d7b416c02eb13c506e9dc92d78e983bf43f4f0..963a591e1031834cb6e98b5ed6f2ef30 for (int i = 0; i < this.changedBlocksPerSection.length; ++i) { ShortSet shortset = this.changedBlocksPerSection[i]; -@@ -307,193 +379,40 @@ public class ChunkHolder extends GenerationChunkHolder { +@@ -309,193 +381,40 @@ public class ChunkHolder extends GenerationChunkHolder { @Override public final int getTicketLevel() { // Paper - final for inline @@ -22956,7 +22963,7 @@ index 09d7b416c02eb13c506e9dc92d78e983bf43f4f0..963a591e1031834cb6e98b5ed6f2ef30 } @FunctionalInterface -@@ -509,15 +428,15 @@ public class ChunkHolder extends GenerationChunkHolder { +@@ -511,15 +430,15 @@ public class ChunkHolder extends GenerationChunkHolder { // Paper start public final boolean isEntityTickingReady() { @@ -24692,7 +24699,7 @@ index 3dc1daa3c6a04d3ff1a2353773b465fc380994a2..4fa938e2d893c0db7d3fbd4c20b829cb } } diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 6f506ed8c8052f56356f60c5987cca8aa34d1d78..ade744dd17431cc671de1322d7f58b54039fe1c9 100644 +index a94833f58eb823332890d07c147161e9e0a938e9..b2d444f5b1a89e1f03bf4422474accde184240b0 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -75,6 +75,29 @@ public class ServerChunkCache extends ChunkSource { @@ -24809,7 +24816,7 @@ index 6f506ed8c8052f56356f60c5987cca8aa34d1d78..ade744dd17431cc671de1322d7f58b54 } private void clearCache() { -@@ -335,35 +331,42 @@ public class ServerChunkCache extends ChunkSource { +@@ -335,56 +331,63 @@ public class ServerChunkCache extends ChunkSource { } private CompletableFuture> getChunkFutureMainThread(int chunkX, int chunkZ, ChunkStatus leastStatus, boolean create) { @@ -24862,12 +24869,15 @@ index 6f506ed8c8052f56356f60c5987cca8aa34d1d78..ade744dd17431cc671de1322d7f58b54 + }; - return this.chunkAbsent(playerchunk, l) ? GenerationChunkHolder.UNLOADED_CHUNK_FUTURE : playerchunk.scheduleChunkGenerationTask(leastStatus, this.chunkMap); +- } + ((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel)this.level).moonrise$getChunkTaskScheduler().scheduleChunkLoad( + chunkX, chunkZ, leastStatus, true, + ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor.Priority.HIGHER, + complete + ); -+ + +- private boolean chunkAbsent(@Nullable ChunkHolder holder, int maxLevel) { +- return holder == null || holder.oldTicketLevel > maxLevel; // CraftBukkit using oldTicketLevel for isLoaded checks + return ret; + } else { + // can return now @@ -24876,9 +24886,6 @@ index 6f506ed8c8052f56356f60c5987cca8aa34d1d78..ade744dd17431cc671de1322d7f58b54 + // Paper end - rewrite chunk system } - private boolean chunkAbsent(@Nullable ChunkHolder holder, int maxLevel) { -@@ -372,19 +375,23 @@ public class ServerChunkCache extends ChunkSource { - @Override public boolean hasChunk(int x, int z) { - ChunkHolder playerchunk = this.getVisibleChunkIfPresent((new ChunkPos(x, z)).toLong()); @@ -24909,7 +24916,7 @@ index 6f506ed8c8052f56356f60c5987cca8aa34d1d78..ade744dd17431cc671de1322d7f58b54 } @Override -@@ -397,16 +404,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -397,16 +400,7 @@ public class ServerChunkCache extends ChunkSource { } public boolean runDistanceManagerUpdates() { // Paper - public @@ -24927,7 +24934,7 @@ index 6f506ed8c8052f56356f60c5987cca8aa34d1d78..ade744dd17431cc671de1322d7f58b54 } // Paper start -@@ -416,13 +414,14 @@ public class ServerChunkCache extends ChunkSource { +@@ -416,13 +410,14 @@ public class ServerChunkCache extends ChunkSource { // Paper end public boolean isPositionTicking(long pos) { @@ -24946,7 +24953,7 @@ index 6f506ed8c8052f56356f60c5987cca8aa34d1d78..ade744dd17431cc671de1322d7f58b54 try (co.aikar.timings.Timing timed = level.timings.chunkSaveData.startTiming()) { // Paper - Timings this.chunkMap.saveAllChunks(flush); } // Paper - Timings -@@ -435,12 +434,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -435,12 +430,7 @@ public class ServerChunkCache extends ChunkSource { } public void close(boolean save) throws IOException { @@ -24960,7 +24967,7 @@ index 6f506ed8c8052f56356f60c5987cca8aa34d1d78..ade744dd17431cc671de1322d7f58b54 } // CraftBukkit start - modelled on below -@@ -468,6 +462,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -468,6 +458,7 @@ public class ServerChunkCache extends ChunkSource { this.level.getProfiler().popPush("chunks"); if (tickChunks) { this.level.timings.chunks.startTiming(); // Paper - timings @@ -24968,7 +24975,7 @@ index 6f506ed8c8052f56356f60c5987cca8aa34d1d78..ade744dd17431cc671de1322d7f58b54 this.tickChunks(); this.level.timings.chunks.stopTiming(); // Paper - timings this.chunkMap.tick(); -@@ -567,11 +562,12 @@ public class ServerChunkCache extends ChunkSource { +@@ -567,11 +558,12 @@ public class ServerChunkCache extends ChunkSource { } private void getFullChunk(long pos, Consumer chunkConsumer) { @@ -24985,7 +24992,7 @@ index 6f506ed8c8052f56356f60c5987cca8aa34d1d78..ade744dd17431cc671de1322d7f58b54 } -@@ -665,6 +661,12 @@ public class ServerChunkCache extends ChunkSource { +@@ -665,6 +657,12 @@ public class ServerChunkCache extends ChunkSource { this.chunkMap.setServerViewDistance(watchDistance); } @@ -24998,7 +25005,7 @@ index 6f506ed8c8052f56356f60c5987cca8aa34d1d78..ade744dd17431cc671de1322d7f58b54 public void setSimulationDistance(int simulationDistance) { this.distanceManager.updateSimulationDistance(simulationDistance); } -@@ -743,16 +745,14 @@ public class ServerChunkCache extends ChunkSource { +@@ -743,16 +741,14 @@ public class ServerChunkCache extends ChunkSource { @Override // CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task public boolean pollTask() { diff --git a/patches/server/0994-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch b/patches/server/0994-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch index 0da16b007f..75589c401e 100644 --- a/patches/server/0994-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch +++ b/patches/server/0994-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch @@ -26,7 +26,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 23ce3f5fefceaeff5011f91f04ec8b200a503d21..5fa68b3a1f8814074ef46ba91c080f5a7ec668e4 100644 +index 7a6c8a64bd119fd1f2fc245f84cbb332ecd937e3..f35c9b1ee4bb99a4fad269b5f0cc46b8a1f3adfb 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3743,7 +3743,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0999-Optional-per-player-mob-spawns.patch b/patches/server/0999-Optional-per-player-mob-spawns.patch index 67e29bd026..2e43136e37 100644 --- a/patches/server/0999-Optional-per-player-mob-spawns.patch +++ b/patches/server/0999-Optional-per-player-mob-spawns.patch @@ -37,10 +37,10 @@ index b849e0cf15f894aa87b1bb397d85b887b8fb816e..7bebf252887ecc7594b1ce21471fb6ba // Paper end diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index ade744dd17431cc671de1322d7f58b54039fe1c9..3e97778b94d2062a40a5e07bb3bac7cd792d7566 100644 +index b2d444f5b1a89e1f03bf4422474accde184240b0..f134b75b3665b53ef873404b3f4775657cfbcadb 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -503,7 +503,19 @@ public class ServerChunkCache extends ChunkSource { +@@ -499,7 +499,19 @@ public class ServerChunkCache extends ChunkSource { gameprofilerfiller.popPush("naturalSpawnCount"); this.level.timings.countNaturalMobs.startTiming(); // Paper - timings int k = this.distanceManager.getNaturalSpawnChunkCount(); diff --git a/work/Bukkit b/work/Bukkit index befcf86d22..e2160a1865 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit befcf86d22f9576c361bba18b2ec725e41508a65 +Subproject commit e2160a18658bb7d19d303abd7a24605848d6912c diff --git a/work/CraftBukkit b/work/CraftBukkit index a1d2cd1521..6ce1726424 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit a1d2cd1521b97cb4048f990455d78e7c9fb94e82 +Subproject commit 6ce17264243172b5e3d14309388e131f025d90f4