Relative Axis For Placed Blocks?

Started by NhyraVirakah on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Relative Axis For Placed Blocks?

**I've only been using MCreator for a couple days now, so I've still figuring out the format/structure of this stuff.

I've been fiddling with an idea with placing blocks that places other blocks. I got it working using a very long procedure via experimenting, for figuring out what rotation/direction to place the 2nd block at. However I wonder if there's a way to 'get' the relative Direction/Rotation of a block? 
 
Like let's say for arguments Z+ is north, and the block is rotated 90 degrees. The Z axis would rotate for that block. So it would become X (again, only for that block).

So far I have it functioning the way I want, I just wondered if there was an easier way to do this.

Here's my current solution: