Jump to content

Recommended Posts

Posted

They are the same as 1.7.2 Containers, which are the same as 1.6.4 Containers, which are probably the same as Containers in previous versions. Containers have been pretty stable over the various versions up to at least 1.8.9.

 

That all said, if you want to see one that is for your current version, check out vanilla Minecraft's ContainerFurnace - it does pretty much everything a Container can do. If you don't understand any part of it (e.g. #detectAndSendChanges or #addCraftingToCrafters), look for ANY Container tutorial and it will probably explain it.

Posted

 

i get the feeling this is not the proper way to do it or am i wrong?

No idea - I generally abhor video code tutorials, and I'm certainly not spending 34+ minutes watching this one.

 

What specifically about Containers do you not understand? Or by 'container', do you mean the entire item storage / display system?

 

For a system like a chest, you need:

1. A Block to provide the TileEntity and open the GUI when activated

2. A TileEntity to store the inventory contents

3. An IInventory implementation to handle interactions with the inventory

4. A GUI to display the inventory contents

5. A Container to keep the client-side version of the IInventory in sync with the server while the GUI is open

6. An IGuiHandler to provide the correct GUI and Container when you call #openGui

 

I might be forgetting something, but each of the above has multiple steps and several have specific registration requirements, and none of it will work if your base mod class isn't set up correctly. Needless to say, this is a HUGE undertaking for a new modder.

 

While it's not impossible, I highly suggest you start with something simpler and work your way up. For example, start with a non-interactive Block. Then an interactive Block (doesn't have to be fancy). Then try a basic GUI - one that doesn't have an inventory, but is rather just a way to display some info. Etc.

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.

×
×
  • Create New...

Important Information

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