Jump to content

Recommended Posts

Posted (edited)

I am making a simple backpack mod to extend my knowledge of modding, but after implementing some of the more simple components, (an inventory, the layer renderer, the backpack item), I have run into a brick wall in trying to add a new armor slot to the player, to put the backpack item in. I have examined a few other mods, and they either use the curios api, or mixins, neither of which I am keen to use. (I don't want dependencies for a mod this simple, and I know mixins are a last resort, so I want to avoid them) I know it is possible to add a slot without either, but am totally lost on how to do this, I have heard that capabilities are what should be used, for storing the data, but don't really understand the docs. (or much about capabilities in general lol) I also can't seem to find any information on how to properly render in a new slot for the player inventory, I have seen methods where you would render a second, slot sized gui over the regular inventory, which seems reasonable, if not a bit of a hack, but don't know if it is the right option. I just want advice on what would be the best way to implement something like this, or what best practices I should take into consideration. 

Edited by ToastBucket
  • ToastBucket changed the title to [1.16.5] Adding new player inventory slots, best practice?

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.

Guest
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.

Announcements



×
×
  • Create New...

Important Information

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