Get associated block of currently open GUI?

Started by EnderSam on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Get associated block of currently open GUI?

Hello! I just want to know, is there a way to get the associated block or the X Y Z coords of said block of the currently open GUI?

Like, for example, say I have a GUI "CustomFurnaceGUI" attached to a block called "CustomFurnace"

Through procedures attached to the GUI procedure triggers, like "While this GUI is open tick", is there a way to get the "CustomFurnace" Block of the GUI that is currently open?

The X Y Z dependancies that come with the GUI procedure triggers are the X Y Z values of the player, and not the block associated with the currently open GUI, and I want the associated block in order to get and set properties, place blocks based on the open GUI block's coords and not the player's, etc.

Like if the "CustomFurnace" block had the boolean property "lit" which would change the block texture based on the value of the property, I want to know if there is a way to get or set the property of the specific "CustomFurnace" block that the currently open GUI is attached to

Hopefully this is understandable