/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Ic2ExpReactorPlanner;
import Ic2ExpReactorPlanner.components.Condensator;
import Ic2ExpReactorPlanner.components.CoolantCell;
import Ic2ExpReactorPlanner.components.Exchanger;
import Ic2ExpReactorPlanner.components.FuelRod;
import Ic2ExpReactorPlanner.components.Plating;
import Ic2ExpReactorPlanner.components.ReactorItem;
import Ic2ExpReactorPlanner.components.Reflector;
import Ic2ExpReactorPlanner.components.Vent;
import gregtech.api.enums.ItemList;
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.util.GT_ModHandler;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.xmod.bartworks.BW_Utils;
import gtPlusPlus.xmod.bartworks.BW_Utils.NonMeta_MaterialItem;
import gtPlusPlus.xmod.goodgenerator.GG_Utils;
import gtPlusPlus.xmod.goodgenerator.GG_Utils.GG_Fuel_Rod;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* Factory class to handle creating components by id or name.
* @author Brian McCloud
*/
public class ComponentFactory {
public static int MAX_COMPONENT_ID = 64;
static ItemList[] aGtItems =
new ItemList[] {ItemList.Neutron_Reflector, ItemList.Moxcell_1, ItemList.Moxcell_2, ItemList.Moxcell_4};
private ComponentFactory() {
// do nothing, this class should not be instantiated.
}
private static LinkedHashMap<Integer, ReactorItem> ITEM_LIST = new LinkedHashMap<Integer, ReactorItem>();
static {
int aID = 0;
ITEM_LIST.put(aID++, null);
ITEM_LIST.put(
aID++,
new FuelRod(
1,
"fuelRodUranium",
new GT_ItemStack(GT_ModHandler.getIC2Item("reactorUraniumSimple", 1)
.copy()),
20e3,
1,
null,
100,
2,
1,
false));
ITEM_LIST.put(
aID++,
new FuelRod(
2,
"dualFuelRodUranium",
new GT_ItemStack(GT_ModHandler.getIC2Item("reactorUraniumDual", 1)
.copy()),
20e3,
1,
null,
200,
4,
2,
false));
ITEM_LIST.put(
aID++,
new FuelRod(
3,
"quadFuelRodUranium",
new GT_ItemStack(GT_ModHandler.getIC2Item("reactorUraniumQuad", 1)
.copy()),
20e3,
1,
null,
400,
8,
4,
false));
ITEM_LIST.put(
aID++,
new FuelRod(
4, "fuelRodMox", new GT_ItemStack(aGtItems[1].get(1).copy()), 10e3, 1, null, 100, 2, 1, true));
ITEM_LIST.put(
aID++,
new FuelRod(
5,
"dualFuelRodMox",
new GT_ItemStack(aGtItems[2].get(1).copy()),
10e3,
1,
null,
200,
4,
2,
true));
ITEM_LIST.put(
aID++,
new FuelRod(
6,
"quadFuelRodMox",
new GT_ItemStack(aGtItems[3].get(1).copy()),
10e3,
1,
null,
400,
8,
4,
true));
ITEM_LIST.put(
aID++,
new Reflector(
7,
"neutronReflector",
new GT_ItemStack(
GT_ModHandler.getIC2Item("reactorReflector", 1).copy()),
30e3,
1,
null));
ITEM_LIST.put(
aID++,
new Reflector(
8,
"thickNeutronReflector",
new GT_ItemStack(GT_ModHandler.getIC2Item("reactorReflectorThick", 1)
.copy()),
120e3,
1,
null));
ITEM_LIST.put(
aID++,
new Vent(
9,
"heatVent",
new GT_ItemStack(
GT_ModHandler.getIC2Item("reactorVent", 1).copy()),
1,
1000,
null,
6,
0,
0));
ITEM_LIST.put(
aID++,
new Vent(
10,
"advancedHeatVent",
new GT_ItemStack(GT_ModHandler.getIC2Item("reactorVentDiamond", 1)
.copy()),
1,
1000,
null,
12,
0,
0));
ITEM_LIST.put(
aID++,
new Vent(
11,
"reactorHeatVent",
new GT_ItemStack(
GT_ModHandler.getIC2Item("reactorVentCore", 1).copy()),
1,
1000,
null,
5,
5,
0));
ITEM_LIST.put(
aID++,
new Vent(
12,
"componentHeatVent",
new GT_ItemStack(
GT_ModHandler.getIC2Item("reactorVentSpread", 1).copy()),
1,
1,
null,
0,
0,
4));
ITEM_LIST.put(
aID++,
new Vent(
13