This closes #17 and closes #58, I tested and it worked using the script given

Also changes like all packages
inb4 "jared changes a package name in ModTweaker2 breaking compatability
with everything" drama tweet.
This commit is contained in:
jaredlll08 committed 2015-02-20 23:57:32 +02:00
1 parent 4fd2551072
commit ec562b62ea
187 files changed
+977 -991

No files matched your search

@@ -0,0 +1,42 @@
package modtweaker2.mods.mekanism.util;
import java.util.Map;
import mekanism.api.ChanceOutput;
import mekanism.api.ChemicalPair;
import mekanism.api.PressurizedReactants;
import mekanism.api.gas.GasStack;
import mekanism.api.infuse.InfusionOutput;
import modtweaker2.util.BaseMapAddition;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
public class AddMekanismRecipe extends BaseMapAddition {
public AddMekanismRecipe(String str, Map map, Object key, Object recipe) {
super(str.toLowerCase(), map, key, recipe);
}
@Override
public String describe() {
if (recipe instanceof ItemStack) return "Adding " + description + " Recipe for : " + ((ItemStack) recipe).getDisplayName();
else if (recipe instanceof FluidStack) return "Adding " + description + " Recipe for : " + ((FluidStack) recipe).getFluid().getLocalizedName();
else if (recipe instanceof ChemicalPair) return "Adding " + description + " Recipe for : " + ((ChemicalPair) recipe).leftGas.getGas().getLocalizedName();
else if (recipe instanceof ChanceOutput) return "Adding " + description + " Recipe for : " + ((ChanceOutput) recipe).primaryOutput.getDisplayName();
else if (recipe instanceof GasStack) return "Adding " + description + " Recipe for : " + ((GasStack) recipe).getGas().getLocalizedName();
else if (recipe instanceof PressurizedReactants) return "Adding " + description + " Recipe for : " + ((PressurizedReactants) recipe).getSolid().getDisplayName();
else if (recipe instanceof InfusionOutput) return "Adding " + description + " Recipe for : " + ((InfusionOutput) recipe).resource.getDisplayName();
else return super.getRecipeInfo();
}
@Override
public String describeUndo() {
if (recipe instanceof ItemStack) return "Removing " + description + " Recipe for : " + ((ItemStack) recipe).getDisplayName();
else if (recipe instanceof FluidStack) return "Removing " + description + " Recipe for : " + ((FluidStack) recipe).getFluid().getLocalizedName();
else if (recipe instanceof ChemicalPair) return "Removing " + description + " Recipe for : " + ((ChemicalPair) recipe).leftGas.getGas().getLocalizedName();
else if (recipe instanceof ChanceOutput) return "Removing " + description + " Recipe for : " + ((ChanceOutput) recipe).primaryOutput.getDisplayName();
else if (recipe instanceof GasStack) return "Removing " + description + " Recipe for : " + ((GasStack) recipe).getGas().getLocalizedName();
else if (recipe instanceof PressurizedReactants) return "Removing " + description + " Recipe for : " + ((PressurizedReactants) recipe).getSolid().getDisplayName();
else if (recipe instanceof InfusionOutput) return "Removing " + description + " Recipe for : " + ((InfusionOutput) recipe).resource.getDisplayName();
else return super.getRecipeInfo();
}
}