From a2918a5feae3c2b2c835d83190cc28fa162792c1 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Wed, 15 Mar 2023 12:59:34 -0700 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: 3a54fb16 SPIGOT-7296: Add ItemFlag#HIDE_ARMOR_TRIM CraftBukkit Changes: 55056ad80 SPIGOT-7295: Fix Sniffer data defined in incorrect position --- patches/api/0055-Fix-upstream-javadocs.patch | 13 ++++++ .../0404-Mark-experimental-api-as-such.patch | 11 +++++ ...Replace-ItemFlag.HIDE_POTION_EFFECTS.patch | 10 +++-- .../0419-Add-new-HIDE_UPGRADES-ItemFlag.patch | 25 ----------- patches/server/0962-Fix-sniffer.patch | 42 ------------------- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 7 files changed, 32 insertions(+), 73 deletions(-) delete mode 100644 patches/api/0419-Add-new-HIDE_UPGRADES-ItemFlag.patch delete mode 100644 patches/server/0962-Fix-sniffer.patch diff --git a/patches/api/0055-Fix-upstream-javadocs.patch b/patches/api/0055-Fix-upstream-javadocs.patch index 5576f1e781..4e452567eb 100644 --- a/patches/api/0055-Fix-upstream-javadocs.patch +++ b/patches/api/0055-Fix-upstream-javadocs.patch @@ -442,6 +442,19 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..a91fa5386afd7a1137adb921ad5adb79 /** * Sets the entities armor to the provided array of ItemStacks +diff --git a/src/main/java/org/bukkit/inventory/ItemFlag.java b/src/main/java/org/bukkit/inventory/ItemFlag.java +index 42fcc31147934fd4ed6484b0729e938e7ae2f8e2..4e637420b9a39b822be19367a16da93f236549b3 100644 +--- a/src/main/java/org/bukkit/inventory/ItemFlag.java ++++ b/src/main/java/org/bukkit/inventory/ItemFlag.java +@@ -35,7 +35,7 @@ public enum ItemFlag { + */ + HIDE_DYE, + /** +- * Setting to show/hide armor trim from leather armor. ++ * Setting to show/hide armor trim from armor. + */ + HIDE_ARMOR_TRIM; + } diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java index 62fbd7f6d8195bebcab7f704a0a485a1bbeca26c..5461f7fa75f5a065bb333b4a113640b5fe1e3825 100644 --- a/src/main/java/org/bukkit/inventory/PlayerInventory.java diff --git a/patches/api/0404-Mark-experimental-api-as-such.patch b/patches/api/0404-Mark-experimental-api-as-such.patch index 8f8d1f3c5b..917b66e46c 100644 --- a/patches/api/0404-Mark-experimental-api-as-such.patch +++ b/patches/api/0404-Mark-experimental-api-as-such.patch @@ -1221,6 +1221,17 @@ index b99f26079c14931d443615fa81eac9791080ecb0..dadb5b3563b5835c821a2d55d1f076a5 public interface ChiseledBookshelfInventory extends Inventory { @Nullable +diff --git a/src/main/java/org/bukkit/inventory/ItemFlag.java b/src/main/java/org/bukkit/inventory/ItemFlag.java +index 4e637420b9a39b822be19367a16da93f236549b3..615cd9994be8a988b474eb512d9e9b7ace743a7a 100644 +--- a/src/main/java/org/bukkit/inventory/ItemFlag.java ++++ b/src/main/java/org/bukkit/inventory/ItemFlag.java +@@ -37,5 +37,6 @@ public enum ItemFlag { + /** + * Setting to show/hide armor trim from armor. + */ ++ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - 1.20 + HIDE_ARMOR_TRIM; + } diff --git a/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java b/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java index 08fd3eca8383cdc2d06c3ce973e8c402d279077e..c845b68217eef87668d0bd725c51181312128f47 100644 --- a/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java diff --git a/patches/api/0412-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch b/patches/api/0412-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch index f9cbe3e687..0372472444 100644 --- a/patches/api/0412-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch +++ b/patches/api/0412-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Replace ItemFlag.HIDE_POTION_EFFECTS diff --git a/src/main/java/org/bukkit/inventory/ItemFlag.java b/src/main/java/org/bukkit/inventory/ItemFlag.java -index a4c0469c565b1fea68b828280c7faf81bc6c332c..73ed2d3c4aded81a24489381db16184383e625bb 100644 +index 615cd9994be8a988b474eb512d9e9b7ace743a7a..802b7ce23db1e19fc39adc7f93d9a36618742d33 100644 --- a/src/main/java/org/bukkit/inventory/ItemFlag.java +++ b/src/main/java/org/bukkit/inventory/ItemFlag.java -@@ -28,10 +28,33 @@ public enum ItemFlag { +@@ -28,7 +28,9 @@ public enum ItemFlag { /** * Setting to show/hide potion effects, book and firework information, map * tooltips, patterns of banners, and enchantments of enchanted books. @@ -17,9 +17,11 @@ index a4c0469c565b1fea68b828280c7faf81bc6c332c..73ed2d3c4aded81a24489381db161843 + @Deprecated // Paper HIDE_POTION_EFFECTS, /** - * Setting to show/hide dyes from coloured leather armour + * Setting to show/hide dyes from colored leather armor. +@@ -39,4 +41,25 @@ public enum ItemFlag { */ - HIDE_DYE; + @org.jetbrains.annotations.ApiStatus.Experimental // Paper - 1.20 + HIDE_ARMOR_TRIM; + // Paper start + /** + * Setting to show/hide item-specific information, including, but not limited to: diff --git a/patches/api/0419-Add-new-HIDE_UPGRADES-ItemFlag.patch b/patches/api/0419-Add-new-HIDE_UPGRADES-ItemFlag.patch deleted file mode 100644 index 7851dfc37d..0000000000 --- a/patches/api/0419-Add-new-HIDE_UPGRADES-ItemFlag.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jake Potrebic -Date: Tue, 14 Mar 2023 19:37:29 -0700 -Subject: [PATCH] Add new HIDE_UPGRADES ItemFlag - - -diff --git a/src/main/java/org/bukkit/inventory/ItemFlag.java b/src/main/java/org/bukkit/inventory/ItemFlag.java -index 73ed2d3c4aded81a24489381db16184383e625bb..ee99ef92d0afffe90f4e77da1f04e5724f868546 100644 ---- a/src/main/java/org/bukkit/inventory/ItemFlag.java -+++ b/src/main/java/org/bukkit/inventory/ItemFlag.java -@@ -35,7 +35,13 @@ public enum ItemFlag { - /** - * Setting to show/hide dyes from coloured leather armour - */ -- HIDE_DYE; -+ HIDE_DYE, -+ // Paper start -+ /** -+ * Setting to show/hide armor trim information. -+ */ -+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - 1.20 -+ HIDE_UPGRADES; - // Paper start - /** - * Setting to show/hide item-specific information, including, but not limited to: diff --git a/patches/server/0962-Fix-sniffer.patch b/patches/server/0962-Fix-sniffer.patch deleted file mode 100644 index ea309e29b7..0000000000 --- a/patches/server/0962-Fix-sniffer.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jake Potrebic -Date: Tue, 14 Mar 2023 20:03:21 -0700 -Subject: [PATCH] Fix sniffer - - -diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -index efcfce93d17507bb6cc870a94eaa777429050d18..5719172a31f005ce419f365011d53712a9b2820f 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -@@ -74,12 +74,20 @@ public class Sniffer extends Animal { - - public Sniffer(EntityType type, Level world) { - super(type, world); -- this.entityData.define(DATA_STATE, Sniffer.State.IDLING); -- this.entityData.define(DATA_DROP_SEED_AT_TICK, 0); -+ // Paper - move to defineSyncedData - this.getNavigation().setCanFloat(true); - this.setPathfindingMalus(BlockPathTypes.WATER, -2.0F); - } - -+ // Paper start -+ @Override -+ protected void defineSynchedData() { -+ super.defineSynchedData(); -+ this.entityData.define(DATA_STATE, Sniffer.State.IDLING); -+ this.entityData.define(DATA_DROP_SEED_AT_TICK, 0); -+ } -+ // Paper end -+ - @Override - protected float getStandingEyeHeight(Pose pose, EntityDimensions dimensions) { - return this.getDimensions(pose).height * 0.6F; -@@ -388,7 +396,7 @@ public class Sniffer extends Animal { - - @Override - public Brain getBrain() { -- return super.getBrain(); -+ return (Brain) super.getBrain(); // Paper - decompile issue - } - - @Override diff --git a/work/Bukkit b/work/Bukkit index fdef9473fc..3a54fb167d 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit fdef9473fc0cc3873104306f5ec24e587ad3e962 +Subproject commit 3a54fb167d6354b6e39f5027bcde56641f487b8f diff --git a/work/CraftBukkit b/work/CraftBukkit index 968d28df04..55056ad803 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 968d28df0410e2a4ff04fbbd09e7c6bf91c3cd69 +Subproject commit 55056ad80314cca1c910c9b79f31a1b6a4c629f6