About Procedures

Started by koyote on

Topic category: Help with modding (Java Edition)

Last seen on 18:43, 16. Nov 2023
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
About Procedures

I have created a procedure that opens a GUI when I right click on a specific block, but when I right click, if I have a block, it places the block at the same time. Is there any way to solve this?

Last seen on 18:36, 16. Jul 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You might be able to fix…
Tue, 10/31/2023 - 21:54

You might be able to fix this if you run the procedure through the block, instead of separately. Not sure if though.

Essentially, if you create a new procedure and give it the 'when block right clicked' procedure, it will run this procedure in addition to anything else the game would normally do when a player clicks a block. 

If the block you want to open a GUI is a modded block, (something you made), you can instead go into the 'triggers' menu for that block, and link the same procedure to the 'when block right clicked' trigger. Then, the block itself runs the procedure when right clicked, and should (probably) interrupt any other actions that would take place. (Similar to how crafting tables and chests work.)

Last seen on 18:43, 16. Nov 2023
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks to you I have solved…
Wed, 11/01/2023 - 23:30

Thanks to you I have solved the problem! Thank you!