diff options
Diffstat (limited to 'src')
5 files changed, 224 insertions, 211 deletions
diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java index 5b585aed16..8c38ad82d0 100644 --- a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java +++ b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java @@ -4,6 +4,7 @@ import gregtech.api.util.GT_OreDictUnificator; import gtPlusPlus.core.creative.AddToCreativeTab; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.entity.EntityUtils; import gtPlusPlus.core.util.item.ItemUtils; import gtPlusPlus.core.util.math.MathUtils; @@ -134,7 +135,12 @@ public class BaseItemComponent extends Item{ } if (componentMaterial != null){ if (!componentMaterial.vChemicalFormula.equals("??")) { + if (componentType != ComponentTypes.CELL || componentType != ComponentTypes.PLASMACELL){ list.add(componentMaterial.vChemicalFormula); + } + else { + list.add(Utils.sanitizeString(componentMaterial.vChemicalFormula)); + } } if (componentMaterial.isRadioactive){ 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); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java index 40c6a2eada..9b11e82dbd 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java @@ -375,7 +375,7 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase if(depleteInput(tLiquid)) { //Deplete that amount Utils.LOG_INFO("Depleted some FLiBe fluid"); - this.mMaxProgresstime = 1; + this.mMaxProgresstime = 500; if(tFluids.contains(NUCLIDE.LiFBeF2ThF4UF4.getFluid(1)) || tFluids.contains(NUCLIDE.LiFBeF2ZrF4UF4.getFluid(2)) || diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java index 84c006a90e..eac2cba20f 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java @@ -8,184 +8,185 @@ import gtPlusPlus.core.util.Utils; public class RecipeGen_Fluids implements Runnable{ final Material toGenerate; - + public RecipeGen_Fluids(final Material M){ this.toGenerate = M; } - + @Override public void run() { generateRecipes(toGenerate); } - + public static void generateRecipes(final Material material){ generateRecipes(material, false); } public static void generateRecipes(final Material material, boolean disableOptional){ - + //Melting Shapes to fluid - - //Dust - if (GT_Values.RA.addFluidExtractionRecipe(material.getDust(1), //Input - null, //Input 2 - material.getFluid(144), //Fluid Output - 0, //Chance - 1*20, //Duration - 16 //Eu Tick - )){ - Utils.LOG_WARNING("144l fluid extractor from 1 Dust Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Utils.LOG_WARNING("144l fluid extractor from 1 Dust Recipe: "+material.getLocalizedName()+" - Failed"); - } - - //Ingot - if (GT_Values.RA.addFluidExtractionRecipe(material.getIngot(1), //Input - null, //Input 2 - material.getFluid(144), //Fluid Output - 0, //Chance - 1*20, //Duration - 16 //Eu Tick - )){ - Utils.LOG_WARNING("144l fluid extractor from 1 ingot Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Utils.LOG_WARNING("144l fluid extractor from 1 ingot Recipe: "+material.getLocalizedName()+" - Failed"); - } - - //Plate - if (GT_Values.RA.addFluidExtractionRecipe(material.getPlate(1), //Input - null, //Input 2 - material.getFluid(144), //Fluid Output - 0, //Chance - 1*20, //Duration - 16 //Eu Tick - )){ - Utils.LOG_WARNING("144l fluid extractor from 1 plate Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Utils.LOG_WARNING("144l fluid extractor from 1 plate Recipe: "+material.getLocalizedName()+" - Failed"); - } - - //Double Plate - if (GT_Values.RA.addFluidExtractionRecipe(material.getPlateDouble(1), //Input - null, //Input 2 - material.getFluid(288), //Fluid Output - 0, //Chance - 1*20, //Duration - 16 //Eu Tick - )){ - Utils.LOG_WARNING("144l fluid extractor from 1 double plate Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Utils.LOG_WARNING("144l fluid extractor from 1 double plate Recipe: "+material.getLocalizedName()+" - Failed"); - } - - //Nugget - if (GT_Values.RA.addFluidExtractionRecipe(material.getNugget(1), //Input - null, //Input 2 - material.getFluid(16), //Fluid Output - 0, //Chance - 16, //Duration - 8 //Eu Tick - )){ - Utils.LOG_WARNING("16l fluid extractor from 1 nugget Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Utils.LOG_WARNING("16l fluid extractor from 1 nugget Recipe: "+material.getLocalizedName()+" - Failed"); - } - - //Block - if (GT_Values.RA.addFluidExtractionRecipe(material.getBlock(1), //Input - null, //Input 2 - material.getFluid(144*9), //Fluid Output - 0, //Chance - 288, //Duration - 16 //Eu Tick - )){ - Utils.LOG_WARNING((144*9)+"l fluid extractor from 1 block Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Utils.LOG_WARNING((144*9)+"l fluid extractor from 1 block Recipe: "+material.getLocalizedName()+" - Failed"); - } - - - - - - - - //Making Shapes from fluid - - //Ingot - if (GT_Values.RA.addFluidSolidifierRecipe( - ItemList.Shape_Mold_Ingot.get(0), //Item Shape - material.getFluid(144), //Fluid Input - material.getIngot(1), //output - 32, //Duration - 8 //Eu Tick - )){ - Utils.LOG_WARNING("144l fluid molder for 1 ingot Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Utils.LOG_WARNING("144l fluid molder for 1 ingot Recipe: "+material.getLocalizedName()+" - Failed"); - } - - //Plate - if (GT_Values.RA.addFluidSolidifierRecipe( - ItemList.Shape_Mold_Plate.get(1), //Item Shape - material.getFluid(144), //Fluid Input - material.getPlate(1), //output - 32, //Duration - 8 //Eu Tick - )){ - Utils.LOG_WARNING("144l fluid molder for 1 plate Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Utils.LOG_WARNING("144l fluid molder for 1 plate Recipe: "+material.getLocalizedName()+" - Failed"); - } - - //Nugget - if (GT_Values.RA.addFluidSolidifierRecipe( - ItemList.Shape_Mold_Nugget.get(0), //Item Shape - material.getFluid(16), //Fluid Input - material.getNugget(1), //output - 16, //Duration - 4 //Eu Tick - )){ - Utils.LOG_WARNING("16l fluid molder for 1 nugget Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Utils.LOG_WARNING("16l fluid molder for 1 nugget Recipe: "+material.getLocalizedName()+" - Failed"); - } - - //Gears - if (GT_Values.RA.addFluidSolidifierRecipe( - ItemList.Shape_Mold_Gear.get(0), //Item Shape - material.getFluid(576), //Fluid Input - material.getGear(1), //output - 128, //Duration - 8 //Eu Tick - )){ - Utils.LOG_WARNING("576l fluid molder for 1 gear Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Utils.LOG_WARNING("576l fluid molder for 1 gear Recipe: "+material.getLocalizedName()+" - Failed"); - } - - //Blocks - if (GT_Values.RA.addFluidSolidifierRecipe( - ItemList.Shape_Mold_Block.get(0), //Item Shape - material.getFluid(144*9), //Fluid Input - material.getBlock(1), //output - 288, //Duration - 16 //Eu Tick - )){ - Utils.LOG_WARNING((144*9)+"l fluid molder from 1 block Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Utils.LOG_WARNING((144*9)+"l fluid molder from 1 block Recipe: "+material.getLocalizedName()+" - Failed"); + if (!material.getFluid(1).getUnlocalizedName().toLowerCase().contains("plasma")){ + //Dust + if (GT_Values.RA.addFluidExtractionRecipe(material.getDust(1), //Input + null, //Input 2 + material.getFluid(144), //Fluid Output + 0, //Chance + 1*20, //Duration + 16 //Eu Tick + )){ + Utils.LOG_WARNING("144l fluid extractor from 1 Dust Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Utils.LOG_WARNING("144l fluid extractor from 1 Dust Recipe: "+material.getLocalizedName()+" - Failed"); + } + + //Ingot + if (GT_Values.RA.addFluidExtractionRecipe(material.getIngot(1), //Input + null, //Input 2 + material.getFluid(144), //Fluid Output + 0, //Chance + 1*20, //Duration + 16 //Eu Tick + )){ + Utils.LOG_WARNING("144l fluid extractor from 1 ingot Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Utils.LOG_WARNING("144l fluid extractor from 1 ingot Recipe: "+material.getLocalizedName()+" - Failed"); + } + + //Plate + if (GT_Values.RA.addFluidExtractionRecipe(material.getPlate(1), //Input + null, //Input 2 + material.getFluid(144), //Fluid Output + 0, //Chance + 1*20, //Duration + 16 //Eu Tick + )){ + Utils.LOG_WARNING("144l fluid extractor from 1 plate Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Utils.LOG_WARNING("144l fluid extractor from 1 plate Recipe: "+material.getLocalizedName()+" - Failed"); + } + + //Double Plate + if (GT_Values.RA.addFluidExtractionRecipe(material.getPlateDouble(1), //Input + null, //Input 2 + material.getFluid(288), //Fluid Output + 0, //Chance + 1*20, //Duration + 16 //Eu Tick + )){ + Utils.LOG_WARNING("144l fluid extractor from 1 double plate Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Utils.LOG_WARNING("144l fluid extractor from 1 double plate Recipe: "+material.getLocalizedName()+" - Failed"); + } + + //Nugget + if (GT_Values.RA.addFluidExtractionRecipe(material.getNugget(1), //Input + null, //Input 2 + material.getFluid(16), //Fluid Output + 0, //Chance + 16, //Duration + 8 //Eu Tick + )){ + Utils.LOG_WARNING("16l fluid extractor from 1 nugget Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Utils.LOG_WARNING("16l fluid extractor from 1 nugget Recipe: "+material.getLocalizedName()+" - Failed"); + } + + //Block + if (GT_Values.RA.addFluidExtractionRecipe(material.getBlock(1), //Input + null, //Input 2 + material.getFluid(144*9), //Fluid Output + 0, //Chance + 288, //Duration + 16 //Eu Tick + )){ + Utils.LOG_WARNING((144*9)+"l fluid extractor from 1 block Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Utils.LOG_WARNING((144*9)+"l fluid extractor from 1 block Recipe: "+material.getLocalizedName()+" - Failed"); + } + + + + + + + + //Making Shapes from fluid + + //Ingot + if (GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Ingot.get(0), //Item Shape + material.getFluid(144), //Fluid Input + material.getIngot(1), //output + 32, //Duration + 8 //Eu Tick + )){ + Utils.LOG_WARNING("144l fluid molder for 1 ingot Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Utils.LOG_WARNING("144l fluid molder for 1 ingot Recipe: "+material.getLocalizedName()+" - Failed"); + } + + //Plate + if (GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Plate.get(1), //Item Shape + material.getFluid(144), //Fluid Input + material.getPlate(1), //output + 32, //Duration + 8 //Eu Tick + )){ + Utils.LOG_WARNING("144l fluid molder for 1 plate Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Utils.LOG_WARNING("144l fluid molder for 1 plate Recipe: "+material.getLocalizedName()+" - Failed"); + } + + //Nugget + if (GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Nugget.get(0), //Item Shape + material.getFluid(16), //Fluid Input + material.getNugget(1), //output + 16, //Duration + 4 //Eu Tick + )){ + Utils.LOG_WARNING("16l fluid molder for 1 nugget Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Utils.LOG_WARNING("16l fluid molder for 1 nugget Recipe: "+material.getLocalizedName()+" - Failed"); + } + + //Gears + if (GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Gear.get(0), //Item Shape + material.getFluid(576), //Fluid Input + material.getGear(1), //output + 128, //Duration + 8 //Eu Tick + )){ + Utils.LOG_WARNING("576l fluid molder for 1 gear Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Utils.LOG_WARNING("576l fluid molder for 1 gear Recipe: "+material.getLocalizedName()+" - Failed"); + } + + //Blocks + if (GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Block.get(0), //Item Shape + material.getFluid(144*9), //Fluid Input + material.getBlock(1), //output + 288, //Duration + 16 //Eu Tick + )){ + Utils.LOG_WARNING((144*9)+"l fluid molder from 1 block Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Utils.LOG_WARNING((144*9)+"l fluid molder from 1 block Recipe: "+material.getLocalizedName()+" - Failed"); + } } } } |