#handled screen for a backpack

6 messages · Page 1 of 1 (latest)

wispy haven
#

Im trying to make an item kinda like a backpack. So when you hold it and press a key, a screen opens and you can move items in and out from the inventory.

Can someone tell me what are the steps in doing something like that?

The main questions i have in mind are:

  • How would an inventory in a item look like? Is it a nbt list or something else
  • how to create a screen handler from an item: where to get the syncId and the inventory from the item
  • how to open a handled screen

I tried to look at how some mods do it, but i only found over complicated examples, and not being really familiar with screens and handled screens i was going crazy.
So even a simple mod example would help a lot

(Please ping me when answering)

ember elm
wispy haven
#

For a screen handler i need a syncId, which is already provided for block entities, but in this case i dont have a block entity. so how would i get one?

ember elm
#

did you read the tutorial?

wispy haven
#

I skimmed through, cause im on my phone now, i must have missed it

ember elm
#

that's not the point of tutorials..