Assign the key combination to open the GUI of an item in this my inventory. Don't lose elements in the GUI

Started by RobertoImI on

Topic category: Help with modding (Java Edition)

Last seen on 22:28, 24. Jun 2023
Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Assign the key combination to open the GUI of an item in this my inventory. Don't lose elements in the GUI

Greetings, I have several doubts, I have spent my time reading several forums but I have not reached the solution.
In short, make an item that is a briefcase, create a GUI attached to it for players to store items by right clicking the mouse and the interface opens.
What I want to do are several things:
1- Assign a key or a combination of them that only when you have the "suitcase" item in your inventory will the interface open
2- I have a problem with a recipe to upgrade the briefcase to tier 2, but if I enter it on the crafting table with items inside and make the upgrade, the items inside disappear. So I want to know if it is possible to keep them inside even if it gets better.

If someone can help me with this I would appreciate it.

Link to see what I have done

https://postimg.cc/5HJ1XK6N