#Block Replacement Filter
1 messages · Page 1 of 1 (latest)
"minecraft:placement_filter": {
"conditions": [
{
"allowed_faces": [
"up"
]
}
]
}
This is what I'm using, but I don't get what I want, the block isn't even placed.
It's not work
This allows the block to only be placed on the top face of other blocks, you cannot place it on the bottom or sides of blocks.
Send the block code, is there any content log error?
In fact, the way you put it in the code actually allows the block to be placed only on the top face, but it does not break the block if the block below it is broken
There are no errors in the log
It breaks automatically, placement filter defines where the block can be
It doesn't break, I believe the air block also has a top
Maybe you did something wrong as I'm sure it breaks.
Wait, I think I made a mistake, it breaks if you specify a block. sorry
You can use q.any_tag('wood','stone','metal')
I was doing this, it turned out to be a lot of work because I only want it to break if the bottom block is air.
I'm having to manually place several blocks, there are some that the tags don't reach, like the walls
And fences
´-´
Another solution is to detect if the bottom block is air using "minecraft:queued_ticking", but multiple blocks with this cause lag
How do I it?
I wanted a way to allow it to be placed on any block, but if you break the one below, the block is broken
This is experimental and needs Holiday Creator Features to work
"minecraft:queued_ticking": {
"on_tick": {
"event": "detect_air"
},
"range": [
5,
5
],
"looping": true
}
"events": {
"detect_air": {
"run_command": {
"command": [
"execute if block ~~-1~ air run setblock ~~~ air destroy"
]
}
}
}
I didn't want to have to use experiments on my map :/
But it seems like an interesting solution
This will be no longer experimental soon with new custom components, but they haven't been added yet
You can replace minecraft:queued_ticking with an entity, but that’d be 1 entity per block
Or you can make a grid check from the player to run commands using a grid formula
As I intend to use the block to build, I think one entity per block would cause lag