Jump to content

Recommended Posts

Posted

what i want is something kind of like the backpack mod, you right click holding an item and it brings up an inventory for that item, i also want to limit the inventory to just seeds, with the size of a small chest. if someone can at least show the basic code with place holders for vaiables that would be great.

Posted

Simply make your item backpack open the backpack chest gui using onItemRightClick method.

 

I've not looked into how chest work so I couldn't help you but thats what i would do if i was making a backpack :)

Posted
But is that able to be turned into an item instead of a block?

 

behind the gui is the container with the player inventory and your special inventory (chest, backpack, saddlebags, whatever). The container doesn't know if it's been opened by an item or a block (or even a mob). The item/block/mob has to open the container GUI when triggered (right-click, shift-click, whatever). The GUI will load the container, the container will load the inventories and the inventories will load and store the contained items by means of the readFromNBT and writeToNBT methods ...

running minecraft on Mac OS X - Sierra --- creating code since 1986 ... --- मेरा दिल भारतवासी है!

width=289 height=100http://www.arno-saxena.de/pictures/chococraft/banner_signature.png[/img]

Posted

ive looked at it, and it still makes no sence i also looked at the forge tutorial and that made no sence. part of my confusion with it comes from the "func" methods as they do not give a clue as to what they do.

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.