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

Hi,

 

I an trying to limit what can be inserted in an inventory.

The kind of limitation I need is:

  • "No more than 10 item Items.apple at any given time."
  • "No more than 8 item Items.arrow at any given time."

(all Items.apple do not need to be in the same slot)

 

I am not looking for getInventoryStackLimit() as it will depend on the kind of item.

I need the limitation to be applicable for GUI interactions but also machines inserting (hoppers and whatnot).

 

I am currently using a IInventory as sides do not matter but it seems ISidedInventory allows for more control.

Worst case scenario, I disallow interactions from machines and use the Slot to have more fine grained control.

 

What do you think?

 

Thanks a lot beforehand for your help ;)

  • Author

Alright, I'll try it this way then.

 

I didn't try before because the Javadoc is saying:

/**
* Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.
*/

 

Any idea why "(ignoring stack size)"?

It is usually used to limit the kind of item you can put in.

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.