Topic category: Help with Minecraft modding (Java Edition)
I'm creating a custom sapling for my mod, which requires a custom model. As a result, I'm unable to use the plants feature and must rely on procedures.
I attempted to create a procedure to check if the targeted block is tagged as "minecraft:dirt", which includes my custom blocks, but it didn't work. I have seen a lot of people say that you can use the "Block valid placement condition", but it's currently bugged or something, because I cannot scroll down to choose my procedures, and can only access the first five procedures I've made.
I've seen and followed this forum topic, but it didn't work for me. Procedure: https://postimg.cc/yWPQcZ5N
PS: I want my sapling to be unplacable on blocks that don't allow vegetation to grow on, not that it becomes destroyed after a while through tick updates.
Any help is appreciated. Thank you!
Please help
Bump
pretty simple: advanced properties
block valid placement condition
if your block needs the support below, "if: [block at (x) (y-1) (z)] = [select block]"
if it's above, just put + instead
if it's on the side, put the equasion depending on the axis
if there's multiple blocks, just put a XOR gate in front
Thank you, I do know how to check if the block at y - 1 is the block I wanted. However, I'm not sure how to return a statement so that the procedure is complete and inserted in the block valid placement condition.
UPDATE: I have figured out a way to do it after some tinkering. Thanks pal.
Code for anyone who is interested:
If Get block at {x y + 1 z} tagged in block tags as [your block tag] / is the same block as [your block]
Return logic: True
Return logic: False
For support, just check if there is not a solid block at y - 1.
If that's the case, destroy block at x y z and drop block at x y+1 z to avoid item getting stuck.