Nauktis Posted May 12, 2015 Share Posted May 12, 2015 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 Quote Link to comment Share on other sites More sharing options...
Nauktis Posted May 12, 2015 Author Share Posted May 12, 2015 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. Quote Link to comment Share on other sites More sharing options...
Nauktis Posted May 12, 2015 Author Share Posted May 12, 2015 Haha! Good to know Works like a charm btw! Thanks a lot for your help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.