diff --git a/patches/api/Add-new-HIDE_UPGRADES-ItemFlag.patch b/patches/api/Add-new-HIDE_UPGRADES-ItemFlag.patch new file mode 100644 index 0000000000..843e4d03e6 --- /dev/null +++ b/patches/api/Add-new-HIDE_UPGRADES-ItemFlag.patch @@ -0,0 +1,25 @@ +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/server/Fix-sniffer-and-new-smithing-table.patch b/patches/server/Fix-sniffer-and-new-smithing-table.patch new file mode 100644 index 0000000000..ccf53a49a5 --- /dev/null +++ b/patches/server/Fix-sniffer-and-new-smithing-table.patch @@ -0,0 +1,55 @@ +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 and new smithing table + + +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/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java ++++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +@@ -0,0 +0,0 @@ public class CraftEventFactory { + public static void callPrepareSmithingEvent(InventoryView view, ItemStack item) { // Paper - verify nothing uses return - handled below in PrepareResult + PrepareSmithingEvent event = new PrepareSmithingEvent(view, CraftItemStack.asCraftMirror(item)); // Paper - remove clone + //event.getView().getPlayer().getServer().getPluginManager().callEvent(event); // Paper - disable event +- event.getInventory().setItem(2, event.getResult()); ++ event.getInventory().setItem(view.getType() == org.bukkit.event.inventory.InventoryType.SMITHING_NEW ? 3 : 2, event.getResult()); // Paper - use correct result slot index depending on inventory type + //return event; // Paper + } + // Paper end