From 06335dfd4f4737b1170613199f22b8ce11c219bc 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 --- .../api/Add-new-HIDE_UPGRADES-ItemFlag.patch | 25 ----------- patches/api/Fix-upstream-javadocs.patch | 13 ++++++ .../api/Mark-experimental-api-as-such.patch | 11 +++++ ...Replace-ItemFlag.HIDE_POTION_EFFECTS.patch | 6 ++- patches/server/Fix-sniffer.patch | 42 ------------------- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 7 files changed, 30 insertions(+), 71 deletions(-) delete mode 100644 patches/api/Add-new-HIDE_UPGRADES-ItemFlag.patch delete mode 100644 patches/server/Fix-sniffer.patch diff --git a/patches/api/Add-new-HIDE_UPGRADES-ItemFlag.patch b/patches/api/Add-new-HIDE_UPGRADES-ItemFlag.patch deleted file mode 100644 index 843e4d03e6..0000000000 --- a/patches/api/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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/inventory/ItemFlag.java -+++ b/src/main/java/org/bukkit/inventory/ItemFlag.java -@@ -0,0 +0,0 @@ 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/api/Fix-upstream-javadocs.patch b/patches/api/Fix-upstream-javadocs.patch index e3643a5af3..a1ef3bb4b8 100644 --- a/patches/api/Fix-upstream-javadocs.patch +++ b/patches/api/Fix-upstream-javadocs.patch @@ -442,6 +442,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 /** * 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/inventory/ItemFlag.java ++++ b/src/main/java/org/bukkit/inventory/ItemFlag.java +@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/inventory/PlayerInventory.java diff --git a/patches/api/Mark-experimental-api-as-such.patch b/patches/api/Mark-experimental-api-as-such.patch index 68f0b30b45..51d8695205 100644 --- a/patches/api/Mark-experimental-api-as-such.patch +++ b/patches/api/Mark-experimental-api-as-such.patch @@ -1221,6 +1221,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/inventory/ItemFlag.java ++++ b/src/main/java/org/bukkit/inventory/ItemFlag.java +@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java diff --git a/patches/api/Replace-ItemFlag.HIDE_POTION_EFFECTS.patch b/patches/api/Replace-ItemFlag.HIDE_POTION_EFFECTS.patch index a2a9e685dd..ba023309e6 100644 --- a/patches/api/Replace-ItemFlag.HIDE_POTION_EFFECTS.patch +++ b/patches/api/Replace-ItemFlag.HIDE_POTION_EFFECTS.patch @@ -17,9 +17,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + @Deprecated // Paper HIDE_POTION_EFFECTS, /** - * Setting to show/hide dyes from coloured leather armour + * Setting to show/hide dyes from colored leather armor. +@@ -0,0 +0,0 @@ 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/server/Fix-sniffer.patch b/patches/server/Fix-sniffer.patch deleted file mode 100644 index d47730f698..0000000000 --- a/patches/server/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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -@@ -0,0 +0,0 @@ public class Sniffer extends Animal { - - 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; -@@ -0,0 +0,0 @@ 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