Why doesn't the script work without the GUI open?

Started by goirumi on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Why doesn't the script work without the GUI open?

Hi everyone! I’m having a bit of a problem. I want to make it so that this code works even when the player isn’t viewing the GUI. What I’m trying to do is: when items are transferred into the block via a hopper, the block should subtract the transferred amount from the item’s DATA TAG (if it matches a specific requirement), and then delete the items.
This code works perfectly as long as the player is viewing it (as long as the GUI is open), but as soon as the GUI is closed, all processes inside the block freeze.
How can I modify this code so it continues to work autonomously, even when the GUI is not open?

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Your problem is the "Get…
Tue, 04/29/2025 - 17:38

Your problem is the "Get item from currently open gui". This block ONLY TRIGGERS in a gui that a player has open. what you need is to get the item from the blocks inventory not the gui.