Wearable Backpack Mod idea and Tutorial

Started by Batuu05 on Fri, 12/25/2020 - 14:52

Topic category: Help with modding (Java Edition)

Last seen on 19:23, 17. May 2022
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Wearable Backpack Mod idea and Tutorial
Fri, 12/25/2020 - 14:53 (edited)

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)

https://www.youtube.com/watch?v=F1yE1dQmu3Q

Edited by Batuu05 on Fri, 12/25/2020 - 14:53