Topic category: Help with MCreator software
Hi all! I need some help. I'm working on a mod that creates 3-block wide double doors. So basically, it's like 2 1.5 block doors next to each other. When closed, the doors are made up of 6 components, corresponding to the 6 blocks that the door occupies. Placing the bottom middle block causes the entire door to spawn, and then I want to make it so that breaking any one door block will break the remaining 5.
I've been working on the breaking procedure, but I'm having some trouble with it. It only seems to work if the door was placed in a certain direction (currently, I'm just testing the procedure out on the bottom middle block, but once I can get that to work, I'll create similar procedures for the other 5 blocks).
Here's a picture of the code of the procedure (split into two columns so it's easier to see, but it's all connected)
I want to get it so that it only removes the door blocks in any orientation the door happens to be in. However, I don't think it's processing the direction of the door, because it always acts as though the door is facing North. So if I place the door facing East or West, it only deletes the middle two blocks (and if I place any blocks in front of or behind the door in the middle, it will delete those as well). It works if the door is facing south as well, because it's the same relative placements of the block. I would've simplified it, but I couldn't figure out how to do something like a North OR South case and an East OR West case.
This is a screenshot of the block placement procedure, which works correctly. I can place the door facing any direction, but I can only destroy it fully when it's facing North or South.
Any help with this matter would be greatly appreciated, as I would like this to handle as a single element that doesn't require multiple steps to break.
Currently, I want to figure out the placing and breaking of the door, and then I'll focus on actually making it open. I'm pretty sure I have an idea of how to do that. If possible, I would like to stick to using the graphical interface, as I'm not very familiar with java, but if that can't be avoided, I understand. Any help would be greatly appreciated! Thank you so much!