diff --git a/patches/server/Add-PrepareResultEvent.patch b/patches/server/Add-PrepareResultEvent.patch index 3a455309e8..6218deffd8 100644 --- a/patches/server/Add-PrepareResultEvent.patch +++ b/patches/server/Add-PrepareResultEvent.patch @@ -134,7 +134,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + 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().setResult(event.getResult()); - return event; + //return event; // Paper } diff --git a/patches/server/Fire-EntityChangeBlockEvent-in-more-places.patch b/patches/server/Fire-EntityChangeBlockEvent-in-more-places.patch index 28fb44eb5f..90514073a4 100644 --- a/patches/server/Fire-EntityChangeBlockEvent-in-more-places.patch +++ b/patches/server/Fire-EntityChangeBlockEvent-in-more-places.patch @@ -209,7 +209,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override public void gameEvent(GameEvent event, Vec3 emitterPos, GameEvent.Context emitter) { -- throw new UnsupportedOperationException("Not supported yet."); +- // Used by BlockComposter + // Used by ComposterBlock } diff --git a/patches/server/Fix-Jukeboxes.patch b/patches/server/Fix-Jukeboxes.patch index f41164014e..ac2cc1c503 100644 --- a/patches/server/Fix-Jukeboxes.patch +++ b/patches/server/Fix-Jukeboxes.patch @@ -4,58 +4,6 @@ Date: Tue, 14 Mar 2023 18:55:56 -0700 Subject: [PATCH] Fix Jukeboxes -diff --git a/src/main/java/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java -+++ b/src/main/java/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java -@@ -0,0 +0,0 @@ public class JukeboxBlockEntity extends BlockEntity implements Clearable, Contai - - @Override - public int getMaxStackSize() { -- return 1; -+ return this.maxStack; // Paper - } - - @Override -@@ -0,0 +0,0 @@ public class JukeboxBlockEntity extends BlockEntity implements Clearable, Contai - this.level.updateNeighborsAt(this.getBlockPos(), this.getBlockState().getBlock()); - this.setChanged(); - } -+ -+ // Paper start -+ public java.util.List transaction = new java.util.ArrayList<>(); -+ private int maxStack = 1; -+ @Override -+ public java.util.List getContents() { -+ return this.items; -+ } -+ -+ @Override -+ public void onOpen(org.bukkit.craftbukkit.entity.CraftHumanEntity who) { -+ this.transaction.add(who); -+ } -+ -+ @Override -+ public void onClose(org.bukkit.craftbukkit.entity.CraftHumanEntity who) { -+ this.transaction.remove(who); -+ } -+ -+ @Override -+ public java.util.List getViewers() { -+ return this.transaction; -+ } -+ -+ @Override -+ public void setMaxStackSize(int size) { -+ this.maxStack = size; -+ } -+ -+ @Override -+ public org.bukkit.Location getLocation() { -+ return new org.bukkit.Location(this.level.getWorld(), this.worldPosition.getX(), this.worldPosition.getY(), this.worldPosition.getZ()); -+ } -+ // Paper end - } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java b/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java diff --git a/patches/server/Fix-sniffer-and-new-smithing-table.patch b/patches/server/Fix-sniffer.patch similarity index 57% rename from patches/server/Fix-sniffer-and-new-smithing-table.patch rename to patches/server/Fix-sniffer.patch index ccf53a49a5..d47730f698 100644 --- a/patches/server/Fix-sniffer-and-new-smithing-table.patch +++ b/patches/server/Fix-sniffer.patch @@ -1,7 +1,7 @@ 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 +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 @@ -40,16 +40,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } @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 diff --git a/work/CraftBukkit b/work/CraftBukkit index 703575fc77..e1fc95c506 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 703575fc7725efaf27b633c64316edf235860ae9 +Subproject commit e1fc95c506834dfbb12c5adf00764ed5c46a2fca