Place a block using procedures with player rotation

Started by Nispeew on

Topic category: Help with modding (Java Edition)

Last seen on 20:44, 15. Jun 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Place a block using procedures with player rotation
Sat, 03/23/2024 - 07:58 (edited)

Hi, I'm having trouble figuring out how to make a block placed by a procedure rotate to face the player's direction. Whenever I place the block, it's always oriented to the north. Does anyone know how to do this?

 

Video: https://www.youtube.com/watch?v=luU4aT2GYLk

Procedure for placing blocks:

 

 

Edited by Nispeew on Sat, 03/23/2024 - 07:58
Last seen on 16:14, 26. Mar 2024
Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Does the block rotate if its…
Fri, 03/22/2024 - 15:26

Does the block rotate if its placed outside of a procedure? if it doesn't, then you probs haven't set the block to be able to rotate. its on the visual tab. 

You can use "set direction of Block" procedure block, in the Block Procedures Action menu to set the spawned block's rotation. you just need to determine the player's position in relation to the spawned block position and determine from there if the player is north, south, east or west of its position.

Last seen on 20:44, 15. Jun 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi, the block itself rotates…
Fri, 03/22/2024 - 15:59

Hi, the block itself rotates absolutely fine. However, I still can't get the procedure to work. Could you please send me an image of how the rotation procedure works? It would mean a lot to me. :)

Last seen on 20:44, 15. Jun 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hey, I've finally managed to…
Sat, 03/23/2024 - 07:57

Hey, I've finally managed to get it working! Here is the code for anyone who wants it.

Last seen on 16:14, 26. Mar 2024
Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
congrats on solving it :)
Sat, 03/23/2024 - 08:35

congrats on solving it :)

Last seen on 20:44, 15. Jun 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you so much for…
Sat, 03/23/2024 - 08:52

Thank you so much for telling me how to do it! I couldn't figure it out for over 2 months now. :D