Help with detecting/setting rotation of block

Started by legoboomer on Sat, 08/31/2019 - 20:01

Topic category: Help with modding (Java Edition)

Last seen on 14:30, 26. Mar 2020
Joined Jul 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Help with detecting/setting rotation of block
Sat, 08/31/2019 - 20:01

I'm trying to create a block that will switch into a new (but similar block) when you right click it with an item.  However, it always resets to the default rotation whenever I replace it with the other block.  How the code is set up right now,it just places the block I want it to change into in the previous block's cube.  Does anybody know a way to fix this?  I really appreciate comments, even if they confirm that this is impossible.

Last seen on 09:17, 20. Feb 2020
Joined Aug 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Perhaps you could test what…
Sat, 09/21/2019 - 10:18

Perhaps you could test what direction the player is facing upon placing the block, give the block a custom NBT value based on that, and have multiple duplicates of this block for each direction. You can then just transfer the NBT value to the new block.