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

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.

you'll find *everything* you need in net.minecraft.inventory.ContainerChest ...

 

(this would also be your sample code with place holders you'll have to exchange for your own settings ...)

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]

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 :)

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]

  • Author

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

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.