diff options
Diffstat (limited to 'src/main/java/goodgenerator/util')
| -rw-r--r-- | src/main/java/goodgenerator/util/CharExchanger.java | 94 | ||||
| -rw-r--r-- | src/main/java/goodgenerator/util/CrackRecipeAdder.java | 454 | ||||
| -rw-r--r-- | src/main/java/goodgenerator/util/DescTextLocalization.java | 8 | ||||
| -rw-r--r-- | src/main/java/goodgenerator/util/ItemRefer.java | 6 | ||||
| -rw-r--r-- | src/main/java/goodgenerator/util/MaterialFix.java | 207 | ||||
| -rw-r--r-- | src/main/java/goodgenerator/util/MyRecipeAdder.java | 357 | ||||
| -rw-r--r-- | src/main/java/goodgenerator/util/StructureHelper.java | 39 |
7 files changed, 945 insertions, 220 deletions
diff --git a/src/main/java/goodgenerator/util/CharExchanger.java b/src/main/java/goodgenerator/util/CharExchanger.java index 6c5a9c2175..2677e3fa69 100644 --- a/src/main/java/goodgenerator/util/CharExchanger.java +++ b/src/main/java/goodgenerator/util/CharExchanger.java @@ -5,21 +5,21 @@ import net.minecraft.util.EnumChatFormatting; public class CharExchanger { public static final String[] tierName = new String[] { - EnumChatFormatting.RED + "ULV" + EnumChatFormatting.RESET, - EnumChatFormatting.GRAY + "LV" + EnumChatFormatting.RESET, - EnumChatFormatting.AQUA + "MV" + EnumChatFormatting.RESET, - EnumChatFormatting.GOLD + "HV" + EnumChatFormatting.RESET, - EnumChatFormatting.DARK_PURPLE + "EV" + EnumChatFormatting.RESET, - EnumChatFormatting.DARK_BLUE + "IV" + EnumChatFormatting.RESET, - EnumChatFormatting.LIGHT_PURPLE + "LuV" + EnumChatFormatting.RESET, - EnumChatFormatting.WHITE + "ZPM" + EnumChatFormatting.RESET, - EnumChatFormatting.DARK_AQUA + "UV" + EnumChatFormatting.RESET, - EnumChatFormatting.DARK_RED + "UHV" + EnumChatFormatting.RESET, - EnumChatFormatting.GREEN + "UEV" + EnumChatFormatting.RESET, + EnumChatFormatting.RED + "ULV" + EnumChatFormatting.RESET, + EnumChatFormatting.GRAY + "LV" + EnumChatFormatting.RESET, + EnumChatFormatting.AQUA + "MV" + EnumChatFormatting.RESET, + EnumChatFormatting.GOLD + "HV" + EnumChatFormatting.RESET, + EnumChatFormatting.DARK_PURPLE + "EV" + EnumChatFormatting.RESET, + EnumChatFormatting.DARK_BLUE + "IV" + EnumChatFormatting.RESET, + EnumChatFormatting.LIGHT_PURPLE + "LuV" + EnumChatFormatting.RESET, + EnumChatFormatting.WHITE + "ZPM" + EnumChatFormatting.RESET, + EnumChatFormatting.DARK_AQUA + "UV" + EnumChatFormatting.RESET, + EnumChatFormatting.DARK_RED + "UHV" + EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + "UEV" + EnumChatFormatting.RESET, }; - public static char shifter(int unicode){ - return (char)unicode; + public static char shifter(int unicode) { + return (char) unicode; } public static boolean isValidCompareExpressChar(char c) { @@ -28,8 +28,7 @@ public class CharExchanger { public static boolean isValidCompareExpress(String exp) { if (exp.length() < 2) return false; - for (char c: exp.toCharArray()) - if (!isValidCompareExpressChar(c)) return false; + for (char c : exp.toCharArray()) if (!isValidCompareExpressChar(c)) return false; char c1 = exp.charAt(0), c2 = exp.charAt(1); String subExp = "" + c1; if (!Character.isDigit(c2)) subExp = subExp + c2; @@ -41,10 +40,11 @@ public class CharExchanger { case "==": case "!=": break; - default: return false; + default: + return false; } if (exp.length() == subExp.length()) return false; - for (int i = subExp.length(); i < exp.length(); i ++) { + for (int i = subExp.length(); i < exp.length(); i++) { if (!Character.isDigit(exp.charAt(i))) return false; } return true; @@ -59,17 +59,26 @@ public class CharExchanger { * "<=" : 12 <BR> * INVALID : -1 */ - public static int getOperator(String exp){ + public static int getOperator(String exp) { char c1, c2; int ret; if (exp.length() < 1) return -1; c1 = exp.charAt(0); switch (c1) { - case '>': ret = 1;break; - case '<': ret = 2;break; - case '=': ret = 3;break; - case '!': ret = 4;break; - default: return -1; + case '>': + ret = 1; + break; + case '<': + ret = 2; + break; + case '=': + ret = 3; + break; + case '!': + ret = 4; + break; + default: + return -1; } if (exp.length() > 1) c2 = exp.charAt(1); else return ret; @@ -82,22 +91,29 @@ public class CharExchanger { public static boolean compareExpression(String exp, int num) { int op = getOperator(exp); String NumExp = exp; - String[] opChar = new String[]{">", "<", "=", "!"}; + String[] opChar = new String[] {">", "<", "=", "!"}; if (op == -1) throw new IllegalArgumentException(); - for (String re: opChar) NumExp = NumExp.replace(re, ""); + for (String re : opChar) NumExp = NumExp.replace(re, ""); long num2 = 0; - for (char c: NumExp.toCharArray()) { - num2 *=10; + for (char c : NumExp.toCharArray()) { + num2 *= 10; num2 += c - '0'; } switch (op) { - case 1: return num > num2; - case 2: return num < num2; - case 13: return num == num2; - case 14: return num != num2; - case 11: return num >= num2; - case 12: return num <= num2; - default: return false; + case 1: + return num > num2; + case 2: + return num < num2; + case 13: + return num == num2; + case 14: + return num != num2; + case 11: + return num >= num2; + case 12: + return num <= num2; + default: + return false; } } @@ -107,13 +123,13 @@ public class CharExchanger { if (Character.isDigit(exp.charAt(i))) { int cnt = 0, prt = i; while (i < exp.length() && Character.isDigit(exp.charAt(i))) { - i ++; - cnt ++; + i++; + cnt++; } while (prt < exp.length() && Character.isDigit(exp.charAt(prt))) { sb.append(exp.charAt(prt)); - prt ++; - cnt --; + prt++; + cnt--; if (cnt % 3 == 0 && cnt != 0) sb.append(","); } } @@ -125,7 +141,7 @@ public class CharExchanger { public static String[] genString(String content, int len) { String[] ret = new String[len]; while (len > 0) { - len --; + len--; ret[len] = content; } return ret; diff --git a/src/main/java/goodgenerator/util/CrackRecipeAdder.java b/src/main/java/goodgenerator/util/CrackRecipeAdder.java index ea4158eb4d..3c53063301 100644 --- a/src/main/java/goodgenerator/util/CrackRecipeAdder.java +++ b/src/main/java/goodgenerator/util/CrackRecipeAdder.java @@ -15,52 +15,94 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; public class CrackRecipeAdder { - static float[] coe1 = {1.25f,1.2f,1.1f,0.9f,0.85f,0.8f,0.75f}; - static float[] coe2 = {1.4f,1.25f,1.2f,0.8f,0.75f,0.7f,0.65f}; - static float[] coe3 = {1.6f,1.5f,1.45f,0.7f,0.6f,0.55f,0.45f}; - public static void crackerAdder(FluidStack inputFluid, FluidStack cracker, FluidStack[] outputFluids, ItemStack outputItem, int num, int EUt, int Duration){ + static float[] coe1 = {1.25f, 1.2f, 1.1f, 0.9f, 0.85f, 0.8f, 0.75f}; + static float[] coe2 = {1.4f, 1.25f, 1.2f, 0.8f, 0.75f, 0.7f, 0.65f}; + static float[] coe3 = {1.6f, 1.5f, 1.45f, 0.7f, 0.6f, 0.55f, 0.45f}; + + public static void crackerAdder( + FluidStack inputFluid, + FluidStack cracker, + FluidStack[] outputFluids, + ItemStack outputItem, + int num, + int EUt, + int Duration) { String name; FluidStack[] actOutput = new FluidStack[num]; - name = inputFluid.getFluid().getName().replaceAll(" ",""); + name = inputFluid.getFluid().getName().replaceAll(" ", ""); - GT_Values.RA.addCrackingRecipe(1,inputFluid,cracker, FluidRegistry.getFluidStack("lightlycracked"+name,1000),(int)(Duration * 0.8),EUt); - GT_Values.RA.addCrackingRecipe(2,inputFluid,cracker, FluidRegistry.getFluidStack("moderatelycracked"+name,1000),Duration,EUt); - GT_Values.RA.addCrackingRecipe(3,inputFluid,cracker, FluidRegistry.getFluidStack("heavilycracked"+name,1000),(int)(Duration * 1.2),EUt); + GT_Values.RA.addCrackingRecipe( + 1, + inputFluid, + cracker, + FluidRegistry.getFluidStack("lightlycracked" + name, 1000), + (int) (Duration * 0.8), + EUt); + GT_Values.RA.addCrackingRecipe( + 2, inputFluid, cracker, FluidRegistry.getFluidStack("moderatelycracked" + name, 1000), Duration, EUt); + GT_Values.RA.addCrackingRecipe( + 3, + inputFluid, + cracker, + FluidRegistry.getFluidStack("heavilycracked" + name, 1000), + (int) (Duration * 1.2), + EUt); - for ( int i = num - 1, j = 0; i >= 0; i --, j ++ ){ + for (int i = num - 1, j = 0; i >= 0; i--, j++) { Fluid tmp1 = outputFluids[i].getFluid(); - int tmp2 = (int)(outputFluids[i].amount * coe1[i]); + int tmp2 = (int) (outputFluids[i].amount * coe1[i]); actOutput[j] = new FluidStack(tmp1, tmp2); } - GT_Values.RA.addUniversalDistillationRecipe(FluidRegistry.getFluidStack("lightlycracked"+name,1000),actOutput,outputItem,Duration / 2,EUt / 3); + GT_Values.RA.addUniversalDistillationRecipe( + FluidRegistry.getFluidStack("lightlycracked" + name, 1000), + actOutput, + outputItem, + Duration / 2, + EUt / 3); - for ( int i = num - 1, j = 0; i >= 0; i --, j ++ ){ + for (int i = num - 1, j = 0; i >= 0; i--, j++) { Fluid tmp1 = outputFluids[i].getFluid(); - int tmp2 = (int)(outputFluids[i].amount * coe2[i]); + int tmp2 = (int) (outputFluids[i].amount * coe2[i]); actOutput[j] = new FluidStack(tmp1, tmp2); } - GT_Values.RA.addUniversalDistillationRecipe(FluidRegistry.getFluidStack("moderatelycracked"+name,1000),actOutput,outputItem,Duration / 2,EUt / 3); + GT_Values.RA.addUniversalDistillationRecipe( + FluidRegistry.getFluidStack("moderatelycracked" + name, 1000), + actOutput, + outputItem, + Duration / 2, + EUt / 3); - for ( int i = num - 1, j = 0; i >= 0; i --, j ++ ){ + for (int i = num - 1, j = 0; i >= 0; i--, j++) { Fluid tmp1 = outputFluids[i].getFluid(); - int tmp2 = (int)(outputFluids[i].amount * coe3[i]); + int tmp2 = (int) (outputFluids[i].amount * coe3[i]); actOutput[j] = new FluidStack(tmp1, tmp2); } - GT_Values.RA.addUniversalDistillationRecipe(FluidRegistry.getFluidStack("heavilycracked"+name,1000),actOutput,outputItem,Duration / 2,EUt / 3); + GT_Values.RA.addUniversalDistillationRecipe( + FluidRegistry.getFluidStack("heavilycracked" + name, 1000), + actOutput, + outputItem, + Duration / 2, + EUt / 3); } - public static void addUniversalCircuitAssemblerRecipe(ItemStack[] inputs, ItemStack output, int solders, int duration, int EUt, boolean isClean) { - GT_Values.RA.addCircuitAssemblerRecipe(inputs, Materials.SolderingAlloy.getMolten(solders), output, duration, EUt, isClean); - GT_Values.RA.addCircuitAssemblerRecipe(inputs, Materials.Tin.getMolten(solders * 2), output, duration, EUt, isClean); - GT_Values.RA.addCircuitAssemblerRecipe(inputs, Materials.Lead.getMolten(solders * 4), output, duration, EUt, isClean); + public static void addUniversalCircuitAssemblerRecipe( + ItemStack[] inputs, ItemStack output, int solders, int duration, int EUt, boolean isClean) { + GT_Values.RA.addCircuitAssemblerRecipe( + inputs, Materials.SolderingAlloy.getMolten(solders), output, duration, EUt, isClean); + GT_Values.RA.addCircuitAssemblerRecipe( + inputs, Materials.Tin.getMolten(solders * 2), output, duration, EUt, isClean); + GT_Values.RA.addCircuitAssemblerRecipe( + inputs, Materials.Lead.getMolten(solders * 4), output, duration, EUt, isClean); } - public static void addUniversalAssemblerRecipe(ItemStack[] inputs, ItemStack output, int solders, int duration, int EUt, boolean isClean) { - GT_Values.RA.addAssemblerRecipe(inputs, Materials.SolderingAlloy.getMolten(solders), output, duration, EUt, isClean); + public static void addUniversalAssemblerRecipe( + ItemStack[] inputs, ItemStack output, int solders, int duration, int EUt, boolean isClean) { + GT_Values.RA.addAssemblerRecipe( + inputs, Materials.SolderingAlloy.getMolten(solders), output, duration, EUt, isClean); GT_Values.RA.addAssemblerRecipe(inputs, Materials.Tin.getMolten(solders * 2), output, duration, EUt, isClean); GT_Values.RA.addAssemblerRecipe(inputs, Materials.Lead.getMolten(solders * 4), output, duration, EUt, isClean); } @@ -69,9 +111,19 @@ public class CrackRecipeAdder { ItemStack input = material.get(OrePrefixes.dust, 1); ItemStack output = level > 1750 ? material.get(OrePrefixes.ingotHot, 1) : material.get(OrePrefixes.ingot, 1); if (gas) { - GT_Values.RA.addBlastRecipe(input, GT_Utility.getIntegratedCircuit(11), Materials.Helium.getGas(1000), null, output, null, duration, EUt, level); + GT_Values.RA.addBlastRecipe( + input, + GT_Utility.getIntegratedCircuit(11), + Materials.Helium.getGas(1000), + null, + output, + null, + duration, + EUt, + level); } else { - GT_Values.RA.addBlastRecipe(input, GT_Utility.getIntegratedCircuit(1), null, null, output, null, duration, EUt, level); + GT_Values.RA.addBlastRecipe( + input, GT_Utility.getIntegratedCircuit(1), null, null, output, null, duration, EUt, level); } } @@ -83,21 +135,126 @@ public class CrackRecipeAdder { public static void registerPipe(int ID, Werkstoff material, int flow, int temp, boolean gas) { String unName = material.getDefaultName().replace(" ", "_"); String Name = material.getDefaultName(); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeTiny.get(material.getBridgeMaterial()), new GT_MetaPipeEntity_Fluid(ID, "GT_Pipe_" + unName + "_Tiny", "Tiny " + Name + " Fluid Pipe", 0.25F, material.getBridgeMaterial(), flow / 6, temp, gas).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(material.getBridgeMaterial()), new GT_MetaPipeEntity_Fluid(ID + 1, "GT_Pipe_" + unName + "_Small", "Small " + Name + " Fluid Pipe", 0.375F, material.getBridgeMaterial(), flow / 3, temp, gas).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(material.getBridgeMaterial()), new GT_MetaPipeEntity_Fluid(ID + 2, "GT_Pipe_" + unName, Name + " Fluid Pipe", 0.5F, material.getBridgeMaterial(), flow, temp, gas).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(material.getBridgeMaterial()), new GT_MetaPipeEntity_Fluid(ID + 3, "GT_Pipe_" + unName + "_Large", "Large " + Name + " Fluid Pipe", 0.75F, material.getBridgeMaterial(), flow * 2, temp, gas).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(material.getBridgeMaterial()), new GT_MetaPipeEntity_Fluid(ID + 4, "GT_Pipe_" + unName + "_Huge", "Huge " + Name + " Fluid Pipe", 0.875F, material.getBridgeMaterial(), flow * 4, temp, gas).getStackForm(1L)); - GT_Values.RA.addExtruderRecipe(material.get(OrePrefixes.ingot, 1), ItemList.Shape_Extruder_Pipe_Tiny.get(0), material.get(OrePrefixes.pipeTiny, 2), (int) material.getStats().getMass(), 120); - GT_Values.RA.addExtruderRecipe(material.get(OrePrefixes.ingot, 1), ItemList.Shape_Extruder_Pipe_Small.get(0), material.get(OrePrefixes.pipeSmall, 1), (int) material.getStats().getMass() * 2, 120); - GT_Values.RA.addExtruderRecipe(material.get(OrePrefixes.ingot, 3), ItemList.Shape_Extruder_Pipe_Medium.get(0), material.get(OrePrefixes.pipeMedium, 1), (int) material.getStats().getMass() * 6, 120); - GT_Values.RA.addExtruderRecipe(material.get(OrePrefixes.ingot, 6), ItemList.Shape_Extruder_Pipe_Large.get(0), material.get(OrePrefixes.pipeLarge, 1), (int) material.getStats().getMass() * 12, 120); - GT_Values.RA.addExtruderRecipe(material.get(OrePrefixes.ingot, 12), ItemList.Shape_Extruder_Pipe_Huge.get(0), material.get(OrePrefixes.pipeHuge, 1), (int) material.getStats().getMass() * 24, 120); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Pipe_Tiny.get(0), material.getMolten(72), material.get(OrePrefixes.pipeTiny, 1), (int) material.getStats().getMass(), 30); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Pipe_Small.get(0), material.getMolten(144), material.get(OrePrefixes.pipeSmall, 1), (int) material.getStats().getMass() * 2, 30); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Pipe_Medium.get(0), material.getMolten(432), material.get(OrePrefixes.pipeMedium, 1), (int) material.getStats().getMass() * 6, 30); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Pipe_Large.get(0), material.getMolten(864), material.get(OrePrefixes.pipeLarge, 1), (int) material.getStats().getMass() * 12, 30); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Pipe_Huge.get(0), material.getMolten(1728), material.get(OrePrefixes.pipeHuge, 1), (int) material.getStats().getMass() * 24, 30); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeTiny.get(material.getBridgeMaterial()), + new GT_MetaPipeEntity_Fluid( + ID, + "GT_Pipe_" + unName + "_Tiny", + "Tiny " + Name + " Fluid Pipe", + 0.25F, + material.getBridgeMaterial(), + flow / 6, + temp, + gas) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeSmall.get(material.getBridgeMaterial()), + new GT_MetaPipeEntity_Fluid( + ID + 1, + "GT_Pipe_" + unName + "_Small", + "Small " + Name + " Fluid Pipe", + 0.375F, + material.getBridgeMaterial(), + flow / 3, + temp, + gas) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeMedium.get(material.getBridgeMaterial()), + new GT_MetaPipeEntity_Fluid( + ID + 2, + "GT_Pipe_" + unName, + Name + " Fluid Pipe", + 0.5F, + material.getBridgeMaterial(), + flow, + temp, + gas) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeLarge.get(material.getBridgeMaterial()), + new GT_MetaPipeEntity_Fluid( + ID + 3, + "GT_Pipe_" + unName + "_Large", + "Large " + Name + " Fluid Pipe", + 0.75F, + material.getBridgeMaterial(), + flow * 2, + temp, + gas) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeHuge.get(material.getBridgeMaterial()), + new GT_MetaPipeEntity_Fluid( + ID + 4, + "GT_Pipe_" + unName + "_Huge", + "Huge " + Name + " Fluid Pipe", + 0.875F, + material.getBridgeMaterial(), + flow * 4, + temp, + gas) + .getStackForm(1L)); + GT_Values.RA.addExtruderRecipe( + material.get(OrePrefixes.ingot, 1), + ItemList.Shape_Extruder_Pipe_Tiny.get(0), + material.get(OrePrefixes.pipeTiny, 2), + (int) material.getStats().getMass(), + 120); + GT_Values.RA.addExtruderRecipe( + material.get(OrePrefixes.ingot, 1), + ItemList.Shape_Extruder_Pipe_Small.get(0), + material.get(OrePrefixes.pipeSmall, 1), + (int) material.getStats().getMass() * 2, + 120); + GT_Values.RA.addExtruderRecipe( + material.get(OrePrefixes.ingot, 3), + ItemList.Shape_Extruder_Pipe_Medium.get(0), + material.get(OrePrefixes.pipeMedium, 1), + (int) material.getStats().getMass() * 6, + 120); + GT_Values.RA.addExtruderRecipe( + material.get(OrePrefixes.ingot, 6), + ItemList.Shape_Extruder_Pipe_Large.get(0), + material.get(OrePrefixes.pipeLarge, 1), + (int) material.getStats().getMass() * 12, + 120); + GT_Values.RA.addExtruderRecipe( + material.get(OrePrefixes.ingot, 12), + ItemList.Shape_Extruder_Pipe_Huge.get(0), + material.get(OrePrefixes.pipeHuge, 1), + (int) material.getStats().getMass() * 24, + 120); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Pipe_Tiny.get(0), + material.getMolten(72), + material.get(OrePrefixes.pipeTiny, 1), + (int) material.getStats().getMass(), + 30); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Pipe_Small.get(0), + material.getMolten(144), + material.get(OrePrefixes.pipeSmall, 1), + (int) material.getStats().getMass() * 2, + 30); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Pipe_Medium.get(0), + material.getMolten(432), + material.get(OrePrefixes.pipeMedium, 1), + (int) material.getStats().getMass() * 6, + 30); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Pipe_Large.get(0), + material.getMolten(864), + material.get(OrePrefixes.pipeLarge, 1), + (int) material.getStats().getMass() * 12, + 30); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Pipe_Huge.get(0), + material.getMolten(1728), + material.get(OrePrefixes.pipeHuge, 1), + (int) material.getStats().getMass() * 24, + 30); } public static void registerWire(int ID, Werkstoff material, int aAmperage, int aVoltage, int aLoss, boolean cover) { @@ -108,23 +265,208 @@ public class CrackRecipeAdder { String aTextWire2 = " Wire"; String aTextCable2 = " Cable"; int aLossInsulated = aLoss / 4; - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt01, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable(ID + 0, aTextWire1 + unName + ".01", "1x " + Name + aTextWire2, 0.125F, material.getBridgeMaterial(), aLoss, 1L * aAmperage, aVoltage, false, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt02, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable(ID + 1, aTextWire1 + unName + ".02", "2x " + Name + aTextWire2, 0.25F, material.getBridgeMaterial(), aLoss, 2L * aAmperage, aVoltage, false, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt04, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable(ID + 2, aTextWire1 + unName + ".04", "4x " + Name + aTextWire2, 0.375F, material.getBridgeMaterial(), aLoss, 4L * aAmperage, aVoltage, false, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt08, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable(ID + 3, aTextWire1 + unName + ".08", "8x " + Name + aTextWire2, 0.5F, material.getBridgeMaterial(), aLoss, 8L * aAmperage, aVoltage, false, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt12, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable(ID + 4, aTextWire1 + unName + ".12", "12x " + Name + aTextWire2, 0.625F, material.getBridgeMaterial(), aLoss, 12L * aAmperage, aVoltage, false, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt16, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable(ID + 5, aTextWire1 + unName + ".16", "16x " + Name + aTextWire2, 0.75F, material.getBridgeMaterial(), aLoss, 16L * aAmperage, aVoltage, false, true).getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.wireGt01, + material.getBridgeMaterial(), + new GT_MetaPipeEntity_Cable( + ID + 0, + aTextWire1 + unName + ".01", + "1x " + Name + aTextWire2, + 0.125F, + material.getBridgeMaterial(), + aLoss, + 1L * aAmperage, + aVoltage, + false, + true) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.wireGt02, + material.getBridgeMaterial(), + new GT_MetaPipeEntity_Cable( + ID + 1, + aTextWire1 + unName + ".02", + "2x " + Name + aTextWire2, + 0.25F, + material.getBridgeMaterial(), + aLoss, + 2L * aAmperage, + aVoltage, + false, + true) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.wireGt04, + material.getBridgeMaterial(), + new GT_MetaPipeEntity_Cable( + ID + 2, + aTextWire1 + unName + ".04", + "4x " + Name + aTextWire2, + 0.375F, + material.getBridgeMaterial(), + aLoss, + 4L * aAmperage, + aVoltage, + false, + true) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.wireGt08, + material.getBridgeMaterial(), + new GT_MetaPipeEntity_Cable( + ID + 3, + aTextWire1 + unName + ".08", + "8x " + Name + aTextWire2, + 0.5F, + material.getBridgeMaterial(), + aLoss, + 8L * aAmperage, + aVoltage, + false, + true) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.wireGt12, + material.getBridgeMaterial(), + new GT_MetaPipeEntity_Cable( + ID + 4, + aTextWire1 + unName + ".12", + "12x " + Name + aTextWire2, + 0.625F, + material.getBridgeMaterial(), + aLoss, + 12L * aAmperage, + aVoltage, + false, + true) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.wireGt16, + material.getBridgeMaterial(), + new GT_MetaPipeEntity_Cable( + ID + 5, + aTextWire1 + unName + ".16", + "16x " + Name + aTextWire2, + 0.75F, + material.getBridgeMaterial(), + aLoss, + 16L * aAmperage, + aVoltage, + false, + true) + .getStackForm(1L)); if (cover) { - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt01, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable(ID + 6, aTextCable1 + unName + ".01", "1x " + Name + aTextCable2, 0.25F, material.getBridgeMaterial(), aLossInsulated, 1L * aAmperage, aVoltage, true, false).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt02, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable(ID + 7, aTextCable1 + unName + ".02", "2x " + Name + aTextCable2, 0.375F, material.getBridgeMaterial(), aLossInsulated, 2L * aAmperage, aVoltage, true, false).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt04, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable(ID + 8, aTextCable1 + unName + ".04", "4x " + Name + aTextCable2, 0.5F, material.getBridgeMaterial(), aLossInsulated, 4L * aAmperage, aVoltage, true, false).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt08, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable(ID + 9, aTextCable1 + unName + ".08", "8x " + Name + aTextCable2, 0.625F, material.getBridgeMaterial(), aLossInsulated, 8L * aAmperage, aVoltage, true, false).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt12, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable(ID + 10, aTextCable1 + unName + ".12", "12x " + Name + aTextCable2, 0.75F, material.getBridgeMaterial(), aLossInsulated, 12L * aAmperage, aVoltage, true, false).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt16, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable(ID + 11, aTextCable1 + unName + ".16", "16x " + Name + aTextCable2, 0.875F, material.getBridgeMaterial(), aLossInsulated, 16L * aAmperage, aVoltage, true, false).getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.cableGt01, + material.getBridgeMaterial(), + new GT_MetaPipeEntity_Cable( + ID + 6, + aTextCable1 + unName + ".01", + "1x " + Name + aTextCable2, + 0.25F, + material.getBridgeMaterial(), + aLossInsulated, + 1L * aAmperage, + aVoltage, + true, + false) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.cableGt02, + material.getBridgeMaterial(), + new GT_MetaPipeEntity_Cable( + ID + 7, + aTextCable1 + unName + ".02", + "2x " + Name + aTextCable2, + 0.375F, + material.getBridgeMaterial(), + aLossInsulated, + 2L * aAmperage, + aVoltage, + true, + false) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.cableGt04, + material.getBridgeMaterial(), + new GT_MetaPipeEntity_Cable( + ID + 8, + aTextCable1 + unName + ".04", + "4x " + Name + aTextCable2, + 0.5F, + material.getBridgeMaterial(), + aLossInsulated, + 4L * aAmperage, + aVoltage, + true, + false) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.cableGt08, + material.getBridgeMaterial(), + new GT_MetaPipeEntity_Cable( + ID + 9, + aTextCable1 + unName + ".08", + "8x " + Name + aTextCable2, + 0.625F, + material.getBridgeMaterial(), + aLossInsulated, + 8L * aAmperage, + aVoltage, + true, + false) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.cableGt12, + material.getBridgeMaterial(), + new GT_MetaPipeEntity_Cable( + ID + 10, + aTextCable1 + unName + ".12", + "12x " + Name + aTextCable2, + 0.75F, + material.getBridgeMaterial(), + aLossInsulated, + 12L * aAmperage, + aVoltage, + true, + false) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.cableGt16, + material.getBridgeMaterial(), + new GT_MetaPipeEntity_Cable( + ID + 11, + aTextCable1 + unName + ".16", + "16x " + Name + aTextCable2, + 0.875F, + material.getBridgeMaterial(), + aLossInsulated, + 16L * aAmperage, + aVoltage, + true, + false) + .getStackForm(1L)); } - GT_Values.RA.addWiremillRecipe(material.get(OrePrefixes.ingot, 1), material.get(OrePrefixes.wireGt01, 2), (int) material.getStats().getMass() * 4, 90); - GT_Values.RA.addWiremillRecipe(material.get(OrePrefixes.stick, 1), material.get(OrePrefixes.wireGt01, 1), (int) material.getStats().getMass(), 90); - GT_Values.RA.addWiremillRecipe(material.get(OrePrefixes.wireGt01, 1), material.get(OrePrefixes.wireFine, 4), (int) material.getStats().getMass() * 4, 7); - GT_Values.RA.addExtruderRecipe(material.get(OrePrefixes.ingot, 1), ItemList.Shape_Extruder_Wire.get(0), material.get(OrePrefixes.wireGt01, 2), (int) material.getStats().getMass() * 8, 480); + GT_Values.RA.addWiremillRecipe( + material.get(OrePrefixes.ingot, 1), + material.get(OrePrefixes.wireGt01, 2), + (int) material.getStats().getMass() * 4, + 90); + GT_Values.RA.addWiremillRecipe( + material.get(OrePrefixes.stick, 1), + material.get(OrePrefixes.wireGt01, 1), + (int) material.getStats().getMass(), + 90); + GT_Values.RA.addWiremillRecipe( + material.get(OrePrefixes.wireGt01, 1), + material.get(OrePrefixes.wireFine, 4), + (int) material.getStats().getMass() * 4, + 7); + GT_Values.RA.addExtruderRecipe( + material.get(OrePrefixes.ingot, 1), + ItemList.Shape_Extruder_Wire.get(0), + material.get(OrePrefixes.wireGt01, 2), + (int) material.getStats().getMass() * 8, + 480); } } diff --git a/src/main/java/goodgenerator/util/DescTextLocalization.java b/src/main/java/goodgenerator/util/DescTextLocalization.java index 755397a864..b65f529475 100644 --- a/src/main/java/goodgenerator/util/DescTextLocalization.java +++ b/src/main/java/goodgenerator/util/DescTextLocalization.java @@ -5,11 +5,13 @@ import net.minecraft.util.StatCollector; public class DescTextLocalization { - public static final String BLUE_PRINT_INFO = "Follow the" + EnumChatFormatting.BLUE + " Structure" + EnumChatFormatting.DARK_BLUE + "Lib" + EnumChatFormatting.GRAY + " hologram projector to build the main structure."; + public static final String BLUE_PRINT_INFO = + "Follow the" + EnumChatFormatting.BLUE + " Structure" + EnumChatFormatting.DARK_BLUE + "Lib" + + EnumChatFormatting.GRAY + " hologram projector to build the main structure."; - public static String[] addText(String preFix, int length){ + public static String[] addText(String preFix, int length) { String[] text = new String[length]; - for (int i = 0; i < length; i ++) { + for (int i = 0; i < length; i++) { text[i] = StatCollector.translateToLocal(preFix + "." + i); } return text; diff --git a/src/main/java/goodgenerator/util/ItemRefer.java b/src/main/java/goodgenerator/util/ItemRefer.java index 205296d166..86d3e02fdf 100644 --- a/src/main/java/goodgenerator/util/ItemRefer.java +++ b/src/main/java/goodgenerator/util/ItemRefer.java @@ -1,14 +1,14 @@ package goodgenerator.util; +import static goodgenerator.loader.FuelRodLoader.*; +import static goodgenerator.loader.Loaders.*; + import gregtech.api.util.GT_Utility; import ic2.core.Ic2Items; import net.minecraft.block.Block; import net.minecraft.item |
