From 0d9aab72aa570f13dc3e32e0d32b3f3a95f95e0a Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Mon, 30 Jan 2023 10:56:42 -0800 Subject: [ci skip] spotlessApply with the new settings --- .../java/gregtech/api/enums/ConfigCategories.java | 4 +- src/main/java/gregtech/api/enums/Dyes.java | 31 +- src/main/java/gregtech/api/enums/Element.java | 13 +- src/main/java/gregtech/api/enums/FluidState.java | 6 +- .../java/gregtech/api/enums/GT_HatchElement.java | 29 +- src/main/java/gregtech/api/enums/GT_Values.java | 406 +- .../java/gregtech/api/enums/HeatingCoilLevel.java | 33 +- src/main/java/gregtech/api/enums/ItemList.java | 219 +- .../java/gregtech/api/enums/MaterialBuilder.java | 58 +- src/main/java/gregtech/api/enums/Materials.java | 685 ++-- .../java/gregtech/api/enums/MaterialsBotania.java | 119 +- .../java/gregtech/api/enums/MaterialsKevlar.java | 555 +-- .../java/gregtech/api/enums/MaterialsOreAlum.java | 72 +- src/main/java/gregtech/api/enums/OrePrefixes.java | 4177 ++++---------------- src/main/java/gregtech/api/enums/ParticleFX.java | 1 + .../java/gregtech/api/enums/SoundResource.java | 19 +- src/main/java/gregtech/api/enums/SteamVariant.java | 1 + src/main/java/gregtech/api/enums/SubTag.java | 83 +- src/main/java/gregtech/api/enums/TC_Aspects.java | 24 +- src/main/java/gregtech/api/enums/TextureSet.java | 352 +- src/main/java/gregtech/api/enums/Textures.java | 1099 ++--- src/main/java/gregtech/api/enums/Tier.java | 891 ++--- src/main/java/gregtech/api/enums/TierEU.java | 2 +- .../java/gregtech/api/enums/ToolDictNames.java | 1 + 24 files changed, 2520 insertions(+), 6360 deletions(-) (limited to 'src/main/java/gregtech/api/enums') diff --git a/src/main/java/gregtech/api/enums/ConfigCategories.java b/src/main/java/gregtech/api/enums/ConfigCategories.java index ae4b425e5e..e4a647db22 100644 --- a/src/main/java/gregtech/api/enums/ConfigCategories.java +++ b/src/main/java/gregtech/api/enums/ConfigCategories.java @@ -1,6 +1,7 @@ package gregtech.api.enums; public enum ConfigCategories { + news, general, machineconfig, @@ -15,8 +16,7 @@ public enum ConfigCategories { heatdamage, oreprocessingoutputmultiplier, blastfurnacerequirements, - blastinductionsmelter, - ; + blastinductionsmelter,; } public enum Recipes { diff --git a/src/main/java/gregtech/api/enums/Dyes.java b/src/main/java/gregtech/api/enums/Dyes.java index 2a546e6138..a0b9f87593 100644 --- a/src/main/java/gregtech/api/enums/Dyes.java +++ b/src/main/java/gregtech/api/enums/Dyes.java @@ -1,13 +1,16 @@ package gregtech.api.enums; -import gregtech.api.interfaces.IColorModulationContainer; -import gregtech.api.objects.GT_ArrayList; -import gregtech.api.util.GT_Utility; import java.util.ArrayList; + import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; +import gregtech.api.interfaces.IColorModulationContainer; +import gregtech.api.objects.GT_ArrayList; +import gregtech.api.util.GT_Utility; + public enum Dyes implements IColorModulationContainer { + /** * The valid Colors, see VALUES Array below */ @@ -38,24 +41,8 @@ public enum Dyes implements IColorModulationContainer { CONSTRUCTION_FOAM(-1, 64, 64, 64, "Construction Foam"), MACHINE_METAL(-1, 210, 220, 255, "Machine Metal"); - public static final Dyes[] VALUES = { - dyeBlack, - dyeRed, - dyeGreen, - dyeBrown, - dyeBlue, - dyePurple, - dyeCyan, - dyeLightGray, - dyeGray, - dyePink, - dyeLime, - dyeYellow, - dyeLightBlue, - dyeMagenta, - dyeOrange, - dyeWhite - }; + public static final Dyes[] VALUES = { dyeBlack, dyeRed, dyeGreen, dyeBrown, dyeBlue, dyePurple, dyeCyan, + dyeLightGray, dyeGray, dyePink, dyeLime, dyeYellow, dyeLightBlue, dyeMagenta, dyeOrange, dyeWhite }; public final byte mIndex; public final String mName; @@ -66,7 +53,7 @@ public enum Dyes implements IColorModulationContainer { Dyes(int aIndex, int aR, int aG, int aB, String aName) { mIndex = (byte) aIndex; mName = aName; - mRGBa = new short[] {(short) aR, (short) aG, (short) aB, 0}; + mRGBa = new short[] { (short) aR, (short) aG, (short) aB, 0 }; mOriginalRGBa = mRGBa.clone(); } diff --git a/src/main/java/gregtech/api/enums/Element.java b/src/main/java/gregtech/api/enums/Element.java index 450a85d3d6..c66b9630a3 100644 --- a/src/main/java/gregtech/api/enums/Element.java +++ b/src/main/java/gregtech/api/enums/Element.java @@ -8,6 +8,7 @@ import java.util.Map; * This is some kind of Periodic Table, which I use to determine Properties of the Materials. */ public enum Element { + _NULL(0, 0, 0, -1, null, "", false), H(1, 0, 0, -1, null, "Hydrogen", false), D(1, 1, 0, -1, "H", "Deuterium", true), @@ -288,18 +289,13 @@ public enum Element { /** * @param aProtons Amount of Protons. Antiprotons if negative. - * @param aNeutrons Amount of Neutrons. Antineutrons if negative. (I could have made mistakes with the Neutron amount calculation, please tell me if I did something wrong) + * @param aNeutrons Amount of Neutrons. Antineutrons if negative. (I could have made mistakes with the + * Neutron amount calculation, please tell me if I did something wrong) * @param aHalfLifeSeconds Amount of Half Life this Material has in Seconds. -1 for stable Materials. * @param aDecayTo String representing the Elements it decays to. Separated by an '&' Character. * @param aName Name of the Element */ - Element( - long aProtons, - long aNeutrons, - long aAdditionalMass, - long aHalfLifeSeconds, - String aDecayTo, - String aName, + Element(long aProtons, long aNeutrons, long aAdditionalMass, long aHalfLifeSeconds, String aDecayTo, String aName, boolean aIsIsotope) { mProtons = aProtons; mNeutrons = aNeutrons; @@ -331,6 +327,7 @@ public enum Element { * A companion object to workaround java limitations */ private static final class Companion { + /** * Why is this a separate map and populated by enum constructor instead of a Map prepoluated with values()? * Because apparently there are people hacking into this enum via EnumHelper. diff --git a/src/main/java/gregtech/api/enums/FluidState.java b/src/main/java/gregtech/api/enums/FluidState.java index a6e81ab43d..e84657cc6a 100644 --- a/src/main/java/gregtech/api/enums/FluidState.java +++ b/src/main/java/gregtech/api/enums/FluidState.java @@ -1,17 +1,17 @@ package gregtech.api.enums; public enum FluidState { + GAS, LIQUID, MOLTEN, PLASMA, SLURRY; - public static final FluidState[] VALID_STATES = new FluidState[] {SLURRY, LIQUID, GAS, PLASMA, MOLTEN}; + public static final FluidState[] VALID_STATES = new FluidState[] { SLURRY, LIQUID, GAS, PLASMA, MOLTEN }; public static FluidState fromValue(int stateValue) { - return stateValue >= 0 && stateValue < FluidState.VALID_STATES.length - ? FluidState.VALID_STATES[stateValue] + return stateValue >= 0 && stateValue < FluidState.VALID_STATES.length ? FluidState.VALID_STATES[stateValue] : FluidState.LIQUID; } } diff --git a/src/main/java/gregtech/api/enums/GT_HatchElement.java b/src/main/java/gregtech/api/enums/GT_HatchElement.java index 68702f5eb5..8d8603a10e 100644 --- a/src/main/java/gregtech/api/enums/GT_HatchElement.java +++ b/src/main/java/gregtech/api/enums/GT_HatchElement.java @@ -1,5 +1,9 @@ package gregtech.api.enums; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + import gregtech.api.interfaces.IHatchElement; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; @@ -13,61 +17,68 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Outpu import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.util.GT_ExoticEnergyInputHelper; import gregtech.api.util.IGT_HatchAdder; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; public enum GT_HatchElement implements IHatchElement { + Muffler(GT_MetaTileEntity_MultiBlockBase::addMufflerToMachineList, GT_MetaTileEntity_Hatch_Muffler.class) { + @Override public long count(GT_MetaTileEntity_MultiBlockBase t) { return t.mMufflerHatches.size(); } }, - Maintenance( - GT_MetaTileEntity_MultiBlockBase::addMaintenanceToMachineList, GT_MetaTileEntity_Hatch_Maintenance.class) { + Maintenance(GT_MetaTileEntity_MultiBlockBase::addMaintenanceToMachineList, + GT_MetaTileEntity_Hatch_Maintenance.class) { + @Override public long count(GT_MetaTileEntity_MultiBlockBase t) { return t.mMaintenanceHatches.size(); } }, InputHatch(GT_MetaTileEntity_MultiBlockBase::addInputHatchToMachineList, GT_MetaTileEntity_Hatch_Input.class) { + @Override public long count(GT_MetaTileEntity_MultiBlockBase t) { return t.mInputHatches.size(); } }, InputBus(GT_MetaTileEntity_MultiBlockBase::addInputBusToMachineList, GT_MetaTileEntity_Hatch_InputBus.class) { + @Override public long count(GT_MetaTileEntity_MultiBlockBase t) { return t.mInputBusses.size(); } }, OutputHatch(GT_MetaTileEntity_MultiBlockBase::addOutputHatchToMachineList, GT_MetaTileEntity_Hatch_Output.class) { + @Override public long count(GT_MetaTileEntity_MultiBlockBase t) { return t.mOutputHatches.size(); } }, OutputBus(GT_MetaTileEntity_MultiBlockBase::addOutputBusToMachineList, GT_MetaTileEntity_Hatch_OutputBus.class) { + @Override public long count(GT_MetaTileEntity_MultiBlockBase t) { return t.mOutputBusses.size(); } }, Energy(GT_MetaTileEntity_MultiBlockBase::addEnergyInputToMachineList, GT_MetaTileEntity_Hatch_Energy.class) { + @Override public long count(GT_MetaTileEntity_MultiBlockBase t) { return t.mEnergyHatches.size(); } }, Dynamo(GT_MetaTileEntity_MultiBlockBase::addDynamoToMachineList, GT_MetaTileEntity_Hatch_Dynamo.class) { + @Override public long count(GT_MetaTileEntity_MultiBlockBase t) { return t.mDynamoHatches.size(); } }, ExoticEnergy(GT_MetaTileEntity_MultiBlockBase::addExoticEnergyInputToMachineList) { + @Override public List> mteClasses() { return GT_ExoticEnergyInputHelper.getAllClasses(); @@ -77,14 +88,14 @@ public enum GT_HatchElement implements IHatchElement> mteClasses; private final IGT_HatchAdder adder; @SafeVarargs - GT_HatchElement( - IGT_HatchAdder adder, Class... mteClasses) { + GT_HatchElement(IGT_HatchAdder adder, + Class... mteClasses) { this.mteClasses = Collections.unmodifiableList(Arrays.asList(mteClasses)); this.adder = adder; } diff --git a/src/main/java/gregtech/api/enums/GT_Values.java b/src/main/java/gregtech/api/enums/GT_Values.java index 8cadd17246..ef921a0339 100644 --- a/src/main/java/gregtech/api/enums/GT_Values.java +++ b/src/main/java/gregtech/api/enums/GT_Values.java @@ -1,12 +1,8 @@ package gregtech.api.enums; -import gregtech.api.fluid.FluidTankGT; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.interfaces.internal.IGT_Mod; -import gregtech.api.interfaces.internal.IGT_RecipeAdder; -import gregtech.api.net.IGT_NetworkHandler; import java.math.BigInteger; import java.util.*; + import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; @@ -15,12 +11,20 @@ import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidTank; import net.minecraftforge.oredict.OreDictionary; +import gregtech.api.fluid.FluidTankGT; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.internal.IGT_Mod; +import gregtech.api.interfaces.internal.IGT_RecipeAdder; +import gregtech.api.net.IGT_NetworkHandler; + /** * Made for static imports, this Class is just a Helper. *

- * I am doing this to have a better Table alike view on my Code, so I can change things faster using the Block Selection Mode of eclipse. + * I am doing this to have a better Table alike view on my Code, so I can change things faster using the Block Selection + * Mode of eclipse. *

- * Go to "Window > Preferences > Java > Editor > Content Assist > Favorites" to set static importable Constant Classes such as this one as AutoCompleteable. + * Go to "Window > Preferences > Java > Editor > Content Assist > Favorites" to set static importable Constant Classes + * such as this one as AutoCompleteable. */ @SuppressWarnings("unused") // API Legitimately has unused fields and methods public class GT_Values { @@ -39,31 +43,19 @@ public class GT_Values { * The first 32 Bits */ @SuppressWarnings("PointlessBitwiseExpression") // Nicer source layout this way - public static final int[] B = new int[] { - 1 << 0, 1 << 1, 1 << 2, - 1 << 3, 1 << 4, 1 << 5, - 1 << 6, 1 << 7, 1 << 8, - 1 << 9, 1 << 10, 1 << 11, - 1 << 12, 1 << 13, 1 << 14, - 1 << 15, 1 << 16, 1 << 17, - 1 << 18, 1 << 19, 1 << 20, - 1 << 21, 1 << 22, 1 << 23, - 1 << 24, 1 << 25, 1 << 26, - 1 << 27, 1 << 28, 1 << 29, - 1 << 30, 1 << 31 - }; + public static final int[] B = new int[] { 1 << 0, 1 << 1, 1 << 2, 1 << 3, 1 << 4, 1 << 5, 1 << 6, 1 << 7, 1 << 8, + 1 << 9, 1 << 10, 1 << 11, 1 << 12, 1 << 13, 1 << 14, 1 << 15, 1 << 16, 1 << 17, 1 << 18, 1 << 19, 1 << 20, + 1 << 21, 1 << 22, 1 << 23, 1 << 24, 1 << 25, 1 << 26, 1 << 27, 1 << 28, 1 << 29, 1 << 30, 1 << 31 }; /** * Renamed from "MATERIAL_UNIT" to just "M" *

- * This is worth exactly one normal Item. - * This Constant can be divided by many commonly used Numbers such as - * 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, ... 64 or 81 - * without losing precision and is for that reason used as Unit of Amount. - * But it is also small enough to be multiplied with larger Numbers. + * This is worth exactly one normal Item. This Constant can be divided by many commonly used Numbers such as 1, 2, + * 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, ... 64 or 81 without losing precision and is for that + * reason used as Unit of Amount. But it is also small enough to be multiplied with larger Numbers. *

- * This is used to determine the amount of Material contained inside a prefixed Ore. - * For example Nugget = M / 9 as it contains out of 1/9 of an Ingot. + * This is used to determine the amount of Material contained inside a prefixed Ore. For example Nugget = M / 9 as + * it contains out of 1/9 of an Ingot. */ public static final long M = 3628800; @@ -82,26 +74,18 @@ public class GT_Values { /** * The Voltage Tiers. Use this Array instead of the old named Voltage Variables */ - public static final long[] V = new long[] { - 8L, 32L, 128L, - 512L, 2048L, 8192L, - 32_768L, 131_072L, 524_288L, - 2_097_152L, 8_388_608L, 33_554_432L, - 134_217_728L, 536_870_912L, Integer.MAX_VALUE - 7, - // Error tier to prevent out of bounds errors. Not really a real tier (for now). - 8_589_934_592L - }; + public static final long[] V = new long[] { 8L, 32L, 128L, 512L, 2048L, 8192L, 32_768L, 131_072L, 524_288L, + 2_097_152L, 8_388_608L, 33_554_432L, 134_217_728L, 536_870_912L, Integer.MAX_VALUE - 7, + // Error tier to prevent out of bounds errors. Not really a real tier (for now). + 8_589_934_592L }; /** - * The Voltage Practical. These are recipe voltage you should use if you expect the recipe to use a full amp of - * that tier. These leave a bit of headroom for cable and transformer losses, but not enough to make it a great gain. + * The Voltage Practical. These are recipe voltage you should use if you expect the recipe to use a full amp of that + * tier. These leave a bit of headroom for cable and transformer losses, but not enough to make it a great gain. */ // this will correctly map ULV to 7. - public static final long[] VP = Arrays.stream(V) - .map(i -> BigInteger.valueOf(i) - .multiply(BigInteger.valueOf(30)) - .divide(BigInteger.valueOf(32)) - .longValueExact()) + public static final long[] VP = Arrays.stream(V).map( + i -> BigInteger.valueOf(i).multiply(BigInteger.valueOf(30)).divide(BigInteger.valueOf(32)).longValueExact()) .toArray(); // Why -7? Mystery of the universe. Something may break if you change this so please do not without extensive // testing. @@ -109,7 +93,7 @@ public class GT_Values { // TODO:tier 14,15 wires and transformers only (not even cables !!!) // TODO:tier 12,13 the above + batteries, battery buffers, (maybe cables,12 also works for machines) // TODO:tier 10,11 the above + chargers and other machines, (cables would be nice) - // TODO:tier 9 machines and batteries + // TODO:tier 9 machines and batteries // TODO:AND ALL THE MATERIALS... for that // TODO:LIST OF MACHINES WITH POINTLESS TIERS (unless you implement some other tiering mechanism like reducing eu @@ -118,140 +102,110 @@ public class GT_Values { /** * Array of Maximum Amperes at given Tier index - *

keeping Voltage*Amps < Integer.MAX_VALUE-7 for machines (and tier logic 4x EUt 2/ time)

- *

AMV[4]= max amps at tier 4

- */ - public static final long[] AatV = new long[] { - 268435455, 67108863, 16777215, - 4194303, 1048575, 262143, - 65535, 16383, 4095, - 1023, 255, 63, - 15, 3, 1, - 1 - }; + *

+ * keeping Voltage*Amps < Integer.MAX_VALUE-7 for machines (and tier logic 4x EUt 2/ time) + *

+ *

+ * AMV[4]= max amps at tier 4 + *

+ */ + public static final long[] AatV = new long[] { 268435455, 67108863, 16777215, 4194303, 1048575, 262143, 65535, + 16383, 4095, 1023, 255, 63, 15, 3, 1, 1 }; /** * The short Names for the Voltages */ - public static final String[] VN = new String[] { - "ULV", // 0 - "LV", // 1 - "MV", // 2 - "HV", // 3 - "EV", // 4 - "IV", // 5 - "LuV", // 6 - "ZPM", // 7 - "UV", // 8 - "UHV", // 9 - "UEV", // 10 - "UIV", // 11 - "UMV", // 12 - "UXV", // 13 - "MAX", // 14 - "ERROR VOLTAGE" // 15 + public static final String[] VN = new String[] { "ULV", // 0 + "LV", // 1 + "MV", // 2 + "HV", // 3 + "EV", // 4 + "IV", // 5 + "LuV", // 6 + "ZPM", // 7 + "UV", // 8 + "UHV", // 9 + "UEV", // 10 + "UIV", // 11 + "UMV", // 12 + "UXV", // 13 + "MAX", // 14 + "ERROR VOLTAGE" // 15 }; /** * The long Names for the Voltages */ - public static final String[] VOLTAGE_NAMES = new String[] { - "Ultra Low Voltage", // 0 - "Low Voltage", // 1 - "Medium Voltage", // 2 - "High Voltage", // 3 - "Extreme Voltage", // 4 - "Insane Voltage", // 5 - "Ludicrous Voltage", // 6 - "ZPM Voltage", // 7 - "Ultimate Voltage", // 8 - "Ultimate High Voltage", // 9 - "Ultimate Extreme Voltage", // 10 - "Ultimate Insane Voltage", // 11 - "Ultimate Mega Voltage", // 12 - "Ultimate Extended Mega Voltage", // 13 - "Maximum Voltage", // 14 - "Error Voltage, report this" // 15 + public static final String[] VOLTAGE_NAMES = new String[] { "Ultra Low Voltage", // 0 + "Low Voltage", // 1 + "Medium Voltage", // 2 + "High Voltage", // 3 + "Extreme Voltage", // 4 + "Insane Voltage", // 5 + "Ludicrous Voltage", // 6 + "ZPM Voltage", // 7 + "Ultimate Voltage", // 8 + "Ultimate High Voltage", // 9 + "Ultimate Extreme Voltage", // 10 + "Ultimate Insane Voltage", // 11 + "Ultimate Mega Voltage", // 12 + "Ultimate Extended Mega Voltage", // 13 + "Maximum Voltage", // 14 + "Error Voltage, report this" // 15 }; - public static final String[] TIER_COLORS = new String[] { - EnumChatFormatting.RED.toString(), // ULV, 0 - EnumChatFormatting.GRAY.toString(), // LV, 1 - EnumChatFormatting.GOLD.toString(), // MV, 2 - EnumChatFormatting.YELLOW.toString(), // HV, 3 - EnumChatFormatting.DARK_GRAY.toString(), // EV, 4 - EnumChatFormatting.GREEN.toString(), // IV, 5 - EnumChatFormatting.LIGHT_PURPLE.toString(), // LuV, 6 - EnumChatFormatting.AQUA.toString(), // ZPM, 7 - EnumChatFormatting.DARK_GREEN.toString(), // UV, 8 - EnumChatFormatting.DARK_RED.toString(), // UHV, 9 - EnumChatFormatting.DARK_PURPLE.toString(), // UEV, 10 - EnumChatFormatting.DARK_BLUE.toString() + EnumChatFormatting.BOLD.toString(), // UIV, 11 - EnumChatFormatting.RED.toString() - + EnumChatFormatting.BOLD.toString() - + EnumChatFormatting.UNDERLINE.toString(), // UMV, 12 - EnumChatFormatting.DARK_RED.toString() - + EnumChatFormatting.BOLD.toString() - + EnumChatFormatting.UNDERLINE.toString(), // UXV, 13 - EnumChatFormatting.WHITE.toString() - + EnumChatFormatting.BOLD.toString() - + EnumChatFormatting.UNDERLINE.toString(), // MAX, 14 - EnumChatFormatting.OBFUSCATED.toString() // ~~~, 15 + public static final String[] TIER_COLORS = new String[] { EnumChatFormatting.RED.toString(), // ULV, 0 + EnumChatFormatting.GRAY.toString(), // LV, 1 + EnumChatFormatting.GOLD.toString(), // MV, 2 + EnumChatFormatting.YELLOW.toString(), // HV, 3 + EnumChatFormatting.DARK_GRAY.toString(), // EV, 4 + EnumChatFormatting.GREEN.toString(), // IV, 5 + EnumChatFormatting.LIGHT_PURPLE.toString(), // LuV, 6 + EnumChatFormatting.AQUA.toString(), // ZPM, 7 + EnumChatFormatting.DARK_GREEN.toString(), // UV, 8 + EnumChatFormatting.DARK_RED.toString(), // UHV, 9 + EnumChatFormatting.DARK_PURPLE.toString(), // UEV, 10 + EnumChatFormatting.DARK_BLUE.toString() + EnumChatFormatting.BOLD.toString(), // UIV, 11 + EnumChatFormatting.RED.toString() + EnumChatFormatting.BOLD.toString() + + EnumChatFormatting.UNDERLINE.toString(), // UMV, 12 + EnumChatFormatting.DARK_RED.toString() + EnumChatFormatting.BOLD.toString() + + EnumChatFormatting.UNDERLINE.toString(), // UXV, 13 + EnumChatFormatting.WHITE.toString() + EnumChatFormatting.BOLD.toString() + + EnumChatFormatting.UNDERLINE.toString(), // MAX, 14 + EnumChatFormatting.OBFUSCATED.toString() // ~~~, 15 }; /** - * This way it is possible to have a Call Hierarchy of NullPointers in ItemStack based Functions, and also because most of the time I don't know what kind of Data Type the "null" stands for + * This way it is possible to have a Call Hierarchy of NullPointers in ItemStack based Functions, and also because + * most of the time I don't know what kind of Data Type the "null" stands for */ public static final ItemStack NI = null; /** - * This way it is possible to have a Call Hierarchy of NullPointers in FluidStack based Functions, and also because most of the time I don't know what kind of Data Type the "null" stands for + * This way it is possible to have a Call Hierarchy of NullPointers in FluidStack based Functions, and also because + * most of the time I don't know what kind of Data Type the "null" stands for */ public static final FluidStack NF = null; /** * MOD ID Strings, since they are very common Parameters. */ - public static final String MOD_ID = "gregtech", - MOD_ID_IC2 = "IC2", - MOD_ID_NC = "IC2NuclearControl", - MOD_ID_TC = "Thaumcraft", - MOD_ID_TF = "TwilightForest", - MOD_ID_RC = "Railcraft", - MOD_ID_TE = "ThermalExpansion", - MOD_ID_AE = "appliedenergistics2", - MOD_ID_TFC = "terrafirmacraft", - MOD_ID_PFAA = "PFAAGeologica", - MOD_ID_FR = "Forestry", - MOD_ID_HaC = "harvestcraft", - MOD_ID_APC = "AppleCore", - MOD_ID_MaCr = "magicalcrops", - MOD_ID_GaEn = "ganysend", - MOD_ID_GaSu = "ganyssurface", - MOD_ID_GaNe = "ganysnether", - MOD_ID_BC_SILICON = "BuildCraft|Silicon", - MOD_ID_BC_TRANSPORT = "BuildCraft|Transport", - MOD_ID_BC_FACTORY = "BuildCraft|Factory", - MOD_ID_BC_ENERGY = "BuildCraft|Energy", - MOD_ID_BC_BUILDERS = "BuildCraft|Builders", - MOD_ID_BC_CORE = "BuildCraft|Core", - MOD_ID_GC_CORE = "GalacticraftCore", - MOD_ID_GC_MARS = "GalacticraftMars", - MOD_ID_GC_PLANETS = "GalacticraftPlanets", - MOD_ID_DC = "dreamcraft", + public static final String MOD_ID = "gregtech", MOD_ID_IC2 = "IC2", MOD_ID_NC = "IC2NuclearControl", + MOD_ID_TC = "Thaumcraft", MOD_ID_TF = "TwilightForest", MOD_ID_RC = "Railcraft", + MOD_ID_TE = "ThermalExpansion", MOD_ID_AE = "appliedenergistics2", MOD_ID_TFC = "terrafirmacraft", + MOD_ID_PFAA = "PFAAGeologica", MOD_ID_FR = "Forestry", MOD_ID_HaC = "harvestcraft", + MOD_ID_APC = "AppleCore", MOD_ID_MaCr = "magicalcrops", MOD_ID_GaEn = "ganysend", + MOD_ID_GaSu = "ganyssurface", MOD_ID_GaNe = "ganysnether", MOD_ID_BC_SILICON = "BuildCraft|Silicon", + MOD_ID_BC_TRANSPORT = "BuildCraft|Transport", MOD_ID_BC_FACTORY = "BuildCraft|Factory", + MOD_ID_BC_ENERGY = "BuildCraft|Energy", MOD_ID_BC_BUILDERS = "BuildCraft|Builders", + MOD_ID_BC_CORE = "BuildCraft|Core", MOD_ID_GC_CORE = "GalacticraftCore", + MOD_ID_GC_MARS = "GalacticraftMars", MOD_ID_GC_PLANETS = "GalacticraftPlanets", MOD_ID_DC = "dreamcraft", MOD_ID_GTPP = "miscutils"; /** * File Paths and Resource Paths */ - public static final String TEX_DIR = "textures/", - TEX_DIR_GUI = TEX_DIR + "gui/", - TEX_DIR_ITEM = TEX_DIR + "items/", - TEX_DIR_BLOCK = TEX_DIR + "blocks/", - TEX_DIR_ENTITY = TEX_DIR + "entity/", - TEX_DIR_ASPECTS = TEX_DIR + "aspects/", - RES_PATH = MOD_ID + ":" + TEX_DIR, - RES_PATH_GUI = MOD_ID + ":" + TEX_DIR_GUI, - RES_PATH_ITEM = MOD_ID + ":", - RES_PATH_BLOCK = MOD_ID + ":", - RES_PATH_ENTITY = MOD_ID + ":" + TEX_DIR_ENTITY, - RES_PATH_ASPECTS = MOD_ID + ":" + TEX_DIR_ASPECTS, + public static final String TEX_DIR = "textures/", TEX_DIR_GUI = TEX_DIR + "gui/", TEX_DIR_ITEM = TEX_DIR + "items/", + TEX_DIR_BLOCK = TEX_DIR + "blocks/", TEX_DIR_ENTITY = TEX_DIR + "entity/", + TEX_DIR_ASPECTS = TEX_DIR + "aspects/", RES_PATH = MOD_ID + ":" + TEX_DIR, + RES_PATH_GUI = MOD_ID + ":" + TEX_DIR_GUI, RES_PATH_ITEM = MOD_ID + ":", RES_PATH_BLOCK = MOD_ID + ":", + RES_PATH_ENTITY = MOD_ID + ":" + TEX_DIR_ENTITY, RES_PATH_ASPECTS = MOD_ID + ":" + TEX_DIR_ASPECTS, RES_PATH_IC2 = MOD_ID_IC2.toLowerCase(Locale.ENGLISH) + ":", RES_PATH_MODEL = MOD_ID + ":" + TEX_DIR + "models/"; @@ -259,6 +213,7 @@ public class GT_Values { * NBT String Keys */ public static final class NBT { + public static final String COLOR = "gt.color", // Integer COVERS = "gt.covers", // String CUSTOM_NAME = "name", // String @@ -287,10 +242,7 @@ public class GT_Values { INV_OUTPUT_LIST = "gt.invlist.out", // NBT List // MultiBlock - STRUCTURE_OK = "gt.structure.ok", - ROTATION = "gt.eRotation", - FLIP = "gt.eFlip", - TARGET = "gt.target", // Boolean + STRUCTURE_OK = "gt.structure.ok", ROTATION = "gt.eRotation", FLIP = "gt.eFlip", TARGET = "gt.target", // Boolean TARGET_X = "gt.target.x", // Number TARGET_Y = "gt.target.y", // Number TARGET_Z = "gt.target.z", // Number @@ -300,66 +252,53 @@ public class GT_Values { } /** The Color White as RGB Short Array. */ - public static final short[] UNCOLORED_RBGA = {255, 255, 255, 255}; + public static final short[] UNCOLORED_RBGA = { 255, 255, 255, 255 }; /** The Color White as simple Integer (0x00ffffff). */ public static final int UNCOLORED = 0x00ffffff; /** * Sides */ - public static final byte SIDE_BOTTOM = 0, - SIDE_DOWN = 0, - SIDE_TOP = 1, - SIDE_UP = 1, - SIDE_NORTH = 2, // Also a Side with a stupidly mirrored Texture - SIDE_SOUTH = 3, - SIDE_WEST = 4, - SIDE_EAST = 5, // Also a Side with a stupidly mirrored Texture - SIDE_ANY = 6, - SIDE_UNKNOWN = 6, - SIDE_INVALID = 6, - SIDE_INSIDE = 6, - SIDE_UNDEFINED = 6; + public static final byte SIDE_BOTTOM = 0, SIDE_DOWN = 0, SIDE_TOP = 1, SIDE_UP = 1, SIDE_NORTH = 2, // Also a Side + // with a + // stupidly + // mirrored + // Texture + SIDE_SOUTH = 3, SIDE_WEST = 4, SIDE_EAST = 5, // Also a Side with a stupidly mirrored Texture + SIDE_ANY = 6, SIDE_UNKNOWN = 6, SIDE_INVALID = 6, SIDE_INSIDE = 6, SIDE_UNDEFINED = 6; /** Compass alike Array for the proper ordering of North, East, South and West. */ - public static final byte[] COMPASS_DIRECTIONS = {SIDE_NORTH, SIDE_EAST, SIDE_SOUTH, SIDE_WEST}; + public static final byte[] COMPASS_DIRECTIONS = { SIDE_NORTH, SIDE_EAST, SIDE_SOUTH, SIDE_WEST }; /** * An Array containing all Sides which follow the Condition, in order to iterate over them for example. */ - public static final byte[] ALL_SIDES = {0, 1, 2, 3, 4, 5, 6}, ALL_VALID_SIDES = {0, 1, 2, 3, 4, 5}; + public static final byte[] ALL_SIDES = { 0, 1, 2, 3, 4, 5, 6 }, ALL_VALID_SIDES = { 0, 1, 2, 3, 4, 5 }; /** * For Facing Checks. */ - public static final boolean[] INVALID_SIDES = {false, false, false, false, false, false, true}, - VALID_SIDES = {true, true, true, true, true, true, false}; + public static final boolean[] INVALID_SIDES = { false, false, false, false, false, false, true }, + VALID_SIDES = { true, true, true, true, true, true, false }; /** - * Side->Offset Mappings. + * Side->Offset Mappings. */ - public static final byte[] OFFX = {0, 0, 0, 0, -1, +1, 0}, - OFFY = {-1, +1, 0, 0, 0, 0, 0}, - OFFZ = {0, 0, -1, +1, 0, 0, 0}; + public static final byte[] OFFX = { 0, 0, 0, 0, -1, +1, 0 }, OFFY = { -1, +1, 0, 0, 0, 0, 0 }, + OFFZ = { 0, 0, -1, +1, 0, 0, 0 }; /** - * Side->Opposite Mappings. + * Side->Opposite Mappings. **/ - public static final byte[] OPOS = {1, 0, 3, 2, 5, 4, 6}; + public static final byte[] OPOS = { 1, 0, 3, 2, 5, 4, 6 }; /** - * [Facing,Side]->Side Mappings for Blocks, which don't face up- and downwards. - * 0 = bottom, 1 = top, 2 = left, 3 = front, 4 = right, 5 = back, 6 = undefined. + * [Facing,Side]->Side Mappings for Blocks, which don't face up- and downwards. 0 = bottom, 1 = top, 2 = left, 3 = + * front, 4 = right, 5 = back, 6 = undefined. */ - public static final byte[][] FACING_ROTATIONS = { - {0, 1, 2, 3, 4, 5, 6}, - {0, 1, 2, 3, 4, 5, 6}, - {0, 1, 3, 5, 4, 2, 6}, - {0, 1, 5, 3, 2, 4, 6}, - {0, 1, 2, 4, 3, 5, 6}, - {0, 1, 4, 2, 5, 3, 6}, - {0, 1, 2, 3, 4, 5, 6} - }; + public static final byte[][] FACING_ROTATIONS = { { 0, 1, 2, 3, 4, 5, 6 }, { 0, 1, 2, 3, 4, 5, 6 }, + { 0, 1, 3, 5, 4, 2, 6 }, { 0, 1, 5, 3, 2, 4, 6 }, { 0, 1, 2, 4, 3, 5, 6 }, { 0, 1, 4, 2, 5, 3, 6 }, + { 0, 1, 2, 3, 4, 5, 6 } }; /** * The Mod Object itself. That is the GT_Mod-Object. It's needed to open GUI's and similar. @@ -378,13 +317,15 @@ public class GT_Values { */ public static int oreveinPercentage; /** - * Control number of attempts to find a valid orevein. Generally this maximum limit isn't hit, selecting a vein is cheap + * Control number of attempts to find a valid orevein. Generally this maximum limit isn't hit, selecting a vein is + * cheap */ public static int oreveinAttempts; /** * Control number of attempts to place a valid ore vein. - *

If a vein wasn't placed due to height restrictions, - * completely in the water, etc, another attempt is tried.

+ *

+ * If a vein wasn't placed due to height restrictions, completely in the water, etc, another attempt is tried. + *

*/ public static int oreveinMaxPlacementAttempts; /** @@ -396,7 +337,8 @@ public class GT_Values { */ public static int oreveinPlacerOresMultiplier; /** - * Not really Constants, but they set using the Config and therefore should be constant (those are for the Debug Mode) + * Not really Constants, but they set using the Config and therefore should be constant (those are for the Debug + * Mode) */ public static boolean D1 = false, D2 = false; /** @@ -440,7 +382,8 @@ public class GT_Values { */ public static boolean debugWorldData = false; /** - * Number of ticks between sending sound packets to clients for electric machines. Default is 1.5 seconds. Trying to mitigate lag and FPS drops. + * Number of ticks between sending sound packets to clients for electric machines. Default is 1.5 seconds. Trying to + * mitigate lag and FPS drops. */ public static int ticksBetweenSounds = 30; /** @@ -473,7 +416,7 @@ public class GT_Values { public static boolean updateFluidDisplayItems = true; public static final int STEAM_PER_WATER = 160; /** - * If true, then digital chest with AE2 storage bus will be accessible only through AE2 + * If true, then digital chest with AE2 storage bus will be accessible only through AE2 */ public static boolean disableDigitalChestsExternalAccess = false; @@ -490,29 +433,66 @@ public class GT_Values { public static final IIconContainer[] emptyIconContainerArray = new IIconContainer[3]; /** - * Pretty formatting for author names. + * Pretty formatting for author names. */ public static final String Colen = "" + EnumChatFormatting.DARK_RED - + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "C" + + EnumChatFormatting.BOLD + + EnumChatFormatting.ITALIC + + EnumChatFormatting.UNDERLINE + + "C" + EnumChatFormatting.GOLD - + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "o" + + EnumChatFormatting.BOLD + + EnumChatFormatting.ITALIC + + EnumChatFormatting.UNDERLINE + + "o" + EnumChatFormatting.GREEN - + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "l" + + EnumChatFormatting.BOLD + + EnumChatFormatting.ITALIC + + EnumChatFormatting.UNDERLINE + + "l" + EnumChatFormatting.DARK_AQUA - + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "e" + + EnumChatFormatting.BOLD + + EnumChatFormatting.ITALIC + + EnumChatFormatting.UNDERLINE + + "e" + EnumChatFormatting.DARK_PURPLE - + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "n"; + + EnumChatFormatting.BOLD + + EnumChatFormatting.ITALIC + + EnumChatFormatting.UNDERLINE + + "n"; public static final String AuthorColen = "Author: " + Colen; - public static final String AuthorKuba = "Author: " + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + "k" - + EnumChatFormatting.RED + EnumChatFormatting.BOLD + "u" - + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + "b" + EnumChatFormatting.YELLOW - + EnumChatFormatting.BOLD + "a" + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + "6" - + EnumChatFormatting.GREEN + EnumChatFormatting.BOLD + "0" + EnumChatFormatting.AQUA - + EnumChatFormatting.BOLD + "0" + EnumChatFormatting.DARK_AQUA + EnumChatFormatting.BOLD + "0"; - - public static final String AuthorBlueWeabo = "Author: " + EnumChatFormatting.BLUE + EnumChatFormatting.BOLD + "Blue" - + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + "Weabo"; + public static final String AuthorKuba = "Author: " + EnumChatFormatting.DARK_RED + + EnumChatFormatting.BOLD + + "k" + + EnumChatFormatting.RED + + EnumChatFormatting.BOLD + + "u" + + EnumChatFormatting.GOLD + + EnumChatFormatting.BOLD + + "b" + + EnumChatFormatting.YELLOW + + EnumChatFormatting.BOLD + + "a" + + EnumChatFormatting.DARK_GREEN + + EnumChatFormatting.BOLD + + "6" + + EnumChatFormatting.GREEN + + EnumChatFormatting.BOLD + + "0" + + EnumChatFormatting.AQUA + + EnumChatFormatting.BOLD + + "0" + + EnumChatFormatting.DARK_AQUA + + EnumChatFormatting.BOLD + + "0"; + + public static final String AuthorBlueWeabo = "Author: " + EnumChatFormatting.BLUE + + EnumChatFormatting.BOLD + + "Blue" + + EnumChatFormatting.AQUA + + EnumChatFormatting.BOLD + + "Weabo"; // 7.5F comes from GT_Tool_Turbine_Large#getBaseDamage() given huge turbines are the most efficient now. public static double getMaxPlasmaTurbineEfficiencyFromMaterial(Materials material) { diff --git a/src/main/java/gregtech/api/enums/HeatingCoilLevel.java b/src/main/java/gregtech/api/enums/HeatingCoilLevel.java index 62a4663bb4..f80f8139c6 100644 --- a/src/main/java/gregtech/api/enums/HeatingCoilLevel.java +++ b/src/main/java/gregtech/api/enums/HeatingCoilLevel.java @@ -3,22 +3,23 @@ package gregtech.api.enums; import net.minecraft.util.StatCollector; public enum HeatingCoilLevel { - None, // 0 - ULV, // Not implemented 901 - LV, // Cupronickel 1801 - MV, // KANTHAL 2701 - HV, // NICHROME 3601 - EV, // TPVALLOY 4501 - IV, // HSSG 5401 - LuV, // HSSS 6301 - ZPM, // NAQUADAH 7201 - UV, // NAQUADAHALLOY 8101 - UHV, // TRINIUM 9001 - UEV, // ELECTRUMFLUX 9901 - UIV, // AWAKENEDDRACONIUM 10801 - UMV, // INFINITY 11701 - UXV, // HYPOGEN 12601 - MAX, // ETERNAL 13501 + + None, // 0 + ULV, // Not implemented 901 + LV, // Cupronickel 1801 + MV, // KANTHAL 2701 + HV, // NICHROME 3601 + EV, // TPVALLOY 4501 + IV, // HSSG 5401 + LuV, // HSSS 6301 + ZPM, // NAQUADAH 7201 + UV, // NAQUADAHALLOY 8101 + UHV, // TRINIUM 9001 + UEV, // ELECTRUMFLUX 9901 + UIV, // AWAKENEDDRACONIUM 10801 + UMV, // INFINITY 11701 + UXV, // HYPOGEN 12601 + MAX, // ETERNAL 13501 ; private static final HeatingCoilLevel[] VALUES = values(); diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index 4453d16653..e260b03936 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -3,22 +3,25 @@ package gregtech.api.enums; import static gregtech.api.enums.GT_Values.NI; import static gregtech.api.enums.GT_Values.W; +import java.util.Locale; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; + import gregtech.api.interfaces.IItemContainer; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import java.util.Locale; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; /** * Class containing all non-OreDict Items of GregTech. */ public enum ItemList implements IItemContainer { + Display_ITS_FREE, Display_Fluid, TE_Slag, @@ -2010,167 +2013,40 @@ public enum ItemList implements IItemContainer { ReinforcedPhotolithographicFrameworkCasing, RadiationProofPhotolithographicFrameworkCasing, InfinityCooledCasing; - public static final ItemList[] - DYE_ONLY_ITEMS = - { - Color_00, Color_01, Color_02, Color_03, Color_04, Color_05, Color_06, Color_07, Color_08, - Color_09, Color_10, Color_11, Color_12, Color_13, Color_14, Color_15 - }, - SPRAY_CAN_DYES = - { - Spray_Color_00, - Spray_Color_01, - Spray_Color_02, - Spray_Color_03, - Spray_Color_04, - Spray_Color_05, - Spray_Color_06, - Spray_Color_07, - Spray_Color_08, - Spray_Color_09, - Spray_Color_10, - Spray_Color_11, - Spray_Color_12, - Spray_Color_13, - Spray_Color_14, - Spray_Color_15 - }, - SPRAY_CAN_DYES_USED = - { - Spray_Color_Used_00, - Spray_Color_Used_01, - Spray_Color_Used_02, - Spray_Color_Used_03, - Spray_Color_Used_04, - Spray_Color_Used_05, - Spray_Color_Used_06, - Spray_Color_Used_07, - Spray_Color_Used_08, - Spray_Color_Used_09, - Spray_Color_Used_10, - Spray_Color_Used_11, - Spray_Color_Used_12, - Spray_Color_Used_13, - Spray_Color_Used_14, - Spray_Color_Used_15 - }, - TRANSFORMERS = - { - Transformer_LV_ULV, - Transformer_MV_LV, - Transformer_HV_MV, - Transformer_EV_HV, - Transformer_IV_EV, - Transformer_LuV_IV, - Transformer_ZPM_LuV, - Transformer_UV_ZPM, - Transformer_MAX_UV - }, - MACHINE_HULLS = - {Hull_ULV, Hull_LV, Hull_MV, Hull_HV, Hull_EV, Hull_IV, Hull_LuV, Hull_ZPM, Hull_UV, Hull_MAX}, - HATCHES_DYNAMO = - { - Hatch_Dynamo_ULV, - Hatch_Dynamo_LV, - Hatch_Dynamo_MV, - Hatch_Dynamo_HV, - Hatch_Dynamo_EV, - Hatch_Dynamo_IV, - Hatch_Dynamo_LuV, - Hatch_Dynamo_ZPM, - Hatch_Dynamo_UV, - Hatch_Dynamo_MAX - }, - HATCHES_ENERGY = - { - Hatch_Energy_ULV, - Hatch_Energy_LV, - Hatch_Energy_MV, - Hatch_Energy_HV, - Hatch_Energy_EV, - Hatch_Energy_IV, - Hatch_Energy_LuV, - Hatch_Energy_ZPM, - Hatch_Energy_UV, - Hatch_Energy_MAX - }, - HATCHES_INPUT = - { - Hatch_Input_ULV, - Hatch_Input_LV, - Hatch_Input_MV, - Hatch_Input_HV, - Hatch_Input_EV, - Hatch_Input_IV, - Hatch_Input_LuV, - Hatch_Input_ZPM, - Hatch_Input_UV, - Hatch_Input_MAX - }, - HATCHES_INPUT_BUS = - { - Hatch_Input_Bus_ULV, - Hatch_Input_Bus_LV, - Hatch_Input_Bus_MV, - Hatch_Input_Bus_HV, - Hatch_Input_Bus_EV, - Hatch_Input_Bus_IV, - Hatch_Input_Bus_LuV, - Hatch_Input_Bus_ZPM, - Hatch_Input_Bus_UV, - Hatch_Input_Bus_MAX - }, - HATCHES_OUTPUT = - { - Hatch_Output_ULV, - Hatch_Output_LV, - Hatch_Output_MV, - Hatch_Output_HV, - Hatch_Output_EV, - Hatch_Output_IV, - Hatch_Output_LuV, - Hatch_Output_ZPM, - Hatch_Output_UV, - Hatch_Output_MAX - }, - HATCHES_OUTPUT_BUS = - { - Hatch_Output_Bus_ULV, - Hatch_Output_Bus_LV, - Hatch_Output_Bus_MV, - Hatch_Output_Bus_HV, - Hatch_Output_Bus_EV, - Hatch_Output_Bus_IV, - Hatch_Output_Bus_LuV, - Hatch_Output_Bus_ZPM, - Hatch_Output_Bus_UV, - Hatch_Output_Bus_MAX - }, - HATCHES_MUFFLER = - { - Hatch_Muffler_LV, - Hatch_Muffler_LV, - Hatch_Muffler_MV, - Hatch_Muffler_HV, - Hatch_Muffler_EV, - Hatch_Muffler_IV, - Hatch_Muffler_LuV, - Hatch_Muffler_ZPM, - Hatch_Muffler_UV, - Hatch_Muffler_MAX - }; - public static Fluid sOilExtraHeavy, - sEpichlorhydrin, - sDrillingFluid, - sBlueVitriol, - sNickelSulfate, - sGreenVitriol, - sToluene, - sNitrationMixture, - sRocketFuel, - sHydricSulfur, - sIndiumConcentrate, - sLeadZincSolution, + + public static final ItemList[] DYE_ONLY_ITEMS = { Color_00, Color_01, Color_02, Color_03, Color_04, Color_05, + Color_06, Color_07, Color_08, Color_09, Color_10, Color_11, Color_12, Color_13, Color_14, Color_15 }, + SPRAY_CAN_DYES = { Spray_Color_00, Spray_Color_01, Spray_Color_02, Spray_Color_03, Spray_Color_04, + Spray_Color_05, Spray_Color_06, Spray_Color_07, Spray_Color_08, Spray_Color_09, Spray_Color_10, + Spray_Color_11, Spray_Color_12, Spray_Color_13, Spray_Color_14, Spray_Color_15 }, + SPRAY_CAN_DYES_USED = { Spray_Color_Used_00, Spray_Color_Used_01, Spray_Color_Used_02, Spray_Color_Used_03, + Spray_Color_Used_04, Spray_Color_Used_05, Spray_Color_Used_06, Spray_Color_Used_07, + Spray_Color_Used_08, Spray_Color_Used_09, Spray_Color_Used_10, Spray_Color_Used_11, + Spray_Color_Used_12, Spray_Color_Used_13, Spray_Color_Used_14, Spray_Color_Used_15 }, + TRANSFORMERS = { Transformer_LV_ULV, Transformer_MV_LV, Transformer_HV_MV, Transformer_EV_HV, + Transformer_IV_EV, Transformer_LuV_IV, Transformer_ZPM_LuV, Transformer_UV_ZPM, + Transformer_MAX_UV }, + MACHINE_HULLS = { Hull_ULV, Hull_LV, Hull_MV, Hull_HV, Hull_EV, Hull_IV, Hull_LuV, Hull_ZPM, Hull_UV, + Hull_MAX }, + HATCHES_DYNAMO = { Hatch_Dynamo_ULV, Hatch_Dynamo_LV, Hatch_Dynamo_MV, Hatch_Dynamo_HV, Hatch_Dynamo_EV, + Hatch_Dynamo_IV, Hatch_Dynamo_LuV, Hatch_Dynamo_ZPM, Hatch_Dynamo_UV, Hatch_Dynamo_MAX }, + HATCHES_ENERGY = { Hatch_Energy_ULV, Hatch_Energy_LV, Hatch_Energy_MV, Hatch_Energy_HV, Hatch_Energy_EV, + Hatch_Energy_IV, Hatch_Energy_LuV, Hatch_Energy_ZPM, Hatch_Energy_UV, Hatch_Energy_MAX }, + HATCHES_INPUT = { Hatch_Input_ULV, Hatch_Input_LV, Hatch_Input_MV, Hatch_Input_HV, Hatch_Input_EV, + Hatch_Input_IV, Hatch_Input_LuV, Hatch_Input_ZPM, Hatch_Input_UV, Hatch_Input_MAX }, + HATCHES_INPUT_BUS = { Hatch_Input_Bus_ULV, Hatch_Input_Bus_LV, Hatch_Input_Bus_MV, Hatch_Input_Bus_HV, + Hatch_Input_Bus_EV, Hatch_Input_Bus_IV, Hatch_Input_Bus_LuV, Hatch_Input_Bus_ZPM, + Hatch_Input_Bus_UV, Hatch_Input_Bus_MAX }, + HATCHES_OUTPUT = { Hatch_Output_ULV, Hatch_Output_LV, Hatch_Output_MV, Hatch_Output_HV, Hatch_Output_EV, + Hatch_Output_IV, Hatch_Output_LuV, Hatch_Output_ZPM, Hatch_Output_UV, Hatch_Output_MAX }, + HATCHES_OUTPUT_BUS = { Hatch_Output_Bus_ULV, Hatch_Output_Bus_LV, Hatch_Output_Bus_MV, Hatch_Output_Bus_HV, + Hatch_Output_Bus_EV, Hatch_Output_Bus_IV, Hatch_Output_Bus_LuV, Hatch_Output_Bus_ZPM, + Hatch_Output_Bus_UV, Hatch_Output_Bus_MAX }, + HATCHES_MUFFLER = { Hatch_Muffler_LV, Hatch_Muffler_LV, Hatch_Muffler_MV, Hatch_Muffler_HV, + Hatch_Muffler_EV, Hatch_Muffler_IV, Hatch_Muffler_LuV, Hatch_Muffler_ZPM, Hatch_Muffler_UV, + Hatch_Muffler_MAX }; + public static Fluid sOilExtraHeavy, sEpichlorhydrin, sDrillingFluid, sBlueVitriol, sNickelSulfate, sGreenVitriol, + sToluene, sNitrationMixture, sRocketFuel, sHydricSulfur, sIndiumConcentrate, sLeadZincSolution, sHydrochloricAcid; private ItemStack mStack; private boolean mHasNotBeenSet; @@ -2275,10 +2151,8 @@ public enum ItemList implements IItemContainer { StringBuilder tCamelCasedDisplayNameBuilder = new StringBuilder(); final String[] tDisplayNameWords = aDisplayName.split("\\W"); for (String tWord : tDisplayNameWords) { - if (tWord.length() > 0) - tCamelCasedDisplayNameBuilder.append(tWord.substring(0, 1).toUpperCase(Locale.US)); - if (tWord.length() > 1) - tCamelCasedDisplayNameBuilder.append(tWord.substring(1).toLowerCase(Locale.US)); + if (tWord.length() > 0) tCamelCasedDisplayNameBuilder.append(tWord.substring(0, 1).toUpperCase(Locale.US)); + if (tWord.length() > 1) tCamelCasedDisplayNameBuilder.append(tWord.substring(1).toLowerCase(Locale.US)); } if (tCamelCasedDisplayNameBuilder.length() == 0) { // CamelCased DisplayName is empty, so use hash of aDisplayName @@ -2322,9 +2196,8 @@ public enum ItemList implements IItemContainer { } /** - * Returns the internal stack. - * This method is unsafe. It's here only for quick operations. - * DON'T CHANGE THE RETURNED VALUE! + * Returns the internal stack. This method is unsafe. It's here only for quick operations. DON'T CHANGE THE RETURNED + * VALUE! */ public ItemStack getInternalStack_unsafe() { return mStack; diff --git a/src/main/java/gregtech/api/enums/MaterialBuilder.java b/src/main/java/gregtech/api/enums/MaterialBuilder.java index 5514b9382e..d265faae8e 100644 --- a/src/main/java/gregtech/api/enums/MaterialBuilder.java +++ b/src/main/java/gregtech/api/enums/MaterialBuilder.java @@ -1,11 +1,13 @@ package gregtech.api.enums; -import gregtech.api.objects.MaterialStack; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import gregtech.api.objects.MaterialStack; + public class MaterialBuilder { + public static final int DIESEL = 0, GAS = 1, THERMAL = 2, SEMIFLUID = 3, PLASMA = 4, MAGIC = 5; private int metaItemSubID; @@ -46,34 +48,32 @@ public class MaterialBuilder { public Materials constructMaterial() { return new Materials( - metaItemSubID, - iconSet, - toolSpeed, - durability, - toolQuality, - types, - r, - g, - b, - a, - name, - defaultLocalName, - fuelType, - fuelPower, - meltingPoint, - blastFurnaceTemp, - blastFurnaceRequired, - transparent, - oreValue, - densityMultiplier, - densityDivider, - color, - extraData, - materialList, - aspects) - .setHasCorrespondingFluid(hasCorrespondingFluid) - .setHasCorrespondingGas(hasCorrespondingGas) - .setCanBeCracked(canBeCracked); + metaItemSubID, + iconSet, + toolSpeed, + durability, + toolQuality, + types, + r, + g, + b, + a, + name, + defaultLocalName, + fuelType, + fuelPower, + meltingPoint, + blastFurnaceTemp, + blastFurnaceRequired, + transparent, + oreValue, + densityMultiplier, + densityDivider, + color, + extraData, + materialList, + aspects).setHasCorrespondingFluid(hasCorrespondingFluid).setHasCorrespondingGas(hasCorrespondingGas) + .setCanBeCracked(canBeCracked); } public MaterialBuilder setName(String name) { diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index fd30bfd231..86e4e3f1ca 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -4,6 +4,15 @@ import static gregtech.api.enums.FluidState.GAS; import static gregtech.api.enums.GT_Values.M; import static gregtech.api.enums.GT_Values.MOD_ID_DC; +import java.util.*; +import java.util.stream.Collectors; +import java.util.stream.IntStream; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; + import cpw.mods.fml.common.Loader; import gregtech.GT_Mod; import gregtech.api.GregTech_API; @@ -20,13 +29,6 @@ import gregtech.common.render.items.*; import gregtech.common.render.items.UniversiumRenderer; import gregtech.loaders.materialprocessing.ProcessingConfig; import gregtech.loaders.materialprocessing.ProcessingModSupport; -import java.util.*; -import java.util.stream.Collectors; -import java.util.stream.IntStream; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; @SuppressWarnings("unused") // API Legitimately has unused Members and Methods public class Materials implements IColorModulationContainer, ISubTagContainer { @@ -38,12 +40,14 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static volatile int VERSION = 509; /** - * This is for keeping compatibility with addons mods (Such as TinkersGregworks etc.) that looped over the old materials enum + * This is for keeping compatibility with addons mods (Such as TinkersGregworks etc.) that looped over the old + * materials enum */ @Deprecated public static Collection VALUES = new LinkedHashSet<>(); /** - * This is the Default Material returned in case no Material has been found or a NullPointer has been inserted at a location where it shouldn't happen. + * This is the Default Material returned in case no Material has been found or a NullPointer has been inserted at a + * location where it shouldn't happen. */ // Spotless breaks the table below into many, many lines @@ -927,14 +931,18 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { /** * Superconductor re-routed for mod compatibility. Circuits are re-routed into SuperconductorUHV as well. - *

Internal name is now Superconductor while translated name is SuperconductorUHV.

+ *

+ * Internal name is now Superconductor while translated name is SuperconductorUHV. + *

+ * * @deprecated Use {@link #SuperconductorUHV} instead */ @Deprecated - public static Materials Superconductor = new Materials( - SuperconductorUHV, true); // new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 - // , 255, 255, 255, 0, "Superconductor" , "Superconductor" , 0, - // 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Arrays.asList(new + public static Materials Superconductor = new Materials(SuperconductorUHV, true); // new Materials( -1, + // TextureSet.SET_NONE , 1.0F, 0, + // 0, 0 + // , 255, 255, 255, 0, "Superconductor" , "Superconductor" , 0, + // 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Arrays.asList(new // TC_AspectStack(TC_Aspects.ELECTRUM, 9))); @Deprecated @@ -962,7 +970,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { overrideChemicalFormulars(); } - public final short[] mRGBa = new short[] {255, 255, 255, 0}, mMoltenRGBa = new short[] {255, 255, 255, 0}; + public final short[] mRGBa = new short[] { 255, 255, 255, 0 }, mMoltenRGBa = new short[] { 255, 255, 255, 0 }; public TextureSet mIconSet; public GT_GeneratedMaterial_Renderer renderer; public List mMaterialList = new ArrayList<>(); @@ -971,16 +979,9 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public ArrayList mMaterialItems = new ArrayList<>(); public Collection mSubTags = new LinkedHashSet<>(); public Enchantment mEnchantmentTools = null, mEnchantmentArmors = null; - public boolean mUnificatable, - mBlastFurnaceRequired = false, - mAutoGenerateBlastFurnaceRecipes = true, - mAutoGenerateVacuumFreezerRecipes = true, - mAutoGenerateRecycleRecipes = true, - mTransparent = false, - mHasParentMod = true, - mHasPlasma = false, - mHasGas = false, - mCustomOre = false; + public boolean mUnificatable, mBlastFurnaceRequired = false, mAutoGenerateBlastFurnaceRecipes = true, + mAutoGenerateVacuumFreezerRecipes = true, mAutoGenerateRecycleRecipes = true, mTransparent = false, + mHasParentMod = true, mHasPlasma = false, mHasGas = false, mCustomOre = false; public byte mEnchantmentToolsLevel = 0, mEnchantmentArmorsLevel = 0, mToolQuality = 0; public short mBlastFurnaceTemp = 0; public int mMeltingPoint = 0; @@ -1009,44 +1010,26 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public int processingMaterialTierEU = 0; public long mDensity = M; - public float mToolSpeed = 1.0F, - mHeatDamage = 0.0F, - mSteamMultiplier = 1.0F, - mGasMultiplier = 1.0F, + public float mToolSpeed = 1.0F, mHeatDamage = 0.0F, mSteamMultiplier = 1.0F, mGasMultiplier = 1.0F, mPlasmaMultiplier = 1.0F; - public String mChemicalFormula = "?", - mName, - mDefaultLocalName, - mCustomID = "null", - mConfigSection = "null", + public String mChemicalFormula = "?", mName, mDefaultLocalName, mCustomID = "null", mConfigSection = "null", mLocalizedName = "null"; public Dyes mColor = Dyes._NULL; public Element mElement = null; - public Materials mDirectSmelting = this, - mOreReplacement = this, - mMacerateInto = this, - mSmeltInto = this, - mArcSmeltInto = this, - mHandleMaterial = this, - mMaterialInto; + public Materials mDirectSmelting = this, mOreReplacement = this, mMacerateInto = this, mSmeltInto = this, + mArcSmeltInto = this, mHandleMaterial = this, mMaterialInto; public Fluid mSolid = null, mFluid = null, mGas = null, mPlasma = null; /** - * This Fluid is used as standard Unit for Molten Materials. 1296 is a Molten Block, that means 144 is one Material Unit worth of fluid. + * This Fluid is used as standard Unit for Molten Materials. 1296 is a Molten Block, that means 144 is one Material + * Unit worth of fluid. */ public Fluid mStandardMoltenFluid = null; private boolean hasCorrespondingFluid = false, hasCorrespondingGas = false, canBeCracked = false; private Fluid[] hydroCrackedFluids = new Fluid[3], steamCrackedFluids = new Fluid[3]; - public Materials( - int aMetaItemSubID, - TextureSet aIconSet, - float aToolSpeed, - int aDurability, - int aT