Make GUI button open GUI for item in its slot

Started by pixelurbanism on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make GUI button open GUI for item in its slot

Hello everyone! I am trying to make it so a button on the GUI of a block opens the respective GUI for the item in one of its slots. Is there any way to do so? For example, lets say you wanted to make a laptop or something, and the only way to open its GUI was to place it inside a desk block and click "Open."

Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you could have,…
Wed, 02/19/2025 - 13:07

you could have, whenButtonClicked(or something), if item in slot <slot_number> = <your_item> do open <your_GUI>