mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-12 00:07:57 +00:00
Fixes for description
This commit is contained in:
1 parent
231f25eec4
commit
87c20f178a
2 files changed
+36
-18
No files matched your search
@@ -4,12 +4,14 @@ import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import mekanism.common.recipe.inputs.MachineInput;
|
||||
import mekanism.common.recipe.machines.CombinerRecipe;
|
||||
import mekanism.common.recipe.machines.CrusherRecipe;
|
||||
import mekanism.common.recipe.machines.CrystallizerRecipe;
|
||||
import mekanism.common.recipe.machines.MachineRecipe;
|
||||
import mekanism.common.recipe.outputs.ChanceOutput;
|
||||
import mekanism.common.recipe.outputs.ChemicalPairOutput;
|
||||
import mekanism.common.recipe.outputs.FluidOutput;
|
||||
import mekanism.common.recipe.outputs.GasOutput;
|
||||
import mekanism.common.recipe.outputs.ItemStackOutput;
|
||||
import mekanism.common.recipe.outputs.MachineOutput;
|
||||
import mekanism.common.recipe.outputs.PressurizedOutput;
|
||||
import modtweaker2.helpers.LogHelper;
|
||||
import modtweaker2.utils.BaseMapAddition;
|
||||
|
||||
@@ -27,15 +29,22 @@ public class AddMekanismRecipe extends BaseMapAddition<MachineInput, MachineReci
|
||||
|
||||
@Override
|
||||
protected String getRecipeInfo(Entry<MachineInput, MachineRecipe> recipe) {
|
||||
MachineRecipe machineRecipe = recipe.getValue();
|
||||
MachineOutput output = recipe.getValue().recipeOutput;
|
||||
|
||||
if(machineRecipe instanceof CombinerRecipe) {
|
||||
return LogHelper.getStackDescription(((ItemStackOutput)output).output);
|
||||
} else if (machineRecipe instanceof CrusherRecipe) {
|
||||
return LogHelper.getStackDescription(((ItemStackOutput)output).output);
|
||||
} else if (machineRecipe instanceof CrystallizerRecipe) {
|
||||
if(output instanceof ItemStackOutput) {
|
||||
return LogHelper.getStackDescription(((ItemStackOutput)output).output);
|
||||
} else if (output instanceof GasOutput) {
|
||||
return LogHelper.getStackDescription(((GasOutput)output).output);
|
||||
} else if (output instanceof FluidOutput) {
|
||||
return LogHelper.getStackDescription(((FluidOutput)output).output);
|
||||
} else if (output instanceof ChemicalPairOutput) {
|
||||
return "[" + LogHelper.getStackDescription(((ChemicalPairOutput)output).leftGas) + ", " +
|
||||
LogHelper.getStackDescription(((ChemicalPairOutput)output).rightGas) + "]";
|
||||
} else if (output instanceof ChanceOutput) {
|
||||
return LogHelper.getStackDescription(((ChanceOutput)output).primaryOutput);
|
||||
} else if (output instanceof PressurizedOutput) {
|
||||
return "[" + LogHelper.getStackDescription(((PressurizedOutput)output).getItemOutput()) + ", " +
|
||||
LogHelper.getStackDescription(((PressurizedOutput)output).getGasOutput()) + "]";
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -4,12 +4,14 @@ import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import mekanism.common.recipe.inputs.MachineInput;
|
||||
import mekanism.common.recipe.machines.CombinerRecipe;
|
||||
import mekanism.common.recipe.machines.CrusherRecipe;
|
||||
import mekanism.common.recipe.machines.CrystallizerRecipe;
|
||||
import mekanism.common.recipe.machines.MachineRecipe;
|
||||
import mekanism.common.recipe.outputs.ChanceOutput;
|
||||
import mekanism.common.recipe.outputs.ChemicalPairOutput;
|
||||
import mekanism.common.recipe.outputs.FluidOutput;
|
||||
import mekanism.common.recipe.outputs.GasOutput;
|
||||
import mekanism.common.recipe.outputs.ItemStackOutput;
|
||||
import mekanism.common.recipe.outputs.MachineOutput;
|
||||
import mekanism.common.recipe.outputs.PressurizedOutput;
|
||||
import modtweaker2.helpers.LogHelper;
|
||||
import modtweaker2.utils.BaseMapRemoval;
|
||||
|
||||
@@ -21,15 +23,22 @@ public class RemoveMekanismRecipe extends BaseMapRemoval<MachineInput, MachineRe
|
||||
|
||||
@Override
|
||||
protected String getRecipeInfo(Entry<MachineInput, MachineRecipe> recipe) {
|
||||
MachineRecipe machineRecipe = recipe.getValue();
|
||||
MachineOutput output = recipe.getValue().recipeOutput;
|
||||
|
||||
if(machineRecipe instanceof CombinerRecipe) {
|
||||
return LogHelper.getStackDescription(((ItemStackOutput)output).output);
|
||||
} else if (machineRecipe instanceof CrusherRecipe) {
|
||||
return LogHelper.getStackDescription(((ItemStackOutput)output).output);
|
||||
} else if (machineRecipe instanceof CrystallizerRecipe) {
|
||||
if(output instanceof ItemStackOutput) {
|
||||
return LogHelper.getStackDescription(((ItemStackOutput)output).output);
|
||||
} else if (output instanceof GasOutput) {
|
||||
return LogHelper.getStackDescription(((GasOutput)output).output);
|
||||
} else if (output instanceof FluidOutput) {
|
||||
return LogHelper.getStackDescription(((FluidOutput)output).output);
|
||||
} else if (output instanceof ChemicalPairOutput) {
|
||||
return "[" + LogHelper.getStackDescription(((ChemicalPairOutput)output).leftGas) + ", " +
|
||||
LogHelper.getStackDescription(((ChemicalPairOutput)output).rightGas) + "]";
|
||||
} else if (output instanceof ChanceOutput) {
|
||||
return LogHelper.getStackDescription(((ChanceOutput)output).primaryOutput);
|
||||
} else if (output instanceof PressurizedOutput) {
|
||||
return "[" + LogHelper.getStackDescription(((PressurizedOutput)output).getItemOutput()) + ", " +
|
||||
LogHelper.getStackDescription(((PressurizedOutput)output).getGasOutput()) + "]";
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user