#How do I restrict the generation of my blocks to only those above the grass or soil? (1.21.1)
1 messages · Page 1 of 1 (latest)
A block predicate filter placement type
I tried using it, but I think I was wrong; the filter in question was this one
Show your work
{
"feature": "techpack:wild_forest_nest",
"placement": [
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:any_of",
"predicates": [
{
"type": "minecraft:not",
"predicate": {
"type": "minecraft:matching_blocks",
"blocks": "minecraft:water"
}
}
]
}
}
]
}
That's just checking if the block it's trying to generate in is not water, not the block below it. You need to add an offset to the matching blocks check
y = -1?
Show your work
one minute
I'm going to open my modpack
i finded the error
In the file included in the modpack, the filter order was reversed, which caused the feature not to appear
How do I restrict the generation of my blocks to only those above the grass or soil? (1.21.1)
If anyone needs a generation configuration similar to mine, where the block only appears above the grass and not above the water, it's here. (its a placed feature, the configured its a simple state provider)