--- a/net/minecraft/world/entity/animal/Bucketable.java
+++ b/net/minecraft/world/entity/animal/Bucketable.java
@@ -16,8 +16,14 @@
 import net.minecraft.world.item.Items;
 import net.minecraft.world.item.component.CustomData;
 import net.minecraft.world.level.Level;
+import org.bukkit.craftbukkit.event.CraftEventFactory;
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
+import org.bukkit.event.entity.EntityRemoveEvent;
+import org.bukkit.event.player.PlayerBucketEntityEvent;
+// CraftBukkit end
 
 public interface Bucketable {
+
     boolean fromBucket();
 
     void setFromBucket(boolean fromBucket);
@@ -30,34 +36,36 @@
 
     SoundEvent getPickupSound();
 
+    /** @deprecated */
     @Deprecated
     static void saveDefaultDataToBucketTag(Mob entity, ItemStack stack) {
         stack.set(DataComponents.CUSTOM_NAME, entity.getCustomName());
-        CustomData.update(DataComponents.BUCKET_ENTITY_DATA, stack, compoundTag -> {
+        CustomData.update(DataComponents.BUCKET_ENTITY_DATA, stack, (nbttagcompound) -> {
             if (entity.isNoAi()) {
-                compoundTag.putBoolean("NoAI", entity.isNoAi());
+                nbttagcompound.putBoolean("NoAI", entity.isNoAi());
             }
 
             if (entity.isSilent()) {
-                compoundTag.putBoolean("Silent", entity.isSilent());
+                nbttagcompound.putBoolean("Silent", entity.isSilent());
             }
 
             if (entity.isNoGravity()) {
-                compoundTag.putBoolean("NoGravity", entity.isNoGravity());
+                nbttagcompound.putBoolean("NoGravity", entity.isNoGravity());
             }
 
             if (entity.hasGlowingTag()) {
-                compoundTag.putBoolean("Glowing", entity.hasGlowingTag());
+                nbttagcompound.putBoolean("Glowing", entity.hasGlowingTag());
             }
 
             if (entity.isInvulnerable()) {
-                compoundTag.putBoolean("Invulnerable", entity.isInvulnerable());
+                nbttagcompound.putBoolean("Invulnerable", entity.isInvulnerable());
             }
 
-            compoundTag.putFloat("Health", entity.getHealth());
+            nbttagcompound.putFloat("Health", entity.getHealth());
         });
     }
 
+    /** @deprecated */
     @Deprecated
     static void loadDefaultDataFromBucketTag(Mob entity, CompoundTag nbt) {
         if (nbt.contains("NoAI")) {
@@ -83,23 +91,39 @@
         if (nbt.contains("Health", 99)) {
             entity.setHealth(nbt.getFloat("Health"));
         }
+
     }
 
     static <T extends LivingEntity & Bucketable> Optional<InteractionResult> bucketMobPickup(Player player, InteractionHand hand, T entity) {
-        ItemStack itemStack = player.getItemInHand(hand);
-        if (itemStack.getItem() == Items.WATER_BUCKET && entity.isAlive()) {
-            entity.playSound(entity.getPickupSound(), 1.0F, 1.0F);
-            ItemStack itemStack2 = entity.getBucketItemStack();
-            entity.saveToBucketTag(itemStack2);
-            ItemStack itemStack3 = ItemUtils.createFilledResult(itemStack, player, itemStack2, false);
-            player.setItemInHand(hand, itemStack3);
-            Level level = entity.level();
-            if (!level.isClientSide) {
-                CriteriaTriggers.FILLED_BUCKET.trigger((ServerPlayer)player, itemStack2);
+        ItemStack itemstack = player.getItemInHand(hand);
+
+        if (itemstack.getItem() == Items.WATER_BUCKET && entity.isAlive()) {
+            // CraftBukkit start
+            // t0.playSound(((Bucketable) t0).getPickupSound(), 1.0F, 1.0F); // CraftBukkit - moved down
+            ItemStack itemstack1 = ((Bucketable) entity).getBucketItemStack();
+
+            ((Bucketable) entity).saveToBucketTag(itemstack1);
+
+            PlayerBucketEntityEvent playerBucketFishEvent = CraftEventFactory.callPlayerFishBucketEvent(entity, player, itemstack, itemstack1, hand);
+            itemstack1 = CraftItemStack.asNMSCopy(playerBucketFishEvent.getEntityBucket());
+            if (playerBucketFishEvent.isCancelled()) {
+                ((ServerPlayer) player).containerMenu.sendAllDataToRemote(); // We need to update inventory to resync client's bucket
+                entity.resendPossiblyDesyncedEntityData((ServerPlayer) player); // Paper
+                return Optional.of(InteractionResult.FAIL);
             }
+            entity.playSound(((Bucketable) entity).getPickupSound(), 1.0F, 1.0F);
+            // CraftBukkit end
+            ItemStack itemstack2 = ItemUtils.createFilledResult(itemstack, player, itemstack1, false);
 
-            entity.discard();
-            return Optional.of(InteractionResult.sidedSuccess(level.isClientSide));
+            player.setItemInHand(hand, itemstack2);
+            Level world = entity.level();
+
+            if (!world.isClientSide) {
+                CriteriaTriggers.FILLED_BUCKET.trigger((ServerPlayer) player, itemstack1);
+            }
+
+            entity.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
+            return Optional.of(InteractionResult.sidedSuccess(world.isClientSide));
         } else {
             return Optional.empty();
         }
