diff options
author | draknyte1 <draknyte1@hotmail.com> | 2017-02-22 21:21:29 +1000 |
---|---|---|
committer | draknyte1 <draknyte1@hotmail.com> | 2017-02-22 21:21:29 +1000 |
commit | 31bf8ea23313e4eab2db072a35467c6e68d04932 (patch) | |
tree | 2b83c33d86f41c05557371879214821d26d62204 /src/Java/gtPlusPlus/core/material | |
parent | a1540dee487183de00bcc02ac7517790da00f9d9 (diff) | |
download | GT5-Unofficial-31bf8ea23313e4eab2db072a35467c6e68d04932.tar.gz GT5-Unofficial-31bf8ea23313e4eab2db072a35467c6e68d04932.tar.bz2 GT5-Unofficial-31bf8ea23313e4eab2db072a35467c6e68d04932.zip |
% Tweaked recipe creation for materials due to states.
% Tweaked items generated for materials due to states.
% Tweaked tooltips of cells, now they are cleaner.
% Changed max progress time of LFTR to be 500x what it was.
Diffstat (limited to 'src/Java/gtPlusPlus/core/material')
-rw-r--r-- | src/Java/gtPlusPlus/core/material/Material.java | 4 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/core/material/MaterialGenerator.java | 92 |
2 files changed, 51 insertions, 45 deletions
diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java index d7153544eb..fe7370e777 100644 --- a/src/Java/gtPlusPlus/core/material/Material.java +++ b/src/Java/gtPlusPlus/core/material/Material.java @@ -256,6 +256,10 @@ public class Material { return this.unlocalizedName; return "ERROR.BAD.UNLOCALIZED.NAME"; } + + final public MaterialState getState(){ + return this.materialState; + } final public short[] getRGBA(){ if (this.RGBA != null) diff --git a/src/Java/gtPlusPlus/core/material/MaterialGenerator.java b/src/Java/gtPlusPlus/core/material/MaterialGenerator.java index a8d8f2bd82..ffc864feb3 100644 --- a/src/Java/gtPlusPlus/core/material/MaterialGenerator.java +++ b/src/Java/gtPlusPlus/core/material/MaterialGenerator.java @@ -15,6 +15,7 @@ import gtPlusPlus.core.item.base.rods.BaseItemRod; import gtPlusPlus.core.item.base.rods.BaseItemRodLong; import gtPlusPlus.core.item.base.rotors.BaseItemRotor; import gtPlusPlus.core.item.base.screws.BaseItemScrew; +import gtPlusPlus.core.material.state.MaterialState; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.item.ItemUtils; import gtPlusPlus.xmod.gregtech.loaders.*; @@ -31,7 +32,7 @@ public class MaterialGenerator { public static void generate(final Material matInfo, boolean generateEverything){ generate(matInfo, generateEverything, true); } - + public static void generate(final Material matInfo, boolean generateEverything, boolean generateBlastSmelterRecipes){ String unlocalizedName = matInfo.getUnlocalizedName(); String materialName = matInfo.getLocalizedName(); @@ -49,59 +50,60 @@ public class MaterialGenerator { sRadiation = matInfo.vRadioationLevel; } - if (generateEverything == true){ - if (sRadiation >= 1){ - Item temp; - Block tempBlock; - tempBlock = new BlockBaseModular(unlocalizedName, materialName,BlockTypes.STANDARD, Colour); - temp = new BaseItemIngot(matInfo); - - temp = new BaseItemDust("itemDust"+unlocalizedName, materialName, matInfo, Colour, "Dust", materialTier, sRadiation); - temp = new BaseItemDust("itemDustTiny"+unlocalizedName, materialName, matInfo, Colour, "Tiny", materialTier, sRadiation); - temp = new BaseItemDust("itemDustSmall"+unlocalizedName, materialName, matInfo, Colour, "Small", materialTier, sRadiation); - temp = new BaseItemNugget(matInfo); - temp = new BaseItemPlate(matInfo); - temp = new BaseItemRod(matInfo); - temp = new BaseItemRodLong(matInfo); - } + if (matInfo.getState() == MaterialState.SOLID){ + if (generateEverything == true){ + if (sRadiation >= 1){ + Item temp; + Block tempBlock; + tempBlock = new BlockBaseModular(unlocalizedName, materialName,BlockTypes.STANDARD, Colour); + temp = new BaseItemIngot(matInfo); + + temp = new BaseItemDust("itemDust"+unlocalizedName, materialName, matInfo, Colour, "Dust", materialTier, sRadiation); + temp = new BaseItemDust("itemDustTiny"+unlocalizedName, materialName, matInfo, Colour, "Tiny", materialTier, sRadiation); + temp = new BaseItemDust("itemDustSmall"+unlocalizedName, materialName, matInfo, Colour, "Small", materialTier, sRadiation); + temp = new BaseItemNugget(matInfo); + temp = new BaseItemPlate(matInfo); + temp = new BaseItemRod(matInfo); + temp = new BaseItemRodLong(matInfo); + } - else { + else { + Item temp; + Block tempBlock; + tempBlock = new BlockBaseModular(unlocalizedName, materialName,BlockTypes.STANDARD, Colour); + tempBlock = new BlockBaseModular(unlocalizedName, materialName,BlockTypes.FRAME, Colour); + temp = new BaseItemIngot(matInfo); + if (hotIngot){ + temp = new BaseItemIngotHot(matInfo); + } + temp = new BaseItemDust("itemDust"+unlocalizedName, materialName, matInfo, Colour, "Dust", materialTier, sRadiation); + temp = new BaseItemDust("itemDustTiny"+unlocalizedName, materialName, matInfo, Colour, "Tiny", materialTier, sRadiation); + temp = new BaseItemDust("itemDustSmall"+unlocalizedName, materialName, matInfo, Colour, "Small", materialTier, sRadiation); + temp = new BaseItemNugget(matInfo); + temp = new BaseItemPlate(matInfo); + temp = new BaseItemPlateDouble(matInfo); + temp = new BaseItemBolt(matInfo); + temp = new BaseItemRod(matInfo); + temp = new BaseItemRodLong(matInfo); + temp = new BaseItemRing(matInfo); + temp = new BaseItemScrew(matInfo); + temp = new BaseItemRotor(matInfo); + temp = new BaseItemGear(matInfo); + } + } else { Item temp; Block tempBlock; tempBlock = new BlockBaseModular(unlocalizedName, materialName,BlockTypes.STANDARD, Colour); - tempBlock = new BlockBaseModular(unlocalizedName, materialName,BlockTypes.FRAME, Colour); temp = new BaseItemIngot(matInfo); - if (hotIngot){ - temp = new BaseItemIngotHot(matInfo); - } temp = new BaseItemDust("itemDust"+unlocalizedName, materialName, matInfo, Colour, "Dust", materialTier, sRadiation); temp = new BaseItemDust("itemDustTiny"+unlocalizedName, materialName, matInfo, Colour, "Tiny", materialTier, sRadiation); temp = new BaseItemDust("itemDustSmall"+unlocalizedName, materialName, matInfo, Colour, "Small", materialTier, sRadiation); temp = new BaseItemNugget(matInfo); temp = new BaseItemPlate(matInfo); temp = new BaseItemPlateDouble(matInfo); - temp = new BaseItemBolt(matInfo); - temp = new BaseItemRod(matInfo); - temp = new BaseItemRodLong(matInfo); - temp = new BaseItemRing(matInfo); - temp = new BaseItemScrew(matInfo); - temp = new BaseItemRotor(matInfo); - temp = new BaseItemGear(matInfo); - } - } else { - Item temp; - Block tempBlock; - tempBlock = new BlockBaseModular(unlocalizedName, materialName,BlockTypes.STANDARD, Colour); - temp = new BaseItemIngot(matInfo); - temp = new BaseItemDust("itemDust"+unlocalizedName, materialName, matInfo, Colour, "Dust", materialTier, sRadiation); - temp = new BaseItemDust("itemDustTiny"+unlocalizedName, materialName, matInfo, Colour, "Tiny", materialTier, sRadiation); - temp = new BaseItemDust("itemDustSmall"+unlocalizedName, materialName, matInfo, Colour, "Small", materialTier, sRadiation); - temp = new BaseItemNugget(matInfo); - temp = new BaseItemPlate(matInfo); - temp = new BaseItemPlateDouble(matInfo); + } } - //Add A jillion Recipes - old code RecipeGen_AlloySmelter.generateRecipes(matInfo); RecipeGen_Assembler.generateRecipes(matInfo); @@ -116,7 +118,7 @@ public class MaterialGenerator { public static void generateNuclearMaterial(final Material matInfo){ generateNuclearMaterial(matInfo, true); } - + public static void generateNuclearMaterial(final Material matInfo, boolean generatePlates){ String unlocalizedName = matInfo.getUnlocalizedName(); String materialName = matInfo.getLocalizedName(); @@ -127,10 +129,10 @@ public class MaterialGenerator { if (matInfo.vRadioationLevel != 0){ sRadiation = matInfo.vRadioationLevel; } - + Item temp; Block tempBlock; - + tempBlock = new BlockBaseModular(unlocalizedName, materialName,BlockTypes.STANDARD, Colour); temp = new BaseItemIngot(matInfo); temp = new BaseItemDust("itemDust"+unlocalizedName, materialName, matInfo, Colour, "Dust", 3, sRadiation); @@ -139,7 +141,7 @@ public class MaterialGenerator { temp = new BaseItemNugget(matInfo); temp = new BaseItemPlate(matInfo); temp = new BaseItemPlateDouble(matInfo); - + RecipeGen_Plates.generateRecipes(matInfo); RecipeGen_Extruder.generateRecipes(matInfo); RecipeGen_ShapedCrafting.generateRecipes(matInfo); |