The new minecraft:height_difference_filter_feature from Preview 26.30.27 is designed to analyze blocks around the input position to determine if it is suitable for placement of a target feature. The property determining the set of blocks to analyze is given with search_radius. Unfortunately, the feature only analyzes a subset of blocks forming a cross around the input position instead of covering a full area.
Ideally, search_radius would determine a circle or square zone to analyze. If this is intentional, it may be best to rename the property or introduce an additional property that determines the analysis zone.
Demonstration
The attached video demonstrates this issue. Commands are shown attempting to place the following height difference filter feature:
{
"format_version": "1.26.30",
"minecraft:height_difference_filter_feature": {
"description": {"identifier": "bug_filter:height_filter"},
"places_feature": "bug_filter:block",
"max_allowed_downward_height_diff": 2,
"search_radius": 2
}
}The initial placement above the yellow and red concrete succeeds because the yellow concrete blocks in the cross are within the range given by max_allowed_downward_height_diff. The first attempt above the blue and green concrete fails because a block in the blue concrete cross is missing, which causes the max_allowed_downward_height_diff check to fail.
Reproduction
This 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.
The following commands were used in the demonstration:
Above yellow and red concrete:
place feature bug_filter:height_filter -4 67 -4Above blue and green concrete:
place feature bug_filter:height_filter 4 67 -4
Thank you for helping us improve Minecraft! We saved your files: