Topic category: Help with MCreator software
Like the title says, I can't get blocks to place on a 3x3 grid in the correct axis.
To explain, anyone played Rainbow Six Siege? I'm trying to make a mod that sort of emulates that experience. I'm trying to make blocks place in a 3x3 grid to 'reinforce' walls, and so far it works but only on the Z axis.
To explain, this procedure runs after a parent block is right clicked. It basically checks to see if there are any blocks on the positive and negative X axis and then places blocks on the Z axis and vise versa. Like I said, this works when the procedure places blocks on the Z axis but not on the X axis. I have no idea why this is as I basically just copy-pasted the code that checks if there are blocks on a certain axis. I know some parts are messed up like the Z and X coordinates being flipped around in the checks but It worked on the Z axis so I was too scared to touch it.
How it's meant to work
When a 'Reinforcement' block is placed against a wall, [when right clicked] it should create a 3x3 barrier.
This is what happens when the blocks are facing the Z axis (as in the big flat sides face the X axis and the edges face the Z axis). This is what I want to happen, and so this is in my eyes a successful test.
This is what happens when the blocks are facing the opposite axis. I implemented some checks to try and get rid of that weird outcrop in the middle, which worked on the Z axis but not here. I tried another fix which ran a check before any code was run and it just resulted in a 3 block column straight up on the X axis.
I have literally no idea why this is happening. I'm not the best at procedures or code in general, and have been thinking of a good way to implement this for a good while. If anyone has any clue as to why this happens any help would be greatly appreciated, and if needed I can send more screenshots of procedures or ingame tests.