public static void hideNEIItems() { for (String entry : SI.CONFIG.hideitemsfromnei) { Object is = SI.REGISTRY.stringToItemStack(entry); if (is instanceof ItemStack) { API.hideItem((ItemStack) is); } } }
@Override public void loadConfig() { ModUtil.LOGGER.info("Initializing Not Enough Items Plugin..."); API.registerGuiOverlay(GuiCrafter.class, "crafting"); API.registerGuiOverlayHandler(GuiCrafter.class, new DefaultOverlayHandler(), "crafting"); NEICrusherRecipe crusherRecipe = new NEICrusherRecipe(); API.registerRecipeHandler(crusherRecipe); API.registerUsageHandler(crusherRecipe); NEICrusherRecipe.Double crusherDoubleRecipe = new NEICrusherRecipe.Double(); API.registerRecipeHandler(crusherDoubleRecipe); API.registerUsageHandler(crusherDoubleRecipe); NEIFurnaceDoubleRecipe furnaceDoubleRecipe = new NEIFurnaceDoubleRecipe(); API.registerRecipeHandler(furnaceDoubleRecipe); API.registerUsageHandler(furnaceDoubleRecipe); NEIHairyBallRecipe ballRecipe = new NEIHairyBallRecipe(); API.registerRecipeHandler(ballRecipe); API.registerUsageHandler(ballRecipe); NEITreasureChestRecipe treasureChestRecipe = new NEITreasureChestRecipe(); API.registerRecipeHandler(treasureChestRecipe); API.registerUsageHandler(treasureChestRecipe); NEICompostRecipe compostRecipe = new NEICompostRecipe(); API.registerRecipeHandler(compostRecipe); API.registerUsageHandler(compostRecipe); NEICoffeeMachineRecipe coffeeMachineRecipe = new NEICoffeeMachineRecipe(); API.registerRecipeHandler(coffeeMachineRecipe); API.registerUsageHandler(coffeeMachineRecipe); NEIReconstructorRecipe reconstructorRecipe = new NEIReconstructorRecipe(); API.registerRecipeHandler(reconstructorRecipe); API.registerUsageHandler(reconstructorRecipe); NEIBookletRecipe bookletRecipe = new NEIBookletRecipe(); API.registerRecipeHandler(bookletRecipe); API.registerUsageHandler(bookletRecipe); API.hideItem(new ItemStack(InitBlocks.blockRice)); API.hideItem(new ItemStack(InitBlocks.blockCanola)); API.hideItem(new ItemStack(InitBlocks.blockFlax)); API.hideItem(new ItemStack(InitBlocks.blockCoffee)); API.hideItem(new ItemStack(InitBlocks.blockWildPlant, 1, Util.WILDCARD)); API.hideItem(new ItemStack(InitBlocks.blockColoredLampOn, 1, Util.WILDCARD)); }
@Override public void loadConfig() { API.registerGuiOverlay(GuiPetrifiedWorkbench.class, "crafting"); API.registerGuiOverlayHandler( GuiPetrifiedWorkbench.class, new DefaultOverlayHandler(), "crafting"); API.registerRecipeHandler(new OfferingAltarNEIHandler()); API.registerUsageHandler(new OfferingAltarNEIHandler()); API.registerRecipeHandler(new SmoothieMakerNEIHandler()); API.registerUsageHandler(new SmoothieMakerNEIHandler()); API.hideItem(new ItemStack(ModBlocks.portal)); API.hideItem(new ItemStack(ModBlocks.blockTurnip)); API.hideItem(new ItemStack(ModBlocks.insectRepellent)); API.hideItem(new ItemStack(ModBlocks.flowerPlanted, 1, OreDictionary.WILDCARD_VALUE)); API.hideItem(new ItemStack(ModBlocks.honeyBlock)); API.hideItem(new ItemStack(ModBlocks.bambooShoot)); API.hideItem(new ItemStack(ModBlocks.slidingBlockPuzzle)); API.hideItem(new ItemStack(ModBlocks.completedPuzzle)); API.hideItem(new ItemStack(ModBlocks.anthillBlock)); API.hideItem(new ItemStack(ModBlocks.anthillStairs)); API.hideItem(new ItemStack(ModBlocks.soldierAntTrap)); API.hideItem(new ItemStack(ModBlocks.puffShroom)); API.hideItem(new ItemStack(ModBlocks.forceLock)); API.hideItem(ItemMaterials.DATA.FORCE_KEY.makeStack()); if (!OreType.ALUMINIUM.isEnabled()) { API.hideItem(new ItemStack(ModBlocks.oreAluminium)); API.hideItem(ItemMaterials.DATA.INGOT_ALUMINIUM.makeStack()); } if (!OreType.COPPER.isEnabled()) { API.hideItem(new ItemStack(ModBlocks.oreCopper)); API.hideItem(ItemMaterials.DATA.INGOT_COPPER.makeStack()); } if (!OreType.LEAD.isEnabled()) { API.hideItem(new ItemStack(ModBlocks.oreLead)); API.hideItem(ItemMaterials.DATA.INGOT_LEAD.makeStack()); } if (!OreType.SILVER.isEnabled()) { API.hideItem(new ItemStack(ModBlocks.oreSilver)); API.hideItem(ItemMaterials.DATA.INGOT_SILVER.makeStack()); } if (!OreType.TIN.isEnabled()) { API.hideItem(new ItemStack(ModBlocks.oreTin)); API.hideItem(ItemMaterials.DATA.INGOT_TIN.makeStack()); } API.hideItem(new ItemStack(ModBlocks.hanger)); API.hideItem(new ItemStack(ModBlocks.glowshroomStalkMain)); API.hideItem(new ItemStack(ModBlocks.glowshroomStalkDown1)); API.hideItem(new ItemStack(ModBlocks.glowshroomStalkDown2)); API.hideItem(new ItemStack(ModBlocks.glowshroomStalkDown3)); API.hideItem(new ItemStack(ModBlocks.glowshroomStalkN1)); API.hideItem(new ItemStack(ModBlocks.glowshroomStalkS1)); API.hideItem(new ItemStack(ModBlocks.glowshroomStalkNS2)); API.hideItem(new ItemStack(ModBlocks.glowshroomStalkW1)); API.hideItem(new ItemStack(ModBlocks.glowshroomStalkE1)); API.hideItem(new ItemStack(ModBlocks.glowshroomStalkWE2)); API.hideItem(new ItemStack(ModBlocks.glowshroomStalkN3)); API.hideItem(new ItemStack(ModBlocks.glowshroomStalkS3)); API.hideItem(new ItemStack(ModBlocks.glowshroomStalkW3)); API.hideItem(new ItemStack(ModBlocks.glowshroomStalkE3)); for (Block block : ModBlocks.BLOCKS) if (block instanceof BlockDoorErebus) API.hideItem(new ItemStack(block)); }
@Override public void hideNEIItems() { String mod = "NotEnoughItems"; if (Loader.isModLoaded(mod) && TFCCrafting.enableNEIHiding) { codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.Bloom)); codechicken.nei.api.API.hideItem(new ItemStack(TFCItems.writabeBookTFC)); // Book codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.Charcoal)); codechicken.nei.api.API.hideItem(new ItemStack(TFCItems.Coke)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.Crops)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.Detailed)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.worldItem)); // Debris for (Block door : TFCBlocks.Doors) { codechicken.nei.api.API.hideItem(new ItemStack(door)); } codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.Firepit)); codechicken.nei.api.API.hideItem( new ItemStack(TFCItems.FlatClay, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem(new ItemStack(TFCItems.FlatLeather)); codechicken.nei.api.API.hideItem( new ItemStack(TFCItems.FlatRock, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.FoodPrep)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.Forge)); codechicken.nei.api.API.hideItem( new ItemStack(TFCBlocks.fruitTreeLeaves, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(TFCBlocks.fruitTreeLeaves2, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(TFCBlocks.fruitTreeWood, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem(new ItemStack(TFCItems.Hemp)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.IngotPile)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.LeatherRack)); codechicken.nei.api.API.hideItem( new ItemStack(TFCBlocks.Leaves, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(TFCBlocks.Leaves2, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(TFCBlocks.LogNatural, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(TFCBlocks.LogNatural2, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.LogPile)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.WoodConstruct)); // Lumber Block codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.MetalSheet)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.Molten)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.Moss)); codechicken.nei.api.API.hideItem( new ItemStack(TFCItems.MudBrick, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.Ore)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.Ore2)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.Ore3)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.Pottery)); codechicken.nei.api.API.hideItem( new ItemStack(TFCItems.PotteryPot, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.Reeds)); codechicken.nei.api.API.hideItem( new ItemStack(TFCItems.Salad, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(TFCItems.Sandwich, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.Sluice)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.Smoke)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.SmokeRack)); codechicken.nei.api.API.hideItem( new ItemStack(TFCItems.Soup, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.stoneSlabs)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.stoneStairs)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.stoneStalac)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.StrawHideBed)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.Sulfur)); codechicken.nei.api.API.hideItem(new ItemStack(TFCBlocks.WaterPlant)); codechicken.nei.api.API.hideItem( new ItemStack(TFCBlocks.WoodHoriz, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(TFCBlocks.WoodHoriz2, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(TFCBlocks.WoodHoriz3, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(TFCBlocks.WoodHoriz4, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(TFCBlocks.WoodSupportH, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(TFCBlocks.WoodSupportH2, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(TFCBlocks.WoodVert, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(TFCBlocks.WoodVert2, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem(new ItemStack(TFCItems.WintergreenLeaf)); codechicken.nei.api.API.hideItem(new ItemStack(TFCItems.BlueberryLeaf)); codechicken.nei.api.API.hideItem(new ItemStack(TFCItems.RaspberryLeaf)); codechicken.nei.api.API.hideItem(new ItemStack(TFCItems.StrawberryLeaf)); codechicken.nei.api.API.hideItem(new ItemStack(TFCItems.BlackberryLeaf)); codechicken.nei.api.API.hideItem(new ItemStack(TFCItems.BunchberryLeaf)); codechicken.nei.api.API.hideItem(new ItemStack(TFCItems.CranberryLeaf)); codechicken.nei.api.API.hideItem(new ItemStack(TFCItems.SnowberryLeaf)); codechicken.nei.api.API.hideItem(new ItemStack(TFCItems.ElderberryLeaf)); codechicken.nei.api.API.hideItem(new ItemStack(TFCItems.GooseberryLeaf)); codechicken.nei.api.API.hideItem(new ItemStack(TFCItems.CloudberryLeaf)); // Vanilla Blocks & Items codechicken.nei.api.API.hideItem( new ItemStack(Blocks.double_wooden_slab, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.wooden_slab, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.oak_stairs, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.acacia_stairs, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.dark_oak_stairs, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.spruce_stairs, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.birch_stairs, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.jungle_stairs, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.waterlily, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.tallgrass, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.yellow_flower, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.red_flower, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.brown_mushroom, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.red_mushroom, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.bookshelf, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.torch, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.chest, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.planks, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.crafting_table, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.cactus, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.reeds, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.pumpkin, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.lit_pumpkin, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem( new ItemStack(Blocks.wooden_button, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem(new ItemStack(Blocks.ice, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem(new ItemStack(Blocks.vine, 1, OreDictionary.WILDCARD_VALUE)); codechicken.nei.api.API.hideItem(new ItemStack(Items.reeds, 1, OreDictionary.WILDCARD_VALUE)); } }