diff --git a/libs/CoFHCore-[1.7.10]3.0.0RC1-187-dev.jar b/libs/CoFHCore-[1.7.10]3.0.1-258-dev.jar similarity index 58% rename from libs/CoFHCore-[1.7.10]3.0.0RC1-187-dev.jar rename to libs/CoFHCore-[1.7.10]3.0.1-258-dev.jar index fc5acf1..c8cc254 100644 Binary files a/libs/CoFHCore-[1.7.10]3.0.0RC1-187-dev.jar and b/libs/CoFHCore-[1.7.10]3.0.1-258-dev.jar differ diff --git a/libs/CoFHLib-[1.7.10]1.0.0B9-114-dev.jar b/libs/CoFHLib-[1.7.10]1.0.0B9-114-dev.jar deleted file mode 100644 index ee186d4..0000000 Binary files a/libs/CoFHLib-[1.7.10]1.0.0B9-114-dev.jar and /dev/null differ diff --git a/libs/CoFHLib-[1.7.10]1.0.1-153-dev.jar b/libs/CoFHLib-[1.7.10]1.0.1-153-dev.jar new file mode 100644 index 0000000..0d82f2d Binary files /dev/null and b/libs/CoFHLib-[1.7.10]1.0.1-153-dev.jar differ diff --git a/libs/ThermalExpansion-[1.7.10]4.0.0RC1-121-dev.jar b/libs/ThermalExpansion-[1.7.10]4.0.0-176-dev.jar similarity index 74% rename from libs/ThermalExpansion-[1.7.10]4.0.0RC1-121-dev.jar rename to libs/ThermalExpansion-[1.7.10]4.0.0-176-dev.jar index 6ae210c..8619cd7 100644 Binary files a/libs/ThermalExpansion-[1.7.10]4.0.0RC1-121-dev.jar and b/libs/ThermalExpansion-[1.7.10]4.0.0-176-dev.jar differ diff --git a/libs/ThermalFoundation-[1.7.10]1.0.0RC2-54-dev.jar b/libs/ThermalFoundation-[1.7.10]1.0.0-81-dev.jar similarity index 87% rename from libs/ThermalFoundation-[1.7.10]1.0.0RC2-54-dev.jar rename to libs/ThermalFoundation-[1.7.10]1.0.0-81-dev.jar index 7f94a99..0c8942e 100644 Binary files a/libs/ThermalFoundation-[1.7.10]1.0.0RC2-54-dev.jar and b/libs/ThermalFoundation-[1.7.10]1.0.0-81-dev.jar differ diff --git a/src/main/java/modtweaker2/mods/exnihilo/handlers/Sieve.java b/src/main/java/modtweaker2/mods/exnihilo/handlers/Sieve.java index 799c536..340f83c 100644 --- a/src/main/java/modtweaker2/mods/exnihilo/handlers/Sieve.java +++ b/src/main/java/modtweaker2/mods/exnihilo/handlers/Sieve.java @@ -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; diff --git a/src/main/java/modtweaker2/mods/mekanism/Mekanism.java b/src/main/java/modtweaker2/mods/mekanism/Mekanism.java index cceeb02..6970986 100644 --- a/src/main/java/modtweaker2/mods/mekanism/Mekanism.java +++ b/src/main/java/modtweaker2/mods/mekanism/Mekanism.java @@ -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); diff --git a/src/main/java/modtweaker2/mods/mekanism/handlers/ChemicalCrystallizer.java b/src/main/java/modtweaker2/mods/mekanism/handlers/ChemicalCrystallizer.java index 1d7c357..edf0f0e 100644 --- a/src/main/java/modtweaker2/mods/mekanism/handlers/ChemicalCrystallizer.java +++ b/src/main/java/modtweaker2/mods/mekanism/handlers/ChemicalCrystallizer.java @@ -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; diff --git a/src/main/java/modtweaker2/mods/mekanism/handlers/ChemicalInfuser.java b/src/main/java/modtweaker2/mods/mekanism/handlers/ChemicalInfuser.java index 76acf30..f045241 100644 --- a/src/main/java/modtweaker2/mods/mekanism/handlers/ChemicalInfuser.java +++ b/src/main/java/modtweaker2/mods/mekanism/handlers/ChemicalInfuser.java @@ -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 diff --git a/src/main/java/modtweaker2/mods/mekanism/handlers/ChemicalInjection.java b/src/main/java/modtweaker2/mods/mekanism/handlers/ChemicalInjection.java index d81b50b..a21395f 100644 --- a/src/main/java/modtweaker2/mods/mekanism/handlers/ChemicalInjection.java +++ b/src/main/java/modtweaker2/mods/mekanism/handlers/ChemicalInjection.java @@ -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 diff --git a/src/main/java/modtweaker2/mods/mekanism/handlers/Combiner.java b/src/main/java/modtweaker2/mods/mekanism/handlers/Combiner.java index 35c358a..983d79f 100644 --- a/src/main/java/modtweaker2/mods/mekanism/handlers/Combiner.java +++ b/src/main/java/modtweaker2/mods/mekanism/handlers/Combiner.java @@ -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 diff --git a/src/main/java/modtweaker2/mods/mekanism/handlers/Compressor.java b/src/main/java/modtweaker2/mods/mekanism/handlers/Compressor.java index b8280f8..25898a8 100644 --- a/src/main/java/modtweaker2/mods/mekanism/handlers/Compressor.java +++ b/src/main/java/modtweaker2/mods/mekanism/handlers/Compressor.java @@ -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 diff --git a/src/main/java/modtweaker2/mods/mekanism/handlers/Infuser.java b/src/main/java/modtweaker2/mods/mekanism/handlers/Infuser.java index 9daf3cf..6b1c67f 100644 --- a/src/main/java/modtweaker2/mods/mekanism/handlers/Infuser.java +++ b/src/main/java/modtweaker2/mods/mekanism/handlers/Infuser.java @@ -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); +// } +// } +// } +//} diff --git a/src/main/java/modtweaker2/mods/mekanism/handlers/Purification.java b/src/main/java/modtweaker2/mods/mekanism/handlers/Purification.java index f36d5d2..5f8a95d 100644 --- a/src/main/java/modtweaker2/mods/mekanism/handlers/Purification.java +++ b/src/main/java/modtweaker2/mods/mekanism/handlers/Purification.java @@ -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 entry : ((Map) map).entrySet()) { + for (Map.Entry entry : ((Map) map).entrySet()) { if (entry.getValue() != null && areEqual(entry.getValue(), (ItemStack) stack)) { key = entry.getKey(); break; diff --git a/src/main/java/modtweaker2/mods/mekanism/handlers/Reaction.java b/src/main/java/modtweaker2/mods/mekanism/handlers/Reaction.java index 004c81b..5bfb04a 100644 --- a/src/main/java/modtweaker2/mods/mekanism/handlers/Reaction.java +++ b/src/main/java/modtweaker2/mods/mekanism/handlers/Reaction.java @@ -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)); } } diff --git a/src/main/java/modtweaker2/mods/mekanism/handlers/Sawmill.java b/src/main/java/modtweaker2/mods/mekanism/handlers/Sawmill.java index d2d5d77..cb9eefa 100644 --- a/src/main/java/modtweaker2/mods/mekanism/handlers/Sawmill.java +++ b/src/main/java/modtweaker2/mods/mekanism/handlers/Sawmill.java @@ -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; diff --git a/src/main/java/modtweaker2/mods/mekanism/handlers/Separator.java b/src/main/java/modtweaker2/mods/mekanism/handlers/Separator.java index ca509b6..af08c3f 100644 --- a/src/main/java/modtweaker2/mods/mekanism/handlers/Separator.java +++ b/src/main/java/modtweaker2/mods/mekanism/handlers/Separator.java @@ -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 entry : ((Map) map).entrySet()) { + for (Map.Entry entry : ((Map) map).entrySet()) { if (entry.getKey() != null && entry.getKey().isFluidEqual((FluidStack) stack)) { key = entry.getKey(); break; diff --git a/src/main/java/modtweaker2/mods/mekanism/util/AddMekanismRecipe.java b/src/main/java/modtweaker2/mods/mekanism/util/AddMekanismRecipe.java index 32cc858..92d3ad8 100644 --- a/src/main/java/modtweaker2/mods/mekanism/util/AddMekanismRecipe.java +++ b/src/main/java/modtweaker2/mods/mekanism/util/AddMekanismRecipe.java @@ -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 ""; + } } diff --git a/src/main/java/modtweaker2/mods/mekanism/util/RemoveMekanismRecipe.java b/src/main/java/modtweaker2/mods/mekanism/util/RemoveMekanismRecipe.java index a3d1573..7b83eb3 100644 --- a/src/main/java/modtweaker2/mods/mekanism/util/RemoveMekanismRecipe.java +++ b/src/main/java/modtweaker2/mods/mekanism/util/RemoveMekanismRecipe.java @@ -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(); } diff --git a/src/main/java/modtweaker2/mods/thermalexpansion/ThermalHelper.java b/src/main/java/modtweaker2/mods/thermalexpansion/ThermalHelper.java index 0d19f42..2afd17b 100644 --- a/src/main/java/modtweaker2/mods/thermalexpansion/ThermalHelper.java +++ b/src/main/java/modtweaker2/mods/thermalexpansion/ThermalHelper.java @@ -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;