Jump to content

Creating something like an ender chest, but with a global inventory (not player specific)


Recommended Posts

I'm wondering how to go about creating a block that is essentially an Ender Chest (its contents are the same regardless of which chest you check), but where any player in that world can see the contents of the Ender Chest. I was thinking of modifying the saved data for a world, but I'm struggling to understand how that even works. Are there any tutorials out there on tools I can use to work on this sort of problem? 

EDIT: I just found this post: is this about what I should be looking at for 1.16.5?



Edited by sfeucht
Link to comment
Share on other sites

you can create a LevelCapability which stores your inventory (use Forge IItemHandler). Then create a menu which you can open for example with a custom KeyMapping. Note you need a custom Packet when you want to open the Menu from the client. Also you need to sync the Inventory to all Players which has open it (look at the ChestBlockEntity for an Example)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.