diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2021-12-13 13:04:35 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2021-12-13 13:04:35 +0000 |
commit | aed9ee9f560200a7139e1f3f80ff087cf80c0be6 (patch) | |
tree | dd6b36ec43a22e490b95aeb648a09fcb516cb296 /src/Java/gtPlusPlus/xmod | |
parent | 352702417fb4036c4048f4095ef225db44b82d26 (diff) | |
download | GT5-Unofficial-aed9ee9f560200a7139e1f3f80ff087cf80c0be6.tar.gz GT5-Unofficial-aed9ee9f560200a7139e1f3f80ff087cf80c0be6.tar.bz2 GT5-Unofficial-aed9ee9f560200a7139e1f3f80ff087cf80c0be6.zip |
More recipe adjustments.
Changed how Fluorite is handled.
Change Monazite Froth output to no longer contain Praseodymium.
Change Monazite Froth output to have 4x less Europium.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluorite.java | 194 |
1 files changed, 194 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluorite.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluorite.java new file mode 100644 index 0000000000..82d6de4498 --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluorite.java @@ -0,0 +1,194 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import java.util.HashSet; +import java.util.Set; + +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_ModHandler; +import gtPlusPlus.api.interfaces.RunnableWithInfo; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.material.nuclear.FLUORIDES; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import net.minecraft.item.ItemStack; + +public class RecipeGen_Fluorite extends RecipeGen_Base { + + public final static Set<RunnableWithInfo<Material>> mRecipeGenMap = new HashSet<RunnableWithInfo<Material>>(); + + static { + MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); + } + + public RecipeGen_Fluorite(final Material material){ + this.toGenerate = material; + mRecipeGenMap.add(this); + + + /** + * Shaped Crafting + */ + RecipeUtils.addShapedRecipe( + CI.craftingToolHammer_Hard, null, null, + material.getCrushedPurified(1), null, null, + null, null, null, + material.getDustPurified(1)); + + RecipeUtils.addShapedRecipe( + CI.craftingToolHammer_Hard, null, null, + material.getCrushed(1), null, null, + null, null, null, + material.getDustImpure(1)); + + RecipeUtils.addShapedRecipe( + CI.craftingToolHammer_Hard, null, null, + material.getCrushedCentrifuged(1), null, null, + null, null, null, + material.getDust(1)); + + + + final ItemStack normalDust = material.getDust(1); + final ItemStack smallDust = material.getSmallDust(1); + final ItemStack tinyDust = material.getTinyDust(1); + + if (RecipeUtils.addShapedRecipe( + tinyDust, tinyDust, tinyDust, + tinyDust, tinyDust, tinyDust, + tinyDust, tinyDust, tinyDust, + normalDust)){ + Logger.WARNING("9 Tiny dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("9 Tiny dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Failed"); + } + + if (RecipeUtils.addShapedRecipe( + normalDust, null, null, + null, null, null, + null, null, null, + material.getTinyDust(9))){ + Logger.WARNING("9 Tiny dust from 1 Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("9 Tiny dust from 1 Recipe: "+material.getLocalizedName()+" - Failed"); + } + + if (RecipeUtils.addShapedRecipe( + smallDust, smallDust, null, + smallDust, smallDust, null, + null, null, null, + normalDust)){ + Logger.WARNING("4 Small dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("4 Small dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Failed"); + } + + if (RecipeUtils.addShapedRecipe( + null, normalDust, null, + null, null, null, + null, null, null, + material.getSmallDust(4))){ + Logger.WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Failed"); + } + } + + @Override + public void run() { + generateRecipes(this.toGenerate); + } + + public static void generateRecipes(final Material material){ + + int tVoltageMultiplier = MaterialUtils.getVoltageForTier(material.vTier); + + final ItemStack dustStone = ItemUtils.getItemStackOfAmountFromOreDict("dustStone", 1); + + + ItemStack tinyDustA = FLUORIDES.FLUORITE.getTinyDust(1); + ItemStack tinyDustB = FLUORIDES.FLUORITE.getTinyDust(1); + ItemStack matDust = FLUORIDES.FLUORITE.getDust(1); + ItemStack matDustA = FLUORIDES.FLUORITE.getDust(1); + + /** + * Package + */ + //Allow ore dusts to be packaged + if (ItemUtils.checkForInvalidItems(material.getSmallDust(1)) && ItemUtils.checkForInvalidItems(material.getTinyDust(1))) { + RecipeGen_DustGeneration.generatePackagerRecipes(material); + } + + + /** + * Macerate + */ + //Macerate ore to Crushed + if (GT_Values.RA.addPulveriserRecipe(material.getOre(1), new ItemStack[]{material.getCrushed(2)}, new int[]{10000}, 20*20, tVoltageMultiplier/2)){ + Logger.MATERIALS("[Macerator] Added Recipe: 'Macerate ore to Crushed ore'"); + } + //Macerate Centrifuged to Pure Dust + if (GT_Values.RA.addPulveriserRecipe(material.getCrushedCentrifuged(1), new ItemStack[]{matDust, matDustA}, new int[]{10000, 1000}, 20*20, tVoltageMultiplier/2)){ + Logger.MATERIALS("[Macerator] Added Recipe: 'Macerate Centrifuged ore to Pure Dust'"); + } + if (GT_ModHandler.addThermalCentrifugeRecipe(material.getCrushedPurified(1), 200, material.getCrushedCentrifuged(1), tinyDustA, dustStone)){ + Logger.MATERIALS("[ThermalCentrifuge] Added Recipe: 'Washed ore to Centrifuged Ore' | Input: "+material.getCrushedPurified(1).getDisplayName()+" | Outputs: "+material.getCrushedCentrifuged(1).getDisplayName()+", "+tinyDustA.getDisplayName()+", "+dustStone.getDisplayName()+"."); + } + + GT_Values.RA.addChemicalBathRecipe( + FLUORIDES.FLUORITE.getCrushed(2), + FluidUtils.getFluidStack("hydrogen", 2000), + FLUORIDES.FLUORITE.getCrushedPurified(8), + FLUORIDES.FLUORITE.getDustImpure(4), + FLUORIDES.FLUORITE.getDustPurified(2), + new int[] { 10000, 5000, 1000 }, + 30 * 20, + 240); + + /** + * Forge Hammer + */ + if (GT_Values.RA.addForgeHammerRecipe(material.getCrushedCentrifuged(1), matDust, 10, tVoltageMultiplier/4)){ + Logger.MATERIALS("[ForgeHammer] Added Recipe: 'Crushed Centrifuged to Pure Dust'"); + } + + /** + * Centrifuge + */ + //Purified Dust to Clean + if (GT_Values.RA.addCentrifugeRecipe( + material.getDustPurified(1), null, + null, //In Fluid + null, //Out Fluid + matDust, tinyDustA,null, + null, null,null, + new int[]{10000, 10000}, //Chances + 5*20, //Time + tVoltageMultiplier/2)){ //Eu + Logger.MATERIALS("[Centrifuge] Added Recipe: Purified Dust to Clean Dust"); + } + + //Impure Dust to Clean + if (GT_Values.RA.addCentrifugeRecipe( + material.getDustImpure(1), null, + null, //In Fluid + null, //Out Fluid + matDust, tinyDustB,null, + null, null,null, + new int[]{10000, 10000}, //Chances + 5*20, //Time + tVoltageMultiplier/2)){ //Eu + Logger.MATERIALS("[Centrifuge] Added Recipe: Inpure Dust to Clean Dust"); + } + + } + +} |