Topic category: Help with Minecraft modding (Java Edition)
Nowadays, I really wanted to make a backpack that I can wear on my back, but we can only save the gui screen we made by connecting it to an item or a block. Normally, it was not possible for us to connect it to an armor and turn it on and off easily with the help of the keyboard button. (Key Binding)
I thought of creating a ghost block and linking the gui screen to this block. If I have a Body Armor, which I named backpack, I could add Key Binding and make this block look like a right click. (Simulate Block of xyz Procedure)
I made the bounding boxes of the ghost block I created to 0, made it impenetrable and unbreakable, and set it to fit in the coordinates I wanted when I created the world (x: 100 y: 120 z: 100).
When I went and looked at these coordinates I set, I saw that the block did not appear in any way and did not interfere with gameplay.
Now, every time I press the B key, if I have a backpack in my Body Armor slot, my slot screen appears as if I right clicked on this ghost block.
I finally succeeded and immediately shared it with my followers.
I wanted to add this method, which I could not find in the forum for days, because there would be many people researching this method like me.
I am sharing the link of the Tutorial video so that you can see the details more easily. (If linking is not prohibited)