Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hey guys,

 

At the moment, I'm attempting to create a custom container. It SHOULD be showing the following:

 

The players inventory, the quick bar, and the 'bank' inventory.

 

I have everything working to a certain degree, but I'm having difficulties with the slotIndex values. The problem really stems from the fact that I just don't completely understand the purpose of them, or how they achieve that purpose. I tried to decipher it by looking at the other containers/slots, but I just don't understand it. Could someone help explain, please?

 

Thank you!

Have a modding question? PM me and hopefully I'll be able to help. Good at 2d Pixel Art? We need your help!  http://www.minecraftforum.net/topic/1806355-looking-for-2d-pixel-artist/

The slot index corresponds to the slot of an ItemStack array that you should have created in your TileEntity. All of the IInventory implemented methods should point to that array.

 

It basically maps out so that each slot in a GUI lines up with a slot in that array. So you put something in the slot that you designated slot 0 in your Container, it will go in 0 slot of the array inside the TileEntity and you can reference it from there.

  • Author

Hi Denoflions,

 

Thanks for the help! I moved on to getting the GUI to work properly. For this storage item, I'd like to have the sidebar scrolling available, like in the creative inventory, but I can't even find where this is created. How is that done?

 

Thanks,

Zetal

Have a modding question? PM me and hopefully I'll be able to help. Good at 2d Pixel Art? We need your help!  http://www.minecraftforum.net/topic/1806355-looking-for-2d-pixel-artist/

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.