Updated some mods \o/

This commit is contained in:
jaredlll08 2015-04-14 00:09:11 +02:00
parent 8fa42fd771
commit bd16c93254
20 changed files with 196 additions and 194 deletions

Binary file not shown.

View file

@ -12,6 +12,7 @@ import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import exnihilo.ExNihilo;
import exnihilo.registries.SieveRegistry;
import exnihilo.registries.helpers.SiftReward;

View file

@ -1,7 +1,7 @@
package modtweaker2.mods.mekanism;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ModContainer;
import java.util.regex.Pattern;
import minetweaker.MineTweakerAPI;
import modtweaker2.mods.mekanism.gas.GasBracketHandler;
import modtweaker2.mods.mekanism.handlers.ChemicalCrystallizer;
@ -14,14 +14,13 @@ import modtweaker2.mods.mekanism.handlers.Combiner;
import modtweaker2.mods.mekanism.handlers.Compressor;
import modtweaker2.mods.mekanism.handlers.Crusher;
import modtweaker2.mods.mekanism.handlers.Enrichment;
import modtweaker2.mods.mekanism.handlers.Infuser;
import modtweaker2.mods.mekanism.handlers.Purification;
import modtweaker2.mods.mekanism.handlers.Reaction;
import modtweaker2.mods.mekanism.handlers.Sawmill;
import modtweaker2.mods.mekanism.handlers.Separator;
import modtweaker2.utils.TweakerPlugin;
import java.util.regex.Pattern;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ModContainer;
public class Mekanism extends TweakerPlugin {
public static final boolean v7 = isV7();
@ -31,7 +30,7 @@ public class Mekanism extends TweakerPlugin {
MineTweakerAPI.registerClass(Compressor.class);
MineTweakerAPI.registerClass(Crusher.class);
MineTweakerAPI.registerClass(Enrichment.class);
MineTweakerAPI.registerClass(Infuser.class);
// MineTweakerAPI.registerClass(Infuser.class);
MineTweakerAPI.registerClass(Purification.class);
MineTweakerAPI.registerClass(Reaction.class);
MineTweakerAPI.registerClass(Sawmill.class);

View file

@ -3,6 +3,7 @@ package modtweaker2.mods.mekanism.handlers;
import static modtweaker2.helpers.InputHelper.toStack;
import static modtweaker2.mods.mekanism.MekanismHelper.toGas;
import mekanism.common.recipe.RecipeHandler.Recipe;
import mekanism.common.recipe.machines.CrystallizerRecipe;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IItemStack;
import modtweaker2.mods.mekanism.Mekanism;

View file

@ -1,8 +1,8 @@
package modtweaker2.mods.mekanism.handlers;
import static modtweaker2.mods.mekanism.MekanismHelper.toGas;
import mekanism.api.ChemicalPair;
import mekanism.common.recipe.RecipeHandler.Recipe;
import mekanism.common.recipe.inputs.ChemicalPairInput;
import mekanism.common.recipe.machines.ChemicalInfuserRecipe;
import minetweaker.MineTweakerAPI;
import modtweaker2.mods.mekanism.Mekanism;
@ -18,7 +18,7 @@ public class ChemicalInfuser {
public static void addRecipe(IGasStack left, IGasStack right, IGasStack out) {
if (Mekanism.v7)
{
ChemicalPair pair = new ChemicalPair(toGas(left), toGas(right));
ChemicalPairInput pair = new ChemicalPairInput(toGas(left), toGas(right));
MineTweakerAPI.apply(new AddMekanismRecipe("CHEMICAL_INFUSER", Recipe.CHEMICAL_INFUSER.get(), pair, toGas(out)));
}
else

View file

@ -2,8 +2,8 @@ package modtweaker2.mods.mekanism.handlers;
import static modtweaker2.helpers.InputHelper.toStack;
import static modtweaker2.mods.mekanism.MekanismHelper.toGas;
import mekanism.api.AdvancedInput;
import mekanism.common.recipe.RecipeHandler.Recipe;
import mekanism.common.recipe.inputs.AdvancedMachineInput;
import mekanism.common.recipe.machines.InjectionRecipe;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IItemStack;
@ -20,7 +20,7 @@ public class ChemicalInjection {
public static void addRecipe(IItemStack input, IGasStack gas, IItemStack output) {
if (Mekanism.v7)
{
AdvancedInput aInput = new AdvancedInput(toStack(input), toGas(gas).getGas());
AdvancedMachineInput aInput = new AdvancedMachineInput(toStack(input), toGas(gas).getGas());
MineTweakerAPI.apply(new AddMekanismRecipe("CHEMICAL_INJECTION_CHAMBER", Recipe.CHEMICAL_INJECTION_CHAMBER.get(), aInput, toStack(output)));
}
else

View file

@ -1,9 +1,9 @@
package modtweaker2.mods.mekanism.handlers;
import static modtweaker2.helpers.InputHelper.toStack;
import mekanism.api.AdvancedInput;
import mekanism.api.gas.GasRegistry;
import mekanism.common.recipe.RecipeHandler.Recipe;
import mekanism.common.recipe.inputs.AdvancedMachineInput;
import mekanism.common.recipe.machines.CombinerRecipe;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IItemStack;
@ -17,7 +17,7 @@ import stanhebben.zenscript.annotations.ZenMethod;
public class Combiner {
@ZenMethod
public static void addRecipe(IItemStack input, IItemStack output) {
AdvancedInput aInput = new AdvancedInput(toStack(input), GasRegistry.getGas("liquidStone"));
AdvancedMachineInput aInput = new AdvancedMachineInput(toStack(input), GasRegistry.getGas("liquidStone"));
if (Mekanism.v7)
MineTweakerAPI.apply(new AddMekanismRecipe("COMBINER", Recipe.COMBINER.get(), aInput, toStack(output)));
else

View file

@ -1,9 +1,9 @@
package modtweaker2.mods.mekanism.handlers;
import static modtweaker2.helpers.InputHelper.toStack;
import mekanism.api.AdvancedInput;
import mekanism.api.gas.GasRegistry;
import mekanism.common.recipe.RecipeHandler.Recipe;
import mekanism.common.recipe.inputs.AdvancedMachineInput;
import mekanism.common.recipe.machines.OsmiumCompressorRecipe;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IItemStack;
@ -17,7 +17,7 @@ import stanhebben.zenscript.annotations.ZenMethod;
public class Compressor {
@ZenMethod
public static void addRecipe(IItemStack input, IItemStack output) {
AdvancedInput aInput = new AdvancedInput(toStack(input), GasRegistry.getGas("liquidOsmium"));
AdvancedMachineInput aInput = new AdvancedMachineInput(toStack(input), GasRegistry.getGas("liquidOsmium"));
if (Mekanism.v7)
MineTweakerAPI.apply(new AddMekanismRecipe("OSMIUM_COMPRESSOR", Recipe.OSMIUM_COMPRESSOR.get(), aInput, toStack(output)));
else

View file

@ -1,87 +1,87 @@
package modtweaker2.mods.mekanism.handlers;
import static modtweaker2.helpers.InputHelper.toStack;
import static modtweaker2.helpers.StackHelper.areEqual;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import mekanism.api.infuse.InfuseRegistry;
import mekanism.api.infuse.InfusionInput;
import mekanism.api.infuse.InfusionOutput;
import mekanism.common.recipe.RecipeHandler.Recipe;
import mekanism.common.recipe.machines.MetallurgicInfuserRecipe;
import mekanism.common.recipe.outputs.ItemStackOutput;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IItemStack;
import modtweaker2.mods.mekanism.Mekanism;
import modtweaker2.mods.mekanism.util.AddMekanismRecipe;
import modtweaker2.mods.mekanism.util.RemoveMekanismRecipe;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
@ZenClass("mods.mekanism.Infuser")
public class Infuser {
@ZenMethod
public static void addRecipe(String type, int infuse, IItemStack input, IItemStack output) {
if (Mekanism.v7)
{
InfusionInput infuseIn = new InfusionInput(InfuseRegistry.get(type), infuse, toStack(input));
InfusionOutput infuseOut = new InfusionOutput(infuseIn, toStack(output));
MineTweakerAPI.apply(new AddMekanismRecipe("METALLURGIC_INFUSER", Recipe.METALLURGIC_INFUSER.get(), infuseIn, infuseOut));
}
else
{
MetallurgicInfuserRecipe recipe = new MetallurgicInfuserRecipe(new mekanism.common.recipe.inputs.InfusionInput(InfuseRegistry.get(type), infuse, toStack(input)), toStack(output));
MineTweakerAPI.apply(new AddMekanismRecipe("METALLURGIC_INFUSER", Recipe.METALLURGIC_INFUSER.get(), recipe.getInput(), recipe));
}
}
@ZenMethod
public static void removeRecipe(IItemStack output) {
if (Mekanism.v7)
{
MineTweakerAPI.apply(new Remove("METALLURGIC_INFUSER", Recipe.METALLURGIC_INFUSER.get(), new InfusionOutput(null, toStack(output))));
}
else
{
throw new UnsupportedOperationException("Function not added to v8 compatibility yet");
}
}
private static class Remove extends RemoveMekanismRecipe {
public Remove(String string, Map map, Object key) {
super(string, map, key);
}
private List removed = new ArrayList();
@Override
public void apply() {
Iterator it = map.entrySet().iterator();
while (it.hasNext()) {
Map.Entry pairs = (Map.Entry)it.next();
InfusionInput key = (InfusionInput)pairs.getKey();
InfusionOutput value = (InfusionOutput)pairs.getValue();
if (key != null)
{
if (this.key instanceof InfusionOutput && areEqual(value.resource, ((InfusionOutput)this.key).resource))
{
this.key = key;
removed.add(value);
it.remove();
}
}
}
}
@Override
public void undo()
{
for (Object recipe : removed)
{
map.put(key, recipe);
}
}
}
}
//package modtweaker2.mods.mekanism.handlers;
//
//import static modtweaker2.helpers.InputHelper.toStack;
//import static modtweaker2.helpers.StackHelper.areEqual;
//
//import java.util.ArrayList;
//import java.util.Iterator;
//import java.util.List;
//import java.util.Map;
//
//import mekanism.api.infuse.InfuseRegistry;
//import mekanism.common.recipe.RecipeHandler.Recipe;
//import mekanism.common.recipe.inputs.InfusionInput;
//import mekanism.common.recipe.machines.MetallurgicInfuserRecipe;
//import mekanism.common.recipe.outputs.MachineOutput;
//import minetweaker.MineTweakerAPI;
//import minetweaker.api.item.IItemStack;
//import modtweaker2.mods.mekanism.Mekanism;
//import modtweaker2.mods.mekanism.util.AddMekanismRecipe;
//import modtweaker2.mods.mekanism.util.RemoveMekanismRecipe;
//import stanhebben.zenscript.annotations.ZenClass;
//import stanhebben.zenscript.annotations.ZenMethod;
//
//@ZenClass("mods.mekanism.Infuser")
//public class Infuser {
// @ZenMethod
// public static void addRecipe(String type, int infuse, IItemStack input, IItemStack output) {
// if (Mekanism.v7)
// {
// InfusionInput infuseIn = new InfusionInput(InfuseRegistry.get(type), infuse, toStack(input));
// InfusionOutput infuseOut = new InfusionOutput(infuseIn, toStack(output));
//
// MineTweakerAPI.apply(new AddMekanismRecipe("METALLURGIC_INFUSER", Recipe.METALLURGIC_INFUSER.get(), infuseIn, infuseOut));
// }
// else
// {
// MetallurgicInfuserRecipe recipe = new MetallurgicInfuserRecipe(new mekanism.common.recipe.inputs.InfusionInput(InfuseRegistry.get(type), infuse, toStack(input)), toStack(output));
// MineTweakerAPI.apply(new AddMekanismRecipe("METALLURGIC_INFUSER", Recipe.METALLURGIC_INFUSER.get(), recipe.getInput(), recipe));
// }
// }
//
// @ZenMethod
// public static void removeRecipe(IItemStack output) {
// if (Mekanism.v7)
// {
// MineTweakerAPI.apply(new Remove("METALLURGIC_INFUSER", Recipe.METALLURGIC_INFUSER.get(), new InfusionOutput(null, toStack(output))));
// }
// else
// {
// throw new UnsupportedOperationException("Function not added to v8 compatibility yet");
// }
// }
//
// private static class Remove extends RemoveMekanismRecipe {
// public Remove(String string, Map map, Object key) {
// super(string, map, key);
// }
// private List removed = new ArrayList();
// @Override
// public void apply() {
// Iterator it = map.entrySet().iterator();
// while (it.hasNext()) {
// Map.Entry pairs = (Map.Entry)it.next();
// InfusionInput key = (InfusionInput)pairs.getKey();
// InfusionOutput value = (InfusionOutput)pairs.getValue();
// if (key != null)
// {
// if (this.key instanceof InfusionOutput && areEqual(value.resource, ((InfusionOutput)this.key).resource))
// {
// this.key = key;
// removed.add(value);
// it.remove();
// }
// }
// }
// }
//
// @Override
// public void undo()
// {
// for (Object recipe : removed)
// {
// map.put(key, recipe);
// }
// }
// }
//}

View file

@ -5,10 +5,11 @@ import static modtweaker2.helpers.StackHelper.areEqual;
import java.util.Map;
import mekanism.api.AdvancedInput;
import mekanism.api.gas.GasRegistry;
import mekanism.common.recipe.RecipeHandler.Recipe;
import mekanism.common.recipe.inputs.AdvancedMachineInput;
import mekanism.common.recipe.machines.PurificationRecipe;
import mekanism.common.recipe.outputs.MachineOutput;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IItemStack;
import modtweaker2.mods.mekanism.Mekanism;
@ -24,7 +25,7 @@ public class Purification {
public static void addRecipe(IItemStack input, IItemStack output) {
if (Mekanism.v7)
{
AdvancedInput aInput = new AdvancedInput(toStack(input), GasRegistry.getGas("oxygen"));
AdvancedMachineInput aInput = new AdvancedMachineInput(toStack(input), GasRegistry.getGas("oxygen"));
MineTweakerAPI.apply(new AddMekanismRecipe("PURIFICATION_CHAMBER", Recipe.PURIFICATION_CHAMBER.get(), aInput, toStack(output)));
}
else
@ -48,7 +49,7 @@ public class Purification {
//We must search through the recipe entries so that we can assign the correct key for removal
@Override
public void apply() {
for (Map.Entry<AdvancedInput, ItemStack> entry : ((Map<AdvancedInput, ItemStack>) map).entrySet()) {
for (Map.Entry<MachineOutput, ItemStack> entry : ((Map<MachineOutput, ItemStack>) map).entrySet()) {
if (entry.getValue() != null && areEqual(entry.getValue(), (ItemStack) stack)) {
key = entry.getKey();
break;

View file

@ -3,10 +3,10 @@ package modtweaker2.mods.mekanism.handlers;
import static modtweaker2.helpers.InputHelper.toFluid;
import static modtweaker2.helpers.InputHelper.toStack;
import static modtweaker2.mods.mekanism.MekanismHelper.toGas;
import mekanism.api.PressurizedProducts;
import mekanism.api.PressurizedReactants;
import mekanism.api.PressurizedRecipe;
import mekanism.common.recipe.RecipeHandler.Recipe;
import mekanism.common.recipe.inputs.PressurizedInput;
import mekanism.common.recipe.machines.PressurizedRecipe;
import mekanism.common.recipe.outputs.PressurizedOutput;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IItemStack;
import minetweaker.api.liquid.ILiquidStack;
@ -23,8 +23,8 @@ public class Reaction {
public static void addRecipe(IItemStack solid, ILiquidStack liquid, IGasStack gas, IItemStack outItem, IGasStack outGas, double energy, int ticks) {
if (Mekanism.v7)
{
PressurizedReactants input = new PressurizedReactants(toStack(solid), toFluid(liquid), toGas(gas));
PressurizedRecipe recipe = new PressurizedRecipe(input, energy, new PressurizedProducts(toStack(outItem), toGas(outGas)), ticks);
PressurizedInput input = new PressurizedInput(toStack(solid), toFluid(liquid), toGas(gas));
PressurizedRecipe recipe = new PressurizedRecipe(input, new PressurizedOutput(toStack(outItem), toGas(outGas)), energy, ticks);
MineTweakerAPI.apply(new AddMekanismRecipe("PRESSURIZED_REACTION_CHAMBER", Recipe.PRESSURIZED_REACTION_CHAMBER.get(), input, recipe));
}
else {
@ -36,7 +36,7 @@ public class Reaction {
@ZenMethod
public static void removeRecipe(IItemStack outItem, IGasStack outGas) {
if (!Mekanism.v7) throw new UnsupportedOperationException("Function not added to v8 compatibility yet");
PressurizedProducts output = new PressurizedProducts(toStack(outItem), toGas(outGas));
PressurizedOutput output = new PressurizedOutput(toStack(outItem), toGas(outGas));
MineTweakerAPI.apply(new RemoveMekanismRecipe("PRESSURIZED_REACTION_CHAMBER", Recipe.PRESSURIZED_REACTION_CHAMBER.get(), output));
}
}

View file

@ -5,9 +5,9 @@ import static modtweaker2.helpers.StackHelper.areEqual;
import java.util.Map;
import mekanism.api.ChanceOutput;
import mekanism.common.recipe.RecipeHandler.Recipe;
import mekanism.common.recipe.machines.SawmillRecipe;
import mekanism.common.recipe.outputs.ChanceOutput;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IItemStack;
import modtweaker2.mods.mekanism.Mekanism;

View file

@ -5,9 +5,10 @@ import static modtweaker2.mods.mekanism.MekanismHelper.toGas;
import java.util.Map;
import mekanism.api.ChemicalPair;
import mekanism.common.recipe.RecipeHandler.Recipe;
import mekanism.common.recipe.inputs.ChemicalPairInput;
import mekanism.common.recipe.machines.SeparatorRecipe;
import mekanism.common.recipe.outputs.ChemicalPairOutput;
import minetweaker.MineTweakerAPI;
import minetweaker.api.liquid.ILiquidStack;
import modtweaker2.mods.mekanism.Mekanism;
@ -24,7 +25,7 @@ public class Separator {
public static void addRecipe(ILiquidStack input, IGasStack gas1, IGasStack gas2) {
if (Mekanism.v7)
{
ChemicalPair pair = new ChemicalPair(toGas(gas1), toGas(gas2));
ChemicalPairInput pair = new ChemicalPairInput(toGas(gas1), toGas(gas2));
MineTweakerAPI.apply(new AddMekanismRecipe("ELECTROLYTIC_SEPARATOR", Recipe.ELECTROLYTIC_SEPARATOR.get(), toFluid(input), pair));
} else
{
@ -58,7 +59,7 @@ public class Separator {
//We must search through the recipe entries so that we can assign the correct key for removal
@Override
public void apply() {
for (Map.Entry<FluidStack, ChemicalPair> entry : ((Map<FluidStack, ChemicalPair>) map).entrySet()) {
for (Map.Entry<FluidStack, ChemicalPairOutput> entry : ((Map<FluidStack, ChemicalPairOutput>) map).entrySet()) {
if (entry.getKey() != null && entry.getKey().isFluidEqual((FluidStack) stack)) {
key = entry.getKey();
break;

View file

@ -2,64 +2,66 @@ 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 mekanism.common.recipe.inputs.ChemicalPairInput;
import mekanism.common.recipe.inputs.InfusionInput;
import mekanism.common.recipe.machines.PressurizedRecipe;
import mekanism.common.recipe.outputs.ChanceOutput;
import mekanism.common.recipe.outputs.ChemicalPairOutput;
import mekanism.common.recipe.outputs.PressurizedOutput;
import modtweaker2.mods.mekanism.Mekanism;
import modtweaker2.utils.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);
}
public AddMekanismRecipe(String str, Map map, Object key, Object recipe) {
super(str.toLowerCase(), map, key, recipe);
}
@Override
public String describe() {
if (Mekanism.v7)
{
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();
}
return "";
}
@Override
public String describe() {
if (Mekanism.v7) {
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 ChemicalPairInput)
return "Adding " + description + " Recipe for : " + ((ChemicalPairInput) 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 PressurizedRecipe)
return "Adding " + description + " Recipe for : " + ((PressurizedRecipe) recipe).getOutput().getItemOutput().getDisplayName();
else if (recipe instanceof InfusionInput)
return "Adding " + description + " Recipe for : " + ((InfusionInput) recipe).inputStack.getDisplayName();
else
return super.getRecipeInfo();
}
return "";
}
@Override
public String describeUndo() {
if (Mekanism.isV7())
{
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();
}
return "";
}
@Override
public String describeUndo() {
if (Mekanism.isV7()) {
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 ChemicalPairOutput)
return "Removing " + description + " Recipe for : " + ((ChemicalPairOutput) 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 PressurizedOutput)
return "Removing " + description + " Recipe for : " + ((PressurizedOutput) recipe).getItemOutput().getDisplayName();
else if (recipe instanceof InfusionInput)
return "Removing " + description + " Recipe for : " + ((InfusionInput) recipe).inputStack.getDisplayName();
else
return super.getRecipeInfo();
}
return "";
}
}

View file

@ -5,13 +5,13 @@ import static modtweaker2.helpers.StackHelper.areEqual;
import java.util.Iterator;
import java.util.Map;
import mekanism.api.ChanceOutput;
import mekanism.api.ChemicalPair;
import mekanism.api.PressurizedProducts;
import mekanism.api.PressurizedReactants;
import mekanism.api.PressurizedRecipe;
import mekanism.api.gas.GasStack;
import mekanism.api.infuse.InfusionOutput;
import mekanism.common.recipe.inputs.InfusionInput;
import mekanism.common.recipe.inputs.PressurizedInput;
import mekanism.common.recipe.machines.PressurizedRecipe;
import mekanism.common.recipe.outputs.ChanceOutput;
import mekanism.common.recipe.outputs.ChemicalPairOutput;
import mekanism.common.recipe.outputs.PressurizedOutput;
import modtweaker2.utils.BaseMapRemoval;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
@ -55,16 +55,16 @@ public class RemoveMekanismRecipe extends BaseMapRemoval {
}
}
if (tmp instanceof ItemStack && value instanceof InfusionOutput) {
if (areEqual(((ItemStack) tmp), ((InfusionOutput) value).resource)) {
if (tmp instanceof ItemStack && value instanceof InfusionInput) {
if (areEqual(((ItemStack) tmp), ((InfusionInput) value).inputStack)) {
key = pairs.getKey();
break;
}
}
if (tmp instanceof ChemicalPair && value instanceof ChemicalPair) {
ChemicalPair par1 = (ChemicalPair) tmp;
ChemicalPair par2 = (ChemicalPair) value;
if (tmp instanceof ChemicalPairOutput && value instanceof ChemicalPairOutput) {
ChemicalPairOutput par1 = (ChemicalPairOutput) tmp;
ChemicalPairOutput par2 = (ChemicalPairOutput) value;
if (par1.leftGas.isGasEqual(par2.leftGas) && par1.rightGas.isGasEqual(par2.rightGas)) {
key = pairs.getKey();
break;
@ -82,9 +82,9 @@ public class RemoveMekanismRecipe extends BaseMapRemoval {
}
}
if (tmp instanceof PressurizedProducts && value instanceof PressurizedRecipe) {
PressurizedProducts par1 = (PressurizedProducts) tmp;
PressurizedProducts par2 = ((PressurizedRecipe) value).products;
if (tmp instanceof PressurizedOutput && value instanceof PressurizedRecipe) {
PressurizedOutput par1 = (PressurizedOutput) tmp;
PressurizedOutput par2 = ((PressurizedRecipe) value).recipeOutput;
if (areEqual(par1.getItemOutput(), (par2.getItemOutput()))) {
if (par1.getGasOutput().isGasEqual(par2.getGasOutput())) {
key = pairs.getKey();
@ -114,16 +114,16 @@ public class RemoveMekanismRecipe extends BaseMapRemoval {
return "Removing " + description + " Recipe for : " + ((ItemStack) tmp).getDisplayName();
else if (tmp instanceof FluidStack)
return "Removing " + description + " Recipe for : " + ((FluidStack) tmp).getFluid().getLocalizedName();
else if (tmp instanceof ChemicalPair)
return "Removing " + description + " Recipe for : " + ((ChemicalPair) tmp).leftGas.getGas().getLocalizedName();
else if (tmp instanceof ChemicalPairOutput)
return "Removing " + description + " Recipe for : " + ((ChemicalPairOutput) tmp).leftGas.getGas().getLocalizedName();
else if (tmp instanceof ChanceOutput)
return "Removing " + description + " Recipe for : " + ((ChanceOutput) tmp).primaryOutput.getDisplayName();
else if (tmp instanceof GasStack)
return "Removing " + description + " Recipe for : " + ((GasStack) tmp).getGas().getLocalizedName();
else if (tmp instanceof PressurizedReactants)
return "Removing " + description + " Recipe for : " + ((PressurizedReactants) tmp).getSolid().getDisplayName();
else if (tmp instanceof InfusionOutput)
return "Removing " + description + " Recipe for : " + ((InfusionOutput) tmp).resource.getDisplayName();
else if (tmp instanceof PressurizedInput)
return "Removing " + description + " Recipe for : " + ((PressurizedInput) tmp).getSolid().getDisplayName();
else if (tmp instanceof InfusionInput)
return "Removing " + description + " Recipe for : " + ((InfusionInput) tmp).inputStack.getDisplayName();
else
return super.getRecipeInfo();
}
@ -134,16 +134,16 @@ public class RemoveMekanismRecipe extends BaseMapRemoval {
return "Restoring " + description + " Recipe for : " + ((ItemStack) tmp).getDisplayName();
else if (tmp instanceof FluidStack)
return "Restoring " + description + " Recipe for : " + ((FluidStack) tmp).getFluid().getLocalizedName();
else if (tmp instanceof ChemicalPair)
return "Restoring " + description + " Recipe for : " + ((ChemicalPair) tmp).leftGas.getGas().getLocalizedName();
else if (tmp instanceof ChemicalPairOutput)
return "Restoring " + description + " Recipe for : " + ((ChemicalPairOutput) tmp).leftGas.getGas().getLocalizedName();
else if (tmp instanceof ChanceOutput)
return "Restoring " + description + " Recipe for : " + ((ChanceOutput) tmp).primaryOutput.getDisplayName();
else if (tmp instanceof GasStack)
return "Restoring " + description + " Recipe for : " + ((GasStack) tmp).getGas().getLocalizedName();
else if (tmp instanceof PressurizedReactants)
return "Restoring " + description + " Recipe for : " + ((PressurizedReactants) tmp).getSolid().getDisplayName();
else if (tmp instanceof InfusionOutput)
return "Restoring " + description + " Recipe for : " + ((InfusionOutput) tmp).resource.getDisplayName();
else if (tmp instanceof PressurizedInput)
return "Restoring " + description + " Recipe for : " + ((PressurizedInput) tmp).getSolid().getDisplayName();
else if (tmp instanceof InfusionInput)
return "Restoring " + description + " Recipe for : " + ((InfusionInput) tmp).inputStack.getDisplayName();
else
return super.getRecipeInfo();
}

View file

@ -8,9 +8,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import appeng.api.AEApi;
import appeng.core.Registration;
import appeng.core.features.registries.InscriberRegistry;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import cofh.lib.inventory.ComparableItemStackSafe;