diff options
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/registration')
7 files changed, 18 insertions, 763 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBufferDynamos.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBufferDynamos.java index eb13397bf3..7fd68be584 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBufferDynamos.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBufferDynamos.java @@ -128,6 +128,6 @@ public class GregtechBufferDynamos { GregtechItemList.Hatch_Buffer_Dynamo_MAX.get(1L, new Object[0]), bitsd, new Object[] { "TMC", 'M', ItemList.Hatch_Dynamo_MAX, 'T', CI.getTieredCircuit(9), 'C', - OrePrefixes.wireGt04.get((Object) Materials.Superconductor) }); + OrePrefixes.wireGt04.get(Materials.SuperconductorUHV) }); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechComponentAssembler.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechComponentAssembler.java deleted file mode 100644 index 81bc9efa8b..0000000000 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechComponentAssembler.java +++ /dev/null @@ -1,665 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableMachine_ComponentAssemblers; - -import java.util.ArrayList; - -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_GT_Recipe; -import gregtech.api.util.GTPP_Recipe; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; - -public class GregtechComponentAssembler { - - public static void run() { - - if (!enableMachine_ComponentAssemblers) { - return; - } - - GregtechItemList.Machine_LV_Component_Maker.set( - new GT_MetaTileEntity_BasicMachine_GT_Recipe( - 985, - "basicmachine.componentmaker.tier.01", - "Basic Component Maker", - 1, - "Components, Unite!", - GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, - 6, - 1, - 16000, - 0, - 1, - "Assembler.png", - "", - false, - false, - 0, - "ASSEMBLER", - new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); - GregtechItemList.Machine_MV_Component_Maker.set( - new GT_MetaTileEntity_BasicMachine_GT_Recipe( - 986, - "basicmachine.componentmaker.tier.02", - "Advanced Component Maker", - 2, - "Components, Unite!", - GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, - 6, - 1, - 16000, - 0, - 1, - "Assembler.png", - "", - false, - false, - 0, - "ASSEMBLER", - new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); - GregtechItemList.Machine_HV_Component_Maker.set( - new GT_MetaTileEntity_BasicMachine_GT_Recipe( - 987, - "basicmachine.componentmaker.tier.03", - "Advanced Component Maker II", - 3, - "Components, Unite!", - GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, - 6, - 1, - 16000, - 0, - 1, - "Assembler.png", - "", - false, - false, - 0, - "ASSEMBLER", - new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); - GregtechItemList.Machine_EV_Component_Maker.set( - new GT_MetaTileEntity_BasicMachine_GT_Recipe( - 988, - "basicmachine.componentmaker.tier.04", - "Advanced Component Maker III", - 4, - "Components, Unite!", - GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, - 6, - 1, - 16000, - 0, - 1, - "Assembler.png", - "", - false, - false, - 0, - "ASSEMBLER", - new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); - GregtechItemList.Machine_IV_Component_Maker.set( - new GT_MetaTileEntity_BasicMachine_GT_Recipe( - 989, - "basicmachine.componentmaker.tier.05", - "Advanced Component Maker IV", - 5, - "Components, Unite!", - GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, - 6, - 1, - 16000, - 0, - 1, - "Assembler.png", - "", - false, - false, - 0, - "ASSEMBLER", - new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); - GregtechItemList.Machine_LuV_Component_Maker.set( - new GT_MetaTileEntity_BasicMachine_GT_Recipe( - 31012, - "basicmachine.componentmaker.tier.06", - "Advanced Component Maker V", - 6, - "Components, Unite!", - GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, - 6, - 1, - 24000, - 0, - 1, - "Assembler.png", - "", - false, - false, - 0, - "ASSEMBLER", - new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); - GregtechItemList.Machine_ZPM_Component_Maker.set( - new GT_MetaTileEntity_BasicMachine_GT_Recipe( - 31013, - "basicmachine.componentmaker.tier.07", - "Advanced Component Maker VI", - 7, - "Components, Unite!", - GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, - 6, - 1, - 32000, - 0, - 1, - "Assembler.png", - "", - false, - false, - 0, - "ASSEMBLER", - new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); - GregtechItemList.Machine_UV_Component_Maker.set( - new GT_MetaTileEntity_BasicMachine_GT_Recipe( - 31014, - "basicmachine.componentmaker.tier.08", - "Advanced Component Maker VII", - 8, - "Components, Unite!", - GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, - 6, - 1, - 48000, - 0, - 1, - "Assembler.png", - "", - false, - false, - 0, - "ASSEMBLER", - new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); - - // Motors - // addRecipeMotor(0, Materials.Lead, 1, Materials.RedAlloy, 1, - // Materials.WroughtIron, Materials.IronMagnetic); - addRecipeMotor(1, Materials.Copper, 1, Materials.Tin, 1, Materials.Iron, Materials.IronMagnetic); - addRecipeMotor(2, Materials.Copper, 2, Materials.Copper, 1, Materials.Aluminium, Materials.SteelMagnetic); - addRecipeMotor(3, Materials.Copper, 4, Materials.Gold, 1, Materials.StainlessSteel, Materials.SteelMagnetic); - addRecipeMotor(4, Materials.Copper, 8, Materials.Aluminium, 1, Materials.Titanium, Materials.NeodymiumMagnetic); - addRecipeMotor( - 5, - Materials.Copper, - 16, - Materials.Tungsten, - 1, - Materials.TungstenSteel, - Materials.NeodymiumMagnetic); - - // Pistons - // addRecipePiston(0, Materials.Lead, Materials.Lead); - addRecipePiston(1, Materials.Steel, Materials.Tin); - addRecipePiston(2, Materials.Aluminium, Materials.Copper); - addRecipePiston(3, Materials.StainlessSteel, Materials.Gold); - addRecipePiston(4, Materials.Titanium, Materials.Aluminium); - addRecipePiston(5, Materials.TungstenSteel, Materials.Tungsten); - - // Conveyors - // addRecipeConveyor(0, Materials.Lead); - addRecipeConveyor(1, Materials.Tin); - addRecipeConveyor(2, Materials.Copper); - addRecipeConveyor(3, Materials.Gold); - addRecipeConveyor(4, Materials.Aluminium); - addRecipeConveyor(5, Materials.Tungsten); - - // Pumps - // addRecipePump(0, Materials.Lead, Materials.Lead, Materials.Lead); - addRecipePump(1, Materials.Tin, Materials.Copper, Materials.Tin); - addRecipePump(2, Materials.Bronze, Materials.Steel, Materials.Copper); - addRecipePump(3, Materials.Steel, Materials.StainlessSteel, Materials.Gold); - addRecipePump(4, Materials.StainlessSteel, Materials.Titanium, Materials.Aluminium); - addRecipePump(5, Materials.TungstenSteel, Materials.TungstenSteel, Materials.Tungsten); - - // Robot Arms - // addRecipeRobotArm(0, Materials.Lead, Materials.Lead); - addRecipeRobotArm(1, Materials.Steel, Materials.Tin); - addRecipeRobotArm(2, Materials.Aluminium, Materials.Copper); - addRecipeRobotArm(3, Materials.StainlessSteel, Materials.Gold); - addRecipeRobotArm(4, Materials.Titanium, Materials.Aluminium); - addRecipeRobotArm(5, Materials.TungstenSteel, Materials.Tungsten); - - // Field Generators - // addRecipeFieldGenerator(0, Materials.Lead); - addRecipeFieldGenerator(1); - addRecipeFieldGenerator(2); - addRecipeFieldGenerator(3); - addRecipeFieldGenerator(4); - addRecipeFieldGenerator(5); - - // Emitters - // addRecipeEmitter(0, Materials.Lead, Materials.IronMagnetic); - addRecipeEmitter(1, Materials.Tin, Materials.Brass, Materials.Quartzite); - addRecipeEmitter(2, Materials.Copper, Materials.Electrum, Materials.NetherQuartz); - addRecipeEmitter(3, Materials.Gold, Materials.Chrome, Materials.Emerald); - addRecipeEmitter(4, Materials.Aluminium, Materials.Platinum, Materials.EnderPearl); - addRecipeEmitter(5, Materials.Tungsten, Materials.Osmium, Materials.EnderEye); - - // Sensors - // addRecipeSensor(0, Materials.WroughtIron, Materials.IronMagnetic, - // Materials.Apatite); - addRecipeSensor(1, Materials.Steel, Materials.Brass, Materials.Quartzite); - addRecipeSensor(2, Materials.Aluminium, Materials.Electrum, Materials.NetherQuartz); - addRecipeSensor(3, Materials.StainlessSteel, Materials.Chrome, Materials.Emerald); - addRecipeSensor(4, Materials.Titanium, Materials.Platinum, Materials.EnderPearl); - addRecipeSensor(5, Materials.TungstenSteel, Materials.Osmium, Materials.EnderEye); - } - - private static boolean addRecipeMotor(int tier, Materials wire, int wirethickness, Materials cable, - int cablethickness, Materials stick, Materials magstick) { - try { - String mWT = "" + wirethickness; - String mCT = "" + cablethickness; - - if (wirethickness < 10) { - mWT = "0" + wirethickness; - } - if (cablethickness < 10) { - mCT = "0" + cablethickness; - } - - OrePrefixes prefixWire = OrePrefixes.getOrePrefix("wireGt" + mWT); - OrePrefixes prefixCable = OrePrefixes.getOrePrefix("cableGt" + mCT); - - ItemStack wireStack = ItemUtils.getGregtechOreStack(prefixWire, wire, 4); - ItemStack cableStack = ItemUtils.getGregtechOreStack(prefixCable, cable, 2); - ItemStack rodStack = ItemUtils.getGregtechOreStack(OrePrefixes.stick, stick, 2); - ItemStack magrodStack = ItemUtils.getGregtechOreStack(OrePrefixes.stick, magstick, 1); - - ItemStack Input[] = { wireStack, cableStack, rodStack, magrodStack }; - - return CORE.RA.addComponentMakerRecipe( - Input, - GT_Values.NF, - CI.getElectricMotor(tier, 1), - (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } catch (Throwable t) { - return false; - } - } - - private static boolean addRecipePiston(int tier, Materials mat, Materials cable) { - try { - - OrePrefixes prefixCable = OrePrefixes.cableGt01; - ItemStack cableStack = ItemUtils.getGregtechOreStack(prefixCable, cable, 2); - ItemStack rodStack = ItemUtils.getGregtechOreStack(OrePrefixes.stick, mat, 2); - ItemStack plateStack = ItemUtils.getGregtechOreStack(OrePrefixes.plate, mat, 3); - ItemStack gearStack = ItemUtils.getGregtechOreStack(OrePrefixes.gearGtSmall, mat, 1); - ItemStack motorStack = CI.getElectricMotor(tier, 1); - - ItemStack Input[] = { plateStack, cableStack, rodStack, gearStack, motorStack }; - - return CORE.RA.addComponentMakerRecipe( - Input, - GT_Values.NF, - CI.getElectricPiston(tier, 1), - (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } catch (Throwable t) { - return false; - } - } - - private static boolean addRecipeConveyor(int tier, Materials cable) { - try { - OrePrefixes prefixCable = OrePrefixes.cableGt01; - ItemStack cableStack = ItemUtils.getGregtechOreStack(prefixCable, cable, 1); - ItemStack motorStack = CI.getElectricMotor(tier, 2); - boolean mAdd[]; - final ArrayList<ItemStack> oreDictList = OreDictionary.getOres("plateAnyRubber"); - if (!oreDictList.isEmpty()) { - int mcount = 0; - mAdd = new boolean[oreDictList.size()]; - for (ItemStack mRubberType : oreDictList) { - final ItemStack returnValue = mRubberType.copy(); - returnValue.stackSize = 6; - ItemStack Input[] = { cableStack, motorStack, returnValue }; - mAdd[mcount++] = CORE.RA.addComponentMakerRecipe( - Input, - GT_Values.NF, - CI.getConveyor(tier, 1), - (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - int added = 0; - for (boolean y : mAdd) { - if (y) { - added++; - } - } - if (added >= (oreDictList.size() / 2)) { - return true; - } else { - return false; - } - } else { - ItemStack Input[] = { cableStack, motorStack, - ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateRubber", 6) }; - return CORE.RA.addComponentMakerRecipe( - Input, - GT_Values.NF, - CI.getConveyor(tier, 1), - (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - - } catch (Throwable t) { - return false; - } - } - - private static boolean addRecipePump(int tier, Materials main, Materials pipe, Materials cable) { - try { - ItemStack cableStack = ItemUtils.getGregtechOreStack(OrePrefixes.cableGt01, cable, 1); - ItemStack screwStack = ItemUtils.getGregtechOreStack(OrePrefixes.screw, main, 1); - ItemStack rotorStack = ItemUtils.getGregtechOreStack(OrePrefixes.rotor, main, 1); - ItemStack pipeStack = ItemUtils.getGregtechOreStack(OrePrefixes.pipeMedium, pipe, 1); - ItemStack motorStack = CI.getElectricMotor(tier, 1); - boolean mAdd[]; - final ArrayList<ItemStack> oreDictList = OreDictionary.getOres("ringAnyRubber"); - if (!oreDictList.isEmpty()) { - int mcount = 0; - mAdd = new boolean[oreDictList.size()]; - for (ItemStack mRubberType : oreDictList) { - final ItemStack returnValue = mRubberType.copy(); - returnValue.stackSize = 2; - ItemStack Input[] = { cableStack, screwStack, rotorStack, pipeStack, motorStack, returnValue }; - mAdd[mcount++] = CORE.RA.addComponentMakerRecipe( - Input, - GT_Values.NF, - CI.getElectricPump(tier, 1), - (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - int added = 0; - for (boolean y : mAdd) { - if (y) { - added++; - } - } - if (added >= (oreDictList.size() / 2)) { - return true; - } else { - return false; - } - } else { - ItemStack Input[] = { cableStack, screwStack, rotorStack, pipeStack, motorStack, - ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ringRubber", 2) }; - return CORE.RA.addComponentMakerRecipe( - Input, - GT_Values.NF, - CI.getElectricPump(tier, 1), - (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - - } catch (Throwable t) { - return false; - } - } - - private static boolean addRecipeRobotArm(int tier, Materials stick, Materials cable) { - try { - ItemStack cableStack = ItemUtils.getGregtechOreStack(OrePrefixes.cableGt01, cable, 3); - ItemStack rodStack = ItemUtils.getGregtechOreStack(OrePrefixes.stick, stick, 2); - ItemStack motorStack = CI.getElectricMotor(tier, 2); - ItemStack pistonStack = CI.getElectricPiston(tier, 1); - - boolean mAdd[]; - final ItemStack oreDictList[] = CI.getAllCircuitsOfTier(tier); - if (oreDictList.length > 0) { - int mcount = 0, added = 0; - mAdd = new boolean[oreDictList.length]; - for (ItemStack mCircuitType : oreDictList) { - final ItemStack returnValue = mCircuitType.copy(); - returnValue.stackSize = 1; - ItemStack Input[] = { returnValue, cableStack, rodStack, pistonStack, motorStack }; - mAdd[mcount++] = CORE.RA.addComponentMakerRecipe( - Input, - GT_Values.NF, - CI.getRobotArm(tier, 1), - (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - for (boolean y : mAdd) { - if (y) { - added++; - } - } - if (added >= (oreDictList.length / 2)) { - return true; - } else { - return false; - } - } else { - ItemStack Input[] = { - ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(tier), 1), cableStack, - rodStack, pistonStack, motorStack }; - return CORE.RA.addComponentMakerRecipe( - Input, - GT_Values.NF, - CI.getRobotArm(tier, 1), - (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - - } catch (Throwable t) { - return false; - } - } - - private static boolean addRecipeFieldGenerator(int tier) { - try { - ItemStack gem; - String mWT; - if (tier == 1) mWT = "01"; - else if (tier == 2) mWT = "02"; - else if (tier == 3) mWT = "04"; - else if (tier == 4) mWT = "08"; - else if (tier == 5) mWT = "16"; - else mWT = "01"; - - ItemStack eyeQuantum = ItemList.QuantumEye.get(1); - ItemStack starQuantum = ItemList.QuantumStar.get(1); - - if (tier == 1) gem = ItemUtils.getSimpleStack(Items.ender_pearl); - else if (tier == 2) gem = ItemUtils.getSimpleStack(Items.ender_eye); - else if (tier == 3) gem = eyeQuantum; - else if (tier == 4) gem = ItemUtils.getSimpleStack(Items.nether_star); - else if (tier == 5) gem = starQuantum; - else gem = ItemUtils.getSimpleStack(Items.ender_pearl); - - OrePrefixes prefixWire = OrePrefixes.getOrePrefix("wireGt" + mWT); - ItemStack wireStack = ItemUtils.getGregtechOreStack(prefixWire, Materials.Osmium, 4); - - boolean mAdd[]; - final ItemStack oreDictList[] = CI.getAllCircuitsOfTier(tier); - if (oreDictList.length > 0) { - int mcount = 0, added = 0; - mAdd = new boolean[oreDictList.length]; - for (ItemStack mCircuitType : oreDictList) { - final ItemStack returnValue = mCircuitType.copy(); - returnValue.stackSize = 4; - ItemStack Input[] = { returnValue, wireStack, gem }; - mAdd[mcount++] = CORE.RA.addComponentMakerRecipe( - Input, - GT_Values.NF, - CI.getFieldGenerator(tier, 1), - (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - for (boolean y : mAdd) { - if (y) { - added++; - } - } - if (added >= (oreDictList.length / 2)) { - return true; - } else { - return false; - } - } else { - ItemStack Input[] = { - ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(tier), 4), wireStack, - gem }; - return CORE.RA.addComponentMakerRecipe( - Input, - GT_Values.NF, - CI.getFieldGenerator(tier, 1), - (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - - } catch (Throwable t) { - return false; - } - } - - private static boolean addRecipeEmitter(int tier, Materials cable, Materials stick, Materials gem) { - try { - ItemStack cableStack = ItemUtils.getGregtechOreStack(OrePrefixes.cableGt01, cable, 2); - ItemStack gemstack = ItemUtils.getGregtechOreStack(OrePrefixes.gem, gem, 1); - ItemStack magrodStack = ItemUtils.getGregtechOreStack(OrePrefixes.stick, stick, 4); - - boolean mAdd[]; - final ItemStack oreDictList[] = CI.getAllCircuitsOfTier(tier); - if (oreDictList.length > 0) { - int mcount = 0, added = 0; - mAdd = new boolean[oreDictList.length]; - for (ItemStack mCircuitType : oreDictList) { - final ItemStack returnValue = mCircuitType.copy(); - returnValue.stackSize = 2; - ItemStack Input[] = { returnValue, cableStack, gemstack, magrodStack }; - mAdd[mcount++] = CORE.RA.addComponentMakerRecipe( - Input, - GT_Values.NF, - CI.getEmitter(tier, 1), - (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - for (boolean y : mAdd) { - if (y) { - added++; - } - } - if (added >= (oreDictList.length / 2)) { - return true; - } else { - return false; - } - } else { - ItemStack Input[] = { - ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(tier), 2), cableStack, - gemstack, magrodStack }; - return CORE.RA.addComponentMakerRecipe( - Input, - GT_Values.NF, - CI.getEmitter(tier, 1), - (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - - } catch (Throwable t) { - return false; - } - } - - private static boolean addRecipeSensor(int tier, Materials plate, Materials rod, Materials gem) { - try { - ItemStack cableStack = ItemUtils.getGregtechOreStack(OrePrefixes.plate, plate, 4); - ItemStack magrodStack = ItemUtils.getGregtechOreStack(OrePrefixes.stick, rod, 1); - ItemStack gemStack = ItemUtils.getGregtechOreStack(OrePrefixes.gem, gem, 1); - - boolean mAdd[]; - final ItemStack oreDictList[] = CI.getAllCircuitsOfTier(tier); - if (oreDictList.length > 0) { - int mcount = 0, added = 0; - mAdd = new boolean[oreDictList.length]; - for (ItemStack mCircuitType : oreDictList) { - final ItemStack returnValue = mCircuitType.copy(); - returnValue.stackSize = 1; - ItemStack Input[] = { gemStack, cableStack, returnValue, magrodStack }; - mAdd[mcount++] = CORE.RA.addComponentMakerRecipe( - Input, - GT_Values.NF, - CI.getSensor(tier, 1), - (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - for (boolean y : mAdd) { - if (y) { - added++; - } - } - if (added >= (oreDictList.length / 2)) { - return true; - } else { - return false; - } - } else { - ItemStack Input[] = { gemStack, cableStack, magrodStack, - ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(tier), 1) }; - return CORE.RA.addComponentMakerRecipe( - Input, - GT_Values.NF, - CI.getSensor(tier, 1), - (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - - } catch (Throwable t) { - return false; - } - } -} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java index ca2e45ebfa..25694ac385 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java @@ -238,8 +238,7 @@ public class GregtechConduits { private static void wireFactory(final String Material, final int Voltage, final int ID, final long insulatedLoss, final long uninsulatedLoss, final long Amps, final short[] rgb) { - @SuppressWarnings("deprecation") - final Materials T = Materials.valueOf(Material); + final Materials T = Materials.get(Material); int V = GT_Utility.getTier(Voltage); if (V == -1) { Logger.ERROR("Failed to set voltage on " + Material + ". Invalid voltage of " + Voltage + "V set."); @@ -249,17 +248,16 @@ public class GregtechConduits { makeWires(T, ID, insulatedLoss, uninsulatedLoss, Amps, GT_Values.V[V], true, false, rgb); } - @SuppressWarnings("deprecation") private static void makeWires(final Materials aMaterial, final int aStartID, final long aLossInsulated, final long aLoss, final long aAmperage, final long aVoltage, final boolean aInsulatable, final boolean aAutoInsulated, final short[] aRGB) { - Logger.WARNING("Gregtech5u Content | Registered " + aMaterial.name() + " as a new material for Wire & Cable."); + Logger.WARNING("Gregtech5u Content | Registered " + aMaterial.mName + " as a new material for Wire & Cable."); GT_OreDictUnificator.registerOre( OrePrefixes.wireGt01, aMaterial, new GregtechMetaPipeEntity_Cable( aStartID + 0, - "wire." + aMaterial.name().toLowerCase() + ".01", + "wire." + aMaterial.mName.toLowerCase() + ".01", "1x " + aMaterial.mDefaultLocalName + " Wire", 0.125F, aMaterial, @@ -274,7 +272,7 @@ public class GregtechConduits { aMaterial, new GregtechMetaPipeEntity_Cable( aStartID + 1, - "wire." + aMaterial.name().toLowerCase() + ".02", + "wire." + aMaterial.mName.toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + " Wire", 0.25F, aMaterial, @@ -289,7 +287,7 @@ public class GregtechConduits { aMaterial, new GregtechMetaPipeEntity_Cable( aStartID + 2, - "wire." + aMaterial.name().toLowerCase() + ".04", + "wire." + aMaterial.mName.toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + " Wire", 0.375F, aMaterial, @@ -304,7 +302,7 @@ public class GregtechConduits { aMaterial, new GregtechMetaPipeEntity_Cable( aStartID + 3, - "wire." + aMaterial.name().toLowerCase() + ".08", + "wire." + aMaterial.mName.toLowerCase() + ".08", "8x " + aMaterial.mDefaultLocalName + " Wire", 0.50F, aMaterial, @@ -319,7 +317,7 @@ public class GregtechConduits { aMaterial, new GregtechMetaPipeEntity_Cable( aStartID + 4, - "wire." + aMaterial.name().toLowerCase() + ".12", + "wire." + aMaterial.mName.toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + " Wire", 0.625F, aMaterial, @@ -334,7 +332,7 @@ public class GregtechConduits { aMaterial, new GregtechMetaPipeEntity_Cable( aStartID + 5, - "wire." + aMaterial.name().toLowerCase() + ".16", + "wire." + aMaterial.mName.toLowerCase() + ".16", "16x " + aMaterial.mDefaultLocalName + " Wire", 0.75F, aMaterial, @@ -350,7 +348,7 @@ public class GregtechConduits { aMaterial, new GregtechMetaPipeEntity_Cable( aStartID + 6, - "cable." + aMaterial.name().toLowerCase() + ".01", + "cable." + aMaterial.mName.toLowerCase() + ".01", "1x " + aMaterial.mDefaultLocalName + " Cable", 0.25F, aMaterial, @@ -365,7 +363,7 @@ public class GregtechConduits { aMaterial, new GregtechMetaPipeEntity_Cable( aStartID + 7, - "cable." + aMaterial.name().toLowerCase() + ".02", + "cable." + aMaterial.mName.toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + " Cable", 0.375F, aMaterial, @@ -380,7 +378,7 @@ public class GregtechConduits { aMaterial, new GregtechMetaPipeEntity_Cable( aStartID + 8, - "cable." + aMaterial.name().toLowerCase() + ".04", + "cable." + aMaterial.mName.toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + " Cable", 0.5F, aMaterial, @@ -395,7 +393,7 @@ public class GregtechConduits { aMaterial, new GregtechMetaPipeEntity_Cable( aStartID + 9, - "cable." + aMaterial.name().toLowerCase() + ".08", + "cable." + aMaterial.mName.toLowerCase() + ".08", "8x " + aMaterial.mDefaultLocalName + " Cable", 0.625F, aMaterial, @@ -410,7 +408,7 @@ public class GregtechConduits { aMaterial, new GregtechMetaPipeEntity_Cable( aStartID + 10, - "cable." + aMaterial.name().toLowerCase() + ".12", + "cable." + aMaterial.mName.toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + " Cable", 0.75F, aMaterial, @@ -425,7 +423,7 @@ public class GregtechConduits { aMaterial, new GregtechMetaPipeEntity_Cable( aStartID + 11, - "cable." + aMaterial.name().toLowerCase() + ".16", + "cable." + aMaterial.mName.toLowerCase() + ".16", "16x " + aMaterial.mDefaultLocalName + " Cable", 0.875f, aMaterial, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechEnergyBuffer.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechEnergyBuffer.java index b361c6810a..1495e6e282 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechEnergyBuffer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechEnergyBuffer.java @@ -161,7 +161,7 @@ public class GregtechEnergyBuffer { | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_MAX, Character.valueOf('W'), - OrePrefixes.wireGt08.get(Materials.Superconductor), Character.valueOf('T'), + OrePrefixes.wireGt08.get(Materials.SuperconductorUHV), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); /* * GT_ModHandler.addCraftingRecipe( GregtechItemList.Energy_Buffer_1by1_MAX.get(1L, new Object[0]), diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java index b138383aff..af18105590 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java @@ -60,7 +60,7 @@ public class GregtechGeothermalThermalGenerator { | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "CEC", "GMG", "PWP", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('P'), ItemList.Electric_Piston_IV, Character.valueOf('E'), ItemList.Electric_Motor_IV, - Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Superconductor), + Character.valueOf('C'), OrePrefixes.circuit.get(Materials.SuperconductorUHV), Character.valueOf('W'), OrePrefixes.cableGt04.get(Materials.Platinum), Character.valueOf('G'), ALLOY.STELLITE.getGear(1) }); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSafeBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSafeBlock.java index e15ca67a6c..b341f867b9 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSafeBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSafeBlock.java @@ -124,7 +124,7 @@ public class GregtechSafeBlock { | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_UV, Character.valueOf('V'), OrePrefixes.circuit.get(Materials.Master), Character.valueOf('C'), OreDictNames.craftingChest, - Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Superconductor) }); + Character.valueOf('X'), OrePrefixes.circuit.get(Materials.SuperconductorUHV) }); GT_ModHandler.addCraftingRecipe( GregtechItemList.GT_Safe_MAX.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThreadedBuffers.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThreadedBuffers.java index 444b5f5e9f..739c77ce87 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThreadedBuffers.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThreadedBuffers.java @@ -1,91 +1,13 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech; -import gregtech.common.tileentities.automation.GT_MetaTileEntity_SuperBuffer; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.common.tileentities.storage.creative.GT_MetaTileEntity_InfiniteItemHolder; public class GregtechThreadedBuffers { public static void run() { - run2(); - } - - private static void run2() { - GregtechItemList.Infinite_Item_Chest.set( (new GT_MetaTileEntity_InfiniteItemHolder(31010, "infinite.chest.tier.01", "Infinite Item Chest", 1)) .getStackForm(1L)); - - /* - * This file used to contain registration and recipes for GT++ threaded super buffers. Those have now been - * deprecated and replaced by the original GT super buffers. To avoid breaking existing bases, we've assigned - * the threaded super buffer metadata IDs to a copy of the GT super buffers, with a deprecation notice attached. - * We've also provided disassembler recipes that are the reverse of the original crafting recipes, allowing - * players to reclaim their original materials as well as convert the deprecated threaded super buffer metadata - * ID item back to the original GT super buffer metadata ID item. - */ - - final String deprecationNotice = "**DEPRECATED - Drop in disassembler!** "; - GregtechItemList.Automation_Threaded_SuperBuffer_ULV.set( - (new GT_MetaTileEntity_SuperBuffer( - 31000, - "automation.superbuffer.tier.00.deprecated", - deprecationNotice + "Ultra Low Voltage Super Buffer", - 0)).getStackForm(1L)); - GregtechItemList.Automation_Threaded_SuperBuffer_LV.set( - (new GT_MetaTileEntity_SuperBuffer( - 31001, - "automation.superbuffer.tier.01.deprecated", - deprecationNotice + "Low Voltage Super Buffer", - 1)).getStackForm(1L)); - GregtechItemList.Automation_Threaded_SuperBuffer_MV.set( - (new GT_MetaTileEntity_SuperBuffer( - 31002, - "automation.superbuffer.tier.02.deprecated", - deprecationNotice + "Medium Voltage Super Buffer", - 2)).getStackForm(1L)); - GregtechItemList.Automation_Threaded_SuperBuffer_HV.set( - (new GT_MetaTileEntity_SuperBuffer( - 31003, - "automation.superbuffer.tier.03.deprecated", - deprecationNotice + "High Voltage Super Buffer", - 3)).getStackForm(1L)); - GregtechItemList.Automation_Threaded_SuperBuffer_EV.set( - (new GT_MetaTileEntity_SuperBuffer( - 31004, - "automation.superbuffer.tier.04.deprecated", - deprecationNotice + "Extreme Voltage Super Buffer", - 4)).getStackForm(1L)); - GregtechItemList.Automation_Threaded_SuperBuffer_IV.set( - (new GT_MetaTileEntity_SuperBuffer( - 31005, - "automation.superbuffer.tier.05.deprecated", - deprecationNotice + "Insane Voltage Super Buffer", - 5)).getStackForm(1L)); - GregtechItemList.Automation_Threaded_SuperBuffer_LuV.set( - (new GT_MetaTileEntity_SuperBuffer( - 31006, - "automation.superbuffer.tier.06.deprecated", - deprecationNotice + "Ludicrous Voltage Super Buffer", - 6)).getStackForm(1L)); - GregtechItemList.Automation_Threaded_SuperBuffer_ZPM.set( - (new GT_MetaTileEntity_SuperBuffer( - 31007, - "automation.superbuffer.tier.07.deprecated", - deprecationNotice + "ZPM Voltage Super Buffer", - 7)).getStackForm(1L)); - GregtechItemList.Automation_Threaded_SuperBuffer_UV.set( - (new GT_MetaTileEntity_SuperBuffer( - 31008, - "automation.superbuffer.tier.08.deprecated", - deprecationNotice + "Ultimate Voltage Super Buffer", - 8)).getStackForm(1L)); - GregtechItemList.Automation_Threaded_SuperBuffer_MAX.set( - (new GT_MetaTileEntity_SuperBuffer( - 31009, - "automation.superbuffer.tier.09.deprecated", - deprecationNotice + "Highly Ultimate Voltage Super Buffer", - 9)).getStackForm(1L)); - } } |