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

So I switched over to the capabilities system (totally awesome), and want to know if there is something special I had to do to use the IInventory interfaces with the IItemHandler?  I saw for the Container Slot(), Forge has the SlotItemHandler() to work with the capabilities.  I want to create a crafting table that stores the items put into it in the ItemStackHandler. Any starting points I should look at? Any suggestion would be greatly appreciated.

If you want to save the items in your crafting matrix, you'd have to store them in a

TileEntity

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

  • Author

I do have a tile entity made and working that can store items with the capabilities system. I just am not sure how to make my 3x3 slots that use the IItemHandler to the crafting result that seems to use IInventory (using the vanilla crafting table as my example).

You'd have to copy the logic from SlotCrafting over to a custom class extending

SlotItemHandler

, and adapt it to the

IItemHandler

code.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

  • Author

I figured out my issue and am posting what I did to potentially help others.  You were right with the SlotItemHandler, but I used a different approach. Since my issue was with saving it to the capabilities storage, I decided to try and make it simple.  I was able to use the crafting matrix and the IInventory crafting result (used with the vanilla workbench), and created a extra load/save method.  When you click on my workbench now, it loads the items from the TileEntity inventory into the matrix, and when you close, it saves the item slots from the matrix back into the TileEntity inventory.  Nice and easy. I do appreciate the help.

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.