--- a/net/minecraft/world/item/BoatItem.java
+++ b/net/minecraft/world/item/BoatItem.java
@@ -1,7 +1,9 @@
 package net.minecraft.world.item;
 
+import java.util.Iterator;
 import java.util.List;
 import java.util.function.Predicate;
+import net.minecraft.core.Holder;
 import net.minecraft.server.level.ServerLevel;
 import net.minecraft.stats.Stats;
 import net.minecraft.world.InteractionHand;
@@ -16,10 +18,12 @@
 import net.minecraft.world.level.Level;
 import net.minecraft.world.level.gameevent.GameEvent;
 import net.minecraft.world.phys.AABB;
+import net.minecraft.world.phys.BlockHitResult;
 import net.minecraft.world.phys.HitResult;
 import net.minecraft.world.phys.Vec3;
 
 public class BoatItem extends Item {
+
     private static final Predicate<Entity> ENTITY_PREDICATE = EntitySelector.NO_SPECTATORS.and(Entity::isPickable);
     private final Boat.Type type;
     private final boolean hasChest;
@@ -32,54 +36,76 @@
 
     @Override
     public InteractionResultHolder<ItemStack> use(Level world, Player user, InteractionHand hand) {
-        ItemStack itemStack = user.getItemInHand(hand);
-        HitResult hitResult = getPlayerPOVHitResult(world, user, ClipContext.Fluid.ANY);
-        if (hitResult.getType() == HitResult.Type.MISS) {
-            return InteractionResultHolder.pass(itemStack);
+        ItemStack itemstack = user.getItemInHand(hand);
+        BlockHitResult movingobjectpositionblock = getPlayerPOVHitResult(world, user, ClipContext.Fluid.ANY);
+
+        if (movingobjectpositionblock.getType() == HitResult.Type.MISS) {
+            return InteractionResultHolder.pass(itemstack);
         } else {
-            Vec3 vec3 = user.getViewVector(1.0F);
-            double d = 5.0;
-            List<Entity> list = world.getEntities(user, user.getBoundingBox().expandTowards(vec3.scale(5.0)).inflate(1.0), ENTITY_PREDICATE);
+            Vec3 vec3d = user.getViewVector(1.0F);
+            double d0 = 5.0D;
+            List<Entity> list = world.getEntities((Entity) user, user.getBoundingBox().expandTowards(vec3d.scale(5.0D)).inflate(1.0D), BoatItem.ENTITY_PREDICATE);
+
             if (!list.isEmpty()) {
-                Vec3 vec32 = user.getEyePosition();
+                Vec3 vec3d1 = user.getEyePosition();
+                Iterator iterator = list.iterator();
 
-                for (Entity entity : list) {
-                    AABB aABB = entity.getBoundingBox().inflate((double)entity.getPickRadius());
-                    if (aABB.contains(vec32)) {
-                        return InteractionResultHolder.pass(itemStack);
+                while (iterator.hasNext()) {
+                    Entity entity = (Entity) iterator.next();
+                    AABB axisalignedbb = entity.getBoundingBox().inflate((double) entity.getPickRadius());
+
+                    if (axisalignedbb.contains(vec3d1)) {
+                        return InteractionResultHolder.pass(itemstack);
                     }
                 }
             }
 
-            if (hitResult.getType() == HitResult.Type.BLOCK) {
-                Boat boat = this.getBoat(world, hitResult, itemStack, user);
-                boat.setVariant(this.type);
-                boat.setYRot(user.getYRot());
-                if (!world.noCollision(boat, boat.getBoundingBox())) {
-                    return InteractionResultHolder.fail(itemStack);
+            if (movingobjectpositionblock.getType() == HitResult.Type.BLOCK) {
+                // CraftBukkit start - Boat placement
+                org.bukkit.event.player.PlayerInteractEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(user, org.bukkit.event.block.Action.RIGHT_CLICK_BLOCK, movingobjectpositionblock.getBlockPos(), movingobjectpositionblock.getDirection(), itemstack, false, hand, movingobjectpositionblock.getLocation());
+
+                if (event.isCancelled()) {
+                    return InteractionResultHolder.pass(itemstack);
+                }
+                // CraftBukkit end
+                Boat entityboat = this.getBoat(world, movingobjectpositionblock, itemstack, user);
+
+                entityboat.setVariant(this.type);
+                entityboat.setYRot(user.getYRot());
+                if (!world.noCollision(entityboat, entityboat.getBoundingBox())) {
+                    return InteractionResultHolder.fail(itemstack);
                 } else {
                     if (!world.isClientSide) {
-                        world.addFreshEntity(boat);
-                        world.gameEvent(user, GameEvent.ENTITY_PLACE, hitResult.getLocation());
-                        itemStack.consume(1, user);
+                        // CraftBukkit start
+                        if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(world, movingobjectpositionblock.getBlockPos(), movingobjectpositionblock.getDirection(), user, entityboat, hand).isCancelled()) {
+                            return InteractionResultHolder.fail(itemstack);
+                        }
+
+                        if (!world.addFreshEntity(entityboat)) {
+                            return InteractionResultHolder.pass(itemstack);
+                        }
+                        // CraftBukkit end
+                        world.gameEvent((Entity) user, (Holder) GameEvent.ENTITY_PLACE, movingobjectpositionblock.getLocation());
+                        itemstack.consume(1, user);
                     }
 
                     user.awardStat(Stats.ITEM_USED.get(this));
-                    return InteractionResultHolder.sidedSuccess(itemStack, world.isClientSide());
+                    return InteractionResultHolder.sidedSuccess(itemstack, world.isClientSide());
                 }
             } else {
-                return InteractionResultHolder.pass(itemStack);
+                return InteractionResultHolder.pass(itemstack);
             }
         }
     }
 
     private Boat getBoat(Level world, HitResult hitResult, ItemStack stack, Player player) {
-        Vec3 vec3 = hitResult.getLocation();
-        Boat boat = (Boat)(this.hasChest ? new ChestBoat(world, vec3.x, vec3.y, vec3.z) : new Boat(world, vec3.x, vec3.y, vec3.z));
-        if (world instanceof ServerLevel serverLevel) {
-            EntityType.<Boat>createDefaultStackConfig(serverLevel, stack, player).accept(boat);
+        Vec3 vec3d = hitResult.getLocation();
+        Boat object = this.hasChest ? new ChestBoat(world, vec3d.x, vec3d.y, vec3d.z) : new Boat(world, vec3d.x, vec3d.y, vec3d.z); // CraftBukkit - decompile error
+
+        if (world instanceof ServerLevel worldserver) {
+            EntityType.createDefaultStackConfig(worldserver, stack, player).accept(object);
         }
 
-        return boat;
+        return (Boat) object;
     }
 }
