diff --git a/patches/server/Fix-possible-StackOverflowError-and-NPE-for-some-dis.patch b/patches/server/Fix-possible-StackOverflowError-and-NPE-for-some-dis.patch index f2f6c41a72..b653a09256 100644 --- a/patches/server/Fix-possible-StackOverflowError-and-NPE-for-some-dis.patch +++ b/patches/server/Fix-possible-StackOverflowError-and-NPE-for-some-dis.patch @@ -18,9 +18,6 @@ return value anymore and some dispense behaviors like equippable and regular items will not have a defined behavior in that map and might throw a NPE in that case. -== AT == -public net.minecraft.world.level.block.DispenserBlock getDispenseMethod(Lnet/minecraft/world/level/Level;Lnet/minecraft/world/item/ItemStack;)Lnet/minecraft/core/dispenser/DispenseItemBehavior; - diff --git a/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java @@ -291,7 +288,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // Paper end - Fix NPE with equippable and items without behavior + - public DispenseItemBehavior getDispenseMethod(Level world, ItemStack stack) { + protected DispenseItemBehavior getDispenseMethod(Level world, ItemStack stack) { if (!stack.isItemEnabled(world.enabledFeatures())) { return DispenserBlock.DEFAULT_BEHAVIOR; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java