How can I bind a GUI with inventory to a player?

Started by SirPogsalot on

Topic category: Help with Minecraft modding (Java Edition)

How can I bind a GUI with inventory to a player?

I need a way to save the inventory of a GUI which is opened via keybind. There are a ton of items that can be obtained that all have a similar function, but they must be "equipped" to be used and I don't seem to be able to create a GUI that saves its contents and is bound to the player. Any ideas?

The only way I can think of…
Fri, 07/09/2021 - 08:09

The only way I can think of is to use player variables (itemstack type) to store inventory data and then on gui open and close triggers, load and save the data from slots to the player variables

Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@Klemen how can this be done?
Thu, 05/23/2024 - 05:45

@Klemen how can this be done?

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i know, i am late to the…
Tue, 05/06/2025 - 20:11

i know, i am late to the party, but isnt it easier, to just create one singular playerpersistent itemstack, and put an  item with bound gui and inventory in it? like if you put a shulkerbox in the playerstack, and make the keybind open the gui for that.