diff --git a/patches/server/Do-not-fire-PlayerBucketFillEvent-when-no-fluid.patch b/patches/server/Do-not-fire-PlayerBucketFillEvent-when-no-fluid.patch new file mode 100644 index 0000000000..2120eced2a --- /dev/null +++ b/patches/server/Do-not-fire-PlayerBucketFillEvent-when-no-fluid.patch @@ -0,0 +1,18 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shane Freeder +Date: Tue, 17 Aug 2021 15:42:21 +0100 +Subject: [PATCH] Do not fire PlayerBucketFillEvent when no fluid + + +diff --git a/src/main/java/net/minecraft/world/item/BucketItem.java b/src/main/java/net/minecraft/world/item/BucketItem.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/item/BucketItem.java ++++ b/src/main/java/net/minecraft/world/item/BucketItem.java +@@ -0,0 +0,0 @@ public class BucketItem extends Item implements DispensibleContainerItem { + BucketPickup ifluidsource = (BucketPickup) iblockdata.getBlock(); + // CraftBukkit start + ItemStack dummyFluid = ifluidsource.pickupBlock(DummyGeneratorAccess.INSTANCE, blockposition, iblockdata); ++ if (dummyFluid.isEmpty()) return InteractionResultHolder.fail(itemstack); // Paper + PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent((ServerLevel) world, user, blockposition, blockposition, movingobjectpositionblock.getDirection(), itemstack, dummyFluid.getItem(), hand); // Paper - add enumhand + + if (event.isCancelled()) {