Snap-to-surface features recently gained an allow_non_air_placement boolean property. When true, this allows snapping to search through solid blocks to find a surface. Unfortunately, this property is causing searching to occur backwards.
Demonstration
The attached video demonstrate this issue. A snap-to-surface feature targeting floor surface placement is placed via command that attempts to snap first through solids (stone) and then through air. The first snapping aligns the target placement, a glowstone block, above the input position. The second snaps below the input position. The first case, though stone, is incorrect.
The following is the entire code of the ore feature in question:
{
"format_version": "1.26.50",
"minecraft:snap_to_surface_feature": {
"description": {"identifier": "bug_features:snap_to_surface_feature"},
"feature_to_snap": "bug_features:single_block_feature",
"surface": "floor", "search_range": 32,
"allow_non_air_placement": true,
"embed_in_surface": true
}
}Reproduction
The demo video and code are taken from the behavior pack in the attached world for convenience. This world can be opened (in Minecraft Preview) for inspection or unzipped to access the code associated with such.
Thank you for helping us improve Minecraft! We saved your files: