--- a/net/minecraft/core/dispenser/DispenseBehaviorBoat.java
+++ b/net/minecraft/core/dispenser/DispenseBehaviorBoat.java
@@ -12,6 +12,11 @@
 import net.minecraft.world.item.ItemStack;
 import net.minecraft.world.level.block.BlockDispenser;
 
+// CraftBukkit start
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
+import org.bukkit.event.block.BlockDispenseEvent;
+// CraftBukkit end
+
 public class DispenseBehaviorBoat extends DispenseBehaviorItem {
 
     private final DispenseBehaviorItem defaultDispenseItemBehavior;
@@ -49,12 +54,40 @@
             d4 = 0.0D;
         }
 
-        Object object = this.isChestBoat ? new ChestBoat(worldserver, d1, d2 + d4, d3) : new EntityBoat(worldserver, d1, d2 + d4, d3);
+        // Object object = this.isChestBoat ? new ChestBoat(worldserver, d1, d2 + d4, d3) : new EntityBoat(worldserver, d1, d2 + d4, d3);
+        // CraftBukkit start
+        ItemStack itemstack1 = itemstack.split(1);
+        org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(isourceblock.getPos().getX(), isourceblock.getPos().getY(), isourceblock.getPos().getZ());
+        CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
+
+        BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(d1, d2 + d4, d3));
+        if (!BlockDispenser.eventFired) {
+            worldserver.getCraftServer().getPluginManager().callEvent(event);
+        }
+
+        if (event.isCancelled()) {
+            itemstack.grow(1);
+            return itemstack;
+        }
+
+        if (!event.getItem().equals(craftItem)) {
+            itemstack.grow(1);
+            // Chain to handler for new item
+            ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
+            IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
+            if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior != this) {
+                idispensebehavior.dispense(isourceblock, eventStack);
+                return itemstack;
+            }
+        }
+
+        Object object = this.isChestBoat ? new ChestBoat(worldserver, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ()) : new EntityBoat(worldserver, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ());
+        // CraftBukkit end
 
         ((EntityBoat) object).setVariant(this.type);
         ((EntityBoat) object).setYRot(enumdirection.toYRot());
-        worldserver.addFreshEntity((Entity) object);
-        itemstack.shrink(1);
+        if (!worldserver.addFreshEntity((Entity) object)) itemstack.grow(1); // CraftBukkit
+        // itemstack.shrink(1); // CraftBukkit - handled during event processing
         return itemstack;
     }
 
