Started by
STARRYSOCK
on
Topic category: Help with Minecraft modding (Java Edition)
Is there a way to check if a block is replaceable, like air/water/grass/vines?
I have several blocks that are placed using custom procedures, but haven't found a good way to test if the space they're attempting to be placed in is occupied with a replaceable block, beyond just manually testing for each block. But that doesn't help with modded replaceable blocks
Any luck with this yet? I've been trying to do something similar to this.
Hopefully this gets answered, because many of us don't know how to check for that.
Not sure if this is what you mean but If so here is a solution.
Create a Block Tag and fill it with all the blocks that you want to be replaceable and in your procedure check if the block that's trying to be replaced is tagged as your Block Tag and if it is then replace it.
someone answer this pls
minecraft:replaceable is already a tag so the best way i've found is:
if is [block] tagged as [minecraft:replaceable],
so all the blocks in the tag (grass, water, roots, air, etc...) will be detected
i hope that help