Topic category: Help with Minecraft modding (Java Edition)
import net.minecraft.block.Blocks;
this.customSlots.put(0, this.addSlot(new SlotItemHandler(internal, 0, 34, 30) {
@Override
public boolean isItemValid(ItemStack stack) {
boolean blockCriteria = true;
if (new ItemStack(Blocks.SHULKER_BOX, (int) (1)).getItem() == stack.getItem()){
blockCriteria = false;}
if (new ItemStack(Blocks.WHITE_SHULKER_BOX, (int) (1)).getItem() == stack.getItem()){
blockCriteria = false;}
if (new ItemStack(Blocks.ORANGE_SHULKER_BOX, (int) (1)).getItem() == stack.getItem()){
blockCriteria = false;}
if (new ItemStack(Blocks.MAGENTA_SHULKER_BOX, (int) (1)).getItem() == stack.getItem()){
blockCriteria = false;}
if (new ItemStack(Blocks.LIGHT_BLUE_SHULKER_BOX, (int) (1)).getItem() == stack.getItem()){
blockCriteria = false;}
if (new ItemStack(Blocks.YELLOW_SHULKER_BOX, (int) (1)).getItem() == stack.getItem()){
blockCriteria = false;}
if (new ItemStack(Blocks.LIME_SHULKER_BOX, (int) (1)).getItem() == stack.getItem()){
blockCriteria = false;}
if (new ItemStack(Blocks.PINK_SHULKER_BOX, (int) (1)).getItem() == stack.getItem()){
blockCriteria = false;}
if (new ItemStack(Blocks.GRAY_SHULKER_BOX, (int) (1)).getItem() == stack.getItem()){
blockCriteria = false;}
if (new ItemStack(Blocks.LIGHT_GRAY_SHULKER_BOX, (int) (1)).getItem() == stack.getItem()){
blockCriteria = false;}
if (new ItemStack(Blocks.CYAN_SHULKER_BOX, (int) (1)).getItem() == stack.getItem()){
blockCriteria = false;}
if (new ItemStack(Blocks.PURPLE_SHULKER_BOX, (int) (1)).getItem() == stack.getItem()){
blockCriteria = false;}
if (new ItemStack(Blocks.BLUE_SHULKER_BOX, (int) (1)).getItem() == stack.getItem()){
blockCriteria = false;}
if (new ItemStack(Blocks.BROWN_SHULKER_BOX, (int) (1)).getItem() == stack.getItem()){
blockCriteria = false;}
if (new ItemStack(Blocks.GREEN_SHULKER_BOX, (int) (1)).getItem() == stack.getItem()){
blockCriteria = false;}
if (new ItemStack(Blocks.RED_SHULKER_BOX, (int) (1)).getItem() == stack.getItem()){
blockCriteria = false;}
if (new ItemStack(Blocks.BLACK_SHULKER_BOX, (int) (1)).getItem() == stack.getItem()){
blockCriteria = false;}
return blockCriteria;
}
cool :D