diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Java/gtPlusPlus/core/item/ModItems.java | 66 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/core/material/MaterialGenerator.java | 16 |
2 files changed, 35 insertions, 47 deletions
diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java index c1e40cf6d8..c05c08991d 100644 --- a/src/Java/gtPlusPlus/core/item/ModItems.java +++ b/src/Java/gtPlusPlus/core/item/ModItems.java @@ -207,65 +207,65 @@ public final class ModItems { //Elements generate first so they can be used in compounds. //Uranium-233 is a fissile isotope of uranium that is bred from thorium-232 as part of the thorium fuel cycle. - new MaterialGenerator(ELEMENT.getInstance().URANIUM233); - new MaterialGenerator(ELEMENT.getInstance().ZIRCONIUM); + MaterialGenerator.generate(ELEMENT.getInstance().URANIUM233); + MaterialGenerator.generate(ELEMENT.getInstance().ZIRCONIUM); //Carbides - Tungsten Carbide exists in .09 so don't generate it. - Should still come before alloys though if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ - new MaterialGenerator(ALLOY.TUNGSTEN_CARBIDE); + MaterialGenerator.generate(ALLOY.TUNGSTEN_CARBIDE); } - new MaterialGenerator(ALLOY.SILICON_CARBIDE); - new MaterialGenerator(ALLOY.ZIRCONIUM_CARBIDE); - new MaterialGenerator(ALLOY.TANTALUM_CARBIDE); - new MaterialGenerator(ALLOY.NIOBIUM_CARBIDE); + MaterialGenerator.generate(ALLOY.SILICON_CARBIDE); + MaterialGenerator.generate(ALLOY.ZIRCONIUM_CARBIDE); + MaterialGenerator.generate(ALLOY.TANTALUM_CARBIDE); + MaterialGenerator.generate(ALLOY.NIOBIUM_CARBIDE); //Generate some Alloys //Misc Alloys - new MaterialGenerator(ALLOY.ENERGYCRYSTAL); - new MaterialGenerator(ALLOY.BLOODSTEEL); - new MaterialGenerator(ALLOY.BEDROCKIUM); - new MaterialGenerator(ALLOY.ZERON_100); + MaterialGenerator.generate(ALLOY.ENERGYCRYSTAL); + MaterialGenerator.generate(ALLOY.BLOODSTEEL); + MaterialGenerator.generate(ALLOY.BEDROCKIUM); + MaterialGenerator.generate(ALLOY.ZERON_100); //Tumbaga was the name given by Spaniards to a non-specific alloy of gold and copper - new MaterialGenerator(ALLOY.TUMBAGA); + MaterialGenerator.generate(ALLOY.TUMBAGA); //Potin is traditionally an alloy of bronze, tin and lead, with varying quantities of each possible - new MaterialGenerator(ALLOY.POTIN); + MaterialGenerator.generate(ALLOY.POTIN); //Staballoy & Tantalloy - new MaterialGenerator(ALLOY.STABALLOY); - new MaterialGenerator(ALLOY.TANTALLOY_60); - new MaterialGenerator(ALLOY.TANTALLOY_61); + MaterialGenerator.generate(ALLOY.STABALLOY); + MaterialGenerator.generate(ALLOY.TANTALLOY_60); + MaterialGenerator.generate(ALLOY.TANTALLOY_61); //Inconel - new MaterialGenerator(ALLOY.INCONEL_625); - new MaterialGenerator(ALLOY.INCONEL_690); - new MaterialGenerator(ALLOY.INCONEL_792); + MaterialGenerator.generate(ALLOY.INCONEL_625); + MaterialGenerator.generate(ALLOY.INCONEL_690); + MaterialGenerator.generate(ALLOY.INCONEL_792); //Maraging Steel - new MaterialGenerator(ALLOY.MARAGING250); - new MaterialGenerator(ALLOY.MARAGING300); - new MaterialGenerator(ALLOY.MARAGING350); + MaterialGenerator.generate(ALLOY.MARAGING250); + MaterialGenerator.generate(ALLOY.MARAGING300); + MaterialGenerator.generate(ALLOY.MARAGING350); //Composite Alloys - new MaterialGenerator(ALLOY.STELLITE); - new MaterialGenerator(ALLOY.TALONITE); + MaterialGenerator.generate(ALLOY.STELLITE); + MaterialGenerator.generate(ALLOY.TALONITE); //Hastelloy - new MaterialGenerator(ALLOY.HASTELLOY_W); - new MaterialGenerator(ALLOY.HASTELLOY_X); - new MaterialGenerator(ALLOY.HASTELLOY_C276); - new MaterialGenerator(ALLOY.HASTELLOY_N); + MaterialGenerator.generate(ALLOY.HASTELLOY_W); + MaterialGenerator.generate(ALLOY.HASTELLOY_X); + MaterialGenerator.generate(ALLOY.HASTELLOY_C276); + MaterialGenerator.generate(ALLOY.HASTELLOY_N); //Incoloy - new MaterialGenerator(ALLOY.INCOLOY_020); - new MaterialGenerator(ALLOY.INCOLOY_DS); - new MaterialGenerator(ALLOY.INCOLOY_MA956); + MaterialGenerator.generate(ALLOY.INCOLOY_020); + MaterialGenerator.generate(ALLOY.INCOLOY_DS); + MaterialGenerator.generate(ALLOY.INCOLOY_MA956); //Leagrisium - new MaterialGenerator(ALLOY.LEAGRISIUM); + MaterialGenerator.generate(ALLOY.LEAGRISIUM); //Must be the final Alloy to Generate - new MaterialGenerator(ALLOY.QUANTUM); + MaterialGenerator.generate(ALLOY.QUANTUM); } catch (Throwable r){ diff --git a/src/Java/gtPlusPlus/core/material/MaterialGenerator.java b/src/Java/gtPlusPlus/core/material/MaterialGenerator.java index 8d8f8bc846..9c7f5208ba 100644 --- a/src/Java/gtPlusPlus/core/material/MaterialGenerator.java +++ b/src/Java/gtPlusPlus/core/material/MaterialGenerator.java @@ -25,22 +25,10 @@ import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_ShapedCrafting; import net.minecraft.block.Block; import net.minecraft.item.Item; -public class MaterialGenerator implements Runnable { - - final Material toGenerate; - - public MaterialGenerator(final Material M){ - this.toGenerate = M; - } - - @Override - public void run() { - generateItemsFromMaterial(toGenerate); - } - +public class MaterialGenerator { @SuppressWarnings("unused") - public static void generateItemsFromMaterial(final Material matInfo){ + public static void generate(final Material matInfo){ String unlocalizedName = matInfo.getUnlocalizedName(); String materialName = matInfo.getLocalizedName(); short[] C = matInfo.getRGBA(); |