I want it to be like a snow layer, where it can't be placed on any surface that doesn't have a 16 by 16 collision on the top side of it. Ex. Place a snow layer on a trapdoor and open it.
I am using minecraft:placement_filter.
Although i am considering using a command that deletes the block and a molang that will do the job as well.
#How do make it so that a block can only be placed on a solid block?
1 messages · Page 1 of 1 (latest)
You could use script api. Placement filter is good as well, though you would need to list every block
I am unaware of scripting api but my other idea is using an event with a condition that will delete the block below
someone said to use above_top_solid but i don't think that returns a float and is probably rounded up or down.
That returns the y value
yeah
Which is useful for world generation
but i think it would be useful for returning the height of a block
if it returns something like y=-60.9 or something
then i can do something if it returns a decimal
in other words if above_top_solid(0, 0) mod 1 returns something other than zero
can you tell me if it returns an integer or float?
I'm sorry but it doesn't tell me if it returns an integer or a float for the y value.
Not sure why you would need to even use this query, it doesn't help
true, do you have any other ideas?
My ideas
Sorry i don't know where to begin using scrpting api for this
https://learn.microsoft.com/en-us/minecraft/creator/documents/scriptingintroduction?view=minecraft-bedrock-stable, You can also search or open new posts in #1067535382285135923 for further assistance
I saw something that says that this is only supported with windows, so i'd rather not use this. Besides, i would perfer it if everything stays within my custom block's json file.
Scritping works on all platforms
Then your other choice is to list every block in the placement filter
Yeah.