diff --git a/patches/server/0232-Remove-unnecessary-itemmeta-handling.patch b/patches/server/0232-Remove-unnecessary-itemmeta-handling.patch index bac3c5ba15..ad3868499a 100644 --- a/patches/server/0232-Remove-unnecessary-itemmeta-handling.patch +++ b/patches/server/0232-Remove-unnecessary-itemmeta-handling.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove unnecessary itemmeta handling diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 96da768f55ad835a1a55bf359f0d7278bc232304..aca1e4ef1593c5a506a37349274cd81b1dc81ea8 100644 +index 96da768f55ad835a1a55bf359f0d7278bc232304..fb345894fec5e81d3c35af9812927220a7d56cd1 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -168,7 +168,7 @@ public final class ItemStack implements DataComponentHolder { @@ -17,11 +17,13 @@ index 96da768f55ad835a1a55bf359f0d7278bc232304..aca1e4ef1593c5a506a37349274cd81b CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack)); } return itemstack; -@@ -183,7 +183,7 @@ public final class ItemStack implements DataComponentHolder { +@@ -182,8 +182,8 @@ public final class ItemStack implements DataComponentHolder { + } else { registryfriendlybytebuf.writeVarInt(itemstack.getCount()); // Spigot start - filter - itemstack = itemstack.copy(); +- itemstack = itemstack.copy(); - CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack)); ++ // itemstack = itemstack.copy(); + // CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack)); // Paper - This is no longer with raw NBT being handled in metadata // Spigot end ITEM_STREAM_CODEC.encode(registryfriendlybytebuf, itemstack.getItemHolder()); // CraftBukkit - decompile error diff --git a/patches/server/0251-Allow-chests-to-be-placed-with-NBT-data.patch b/patches/server/0251-Allow-chests-to-be-placed-with-NBT-data.patch index 98f56c204e..68138d557c 100644 --- a/patches/server/0251-Allow-chests-to-be-placed-with-NBT-data.patch +++ b/patches/server/0251-Allow-chests-to-be-placed-with-NBT-data.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow chests to be placed with NBT data diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index aca1e4ef1593c5a506a37349274cd81b1dc81ea8..c834212d0e6a09c0f73abeb545b60dec26e726a5 100644 +index fb345894fec5e81d3c35af9812927220a7d56cd1..bf3785e3b347ebc1ce1e044c9db1a9d23c80f880 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -469,6 +469,7 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/0418-PortalCreateEvent-needs-to-know-its-entity.patch b/patches/server/0418-PortalCreateEvent-needs-to-know-its-entity.patch index b204e440ca..a291a9676f 100644 --- a/patches/server/0418-PortalCreateEvent-needs-to-know-its-entity.patch +++ b/patches/server/0418-PortalCreateEvent-needs-to-know-its-entity.patch @@ -5,7 +5,7 @@ Subject: [PATCH] PortalCreateEvent needs to know its entity diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index c834212d0e6a09c0f73abeb545b60dec26e726a5..db78a1948df2f8a5bce37a7566e9af9cd7c8b485 100644 +index bf3785e3b347ebc1ce1e044c9db1a9d23c80f880..1fe34b2b160569b41ce87910eff56d590731e708 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -501,7 +501,7 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/0594-Add-EntityDamageItemEvent.patch b/patches/server/0594-Add-EntityDamageItemEvent.patch index ebd8955e26..34c8cf7e74 100644 --- a/patches/server/0594-Add-EntityDamageItemEvent.patch +++ b/patches/server/0594-Add-EntityDamageItemEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityDamageItemEvent diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index db78a1948df2f8a5bce37a7566e9af9cd7c8b485..87208b14b3f31f372c1d5f4b759f4ced8cc992c9 100644 +index 1fe34b2b160569b41ce87910eff56d590731e708..f5547caeaeeb8fa37f2aa9bfea6f176b1cc3430a 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -647,7 +647,7 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/0683-Fix-cancelled-powdered-snow-bucket-placement.patch b/patches/server/0683-Fix-cancelled-powdered-snow-bucket-placement.patch index ad31825c78..57020bc01b 100644 --- a/patches/server/0683-Fix-cancelled-powdered-snow-bucket-placement.patch +++ b/patches/server/0683-Fix-cancelled-powdered-snow-bucket-placement.patch @@ -8,7 +8,7 @@ snow bucket didn't revert grass that became snowy because of the placement. diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 87208b14b3f31f372c1d5f4b759f4ced8cc992c9..db94bbbd7f93afef46586e6314ebc666b7e6087c 100644 +index f5547caeaeeb8fa37f2aa9bfea6f176b1cc3430a..2f60e67de38bb4b39deb505f23e35aeff9eded73 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -401,7 +401,7 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/0715-Expand-PlayerItemDamageEvent.patch b/patches/server/0715-Expand-PlayerItemDamageEvent.patch index 31a7de127f..9163d3de01 100644 --- a/patches/server/0715-Expand-PlayerItemDamageEvent.patch +++ b/patches/server/0715-Expand-PlayerItemDamageEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expand PlayerItemDamageEvent diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index db94bbbd7f93afef46586e6314ebc666b7e6087c..9d43c37e345689d5e4c6cfcb00ab2b4da01eef56 100644 +index 2f60e67de38bb4b39deb505f23e35aeff9eded73..0a883564b9dda4fa0e6a7174a6e46b98af8be3e6 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -661,10 +661,11 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/0848-Fix-block-place-logic.patch b/patches/server/0848-Fix-block-place-logic.patch index 1b934b2488..2e91a7ea75 100644 --- a/patches/server/0848-Fix-block-place-logic.patch +++ b/patches/server/0848-Fix-block-place-logic.patch @@ -22,7 +22,7 @@ index 7d76cdc59984b156628273c8357485eb10046007..7180996027f70aef7afe32fb2adfce64 itemstack.consume(1, entityhuman); return InteractionResult.sidedSuccess(world.isClientSide); diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 9d43c37e345689d5e4c6cfcb00ab2b4da01eef56..be2a229903efe80d318e2b94911fa10ed8134690 100644 +index 0a883564b9dda4fa0e6a7174a6e46b98af8be3e6..5ebd43bd4fa08df4531051fde606a9b2921692bf 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -515,13 +515,7 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/0849-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch b/patches/server/0849-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch index 5e1094abf9..a337cf6e29 100644 --- a/patches/server/0849-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch +++ b/patches/server/0849-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix spigot sound playing for BlockItem ItemStacks diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index be2a229903efe80d318e2b94911fa10ed8134690..83976d1b9e6f9fe696f58526cbab9b0f607f3bdc 100644 +index 5ebd43bd4fa08df4531051fde606a9b2921692bf..0d44469149ea1bd80bec6a45a104b63e41ac2d6b 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -566,7 +566,11 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/0856-Add-event-for-player-editing-sign.patch b/patches/server/0856-Add-event-for-player-editing-sign.patch index e0b25d631e..30316e5cd7 100644 --- a/patches/server/0856-Add-event-for-player-editing-sign.patch +++ b/patches/server/0856-Add-event-for-player-editing-sign.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add event for player editing sign diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 83976d1b9e6f9fe696f58526cbab9b0f607f3bdc..05b4762c9a8ceb2faf21efe534ba609b6e76a968 100644 +index 0d44469149ea1bd80bec6a45a104b63e41ac2d6b..b065b2997a0be453a9cba932bcba8320ce80c283 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -545,7 +545,7 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/0877-Only-capture-actual-tree-growth.patch b/patches/server/0877-Only-capture-actual-tree-growth.patch index b815f00241..de9ee567ad 100644 --- a/patches/server/0877-Only-capture-actual-tree-growth.patch +++ b/patches/server/0877-Only-capture-actual-tree-growth.patch @@ -17,7 +17,7 @@ index 5bbadc890a72f1cb22c6881ebcc163b0c06a367a..4fa838bf97ede6e1c893ba64f53aa7af } } diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 05b4762c9a8ceb2faf21efe534ba609b6e76a968..6f5e5c5b4af7e16f4a7c5429208fc85014f9e302 100644 +index b065b2997a0be453a9cba932bcba8320ce80c283..f52e4ebd94a5b91689847be05b8e4bb02db97563 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -445,6 +445,7 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/0941-Dont-resend-blocks-on-interactions.patch b/patches/server/0941-Dont-resend-blocks-on-interactions.patch index b55a7bbcc8..a08da77332 100644 --- a/patches/server/0941-Dont-resend-blocks-on-interactions.patch +++ b/patches/server/0941-Dont-resend-blocks-on-interactions.patch @@ -149,7 +149,7 @@ index 6d494b80ae002aea00afa44adf83dad1ae5bbbc1..49557d6f22c5725c663a231deab019d4 return false; } diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 6f5e5c5b4af7e16f4a7c5429208fc85014f9e302..fef96852bd95ad24d1e0daff17c3e117524efc69 100644 +index f52e4ebd94a5b91689847be05b8e4bb02db97563..f444e5b96c1a768690afadec56e17ba67b2f36f2 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -479,10 +479,12 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/1024-Optimize-Hoppers.patch b/patches/server/1024-Optimize-Hoppers.patch index c0f53d43a2..89784a86e5 100644 --- a/patches/server/1024-Optimize-Hoppers.patch +++ b/patches/server/1024-Optimize-Hoppers.patch @@ -62,7 +62,7 @@ index 2cd2e260e9a958c8aee7b2fb4e010ef8fc600f53..b21daeeb043df885fba5e6a7572d311f this.profiler.push(() -> { String s = String.valueOf(worldserver); diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index fef96852bd95ad24d1e0daff17c3e117524efc69..4ef83f6d48a939f883bac49d6527f95f108a91e5 100644 +index f444e5b96c1a768690afadec56e17ba67b2f36f2..fb26b3b10a6a12b7da86e30740a1338566faaeb1 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -794,7 +794,13 @@ public final class ItemStack implements DataComponentHolder { diff --git a/patches/server/1040-Fix-shield-disable-inconsistency.patch b/patches/server/1040-Fix-shield-disable-inconsistency.patch new file mode 100644 index 0000000000..777f27d8bb --- /dev/null +++ b/patches/server/1040-Fix-shield-disable-inconsistency.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic +Date: Fri, 26 Apr 2024 19:08:37 -0700 +Subject: [PATCH] Fix shield disable inconsistency + +In vanilla, if the damage source is tagged as a projectile, +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 bad6a69246f6b0a4ada222b820f16469f91b0534..e0124e44e1abe8237859e8dc1e357298188dab52 100644 +--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java ++++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +@@ -2335,7 +2335,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + this.hurtCurrentlyUsedShield((float) -event.getDamage(DamageModifier.BLOCKING)); + Entity entity = damagesource.getDirectEntity(); + +- if (entity instanceof LivingEntity && entity.distanceToSqr(this) <= (200.0D * 200.0D)) { // Paper - Improve boat collision performance ++ if (!damagesource.is(DamageTypeTags.IS_PROJECTILE) && entity instanceof LivingEntity && entity.distanceToSqr(this) <= (200.0D * 200.0D)) { // Paper - Improve boat collision performance + this.blockUsingShield((LivingEntity) entity); + } + }