HOW can I make a if condition

Started by Jack4 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
HOW can I make a if condition

I'm going crazy.

How can I open a GUI when Player opens an enderchest?

Thank you for help!

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Overriding vanilla GUI is…
Thu, 07/27/2023 - 05:53

Overriding vanilla GUI is tricky, but not impossible. You'll need to make a procedure that triggers when the player right clicks on an Ender chest. (Use the global trigger 'player right clicked on block,' and then use an if statement to check if the block is an enderchest.) 

Have the procedure close any GUI the player currently has open, then immedieately open your custom GUI. This works most of the time, though there is a bit of a delay.