Search in sources :

Example 1 with PositionedItemStack

use of blusunrize.lib.manual.ManualPages.PositionedItemStack in project ImmersiveEngineering by BluSunrize.

the class ClientProxy method postInit.

@Override
public void postInit() {
    ManualHelper.ieManualInstance = new IEManualInstance();
    //		int subVersion = 0;
    //		while(!(ManualHelper.ieManualInstance.formatEntryName("updateNews_"+subVersion).equals("ie.manual.entry.updateNews_"+subVersion+".name")))
    //		{
    //			ArrayList<IManualPage> pages = new ArrayList<IManualPage>();
    //			int i=0;
    //			String key;
    //			while(!ManualHelper.ieManualInstance.formatText(key = "updateNews_"+subVersion+""+i).equals(key) && i<5)
    //			{
    //				pages.add(new ManualPages.Text(ManualHelper.getManual(), key));
    //				i++;
    //			}
    //			ManualHelper.addEntry("updateNews_"+subVersion, ManualHelper.CAT_UPDATE, pages.toArray(new IManualPage[pages.size()]));
    //			subVersion++;
    //		}
    List<ItemStack> tempItemList;
    List<PositionedItemStack[]> tempRecipeList;
    List<IManualPage> pages;
    addChangelogToManual();
    ManualHelper.addEntry("introduction", ManualHelper.CAT_GENERAL, new ManualPages.Text(ManualHelper.getManual(), "introduction0"), new ManualPages.Text(ManualHelper.getManual(), "introduction1"), new ManualPages.Crafting(ManualHelper.getManual(), "introductionHammer", new ItemStack(IEContent.itemTool, 1, 0)));
    ManualHelper.addEntry("ores", ManualHelper.CAT_GENERAL, new ManualPages.ItemDisplay(ManualHelper.getManual(), "oresCopper", new ItemStack(IEContent.blockOre, 1, 0), new ItemStack(IEContent.itemMetal, 1, 0)), new ManualPages.ItemDisplay(ManualHelper.getManual(), "oresBauxite", new ItemStack(IEContent.blockOre, 1, 1), new ItemStack(IEContent.itemMetal, 1, 1)), new ManualPages.ItemDisplay(ManualHelper.getManual(), "oresLead", new ItemStack(IEContent.blockOre, 1, 2), new ItemStack(IEContent.itemMetal, 1, 2)), new ManualPages.ItemDisplay(ManualHelper.getManual(), "oresSilver", new ItemStack(IEContent.blockOre, 1, 3), new ItemStack(IEContent.itemMetal, 1, 3)), new ManualPages.ItemDisplay(ManualHelper.getManual(), "oresNickel", new ItemStack(IEContent.blockOre, 1, 4), new ItemStack(IEContent.itemMetal, 1, 4)), new ManualPages.ItemDisplay(ManualHelper.getManual(), "oresUranium", new ItemStack(IEContent.blockOre, 1, 5), new ItemStack(IEContent.itemMetal, 1, 5)));
    tempRecipeList = new ArrayList();
    if (!IERecipes.hammerCrushingList.isEmpty()) {
        for (String ore : IERecipes.hammerCrushingList) tempRecipeList.add(new PositionedItemStack[] { new PositionedItemStack(OreDictionary.getOres("ore" + ore), 24, 0), new PositionedItemStack(new ItemStack(IEContent.itemTool, 1, 0), 42, 0), new PositionedItemStack(IEApi.getPreferredOreStack("dust" + ore), 78, 0) });
        if (!tempRecipeList.isEmpty())
            ManualHelper.addEntry("oreProcessing", ManualHelper.CAT_GENERAL, new ManualPages.CraftingMulti(ManualHelper.getManual(), "oreProcessing0", (Object[]) tempRecipeList.toArray(new PositionedItemStack[tempRecipeList.size()][3])));
    }
    ManualHelper.addEntry("alloys", ManualHelper.CAT_GENERAL, new ManualPages.CraftingMulti(ManualHelper.getManual(), "alloys0", (Object[]) new PositionedItemStack[][] { new PositionedItemStack[] { new PositionedItemStack(OreDictionary.getOres("dustCopper"), 24, 0), new PositionedItemStack(OreDictionary.getOres("dustNickel"), 42, 0), new PositionedItemStack(new ItemStack(IEContent.itemMetal, 2, 15), 78, 0) }, new PositionedItemStack[] { new PositionedItemStack(OreDictionary.getOres("dustGold"), 24, 0), new PositionedItemStack(OreDictionary.getOres("dustSilver"), 42, 0), new PositionedItemStack(new ItemStack(IEContent.itemMetal, 2, 16), 78, 0) } }));
    ManualHelper.addEntry("plates", ManualHelper.CAT_GENERAL, new ManualPages.CraftingMulti(ManualHelper.getManual(), "plates0", (Object[]) new PositionedItemStack[][] { new PositionedItemStack[] { new PositionedItemStack(OreDictionary.getOres("ingotIron"), 24, 0), new PositionedItemStack(new ItemStack(IEContent.itemTool, 1, 0), 42, 0), new PositionedItemStack(new ItemStack(IEContent.itemMetal, 1, 39), 78, 0) }, new PositionedItemStack[] { new PositionedItemStack(OreDictionary.getOres("ingotAluminum"), 24, 0), new PositionedItemStack(new ItemStack(IEContent.itemTool, 1, 0), 42, 0), new PositionedItemStack(new ItemStack(IEContent.itemMetal, 1, 31), 78, 0) }, new PositionedItemStack[] { new PositionedItemStack(OreDictionary.getOres("ingotLead"), 24, 0), new PositionedItemStack(new ItemStack(IEContent.itemTool, 1, 0), 42, 0), new PositionedItemStack(new ItemStack(IEContent.itemMetal, 1, 32), 78, 0) }, new PositionedItemStack[] { new PositionedItemStack(OreDictionary.getOres("ingotConstantan"), 24, 0), new PositionedItemStack(new ItemStack(IEContent.itemTool, 1, 0), 42, 0), new PositionedItemStack(new ItemStack(IEContent.itemMetal, 1, 36), 78, 0) }, new PositionedItemStack[] { new PositionedItemStack(OreDictionary.getOres("ingotSteel"), 24, 0), new PositionedItemStack(new ItemStack(IEContent.itemTool, 1, 0), 42, 0), new PositionedItemStack(new ItemStack(IEContent.itemMetal, 1, 38), 78, 0) } }));
    ManualHelper.addEntry("hemp", ManualHelper.CAT_GENERAL, new ManualPages.ItemDisplay(ManualHelper.getManual(), "hemp0", new ItemStack(IEContent.blockCrop, 1, 5), new ItemStack(IEContent.itemSeeds)), new ManualPages.Crafting(ManualHelper.getManual(), "hemp1", new ItemStack(IEContent.itemMaterial, 1, 5)), new ManualPages.Crafting(ManualHelper.getManual(), "hemp2", new ItemStack(IEContent.blockClothDevice, 1, BlockTypes_ClothDevice.CUSHION.getMeta())), new ManualPages.Crafting(ManualHelper.getManual(), "hemp3", new ItemStack(IEContent.blockClothDevice, 1, BlockTypes_ClothDevice.STRIPCURTAIN.getMeta())));
    ManualHelper.addEntry("cokeoven", ManualHelper.CAT_GENERAL, new ManualPages.Text(ManualHelper.getManual(), "cokeoven0"), new ManualPages.Crafting(ManualHelper.getManual(), "cokeovenBlock", new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.COKEBRICK.getMeta())), new ManualPageMultiblock(ManualHelper.getManual(), "", MultiblockCokeOven.instance));
    ManualHelper.addEntry("blastfurnace", ManualHelper.CAT_GENERAL, new ManualPages.Text(ManualHelper.getManual(), "blastfurnace0"), new ManualPages.Crafting(ManualHelper.getManual(), "blastfurnaceBlock", new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.BLASTBRICK.getMeta())), new ManualPageMultiblock(ManualHelper.getManual(), "blastfurnace1", MultiblockBlastFurnace.instance));
    handleMineralManual();
    ManualHelper.addEntry("graphite", ManualHelper.CAT_GENERAL, new ManualPages.Text(ManualHelper.getManual(), "graphite0"), new ManualPages.Crafting(ManualHelper.getManual(), "graphite1", ItemEngineersBlueprint.getTypedBlueprint("electrode")));
    ManualHelper.addEntry("shader", ManualHelper.CAT_GENERAL, new ManualPages.Text(ManualHelper.getManual(), "shader0"), new ManualPages.Text(ManualHelper.getManual(), "shader1"), new ManualPages.ItemDisplay(ManualHelper.getManual(), "shader2"), new ManualPages.CraftingMulti(ManualHelper.getManual(), "shader2"));
    ShaderRegistry.manualEntry = ManualHelper.getManual().getEntry("shader");
    pages = new ArrayList<IManualPage>();
    for (ShaderRegistry.ShaderRegistryEntry entry : ShaderRegistry.shaderRegistry.values()) pages.add(new ManualPageShader(ManualHelper.getManual(), entry));
    ManualHelper.addEntry("shaderList", ManualHelper.CAT_GENERAL, pages.toArray(new IManualPage[pages.size()]));
    ManualHelper.addEntry("treatedwood", ManualHelper.CAT_CONSTRUCTION, new ManualPages.Crafting(ManualHelper.getManual(), "treatedwood0", new ItemStack(IEContent.blockTreatedWood, 1, 0)), new ManualPages.Crafting(ManualHelper.getManual(), "", new ItemStack(IEContent.blockTreatedWood, 1, 1), new ItemStack(IEContent.blockTreatedWood, 1, 2), new ItemStack(IEContent.blockTreatedWoodSlabs, 1, OreDictionary.WILDCARD_VALUE)), new ManualPages.Crafting(ManualHelper.getManual(), "", new ItemStack(IEContent.blockWoodenStair)), new ManualPages.Crafting(ManualHelper.getManual(), "", new ItemStack(IEContent.itemMaterial, 1, 0), new ItemStack(IEContent.blockWoodenDecoration, 1, BlockTypes_WoodenDecoration.FENCE.getMeta()), new ItemStack(IEContent.blockWoodenDecoration, 1, BlockTypes_WoodenDecoration.SCAFFOLDING.getMeta())), new ManualPages.Crafting(ManualHelper.getManual(), "treatedwoodPost0", new ItemStack(IEContent.blockWoodenDevice1, 1, BlockTypes_WoodenDevice1.POST.getMeta())), new ManualPages.Text(ManualHelper.getManual(), "treatedwoodPost1"));
    ItemStack[] storageBlocks = new ItemStack[BlockTypes_MetalsIE.values().length];
    ItemStack[] storageSlabs = new ItemStack[BlockTypes_MetalsIE.values().length];
    for (int i = 0; i < BlockTypes_MetalsIE.values().length; i++) {
        storageBlocks[i] = new ItemStack(IEContent.blockStorage, 1, i);
        storageSlabs[i] = new ItemStack(IEContent.blockStorageSlabs, 1, i);
    }
    tempItemList = new ArrayList();
    for (int i = 0; i < BlockTypes_MetalsAll.values().length; i++) if (!IEContent.blockSheetmetal.isMetaHidden(i))
        tempItemList.add(new ItemStack(IEContent.blockSheetmetal, 1, i));
    ItemStack[] sheetmetal = tempItemList.toArray(new ItemStack[tempItemList.size()]);
    ManualHelper.addEntry("crate", ManualHelper.CAT_CONSTRUCTION, new ManualPages.Crafting(ManualHelper.getManual(), "crate0", new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.CRATE.getMeta())), new ManualPages.Crafting(ManualHelper.getManual(), "crate1", new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.REINFORCED_CRATE.getMeta())));
    ManualHelper.addEntry("barrel", ManualHelper.CAT_CONSTRUCTION, new ManualPages.Crafting(ManualHelper.getManual(), "barrel0", new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.BARREL.getMeta())));
    ManualHelper.addEntry("concrete", ManualHelper.CAT_CONSTRUCTION, new ManualPages.Crafting(ManualHelper.getManual(), "concrete0", new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.CONCRETE.getMeta())), new ManualPages.Crafting(ManualHelper.getManual(), "", new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.CONCRETE_TILE.getMeta()), new ItemStack(IEContent.blockStoneStair_concrete0, 1, 0), new ItemStack(IEContent.blockStoneStair_concrete1, 1, 0)));
    ManualHelper.addEntry("balloon", ManualHelper.CAT_CONSTRUCTION, new ManualPages.Crafting(ManualHelper.getManual(), "balloon0", new ItemStack(IEContent.blockClothDevice, 1, BlockTypes_ClothDevice.BALLOON.getMeta())), new ManualPages.Text(ManualHelper.getManual(), "balloon1"));
    ManualHelper.addEntry("metalconstruction", ManualHelper.CAT_CONSTRUCTION, new ManualPages.Text(ManualHelper.getManual(), "metalconstruction0"), new ManualPages.Crafting(ManualHelper.getManual(), "", storageBlocks, storageSlabs, sheetmetal), new ManualPages.Text(ManualHelper.getManual(), "metalconstruction1"), new ManualPages.Crafting(ManualHelper.getManual(), "", new ItemStack(IEContent.blockMetalDecoration1, 1, BlockTypes_MetalDecoration1.STEEL_FENCE.getMeta()), new ItemStack(IEContent.blockMetalDecoration1, 1, BlockTypes_MetalDecoration1.STEEL_SCAFFOLDING_0.getMeta())), new ManualPages.Crafting(ManualHelper.getManual(), "", new ItemStack(IEContent.blockMetalDecoration2, 1, BlockTypes_MetalDecoration2.STEEL_WALLMOUNT.getMeta()), new ItemStack(IEContent.blockMetalDecoration2, 1, BlockTypes_MetalDecoration2.STEEL_POST.getMeta())), new ManualPages.Crafting(ManualHelper.getManual(), "", new ItemStack(IEContent.blockMetalDecoration1, 1, BlockTypes_MetalDecoration1.ALUMINUM_FENCE.getMeta()), new ItemStack(IEContent.blockMetalDecoration1, 1, BlockTypes_MetalDecoration1.ALUMINUM_SCAFFOLDING_0.getMeta())), new ManualPages.Crafting(ManualHelper.getManual(), "", new ItemStack(IEContent.blockMetalDecoration2, 1, BlockTypes_MetalDecoration2.ALUMINUM_WALLMOUNT.getMeta()), new ItemStack(IEContent.blockMetalDecoration2, 1, BlockTypes_MetalDecoration2.ALUMINUM_POST.getMeta())), new ManualPages.Crafting(ManualHelper.getManual(), "metalconstruction2", new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.CONNECTOR_STRUCTURAL.getMeta())), new ManualPages.Crafting(ManualHelper.getManual(), "", new ItemStack(IEContent.itemWireCoil, 1, 3), new ItemStack(IEContent.itemWireCoil, 1, 4)));
    ManualHelper.addEntry("multiblocks", ManualHelper.CAT_CONSTRUCTION, new ManualPages.Text(ManualHelper.getManual(), "multiblocks0"), new ManualPages.Crafting(ManualHelper.getManual(), "", new ItemStack(IEContent.blockMetalDecoration0, 1, BlockTypes_MetalDecoration0.RS_ENGINEERING.getMeta()), new ItemStack(IEContent.blockMetalDecoration0, 1, BlockTypes_MetalDecoration0.LIGHT_ENGINEERING.getMeta())), new ManualPages.Crafting(ManualHelper.getManual(), "", new ItemStack(IEContent.blockMetalDecoration0, 1, BlockTypes_MetalDecoration0.HEAVY_ENGINEERING.getMeta()), new ItemStack(IEContent.blockMetalDecoration0, 1, BlockTypes_MetalDecoration0.GENERATOR.getMeta())), new ManualPages.Crafting(ManualHelper.getManual(), "", new ItemStack(IEContent.blockMetalDecoration0, 1, BlockTypes_MetalDecoration0.RADIATOR.getMeta())));
    ManualHelper.addEntry("metalbarrel", ManualHelper.CAT_CONSTRUCTION, new ManualPages.Crafting(ManualHelper.getManual(), "metalbarrel0", new ItemStack(IEContent.blockMetalDevice0, 1, BlockTypes_MetalDevice0.BARREL.getMeta())));
    ManualHelper.addEntry("workbench", ManualHelper.CAT_CONSTRUCTION, new ManualPages.Crafting(ManualHelper.getManual(), "workbench0", new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.WORKBENCH.getMeta())));
    ManualHelper.addEntry("blueprints", ManualHelper.CAT_CONSTRUCTION, new ManualPages.Text(ManualHelper.getManual(), "blueprints0"), new ManualPages.Text(ManualHelper.getManual(), "blueprints1"));
    ManualHelper.addEntry("lighting", ManualHelper.CAT_CONSTRUCTION, new ManualPages.Crafting(ManualHelper.getManual(), "lighting0", new ItemStack(IEContent.blockMetalDecoration2, 1, BlockTypes_MetalDecoration2.LANTERN.getMeta())), new ManualPages.Crafting(ManualHelper.getManual(), "lighting1", new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.ELECTRIC_LANTERN.getMeta())), new ManualPages.Text(ManualHelper.getManual(), "lighting2"), new ManualPages.Crafting(ManualHelper.getManual(), "lighting3", new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.FLOODLIGHT.getMeta())), new ManualPages.Text(ManualHelper.getManual(), "lighting4"));
    ManualHelper.addEntry("tank", ManualHelper.CAT_CONSTRUCTION, new ManualPageMultiblock(ManualHelper.getManual(), "tank0", MultiblockSheetmetalTank.instance), new ManualPages.Text(ManualHelper.getManual(), "tank1"));
    ManualHelper.addEntry("silo", ManualHelper.CAT_CONSTRUCTION, new ManualPageMultiblock(ManualHelper.getManual(), "silo0", MultiblockSilo.instance), new ManualPages.Text(ManualHelper.getManual(), "silo1"), new ManualPages.Text(ManualHelper.getManual(), "silo2"));
    Object[] wires = { new ItemStack(IEContent.itemMaterial, 1, 20), new ItemStack(IEContent.itemWireCoil, 1, 0), new ItemStack(IEContent.itemMaterial, 1, 21), new ItemStack(IEContent.itemWireCoil, 1, 1), new ItemStack(IEContent.itemMaterial, 1, 22), new ItemStack(IEContent.itemMaterial, 1, 23), new ItemStack(IEContent.itemWireCoil, 1, 2) };
    ManualHelper.addEntry("wiring", ManualHelper.CAT_ENERGY, new ManualPages.Text(ManualHelper.getManual(), "wiring0"), new ManualPages.CraftingMulti(ManualHelper.getManual(), "wiring1", wires), new ManualPages.Image(ManualHelper.getManual(), "wiring2", "immersiveengineering:textures/misc/wiring.png;0;0;110;40", "immersiveengineering:textures/misc/wiring.png;0;40;110;30"), new ManualPages.Image(ManualHelper.getManual(), "wiring3", "immersiveengineering:textures/misc/wiring.png;0;70;110;60", "immersiveengineering:textures/misc/wiring.png;0;130;110;60"), new ManualPages.Text(ManualHelper.getManual(), "wiring4"), new ManualPages.Text(ManualHelper.getManual(), "wiring5"), new ManualPages.CraftingMulti(ManualHelper.getManual(), "wiringConnector", new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.CONNECTOR_LV.getMeta()), new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.RELAY_LV.getMeta()), new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.CONNECTOR_MV.getMeta()), new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.RELAY_HV.getMeta()), new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.CONNECTOR_HV.getMeta()), new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.RELAY_HV.getMeta())), new ManualPages.CraftingMulti(ManualHelper.getManual(), "wiringCapacitor", new ItemStack(IEContent.blockMetalDevice0, 1, BlockTypes_MetalDevice0.CAPACITOR_LV.getMeta()), new ItemStack(IEContent.blockMetalDevice0, 1, BlockTypes_MetalDevice0.CAPACITOR_MV.getMeta()), new ItemStack(IEContent.blockMetalDevice0, 1, BlockTypes_MetalDevice0.CAPACITOR_HV.getMeta())), new ManualPages.CraftingMulti(ManualHelper.getManual(), "wiringTransformer0", new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.TRANSFORMER.getMeta()), new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.TRANSFORMER_HV.getMeta())), new ManualPages.Text(ManualHelper.getManual(), "wiringTransformer1"), new ManualPages.Crafting(ManualHelper.getManual(), "wiringCutters", new ItemStack(IEContent.itemTool, 1, 1)), new ManualPages.Crafting(ManualHelper.getManual(), "wiringVoltmeter", new ItemStack(IEContent.itemTool, 1, 2)));
    ManualHelper.getManual().addEntry("generator", ManualHelper.CAT_ENERGY, new ManualPages.Crafting(ManualHelper.getManual(), "generator0", new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.DYNAMO.getMeta())), new ManualPages.CraftingMulti(ManualHelper.getManual(), "generatorWindmill", new ItemStack(IEContent.blockWoodenDevice1, 1, BlockTypes_WoodenDevice1.WINDMILL.getMeta()), new ItemStack(IEContent.itemMaterial, 1, 2)), new ManualPages.CraftingMulti(ManualHelper.getManual(), "generatorWatermill", new ItemStack(IEContent.blockWoodenDevice1, 1, BlockTypes_WoodenDevice1.WATERMILL.getMeta()), new ItemStack(IEContent.itemMaterial, 1, 1)), new ManualPages.CraftingMulti(ManualHelper.getManual(), "generatorWindmillImproved", new ItemStack(IEContent.blockWoodenDevice1, 1, BlockTypes_WoodenDevice1.WINDMILL_ADVANCED.getMeta()), new ItemStack(IEContent.itemMaterial, 1, 5)));
    ManualHelper.getManual().addEntry("breaker", ManualHelper.CAT_ENERGY, new ManualPages.Crafting(ManualHelper.getManual(), "breaker0", new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.BREAKERSWITCH.getMeta())), new ManualPages.Text(ManualHelper.getManual(), "breaker1"), new ManualPages.Crafting(ManualHelper.getManual(), "breaker2", new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.REDSTONE_BREAKER.getMeta())));
    ManualHelper.getManual().addEntry("eMeter", ManualHelper.CAT_ENERGY, new ManualPages.Crafting(ManualHelper.getManual(), "eMeter0", new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.ENERGY_METER.getMeta())));
    Map<String, Integer> sortedMap = ThermoelectricHandler.getThermalValuesSorted(true);
    String[][] table = formatToTable_ItemIntHashmap(sortedMap, "K");
    ManualHelper.getManual().addEntry("redstoneWires", ManualHelper.CAT_ENERGY, new ManualPages.Crafting(ManualHelper.getManual(), "redstoneWires0", new ItemStack(IEContent.itemWireCoil, 1, 5)), new ManualPages.Crafting(ManualHelper.getManual(), "redstoneWires1", new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.CONNECTOR_REDSTONE.getMeta())));
    ManualHelper.getManual().addEntry("thermoElectric", ManualHelper.CAT_ENERGY, new ManualPages.Crafting(ManualHelper.getManual(), "thermoElectric0", new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.THERMOELECTRIC_GEN.getMeta())), new ManualPages.Table(ManualHelper.getManual(), "thermoElectric1", table, false));
    //		ManualHelper.addEntry("highvoltage", ManualHelper.CAT_ENERGY,
    //				new ManualPages.Text(ManualHelper.getManual(), "highvoltage0"),
    //				new ManualPages.Crafting(ManualHelper.getManual(), "", new ItemStack(IEContent.blockMetalDevice,1,8),new ItemStack(IEContent.blockMetalDevice,1,4)),
    //				new ManualPages.Crafting(ManualHelper.getManual(), "", new ItemStack(IEContent.blockMetalDevice,1,5),new ItemStack(IEContent.blockMetalDevice,1,7)));
    //		sortedMap = DieselHandler.getFuelValuesSorted(true);
    //		Map.Entry<String,Integer>[] dieselFuels = sortedMap.entrySet().toArray(new Map.Entry[0]);
    //		table = new String[dieselFuels.length][2];
    //		for(int i=0; i<table.length; i++)
    //		{
    //			Fluid f = FluidRegistry.getFluid(dieselFuels[i].getKey());
    //			String sf = f!=null?new FluidStack(f,1000).getUnlocalizedName():"";
    //			int bt = dieselFuels[i].getValue();
    //			String am = Utils.formatDouble(bt/20f, "0.###")+" ("+bt+")";
    //			table[i] = new String[]{sf,am};
    //		}
    ManualHelper.addEntry("dieselgen", ManualHelper.CAT_ENERGY, new ManualPages.Text(ManualHelper.getManual(), "dieselgen0"), new ManualPageMultiblock(ManualHelper.getManual(), "dieselgen1", MultiblockDieselGenerator.instance), new ManualPages.Text(ManualHelper.getManual(), "dieselgen2"));
    ManualHelper.addEntry("lightningrod", ManualHelper.CAT_ENERGY, new ManualPageMultiblock(ManualHelper.getManual(), "lightningrod0", MultiblockLightningrod.instance), new ManualPages.Text(ManualHelper.getManual(), "lightningrod1"));
    ManualHelper.addEntry("conveyor", ManualHelper.CAT_MACHINES, new ManualPages.Crafting(ManualHelper.getManual(), "conveyor0", ConveyorHandler.getConveyorStack(ImmersiveEngineering.MODID + ":conveyor"), ConveyorHandler.getConveyorStack(ImmersiveEngineering.MODID + ":uncontrolled")), new ManualPages.Text(ManualHelper.getManual(), "conveyor1"), new ManualPages.Crafting(ManualHelper.getManual(), "conveyor2", ConveyorHandler.getConveyorStack(ImmersiveEngineering.MODID + ":dropper")), new ManualPages.Crafting(ManualHelper.getManual(), "conveyor3", ConveyorHandler.getConveyorStack(ImmersiveEngineering.MODID + ":vertical")), new ManualPages.Crafting(ManualHelper.getManual(), "conveyor4", ConveyorHandler.getConveyorStack(ImmersiveEngineering.MODID + ":splitter")), new ManualPages.Crafting(ManualHelper.getManual(), "conveyor5", ConveyorHandler.getConveyorStack(ImmersiveEngineering.MODID + ":covered")));
    ManualHelper.addEntry("furnaceHeater", ManualHelper.CAT_MACHINES, new ManualPages.Crafting(ManualHelper.getManual(), "furnaceHeater0", new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.FURNACE_HEATER.getMeta())), new ManualPages.Text(ManualHelper.getManual(), "furnaceHeater1"), new ManualPages.Text(ManualHelper.getManual(), "furnaceHeater2"));
    ManualHelper.addEntry("sorter", ManualHelper.CAT_MACHINES, new ManualPages.Crafting(ManualHelper.getManual(), "sorter0", new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.SORTER.getMeta())), new ManualPages.Text(ManualHelper.getManual(), "sorter1"));
    ManualHelper.addEntry("fluidSorter", ManualHelper.CAT_MACHINES, new ManualPages.Crafting(ManualHelper.getManual(), "fluidSorter0", new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.FLUID_SORTER.getMeta())), new ManualPages.Text(ManualHelper.getManual(), "fluidSorter1"));
    ManualHelper.addEntry("turntable", ManualHelper.CAT_MACHINES, new ManualPages.Crafting(ManualHelper.getManual(), "turntable0", new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.TURNTABLE.getMeta())));
    pages = new ArrayList<IManualPage>();
    pages.add(new ManualPages.Crafting(ManualHelper.getManual(), "fluidPipes0", new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.FLUID_PIPE.getMeta())));
    pages.add(new ManualPages.Text(ManualHelper.getManual(), "fluidPipes1"));
    pages.add(new ManualPages.Crafting(ManualHelper.getManual(), "fluidPipes2", new ItemStack(IEContent.blockMetalDevice0, 1, BlockTypes_MetalDevice0.FLUID_PUMP.getMeta())));
    pages.add(new ManualPages.Text(ManualHelper.getManual(), "fluidPipes3"));
    if (IEConfig.Machines.pump_infiniteWater || IEConfig.Machines.pump_placeCobble)
        pages.add(new ManualPages.Text(ManualHelper.getManual(), "fluidPipes4"));
    pages.add(new ManualPages.Crafting(ManualHelper.getManual(), "fluidPipes5", new ItemStack(IEContent.blockMetalDevice0, 1, BlockTypes_MetalDevice0.FLUID_PLACER.getMeta())));
    ManualHelper.addEntry("fluidPipes", ManualHelper.CAT_MACHINES, pages.toArray(new IManualPage[pages.size()]));
    ManualHelper.addEntry("chargingStation", ManualHelper.CAT_MACHINES, new ManualPages.Crafting(ManualHelper.getManual(), "chargingStation0", new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.CHARGING_STATION.getMeta())), new ManualPages.Text(ManualHelper.getManual(), "chargingStation1"));
    ManualHelper.addEntry("belljar", ManualHelper.CAT_MACHINES, new ManualPages.Crafting(ManualHelper.getManual(), "belljar0", new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.BELLJAR.getMeta())), new ManualPages.Text(ManualHelper.getManual(), "belljar1"));
    ManualHelper.addEntry("teslaCoil", ManualHelper.CAT_MACHINES, new ManualPages.Crafting(ManualHelper.getManual(), "teslaCoil0", new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.TESLA_COIL.getMeta())), new ManualPages.Text(ManualHelper.getManual(), "teslaCoil1"), new ManualPages.CraftingMulti(ManualHelper.getManual(), "teslaCoil2", new ItemStack(IEContent.itemsFaradaySuit[0]), new ItemStack(IEContent.itemsFaradaySuit[1]), new ItemStack(IEContent.itemsFaradaySuit[2]), new ItemStack(IEContent.itemsFaradaySuit[3]), new ItemStack(IEContent.itemFluorescentTube)), new ManualPages.Text(ManualHelper.getManual(), "teslaCoil3"), new ManualPages.Text(ManualHelper.getManual(), "teslaCoil4"));
    ManualHelper.addEntry("jerrycan", ManualHelper.CAT_MACHINES, new ManualPages.Crafting(ManualHelper.getManual(), "jerrycan0", new ItemStack(IEContent.itemJerrycan)));
    tempItemList = new ArrayList<>();
    for (int i = 0; i < 16; i++) tempItemList.add(ItemNBTHelper.stackWithData(new ItemStack(IEContent.itemEarmuffs), "IE:EarmuffColour", EnumDyeColor.byDyeDamage(i).getMapColor().colorValue));
    ManualHelper.addEntry("earmuffs", ManualHelper.CAT_MACHINES, new ManualPages.Crafting(ManualHelper.getManual(), "earmuffs0", new ItemStack(IEContent.itemEarmuffs)), new ManualPages.CraftingMulti(ManualHelper.getManual(), "earmuffs1", (Object[]) new PositionedItemStack[][] { new PositionedItemStack[] { new PositionedItemStack(new ItemStack(IEContent.itemEarmuffs), 24, 0), new PositionedItemStack(new ItemStack(Items.DYE, 1, OreDictionary.WILDCARD_VALUE), 42, 0), new PositionedItemStack(tempItemList, 78, 0) }, new PositionedItemStack[] { new PositionedItemStack(new ItemStack(IEContent.itemEarmuffs), 24, 0), new PositionedItemStack(Lists.newArrayList(new ItemStack(Items.LEATHER_HELMET), new ItemStack(Items.IRON_HELMET)), 42, 0), new PositionedItemStack(Lists.newArrayList(ItemNBTHelper.stackWithData(new ItemStack(Items.LEATHER_HELMET), "IE:Earmuffs", true), ItemNBTHelper.stackWithData(new ItemStack(Items.IRON_HELMET), "IE:Earmuffs", true)), 78, 0) } }));
    ManualHelper.addEntry("toolbox", ManualHelper.CAT_MACHINES, new ManualPages.Crafting(ManualHelper.getManual(), "toolbox0", new ItemStack(IEContent.itemToolbox)), new ManualPages.Text(ManualHelper.getManual(), "toolbox1"));
    ManualHelper.addEntry("drill", ManualHelper.CAT_MACHINES, new ManualPages.CraftingMulti(ManualHelper.getManual(), "drill0", new ItemStack(IEContent.itemDrill, 1, 0), new ItemStack(IEContent.itemMaterial, 1, 9)), new ManualPages.Crafting(ManualHelper.getManual(), "drill1", new ItemStack(IEContent.itemDrillhead, 1, 0)), new ManualPages.Crafting(ManualHelper.getManual(), "drill2", new ItemStack(IEContent.itemToolUpgrades, 1, 0)), new ManualPages.Crafting(ManualHelper.getManual(), "drill3", new ItemStack(IEContent.itemToolUpgrades, 1, 1)), new ManualPages.Crafting(ManualHelper.getManual(), "drill4", new ItemStack(IEContent.itemToolUpgrades, 1, 2)), new ManualPages.Crafting(ManualHelper.getManual(), "drill5", new ItemStack(IEContent.itemToolUpgrades, 1, 3)));
    ManualHelper.addEntry("revolver", ManualHelper.CAT_MACHINES, new ManualPages.CraftingMulti(ManualHelper.getManual(), "revolver0", new ItemStack(IEContent.itemRevolver, 1, 0), new ItemStack(IEContent.itemMaterial, 1, 7), new ItemStack(IEContent.itemMaterial, 1, 8), new ItemStack(IEContent.itemMaterial, 1, 9), new ItemStack(IEContent.itemMaterial, 1, 10)), new ManualPages.CraftingMulti(ManualHelper.getManual(), "revolver1", new ItemStack(IEContent.itemRevolver, 1, 1)), new ManualPages.Crafting(ManualHelper.getManual(), "revolver2", new ItemStack(IEContent.itemToolUpgrades, 1, 4)), new ManualPages.Crafting(ManualHelper.getManual(), "revolver3", new ItemStack(IEContent.itemToolUpgrades, 1, 5)), new ManualPages.Crafting(ManualHelper.getManual(), "revolver4", new ItemStack(IEContent.itemToolUpgrades, 1, 6)));
    pages = new ArrayList<IManualPage>();
    pages.add(new ManualPages.Crafting(ManualHelper.getManual(), "bullets0", ItemEngineersBlueprint.getTypedBlueprint("bullet")));
    pages.add(new ManualPages.CraftingMulti(ManualHelper.getManual(), "bullets1", new ItemStack(IEContent.itemBullet, 1, 0), new ItemStack(IEContent.itemBullet, 1, 1), new ItemStack(IEContent.itemMold, 1, 3)));
    for (String key : BulletHandler.registry.keySet()) if (BulletHandler.registry.get(key).isProperCartridge())
        pages.add(new ManualPages.ItemDisplay(ManualHelper.getManual(), "bullets_" + key, BulletHandler.getBulletStack(key)));
    ManualHelper.addEntry("bullets", ManualHelper.CAT_MACHINES, pages.toArray(new IManualPage[pages.size()]));
    ManualHelper.addEntry("skyhook", ManualHelper.CAT_MACHINES, new ManualPages.CraftingMulti(ManualHelper.getManual(), "skyhook0", new ItemStack(IEContent.itemSkyhook), new ItemStack(IEContent.itemMaterial, 1, 9)), new ManualPages.Text(ManualHelper.getManual(), "skyhook1"));
    ManualHelper.addEntry("chemthrower", ManualHelper.CAT_MACHINES, new ManualPages.CraftingMulti(ManualHelper.getManual(), "chemthrower0", new ItemStack(IEContent.itemChemthrower, 1, 0), new ItemStack(IEContent.itemMaterial, 1, 9), new ItemStack(IEContent.itemToolUpgrades, 1, 0)), new ManualPages.Crafting(ManualHelper.getManual(), "chemthrower1", new ItemStack(IEContent.itemToolUpgrades, 1, 3)), new ManualPages.Crafting(ManualHelper.getManual(), "chemthrower2", new ItemStack(IEContent.itemToolUpgrades, 1, 7)));
    ManualHelper.addEntry("railgun", ManualHelper.CAT_MACHINES, new ManualPages.CraftingMulti(ManualHelper.getManual(), "railgun0", new ItemStack(IEContent.itemRailgun, 1, 0), new ItemStack(IEContent.itemMaterial, 1, 9)), new ManualPages.Text(ManualHelper.getManual(), "railgun1"), new ManualPages.Crafting(ManualHelper.getManual(), "railgun2", new ItemStack(IEContent.itemToolUpgrades, 1, 9)), new ManualPages.Crafting(ManualHelper.getManual(), "railgun3", new ItemStack(IEContent.itemToolUpgrades, 1, 8)));
    ManualHelper.addEntry("razorwire", ManualHelper.CAT_MACHINES, new ManualPages.Crafting(ManualHelper.getManual(), "razorwire0", new ItemStack(IEContent.blockMetalDecoration2, 1, BlockTypes_MetalDecoration2.RAZOR_WIRE.getMeta())));
    ManualHelper.addEntry("turret", ManualHelper.CAT_MACHINES, new ManualPages.Crafting(ManualHelper.getManual(), "turret0"), new ManualPages.Crafting(ManualHelper.getManual(), "turret1"), new ManualPages.Crafting(ManualHelper.getManual(), "turret2", new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.TURRET_CHEM.getMeta())), new ManualPages.Crafting(ManualHelper.getManual(), "turret3"), new ManualPages.Crafting(ManualHelper.getManual(), "turret4", new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.TURRET_GUN.getMeta())), new ManualPages.Crafting(ManualHelper.getManual(), "turret5"));
    ManualHelper.addEntry("improvedBlastfurnace", ManualHelper.CAT_HEAVYMACHINES, new ManualPages.Crafting(ManualHelper.getManual(), "improvedBlastfurnace0", new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.BLASTBRICK_REINFORCED.getMeta())), new ManualPageMultiblock(ManualHelper.getManual(), "improvedBlastfurnace1", MultiblockBlastFurnaceAdvanced.instance), new ManualPages.Text(ManualHelper.getManual(), "improvedBlastfurnace2"), new ManualPages.Crafting(ManualHelper.getManual(), "improvedBlastfurnace3", new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.BLAST_FURNACE_PREHEATER.getMeta())));
    tempItemList = new ArrayList();
    IEContent.itemMold.getSubItems(IEContent.itemMold, ImmersiveEngineering.creativeTab, tempItemList);
    ManualHelper.addEntry("metalPress", ManualHelper.CAT_HEAVYMACHINES, new ManualPageMultiblock(ManualHelper.getManual(), "metalPress0", MultiblockMetalPress.instance), new ManualPages.Text(ManualHelper.getManual(), "metalPress1"), new ManualPages.CraftingMulti(ManualHelper.getManual(), "metalPress2", (Object[]) tempItemList.toArray(new ItemStack[tempItemList.size()])));
    ManualHelper.addEntry("assembler", ManualHelper.CAT_MACHINES, new ManualPageMultiblock(ManualHelper.getManual(), "assembler0", MultiblockAssembler.instance), new ManualPages.Text(ManualHelper.getManual(), "assembler1"), new ManualPages.Text(ManualHelper.getManual(), "assembler2"));
    ManualHelper.addEntry("bottlingMachine", ManualHelper.CAT_MACHINES, new ManualPageMultiblock(ManualHelper.getManual(), "bottlingMachine0", MultiblockBottlingMachine.instance), new ManualPages.Text(ManualHelper.getManual(), "bottlingMachine1"));
    ManualHelper.addEntry("autoworkbench", ManualHelper.CAT_MACHINES, new ManualPageMultiblock(ManualHelper.getManual(), "autoworkbench0", MultiblockAutoWorkbench.instance), new ManualPages.Text(ManualHelper.getManual(), "autoworkbench1"));
    ManualHelper.addEntry("crusher", ManualHelper.CAT_HEAVYMACHINES, new ManualPageMultiblock(ManualHelper.getManual(), "crusher0", MultiblockCrusher.instance), new ManualPages.Text(ManualHelper.getManual(), "crusher1"));
    ManualHelper.addEntry("mixer", ManualHelper.CAT_HEAVYMACHINES, new ManualPageMultiblock(ManualHelper.getManual(), "mixer0", MultiblockMixer.instance), new ManualPages.Text(ManualHelper.getManual(), "mixer1"), new ManualPages.Text(ManualHelper.getManual(), "mixer2"));
    sortedMap = SqueezerRecipe.getFluidValuesSorted(IEContent.fluidPlantoil, true);
    table = formatToTable_ItemIntHashmap(sortedMap, "mB");
    ManualHelper.addEntry("squeezer", ManualHelper.CAT_HEAVYMACHINES, new ManualPageMultiblock(ManualHelper.getManual(), "squeezer0", MultiblockSqueezer.instance), new ManualPages.Text(ManualHelper.getManual(), "squeezer1"), new ManualPages.Table(ManualHelper.getManual(), "squeezer2T", table, false));
    sortedMap = FermenterRecipe.getFluidValuesSorted(IEContent.fluidEthanol, true);
    table = formatToTable_ItemIntHashmap(sortedMap, "mB");
    ManualHelper.addEntry("fermenter", ManualHelper.CAT_HEAVYMACHINES, new ManualPageMultiblock(ManualHelper.getManual(), "fermenter0", MultiblockFermenter.instance), new ManualPages.Text(ManualHelper.getManual(), "fermenter1"), new ManualPages.Table(ManualHelper.getManual(), "fermenter2T", table, false));
    ManualHelper.addEntry("refinery", ManualHelper.CAT_HEAVYMACHINES, new ManualPageMultiblock(ManualHelper.getManual(), "refinery0", MultiblockRefinery.instance), new ManualPages.Text(ManualHelper.getManual(), "refinery1"));
    //		ArrayList<ItemStack> stacks = new ArrayList<ItemStack>();
    //		ManualHelper.addEntry("bottlingMachine", ManualHelper.CAT_MACHINES,
    //				new ManualPageMultiblock(ManualHelper.getManual(), "bottlingMachine0", MultiblockBottlingMachine.instance),
    //				new ManualPages.Text(ManualHelper.getManual(), "bottlingMachine1"));
    sortedMap = FermenterRecipe.getFluidValuesSorted(IEContent.fluidEthanol, true);
    String[][] table2 = formatToTable_ItemIntHashmap(sortedMap, "mB");
    //		ManualHelper.addEntry("biodiesel", ManualHelper.CAT_HEAVYMACHINES,
    //				new ManualPages.Text(ManualHelper.getManual(), "biodiesel0"),
    //				new ManualPageMultiblock(ManualHelper.getManual(), "biodiesel1", MultiblockSqueezer.instance),
    //				new ManualPages.Table(ManualHelper.getManual(), "biodiesel1T", table, false),
    //				new ManualPageMultiblock(ManualHelper.getManual(), "biodiesel2", MultiblockFermenter.instance),
    //				new ManualPages.Table(ManualHelper.getManual(), "biodiesel2T", table2, false),
    //				new ManualPageMultiblock(ManualHelper.getManual(), "biodiesel3", MultiblockRefinery.instance),
    //				new ManualPages.Text(ManualHelper.getManual(), "biodiesel4"));
    ManualHelper.addEntry("arcfurnace", ManualHelper.CAT_HEAVYMACHINES, new ManualPageMultiblock(ManualHelper.getManual(), "arcfurnace0", MultiblockArcFurnace.instance), new ManualPages.Text(ManualHelper.getManual(), "arcfurnace1"), new ManualPages.Text(ManualHelper.getManual(), "arcfurnace2"), new ManualPages.Text(ManualHelper.getManual(), "arcfurnace3"), new ManualPages.Text(ManualHelper.getManual(), "arcfurnace4"), new ManualPages.Text(ManualHelper.getManual(), "arcfurnace5"));
    ManualHelper.addEntry("excavator", ManualHelper.CAT_HEAVYMACHINES, new ManualPageMultiblock(ManualHelper.getManual(), "excavator0", MultiblockExcavator.instance), new ManualPageMultiblock(ManualHelper.getManual(), "", MultiblockBucketWheel.instance), new ManualPageMultiblock(ManualHelper.getManual(), "", MultiblockExcavatorDemo.instance), new ManualPages.Text(ManualHelper.getManual(), "excavator1"));
    ClientCommandHandler.instance.registerCommand(new CommandHandler(true));
}
Also used : IManualPage(blusunrize.lib.manual.IManualPage) CommandHandler(blusunrize.immersiveengineering.common.util.commands.CommandHandler) ClientCommandHandler(net.minecraftforge.client.ClientCommandHandler) ManualPageShader(blusunrize.immersiveengineering.client.manual.ManualPageShader) ShaderRegistry(blusunrize.immersiveengineering.api.shader.ShaderRegistry) PositionedItemStack(blusunrize.lib.manual.ManualPages.PositionedItemStack) IEManualInstance(blusunrize.immersiveengineering.client.manual.IEManualInstance) ManualPages(blusunrize.lib.manual.ManualPages) ItemStack(net.minecraft.item.ItemStack) PositionedItemStack(blusunrize.lib.manual.ManualPages.PositionedItemStack)

Example 2 with PositionedItemStack

use of blusunrize.lib.manual.ManualPages.PositionedItemStack in project ImmersiveEngineering by BluSunrize.

the class ShaderRegistry method compileWeight.

public static void compileWeight() {
    totalWeight.clear();
    chestLootShaders.clear();
    for (ShaderRegistryEntry entry : shaderRegistry.values()) {
        if (entry.getIsBagLoot()) {
            int entryRarityWeight = rarityWeightMap.get(entry.getRarity());
            for (Map.Entry<EnumRarity, Integer> weightedRarity : rarityWeightMap.entrySet()) if (entry.getIsInLowerBags() ? (weightedRarity.getValue() >= entryRarityWeight) : (weightedRarity.getValue() == entryRarityWeight)) {
                int i = totalWeight.containsKey(weightedRarity.getKey()) ? totalWeight.get(weightedRarity.getKey()) : 0;
                totalWeight.put(weightedRarity.getKey(), i + entry.getWeight());
            }
        }
        if (entry.getIsCrateLoot())
            for (int i = 0; i < entry.getWeight(); i++) chestLootShaders.add(entry.getName());
    }
    sortedRarityMap.clear();
    sortedRarityMap.addAll(ShaderRegistry.rarityWeightMap.keySet());
    Collections.sort(sortedRarityMap, new Comparator<EnumRarity>() {

        @Override
        public int compare(EnumRarity enum0, EnumRarity enum1) {
            return Integer.compare(ShaderRegistry.rarityWeightMap.get(enum0), ShaderRegistry.rarityWeightMap.get(enum1));
        }
    });
    if (manualEntry != null) {
        ArrayList<PositionedItemStack[]> recipes = new ArrayList();
        ItemStack[] shaderBags = new ItemStack[ShaderRegistry.sortedRarityMap.size()];
        recipes = new ArrayList();
        for (int i = 0; i < ShaderRegistry.sortedRarityMap.size(); i++) {
            EnumRarity outputRarity = ShaderRegistry.sortedRarityMap.get(i);
            shaderBags[i] = new ItemStack(itemShaderBag);
            shaderBags[i].setTagCompound(new NBTTagCompound());
            shaderBags[i].getTagCompound().setString("rarity", outputRarity.toString());
            ArrayList<EnumRarity> upperRarities = ShaderRegistry.getHigherRarities(outputRarity);
            if (!upperRarities.isEmpty()) {
                ArrayList<ItemStack> inputList = new ArrayList();
                for (EnumRarity r : upperRarities) {
                    ItemStack bag = new ItemStack(itemShaderBag);
                    bag.setTagCompound(new NBTTagCompound());
                    bag.getTagCompound().setString("rarity", r.toString());
                    inputList.add(bag);
                }
                ItemStack s0 = new ItemStack(itemShaderBag, 2);
                s0.setTagCompound(new NBTTagCompound());
                s0.getTagCompound().setString("rarity", outputRarity.toString());
                if (!inputList.isEmpty())
                    recipes.add(new PositionedItemStack[] { new PositionedItemStack(inputList, 33, 0), new PositionedItemStack(s0, 69, 0) });
            //					inputList = new ArrayList();
            //					for(ShaderRegistryEntry entry : ShaderRegistry.shaderRegistry.values())
            //						if(upperRarities.contains(entry.getRarity()))
            //						{
            //							ItemStack shader = new ItemStack(itemShader);
            //							shader.setTagCompound(new NBTTagCompound());
            //							shader.getTagCompound().setString("shader_name",  entry.getName());
            //							inputList.add(shader);
            //						}
            //					ItemStack s1 = new ItemStack(itemShaderBag);
            //					s1.setTagCompound(new NBTTagCompound());
            //					s1.getTagCompound().setString("rarity", outputRarity.toString());
            //					if(!inputList.isEmpty())
            //						recipes.add(new PositionedItemStack[]{ new PositionedItemStack(inputList, 33, 0), new PositionedItemStack(s1, 69, 0)});
            }
        }
        manualEntry.getPages()[2] = new ManualPages.ItemDisplay(ManualHelper.getManual(), "shader2", shaderBags);
        manualEntry.getPages()[3] = new ManualPages.CraftingMulti(ManualHelper.getManual(), "shader3", (Object[]) recipes.toArray(new PositionedItemStack[recipes.size()][3]));
    }
}
Also used : NBTTagCompound(net.minecraft.nbt.NBTTagCompound) EnumRarity(net.minecraft.item.EnumRarity) PositionedItemStack(blusunrize.lib.manual.ManualPages.PositionedItemStack) ManualPages(blusunrize.lib.manual.ManualPages) PositionedItemStack(blusunrize.lib.manual.ManualPages.PositionedItemStack) ItemStack(net.minecraft.item.ItemStack)

Aggregations

ManualPages (blusunrize.lib.manual.ManualPages)2 PositionedItemStack (blusunrize.lib.manual.ManualPages.PositionedItemStack)2 ItemStack (net.minecraft.item.ItemStack)2 ShaderRegistry (blusunrize.immersiveengineering.api.shader.ShaderRegistry)1 IEManualInstance (blusunrize.immersiveengineering.client.manual.IEManualInstance)1 ManualPageShader (blusunrize.immersiveengineering.client.manual.ManualPageShader)1 CommandHandler (blusunrize.immersiveengineering.common.util.commands.CommandHandler)1 IManualPage (blusunrize.lib.manual.IManualPage)1 EnumRarity (net.minecraft.item.EnumRarity)1 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)1 ClientCommandHandler (net.minecraftforge.client.ClientCommandHandler)1