Boat placement snaps to the block center instead of the raycast hit point
Summary
Using a boat ignores the exact point the player targeted. Pumpkin places the boat at the horizontal center and top of the raycast's block cell, so placement jumps by up to half a block and can fail near obstacles where vanilla's exact placement would fit.
Current behavior
BoatItem::normal_use receives only (BlockPos, direction) from World::raycast and constructs the spawn position as:
let hit_vec = Vector3::new(
f64::from(hit_pos.0.x) + 0.5,
f64::from(hit_pos.0.y) + 1.0,
f64::from(hit_pos.0.z) + 0.5,
);The code already notes that vanilla uses hitResult.getPos() while Pumpkin's raycast discards the intersection point.
Vanilla behavior
Modern Java boat placement passes the full HitResult into BoatItem.createEntity, retaining the exact ray intersection position rather than replacing X/Z with the block center.
Reference: https://maven.fabricmc.net/docs/yarn-1.21.7%2Bbuild.4/net/minecraft/item/BoatItem.html
Reproduction
- Aim near one edge or corner of a water block or solid placement surface.
- Use a boat.
- Compare the spawned position with the crosshair hit point.
Pumpkin snaps the boat to the cell center. Vanilla places it at the exact raycast hit position. Near a neighboring collision, Pumpkin can also reject the centered boat even when the targeted position has room.
Suggested fix
Extend the raycast result to include its exact intersection vector and use that vector for boat construction and collision checks. Add tests for two different hit points in the same block cell and for an edge placement beside an obstacle.
Verified against current master at 1ac447f2918b7dec7d19a5836fa3673d4fe3c9f5; the connected issue list and targeted search found no existing boat placement/raycast-position report.
Source: Pumpkin-MC/Pumpkin