Fence gates turn farmland and dirt paths into dirt
Summary
Placing a fence gate above farmland or a dirt path converts the block below into dirt. Vanilla explicitly exempts fence gates from this obstruction rule.
Current behavior
Both support checks use only the legacy-solid flag of the block above:
crates/pumpkin/src/block/blocks/farmland.rs::can_place_atcrates/pumpkin/src/block/blocks/dirt_path.rs::can_place_at
let state = world.get_block_state(&block_pos.up());
!state.is_solid() // TODO: add fence gate blockGenerated fence-gate states have the legacy IS_SOLID flag, so the checks fail and schedule conversion to dirt. Both files already carry the explicit fence-gate TODO.
Vanilla behavior
Vanilla Java keeps farmland and dirt paths intact under fence gates. Its obstruction rule treats legacy-solid blocks as blockers with a fence-gate exception; farmland also has a moving-piston exception.
References:
Reproduction
- Place farmland and a dirt path.
- Put any fence gate directly above each block.
- Wait for the scheduled block update.
Pumpkin converts both blocks to dirt. Vanilla keeps both unchanged.
Suggested fix
Update both can_place_at helpers to allow fence gates despite their legacy-solid flag. Preserve the remaining vanilla exceptions, including moving pistons for farmland, and add tests for closed/open fence gates plus an ordinary full solid block that should still cause conversion.
Verified against current master at 1ac447f2918b7dec7d19a5836fa3673d4fe3c9f5; the connected issue list and targeted repository search found no existing farmland/dirt-path fence-gate issue.
Source: Pumpkin-MC/Pumpkin