--- a/net/minecraft/core/dispenser/DispenseBehaviorBoat.java
+++ b/net/minecraft/core/dispenser/DispenseBehaviorBoat.java
@@ -10,6 +10,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 = new DispenseBehaviorItem();
@@ -39,12 +44,40 @@
             d3 = 0.0D;
         }
 
-        EntityBoat entityboat = new EntityBoat(worldserver, d0, d1 + d3, d2);
+        // EntityBoat entityboat = new EntityBoat(worldserver, d0, d1 + d3, d2);
+        // CraftBukkit start
+        ItemStack itemstack1 = itemstack.cloneAndSubtract(1);
+        org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(isourceblock.getBlockPosition().getX(), isourceblock.getBlockPosition().getY(), isourceblock.getBlockPosition().getZ());
+        CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
+
+        BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(d0, d1 + d3, d2));
+        if (!BlockDispenser.eventFired) {
+            worldserver.getCraftServer().getPluginManager().callEvent(event);
+        }
+
+        if (event.isCancelled()) {
+            itemstack.add(1);
+            return itemstack;
+        }
+
+        if (!event.getItem().equals(craftItem)) {
+            itemstack.add(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;
+            }
+        }
+
+        EntityBoat entityboat = new EntityBoat(worldserver, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ());
+        // CraftBukkit end
 
         entityboat.setType(this.type);
         entityboat.setYRot(enumdirection.o());
-        worldserver.addEntity(entityboat);
-        itemstack.subtract(1);
+        if (!worldserver.addEntity(entityboat)) itemstack.add(1); // CraftBukkit
+        // itemstack.subtract(1); // CraftBukkit - handled during event processing
         return itemstack;
     }
 
