Started by
koyote
on
Topic category: Help with Minecraft modding (Java Edition)
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?
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.)
Thanks to you I have solved the problem! Thank you!