Started by
IdiotHere
on
Topic category: Help with MCreator software
I want to make vines similar to glowberry plants, and I need to tell it that the block can only spawn on the roof of an area; that you can't put a plant on the floor. I already have a procedure open, but don't have any code. Any ideas?
Edited by IdiotHere on Tue, 01/16/2024 - 20:06
You would need to make a condition with the 'block face event/target entity is looking at' function that only returns true if the function returns 'down.' (You can add a placement condition in the 'advanced properties' tab.) From there, you can add a procedure with the 'on neighbor block changed' trigger that breaks and drops the block if the block above doesn't have a solid down-face, (Use the 'is face of block solid' function), or isn't another instance of the vine block.
You will probably need additional procedure to determine whether the block should be a middle or tip variant, (if you want it to be exactly like glowberries.) You should be able to enable 'climbable' surfaces in the advanced properties tab, but I haven't personally tried this, and it may just be for ladder-like blocks, not non-solid climabable blocks. (If it doesn't work, there may be some workarounds you could try with the 'override motion delta' function, but they're a bit more complicated.)
Let me know if some pictures would be helpful!
Ok, sorry I saw this late, but thanks!
Actually, where is this code block at? I... can't seem to find it.
Placement conditions are in the bottom right corner of the 'Advanced Properties' tab when creating a block, you should see a section that says 'Block Valid Placement Condition.' You can link this to a procedure, but the procedure must return a logic value. (So the procedure needs to check if the position is air with a solid block above it and return true if this is the case, or false if it isn't- you can find 'return' functions in the flow control tab when creating a procedure.)
The ladder properties thing is just a little checkbox in the middle of 'Advanced Properties,' but I'm still not sure it'll work for a full sized block. There's probably a separate bit of code you'd have to add in manually.