Posted May 24, 20187 yr Can I make the ItemStackHandler only insert items into a slot if they are valid for the slot? Edited May 24, 20187 yr by deerangle
May 24, 20187 yr If the item isn't allowed, return the input stack unaltered. https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/entities/capabilities/SiftableItemsHandler.java#L14-L17 Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
May 24, 20187 yr Author I know, but how can i even test if it would be valid? I dont have access to the slots themselves from my custom ItemStackHandler.
May 24, 20187 yr Author I solved it with a simple workaround that requires me to manually configure it for every tileentity. Thanks anyways. If anyone has an answer to the actual question, feel free to answer!
May 24, 20187 yr You should not be using the slot to check validity, you should have some ability outside of the inventory and slot classes to check validity. The reason the slot class has an isValid check is so that the client cannot click a stack into the slot and can make that determination without requesting any information from the server. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
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.