From c12349650d68a89e39775722620ffa2b702ed704 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Mon, 13 Dec 2021 13:40:09 +0000 Subject: Fix Fluorite Dehydrator recipe. Add Tooltip to 8k/32k Volumetric Flasks to show max capacity. --- .../xmod/gregtech/loaders/RecipeGen_Fluorite.java | 117 +++++---------------- 1 file changed, 24 insertions(+), 93 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluorite.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluorite.java index 85f239c12e..b285d41652 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluorite.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluorite.java @@ -21,6 +21,7 @@ import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.minecraft.MaterialUtils; import gtPlusPlus.core.util.minecraft.RecipeUtils; import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; public class RecipeGen_Fluorite extends RecipeGen_Base { @@ -194,99 +195,29 @@ public class RecipeGen_Fluorite extends RecipeGen_Base { Logger.MATERIALS("[Centrifuge] Added Recipe: Inpure Dust to Clean Dust"); } - AutoMap> componentMap = new AutoMap>(); - for (MaterialStack r : material.getComposites()){ - if (r != null){ - componentMap.put(new Pair(r.getPartsPerOneHundred(), r.getStackMaterial())); - } - } - - //Process Dust - if (componentMap.size() > 1 && componentMap.size() <= 9){ - Logger.MATERIALS("[Issue][Electrolyzer] "+material.getLocalizedName()+" is composed of over 6 materials, so an electrolyzer recipe for processing cannot be generated. Trying to create one for the Dehydrator instead."); - - ItemStack mInternalOutputs[] = new ItemStack[9]; - int mChances[] = new int[9]; - int mCellCount = 0; - - int mTotalCount = 0; - - int mCounter = 0; - for (Pair f : componentMap){ - if (f.getValue().getState() != MaterialState.SOLID && f.getValue().getState() != MaterialState.ORE){ - Logger.MATERIALS("[Dehydrator] Found Fluid Component, adding "+f.getKey()+" cells of "+f.getValue().getLocalizedName()+"."); - mInternalOutputs[mCounter++] = f.getValue().getCell(f.getKey()); - mCellCount += f.getKey(); - mTotalCount += f.getKey(); - Logger.MATERIALS("[Dehydrator] In total, adding "+mCellCount+" cells for "+material.getLocalizedName()+" processing."); - } - else { - Logger.MATERIALS("[Dehydrator] Found Solid Component, adding "+f.getKey()+" dusts of "+f.getValue().getLocalizedName()+"."); - mInternalOutputs[mCounter++] = f.getValue().getDust(f.getKey()); - mTotalCount += f.getKey(); - } - } - - //Build Output Array - for (int g=0;g 0){ - emptyCell = ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", mCellCount); - Logger.MATERIALS("[Dehydrator] Recipe now requires "+mCellCount+" empty cells as input."); - } - - ItemStack mainDust = material.getDust(material.smallestStackSizeWhenProcessing); - if (mainDust != null){ - Logger.MATERIALS("[Dehydrator] Recipe now requires "+material.smallestStackSizeWhenProcessing+"x "+mainDust.getDisplayName()+" as input."); - } - else { - mainDust = material.getDust(mTotalCount); - Logger.MATERIALS("[Dehydrator] Could not find valid input dust, trying alternative."); - if (mainDust != null){ - Logger.MATERIALS("[Dehydrator] Recipe now requires "+mTotalCount+"x "+mainDust.getDisplayName()+" as input."); - } - else { - Logger.MATERIALS("[Dehydrator] Could not find valid input dust, exiting."); - } - } - - for (int j=0;j