Started by
brigantes
on
Topic category: Help with Minecraft modding (Java Edition)
I'm trying to add a block that behaves like Cocoa Bean pods in vanilla Minecraft (minus the growth stages). I have figured everything out to do except making the block limited to being only placeable on one specific log block. I've tried multiple additional procedures but just can't get it to work. I would ideally also like the block to break once the log block it is attached to is broken.
How would I test if the block is directionally placeable? I have it set to Y Axis Rotation and it places against blocks just fine, the log also naturally has log rotation.
As for the procedure, how would I go about doing that since I've essentially tried doing that already and it just doesn't seem to make a difference. (https://imgur.com/a/3qJpK5t - this is the most recent version I've tried). The problem I have too is getting it to attach to the block, I don't understand how to do that within the procedures
Not sure what's up with your code, it looks very broken. Do something like this for the 'when neighbor block changed. (This is for a six-directional block, you only really need the 4 cardinal directions.) You can do something very similar for checking if the block can be placed; just return true if the block at the correct position, (based on the direction it was placed), is your correct log block; or make a procedure that, when the block is placed, checks if the attatched block is the correct log type, and breaks the block otherwise.