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

When an item is shift clicked from from a chest, it is organized into your inventory.

 

I.e. Shift clicking on 64 oak within a separate inventory will fill oak stacks in your inventory first, before adding new ones.

 

Is there a way to call that method, that transfers the stacks, from the event "PlayerOpenContainerEvent"?  Or will I have to write my own code?

 

Thanks!

The methods are reserved for containers and are fired when you actually shift-click stuff. It basically is written separately for each possible container to respect all slots of all inventories displayed in given container (one container can display many inventories - e.g: player's, chest's, crafting grid's, on and on...).

 

You can't just call those methods. They kinda work like this: "Oh, you shift clicked stack in some inventory at some index." -> "Lemme transfer that stack to the other inventory for you." -> *Iterates through other inventory* -> *Fills-up non-full stacks of same type* -> *Is something is left, places it in 1st possible slot - respecting design*.

 

Those methods are always written (for specific stack) to do transfering (from inv to inv), if you would want to sort all stacks so that you will get nicely stacked (sorted) ItemStacks in one inventory - that would look totally differently. So yeah - you need to write your method.

1.7.10 is no longer supported by forge, you are on your own.

You could take a look at how InventoryTweaks does it.

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.