mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
Support for removing all built in recipes of a type via CraftTweaker
This commit is contained in:
1 parent
c042185eaa
commit
dcd440705d
20 files changed
+219
-63
No files matched your search
+10
-3
@@ -11,8 +11,9 @@ import mekanism.common.integration.crafttweaker.helpers.GasHelper;
|
||||
import mekanism.common.integration.crafttweaker.helpers.IngredientHelper;
|
||||
import mekanism.common.integration.crafttweaker.util.AddMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.IngredientWrapper;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveAllMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveMekanismRecipe;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.recipe.inputs.GasInput;
|
||||
import mekanism.common.recipe.machines.CrystallizerRecipe;
|
||||
import mekanism.common.recipe.outputs.ItemStackOutput;
|
||||
@@ -31,7 +32,7 @@ public class ChemicalCrystallizer {
|
||||
public static void addRecipe(IGasStack gasInput, IItemStack itemOutput) {
|
||||
if (IngredientHelper.checkNotNull(NAME, gasInput, itemOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS
|
||||
.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.CHEMICAL_CRYSTALLIZER,
|
||||
.add(new AddMekanismRecipe(NAME, Recipe.CHEMICAL_CRYSTALLIZER,
|
||||
new CrystallizerRecipe(GasHelper.toGas(gasInput), InputHelper.toStack(itemOutput))));
|
||||
}
|
||||
}
|
||||
@@ -41,8 +42,14 @@ public class ChemicalCrystallizer {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemOutput)) {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveMekanismRecipe<GasInput, ItemStackOutput, CrystallizerRecipe>(NAME,
|
||||
RecipeHandler.Recipe.CHEMICAL_CRYSTALLIZER, new IngredientWrapper(itemOutput),
|
||||
Recipe.CHEMICAL_CRYSTALLIZER, new IngredientWrapper(itemOutput),
|
||||
new IngredientWrapper(gasInput)));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAllRecipes() {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveAllMekanismRecipe<CrystallizerRecipe>(NAME, Recipe.CHEMICAL_CRYSTALLIZER));
|
||||
}
|
||||
}
|
||||
+10
-3
@@ -11,8 +11,9 @@ import mekanism.common.integration.crafttweaker.helpers.GasHelper;
|
||||
import mekanism.common.integration.crafttweaker.helpers.IngredientHelper;
|
||||
import mekanism.common.integration.crafttweaker.util.AddMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.IngredientWrapper;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveAllMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveMekanismRecipe;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.recipe.inputs.ItemStackInput;
|
||||
import mekanism.common.recipe.machines.DissolutionRecipe;
|
||||
import mekanism.common.recipe.outputs.GasOutput;
|
||||
@@ -31,7 +32,7 @@ public class ChemicalDissolution {
|
||||
public static void addRecipe(IItemStack itemInput, IGasStack gasOutput) {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemInput, gasOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS
|
||||
.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.CHEMICAL_DISSOLUTION_CHAMBER,
|
||||
.add(new AddMekanismRecipe(NAME, Recipe.CHEMICAL_DISSOLUTION_CHAMBER,
|
||||
new DissolutionRecipe(InputHelper.toStack(itemInput), GasHelper.toGas(gasOutput))));
|
||||
}
|
||||
}
|
||||
@@ -41,8 +42,14 @@ public class ChemicalDissolution {
|
||||
if (IngredientHelper.checkNotNull(NAME, gasOutput)) {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveMekanismRecipe<ItemStackInput, GasOutput, DissolutionRecipe>(NAME,
|
||||
RecipeHandler.Recipe.CHEMICAL_DISSOLUTION_CHAMBER, new IngredientWrapper(gasOutput),
|
||||
Recipe.CHEMICAL_DISSOLUTION_CHAMBER, new IngredientWrapper(gasOutput),
|
||||
new IngredientWrapper(itemInput)));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAllRecipes() {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveAllMekanismRecipe<DissolutionRecipe>(NAME, Recipe.CHEMICAL_DISSOLUTION_CHAMBER));
|
||||
}
|
||||
}
|
||||
+10
-3
@@ -9,8 +9,9 @@ import mekanism.common.integration.crafttweaker.helpers.GasHelper;
|
||||
import mekanism.common.integration.crafttweaker.helpers.IngredientHelper;
|
||||
import mekanism.common.integration.crafttweaker.util.AddMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.IngredientWrapper;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveAllMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveMekanismRecipe;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.recipe.inputs.ChemicalPairInput;
|
||||
import mekanism.common.recipe.machines.ChemicalInfuserRecipe;
|
||||
import mekanism.common.recipe.outputs.GasOutput;
|
||||
@@ -29,7 +30,7 @@ public class ChemicalInfuser {
|
||||
public static void addRecipe(IGasStack leftGasInput, IGasStack rightGasInput, IGasStack gasOutput) {
|
||||
if (IngredientHelper.checkNotNull(NAME, leftGasInput, rightGasInput, gasOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS
|
||||
.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.CHEMICAL_INFUSER,
|
||||
.add(new AddMekanismRecipe(NAME, Recipe.CHEMICAL_INFUSER,
|
||||
new ChemicalInfuserRecipe(GasHelper.toGas(leftGasInput), GasHelper.toGas(rightGasInput),
|
||||
GasHelper.toGas(gasOutput))));
|
||||
}
|
||||
@@ -41,8 +42,14 @@ public class ChemicalInfuser {
|
||||
if (IngredientHelper.checkNotNull(NAME, gasOutput)) {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveMekanismRecipe<ChemicalPairInput, GasOutput, ChemicalInfuserRecipe>(NAME,
|
||||
RecipeHandler.Recipe.CHEMICAL_INFUSER, new IngredientWrapper(gasOutput),
|
||||
Recipe.CHEMICAL_INFUSER, new IngredientWrapper(gasOutput),
|
||||
new IngredientWrapper(leftGasInput, rightGasInput)));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAllRecipes() {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveAllMekanismRecipe<ChemicalInfuserRecipe>(NAME, Recipe.CHEMICAL_INFUSER));
|
||||
}
|
||||
}
|
||||
+10
-3
@@ -11,8 +11,9 @@ import mekanism.common.integration.crafttweaker.helpers.GasHelper;
|
||||
import mekanism.common.integration.crafttweaker.helpers.IngredientHelper;
|
||||
import mekanism.common.integration.crafttweaker.util.AddMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.IngredientWrapper;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveAllMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveMekanismRecipe;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.recipe.inputs.AdvancedMachineInput;
|
||||
import mekanism.common.recipe.machines.InjectionRecipe;
|
||||
import mekanism.common.recipe.outputs.ItemStackOutput;
|
||||
@@ -31,7 +32,7 @@ public class ChemicalInjection {
|
||||
public static void addRecipe(IItemStack itemInput, IGasStack gasInput, IItemStack itemOutput) {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemInput, gasInput, itemOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS
|
||||
.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.CHEMICAL_INJECTION_CHAMBER,
|
||||
.add(new AddMekanismRecipe(NAME, Recipe.CHEMICAL_INJECTION_CHAMBER,
|
||||
new InjectionRecipe(new AdvancedMachineInput(InputHelper.toStack(itemInput),
|
||||
GasHelper.toGas(gasInput).getGas()),
|
||||
new ItemStackOutput(InputHelper.toStack(itemOutput)))));
|
||||
@@ -44,8 +45,14 @@ public class ChemicalInjection {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemOutput)) {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveMekanismRecipe<AdvancedMachineInput, ItemStackOutput, InjectionRecipe>(NAME,
|
||||
RecipeHandler.Recipe.CHEMICAL_INJECTION_CHAMBER, new IngredientWrapper(itemOutput),
|
||||
Recipe.CHEMICAL_INJECTION_CHAMBER, new IngredientWrapper(itemOutput),
|
||||
new IngredientWrapper(itemInput, gasInput)));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAllRecipes() {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveAllMekanismRecipe<InjectionRecipe>(NAME, Recipe.CHEMICAL_INJECTION_CHAMBER));
|
||||
}
|
||||
}
|
||||
+10
-4
@@ -11,8 +11,9 @@ import mekanism.common.integration.crafttweaker.helpers.GasHelper;
|
||||
import mekanism.common.integration.crafttweaker.helpers.IngredientHelper;
|
||||
import mekanism.common.integration.crafttweaker.util.AddMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.IngredientWrapper;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveAllMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveMekanismRecipe;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.recipe.inputs.ItemStackInput;
|
||||
import mekanism.common.recipe.machines.OxidationRecipe;
|
||||
import mekanism.common.recipe.outputs.GasOutput;
|
||||
@@ -31,7 +32,7 @@ public class ChemicalOxidizer {
|
||||
public static void addRecipe(IItemStack itemInput, IGasStack gasOutput) {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemInput, gasOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS
|
||||
.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.CHEMICAL_OXIDIZER,
|
||||
.add(new AddMekanismRecipe(NAME, Recipe.CHEMICAL_OXIDIZER,
|
||||
new OxidationRecipe(InputHelper.toStack(itemInput), GasHelper.toGas(gasOutput))));
|
||||
}
|
||||
}
|
||||
@@ -41,8 +42,13 @@ public class ChemicalOxidizer {
|
||||
if (IngredientHelper.checkNotNull(NAME, gasOutput)) {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveMekanismRecipe<ItemStackInput, GasOutput, OxidationRecipe>(NAME,
|
||||
RecipeHandler.Recipe.CHEMICAL_OXIDIZER, new IngredientWrapper(gasOutput),
|
||||
new IngredientWrapper(itemInput)));
|
||||
Recipe.CHEMICAL_OXIDIZER, new IngredientWrapper(gasOutput), new IngredientWrapper(itemInput)));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAllRecipes() {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveAllMekanismRecipe<OxidationRecipe>(NAME, Recipe.CHEMICAL_OXIDIZER));
|
||||
}
|
||||
}
|
||||
+10
-4
@@ -9,8 +9,9 @@ import mekanism.common.integration.crafttweaker.helpers.GasHelper;
|
||||
import mekanism.common.integration.crafttweaker.helpers.IngredientHelper;
|
||||
import mekanism.common.integration.crafttweaker.util.AddMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.IngredientWrapper;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveAllMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveMekanismRecipe;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.recipe.inputs.GasInput;
|
||||
import mekanism.common.recipe.machines.WasherRecipe;
|
||||
import mekanism.common.recipe.outputs.GasOutput;
|
||||
@@ -28,7 +29,7 @@ public class ChemicalWasher {
|
||||
@ZenMethod
|
||||
public static void addRecipe(IGasStack gasInput, IGasStack gasOutput) {
|
||||
if (IngredientHelper.checkNotNull(NAME, gasInput, gasOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.CHEMICAL_WASHER,
|
||||
CrafttweakerIntegration.LATE_ADDITIONS.add(new AddMekanismRecipe(NAME, Recipe.CHEMICAL_WASHER,
|
||||
new WasherRecipe(GasHelper.toGas(gasInput), GasHelper.toGas(gasOutput))));
|
||||
}
|
||||
}
|
||||
@@ -37,8 +38,13 @@ public class ChemicalWasher {
|
||||
public static void removeRecipe(IIngredient gasOutput, @Optional IIngredient gasInput) {
|
||||
if (IngredientHelper.checkNotNull(NAME, gasOutput)) {
|
||||
CrafttweakerIntegration.LATE_REMOVALS.add(new RemoveMekanismRecipe<GasInput, GasOutput, WasherRecipe>(NAME,
|
||||
RecipeHandler.Recipe.CHEMICAL_WASHER, new IngredientWrapper(gasOutput),
|
||||
new IngredientWrapper(gasInput)));
|
||||
Recipe.CHEMICAL_WASHER, new IngredientWrapper(gasOutput), new IngredientWrapper(gasInput)));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAllRecipes() {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveAllMekanismRecipe<WasherRecipe>(NAME, Recipe.CHEMICAL_WASHER));
|
||||
}
|
||||
}
|
||||
@@ -9,8 +9,9 @@ import mekanism.common.integration.crafttweaker.CrafttweakerIntegration;
|
||||
import mekanism.common.integration.crafttweaker.helpers.IngredientHelper;
|
||||
import mekanism.common.integration.crafttweaker.util.AddMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.IngredientWrapper;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveAllMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveMekanismRecipe;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.recipe.inputs.DoubleMachineInput;
|
||||
import mekanism.common.recipe.machines.CombinerRecipe;
|
||||
import mekanism.common.recipe.outputs.ItemStackOutput;
|
||||
@@ -28,10 +29,9 @@ public class Combiner {
|
||||
@ZenMethod
|
||||
public static void addRecipe(IItemStack itemInput, IItemStack extraInput, IItemStack itemOutput) {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemInput, extraInput, itemOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.COMBINER,
|
||||
new CombinerRecipe(
|
||||
new DoubleMachineInput(InputHelper.toStack(itemInput), InputHelper.toStack(extraInput)),
|
||||
new ItemStackOutput(InputHelper.toStack(itemOutput)))));
|
||||
CrafttweakerIntegration.LATE_ADDITIONS.add(new AddMekanismRecipe(NAME, Recipe.COMBINER, new CombinerRecipe(
|
||||
new DoubleMachineInput(InputHelper.toStack(itemInput), InputHelper.toStack(extraInput)),
|
||||
new ItemStackOutput(InputHelper.toStack(itemOutput)))));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class Combiner {
|
||||
@Deprecated
|
||||
public static void addRecipe(IItemStack itemInput, IItemStack itemOutput) {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemInput, itemOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.COMBINER,
|
||||
CrafttweakerIntegration.LATE_ADDITIONS.add(new AddMekanismRecipe(NAME, Recipe.COMBINER,
|
||||
new CombinerRecipe(InputHelper.toStack(itemInput), InputHelper.toStack(itemOutput))));
|
||||
}
|
||||
}
|
||||
@@ -54,8 +54,13 @@ public class Combiner {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemOutput)) {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveMekanismRecipe<DoubleMachineInput, ItemStackOutput, CombinerRecipe>(NAME,
|
||||
RecipeHandler.Recipe.COMBINER, new IngredientWrapper(itemOutput),
|
||||
Recipe.COMBINER, new IngredientWrapper(itemOutput),
|
||||
new IngredientWrapper(itemInput, gasInput)));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAllRecipes() {
|
||||
CrafttweakerIntegration.LATE_REMOVALS.add(new RemoveAllMekanismRecipe<CombinerRecipe>(NAME, Recipe.COMBINER));
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,9 @@ import mekanism.common.integration.crafttweaker.helpers.GasHelper;
|
||||
import mekanism.common.integration.crafttweaker.helpers.IngredientHelper;
|
||||
import mekanism.common.integration.crafttweaker.util.AddMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.IngredientWrapper;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveAllMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveMekanismRecipe;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.recipe.inputs.AdvancedMachineInput;
|
||||
import mekanism.common.recipe.machines.OsmiumCompressorRecipe;
|
||||
import mekanism.common.recipe.outputs.ItemStackOutput;
|
||||
@@ -31,7 +32,7 @@ public class Compressor {
|
||||
public static void addRecipe(IItemStack itemInput, IItemStack itemOutput) {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemInput, itemOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS
|
||||
.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.OSMIUM_COMPRESSOR,
|
||||
.add(new AddMekanismRecipe(NAME, Recipe.OSMIUM_COMPRESSOR,
|
||||
new OsmiumCompressorRecipe(InputHelper.toStack(itemInput), InputHelper.toStack(itemOutput))));
|
||||
}
|
||||
}
|
||||
@@ -40,7 +41,7 @@ public class Compressor {
|
||||
public static void addRecipe(IItemStack itemInput, IGasStack gasInput, IItemStack itemOutput) {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemInput, gasInput, itemOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS
|
||||
.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.OSMIUM_COMPRESSOR,
|
||||
.add(new AddMekanismRecipe(NAME, Recipe.OSMIUM_COMPRESSOR,
|
||||
new OsmiumCompressorRecipe(new AdvancedMachineInput(InputHelper.toStack(itemInput),
|
||||
GasHelper.toGas(gasInput).getGas()),
|
||||
new ItemStackOutput(InputHelper.toStack(itemOutput)))));
|
||||
@@ -53,8 +54,14 @@ public class Compressor {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemOutput)) {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveMekanismRecipe<AdvancedMachineInput, ItemStackOutput, OsmiumCompressorRecipe>(NAME,
|
||||
RecipeHandler.Recipe.OSMIUM_COMPRESSOR, new IngredientWrapper(itemOutput),
|
||||
Recipe.OSMIUM_COMPRESSOR, new IngredientWrapper(itemOutput),
|
||||
new IngredientWrapper(itemInput, gasInput)));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAllRecipes() {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveAllMekanismRecipe<OsmiumCompressorRecipe>(NAME, Recipe.OSMIUM_COMPRESSOR));
|
||||
}
|
||||
}
|
||||
@@ -9,8 +9,9 @@ import mekanism.common.integration.crafttweaker.CrafttweakerIntegration;
|
||||
import mekanism.common.integration.crafttweaker.helpers.IngredientHelper;
|
||||
import mekanism.common.integration.crafttweaker.util.AddMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.IngredientWrapper;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveAllMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveMekanismRecipe;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.recipe.inputs.ItemStackInput;
|
||||
import mekanism.common.recipe.machines.CrusherRecipe;
|
||||
import mekanism.common.recipe.outputs.ItemStackOutput;
|
||||
@@ -28,7 +29,7 @@ public class Crusher {
|
||||
@ZenMethod
|
||||
public static void addRecipe(IItemStack itemInput, IItemStack itemOutput) {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemInput, itemOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.CRUSHER,
|
||||
CrafttweakerIntegration.LATE_ADDITIONS.add(new AddMekanismRecipe(NAME, Recipe.CRUSHER,
|
||||
new CrusherRecipe(InputHelper.toStack(itemInput), InputHelper.toStack(itemOutput))));
|
||||
}
|
||||
}
|
||||
@@ -38,8 +39,13 @@ public class Crusher {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemOutput)) {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveMekanismRecipe<ItemStackInput, ItemStackOutput, CrusherRecipe>(NAME,
|
||||
RecipeHandler.Recipe.CRUSHER, new IngredientWrapper(itemOutput),
|
||||
Recipe.CRUSHER, new IngredientWrapper(itemOutput),
|
||||
new IngredientWrapper(itemInput)));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAllRecipes() {
|
||||
CrafttweakerIntegration.LATE_REMOVALS.add(new RemoveAllMekanismRecipe<CrusherRecipe>(NAME, Recipe.CRUSHER));
|
||||
}
|
||||
}
|
||||
+10
-3
@@ -9,8 +9,9 @@ import mekanism.common.integration.crafttweaker.CrafttweakerIntegration;
|
||||
import mekanism.common.integration.crafttweaker.helpers.IngredientHelper;
|
||||
import mekanism.common.integration.crafttweaker.util.AddMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.IngredientWrapper;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveAllMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveMekanismRecipe;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.recipe.inputs.ItemStackInput;
|
||||
import mekanism.common.recipe.machines.SmeltingRecipe;
|
||||
import mekanism.common.recipe.outputs.ItemStackOutput;
|
||||
@@ -39,7 +40,7 @@ public class EnergizedSmelter {
|
||||
public static void addRecipe(IItemStack itemInput, IItemStack itemOutput) {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemInput, itemOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS
|
||||
.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.ENERGIZED_SMELTER,
|
||||
.add(new AddMekanismRecipe(NAME, Recipe.ENERGIZED_SMELTER,
|
||||
new SmeltingRecipe(InputHelper.toStack(itemInput), InputHelper.toStack(itemOutput))));
|
||||
addedRecipe = true;
|
||||
}
|
||||
@@ -50,9 +51,15 @@ public class EnergizedSmelter {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemInput)) {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveMekanismRecipe<ItemStackInput, ItemStackOutput, SmeltingRecipe>(NAME,
|
||||
RecipeHandler.Recipe.ENERGIZED_SMELTER, new IngredientWrapper(itemOutput),
|
||||
Recipe.ENERGIZED_SMELTER, new IngredientWrapper(itemOutput),
|
||||
new IngredientWrapper(itemInput)));
|
||||
removedRecipe = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAllRecipes() {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveAllMekanismRecipe<SmeltingRecipe>(NAME, Recipe.ENERGIZED_SMELTER));
|
||||
}
|
||||
}
|
||||
@@ -9,8 +9,9 @@ import mekanism.common.integration.crafttweaker.CrafttweakerIntegration;
|
||||
import mekanism.common.integration.crafttweaker.helpers.IngredientHelper;
|
||||
import mekanism.common.integration.crafttweaker.util.AddMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.IngredientWrapper;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveAllMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveMekanismRecipe;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.recipe.inputs.ItemStackInput;
|
||||
import mekanism.common.recipe.machines.EnrichmentRecipe;
|
||||
import mekanism.common.recipe.outputs.ItemStackOutput;
|
||||
@@ -29,7 +30,7 @@ public class Enrichment {
|
||||
public static void addRecipe(IItemStack itemInput, IItemStack itemOutput) {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemInput, itemOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS
|
||||
.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.ENRICHMENT_CHAMBER,
|
||||
.add(new AddMekanismRecipe(NAME, Recipe.ENRICHMENT_CHAMBER,
|
||||
new EnrichmentRecipe(InputHelper.toStack(itemInput), InputHelper.toStack(itemOutput))));
|
||||
}
|
||||
}
|
||||
@@ -39,8 +40,14 @@ public class Enrichment {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemInput)) {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveMekanismRecipe<ItemStackInput, ItemStackOutput, EnrichmentRecipe>(NAME,
|
||||
RecipeHandler.Recipe.ENRICHMENT_CHAMBER, new IngredientWrapper(itemOutput),
|
||||
Recipe.ENRICHMENT_CHAMBER, new IngredientWrapper(itemOutput),
|
||||
new IngredientWrapper(itemInput)));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAllRecipes() {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveAllMekanismRecipe<EnrichmentRecipe>(NAME, Recipe.ENRICHMENT_CHAMBER));
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,9 @@ import mekanism.common.integration.crafttweaker.CrafttweakerIntegration;
|
||||
import mekanism.common.integration.crafttweaker.helpers.IngredientHelper;
|
||||
import mekanism.common.integration.crafttweaker.util.AddMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.IngredientWrapper;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveAllMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveMekanismRecipe;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.recipe.inputs.InfusionInput;
|
||||
import mekanism.common.recipe.machines.MetallurgicInfuserRecipe;
|
||||
import mekanism.common.recipe.outputs.ItemStackOutput;
|
||||
@@ -35,7 +36,7 @@ public class Infuser {
|
||||
}
|
||||
if (IngredientHelper.checkNotNull(NAME, itemInput, itemOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS
|
||||
.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.METALLURGIC_INFUSER,
|
||||
.add(new AddMekanismRecipe(NAME, Recipe.METALLURGIC_INFUSER,
|
||||
new MetallurgicInfuserRecipe(new InfusionInput(InfuseRegistry.get(infuseType), infuseAmount,
|
||||
InputHelper.toStack(itemInput)),
|
||||
new ItemStackOutput(InputHelper.toStack(itemOutput)))));
|
||||
@@ -48,8 +49,14 @@ public class Infuser {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemOutput)) {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveMekanismRecipe<InfusionInput, ItemStackOutput, MetallurgicInfuserRecipe>(NAME,
|
||||
RecipeHandler.Recipe.METALLURGIC_INFUSER, new IngredientWrapper(itemOutput),
|
||||
Recipe.METALLURGIC_INFUSER, new IngredientWrapper(itemOutput),
|
||||
new IngredientWrapper(itemInput, infuseType)));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAllRecipes() {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveAllMekanismRecipe<MetallurgicInfuserRecipe>(NAME, Recipe.CHEMICAL_CRYSTALLIZER));
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,9 @@ import mekanism.common.integration.crafttweaker.helpers.GasHelper;
|
||||
import mekanism.common.integration.crafttweaker.helpers.IngredientHelper;
|
||||
import mekanism.common.integration.crafttweaker.util.AddMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.IngredientWrapper;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveAllMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveMekanismRecipe;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.recipe.inputs.AdvancedMachineInput;
|
||||
import mekanism.common.recipe.machines.PurificationRecipe;
|
||||
import mekanism.common.recipe.outputs.ItemStackOutput;
|
||||
@@ -31,7 +32,7 @@ public class Purification {
|
||||
public static void addRecipe(IItemStack itemInput, IItemStack itemOutput) {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemInput, itemOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS
|
||||
.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.PURIFICATION_CHAMBER,
|
||||
.add(new AddMekanismRecipe(NAME, Recipe.PURIFICATION_CHAMBER,
|
||||
new PurificationRecipe(InputHelper.toStack(itemInput), InputHelper.toStack(itemOutput))));
|
||||
}
|
||||
}
|
||||
@@ -40,7 +41,7 @@ public class Purification {
|
||||
public static void addRecipe(IItemStack itemInput, IGasStack gasInput, IItemStack itemOutput) {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemInput, gasInput, itemOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS
|
||||
.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.PURIFICATION_CHAMBER,
|
||||
.add(new AddMekanismRecipe(NAME, Recipe.PURIFICATION_CHAMBER,
|
||||
new PurificationRecipe(new AdvancedMachineInput(InputHelper.toStack(itemInput),
|
||||
GasHelper.toGas(gasInput).getGas()),
|
||||
new ItemStackOutput(InputHelper.toStack(itemOutput)))));
|
||||
@@ -53,8 +54,14 @@ public class Purification {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemOutput)) {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveMekanismRecipe<AdvancedMachineInput, ItemStackOutput, PurificationRecipe>(NAME,
|
||||
RecipeHandler.Recipe.PURIFICATION_CHAMBER, new IngredientWrapper(itemOutput),
|
||||
Recipe.PURIFICATION_CHAMBER, new IngredientWrapper(itemOutput),
|
||||
new IngredientWrapper(itemInput, gasInput)));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAllRecipes() {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveAllMekanismRecipe<PurificationRecipe>(NAME, Recipe.PURIFICATION_CHAMBER));
|
||||
}
|
||||
}
|
||||
@@ -12,8 +12,9 @@ import mekanism.common.integration.crafttweaker.helpers.GasHelper;
|
||||
import mekanism.common.integration.crafttweaker.helpers.IngredientHelper;
|
||||
import mekanism.common.integration.crafttweaker.util.AddMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.IngredientWrapper;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveAllMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveMekanismRecipe;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.recipe.inputs.PressurizedInput;
|
||||
import mekanism.common.recipe.machines.PressurizedRecipe;
|
||||
import mekanism.common.recipe.outputs.PressurizedOutput;
|
||||
@@ -33,7 +34,7 @@ public class Reaction {
|
||||
IItemStack itemOutput, IGasStack gasOutput, double energy, int duration) {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemInput, liquidInput, gasInput, itemOutput, gasOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS
|
||||
.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.PRESSURIZED_REACTION_CHAMBER,
|
||||
.add(new AddMekanismRecipe(NAME, Recipe.PRESSURIZED_REACTION_CHAMBER,
|
||||
new PressurizedRecipe(
|
||||
new PressurizedInput(InputHelper.toStack(itemInput), InputHelper.toFluid(liquidInput),
|
||||
GasHelper.toGas(gasInput)),
|
||||
@@ -48,9 +49,14 @@ public class Reaction {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemOutput, gasOutput)) {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveMekanismRecipe<PressurizedInput, PressurizedOutput, PressurizedRecipe>(NAME,
|
||||
RecipeHandler.Recipe.PRESSURIZED_REACTION_CHAMBER, new IngredientWrapper(itemOutput, gasOutput),
|
||||
Recipe.PRESSURIZED_REACTION_CHAMBER, new IngredientWrapper(itemOutput, gasOutput),
|
||||
new IngredientWrapper(itemInput, liquidInput, gasInput)));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAllRecipes() {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveAllMekanismRecipe<PressurizedRecipe>(NAME, Recipe.PRESSURIZED_REACTION_CHAMBER));
|
||||
}
|
||||
}
|
||||
@@ -10,8 +10,9 @@ import mekanism.common.integration.crafttweaker.CrafttweakerIntegration;
|
||||
import mekanism.common.integration.crafttweaker.helpers.IngredientHelper;
|
||||
import mekanism.common.integration.crafttweaker.util.AddMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.IngredientWrapper;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveAllMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveMekanismRecipe;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.recipe.inputs.ItemStackInput;
|
||||
import mekanism.common.recipe.machines.SawmillRecipe;
|
||||
import mekanism.common.recipe.outputs.ChanceOutput;
|
||||
@@ -31,7 +32,7 @@ public class Sawmill {
|
||||
@Optional double optionalChance) {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemInput, itemOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS
|
||||
.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.PRECISION_SAWMILL,
|
||||
.add(new AddMekanismRecipe(NAME, Recipe.PRECISION_SAWMILL,
|
||||
new SawmillRecipe(new ItemStackInput(toStack(itemInput)),
|
||||
optionalItemOutput == null ? new ChanceOutput(toStack(itemOutput))
|
||||
: new ChanceOutput(toStack(itemOutput), toStack(optionalItemOutput),
|
||||
@@ -45,8 +46,14 @@ public class Sawmill {
|
||||
if (IngredientHelper.checkNotNull(NAME, itemInput)) {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveMekanismRecipe<ItemStackInput, ChanceOutput, SawmillRecipe>(NAME,
|
||||
RecipeHandler.Recipe.PRECISION_SAWMILL, new IngredientWrapper(itemInput),
|
||||
Recipe.PRECISION_SAWMILL, new IngredientWrapper(itemInput),
|
||||
new IngredientWrapper(itemOutput, optionalItemOutput)));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAllRecipes() {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveAllMekanismRecipe<SawmillRecipe>(NAME, Recipe.PRECISION_SAWMILL));
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,9 @@ import mekanism.common.integration.crafttweaker.helpers.GasHelper;
|
||||
import mekanism.common.integration.crafttweaker.helpers.IngredientHelper;
|
||||
import mekanism.common.integration.crafttweaker.util.AddMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.IngredientWrapper;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveAllMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveMekanismRecipe;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.recipe.inputs.FluidInput;
|
||||
import mekanism.common.recipe.machines.SeparatorRecipe;
|
||||
import mekanism.common.recipe.outputs.ChemicalPairOutput;
|
||||
@@ -32,7 +33,7 @@ public class Separator {
|
||||
IGasStack rightGasOutput) {
|
||||
if (IngredientHelper.checkNotNull(NAME, liquidInput, leftGasOutput, rightGasOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS
|
||||
.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.ELECTROLYTIC_SEPARATOR,
|
||||
.add(new AddMekanismRecipe(NAME, Recipe.ELECTROLYTIC_SEPARATOR,
|
||||
new SeparatorRecipe(InputHelper.toFluid(liquidInput), energy, GasHelper.toGas(leftGasOutput),
|
||||
GasHelper.toGas(rightGasOutput))));
|
||||
}
|
||||
@@ -44,8 +45,14 @@ public class Separator {
|
||||
if (IngredientHelper.checkNotNull(NAME, liquidInput)) {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveMekanismRecipe<FluidInput, ChemicalPairOutput, SeparatorRecipe>(NAME,
|
||||
RecipeHandler.Recipe.ELECTROLYTIC_SEPARATOR, new IngredientWrapper(liquidInput),
|
||||
Recipe.ELECTROLYTIC_SEPARATOR, new IngredientWrapper(liquidInput),
|
||||
new IngredientWrapper(leftGasOutput, rightGasOutput)));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAllRecipes() {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveAllMekanismRecipe<SeparatorRecipe>(NAME, Recipe.ELECTROLYTIC_SEPARATOR));
|
||||
}
|
||||
}
|
||||
+10
-3
@@ -9,8 +9,9 @@ import mekanism.common.integration.crafttweaker.helpers.GasHelper;
|
||||
import mekanism.common.integration.crafttweaker.helpers.IngredientHelper;
|
||||
import mekanism.common.integration.crafttweaker.util.AddMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.IngredientWrapper;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveAllMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveMekanismRecipe;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.recipe.inputs.GasInput;
|
||||
import mekanism.common.recipe.machines.SolarNeutronRecipe;
|
||||
import mekanism.common.recipe.outputs.GasOutput;
|
||||
@@ -29,7 +30,7 @@ public class SolarNeutronActivator {
|
||||
public static void addRecipe(IGasStack gasInput, IGasStack gasOutput) {
|
||||
if (IngredientHelper.checkNotNull(NAME, gasInput, gasOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS
|
||||
.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.SOLAR_NEUTRON_ACTIVATOR,
|
||||
.add(new AddMekanismRecipe(NAME, Recipe.SOLAR_NEUTRON_ACTIVATOR,
|
||||
new SolarNeutronRecipe(GasHelper.toGas(gasInput), GasHelper.toGas(gasOutput))));
|
||||
}
|
||||
}
|
||||
@@ -39,8 +40,14 @@ public class SolarNeutronActivator {
|
||||
if (IngredientHelper.checkNotNull(NAME, gasInput)) {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveMekanismRecipe<GasInput, GasOutput, SolarNeutronRecipe>(NAME,
|
||||
RecipeHandler.Recipe.SOLAR_NEUTRON_ACTIVATOR, new IngredientWrapper(gasOutput),
|
||||
Recipe.SOLAR_NEUTRON_ACTIVATOR, new IngredientWrapper(gasOutput),
|
||||
new IngredientWrapper(gasInput)));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAllRecipes() {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveAllMekanismRecipe<SolarNeutronRecipe>(NAME, Recipe.SOLAR_NEUTRON_ACTIVATOR));
|
||||
}
|
||||
}
|
||||
+10
-3
@@ -9,8 +9,9 @@ import mekanism.common.integration.crafttweaker.CrafttweakerIntegration;
|
||||
import mekanism.common.integration.crafttweaker.helpers.IngredientHelper;
|
||||
import mekanism.common.integration.crafttweaker.util.AddMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.IngredientWrapper;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveAllMekanismRecipe;
|
||||
import mekanism.common.integration.crafttweaker.util.RemoveMekanismRecipe;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.recipe.inputs.FluidInput;
|
||||
import mekanism.common.recipe.machines.ThermalEvaporationRecipe;
|
||||
import mekanism.common.recipe.outputs.FluidOutput;
|
||||
@@ -29,7 +30,7 @@ public class ThermalEvaporation {
|
||||
public static void addRecipe(ILiquidStack liquidInput, ILiquidStack liquidOutput) {
|
||||
if (IngredientHelper.checkNotNull(NAME, liquidInput, liquidOutput)) {
|
||||
CrafttweakerIntegration.LATE_ADDITIONS
|
||||
.add(new AddMekanismRecipe(NAME, RecipeHandler.Recipe.THERMAL_EVAPORATION_PLANT,
|
||||
.add(new AddMekanismRecipe(NAME, Recipe.THERMAL_EVAPORATION_PLANT,
|
||||
new ThermalEvaporationRecipe(InputHelper.toFluid(liquidInput),
|
||||
InputHelper.toFluid(liquidOutput))));
|
||||
}
|
||||
@@ -40,8 +41,14 @@ public class ThermalEvaporation {
|
||||
if (IngredientHelper.checkNotNull(NAME, liquidInput)) {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveMekanismRecipe<FluidInput, FluidOutput, ThermalEvaporationRecipe>(NAME,
|
||||
RecipeHandler.Recipe.THERMAL_EVAPORATION_PLANT, new IngredientWrapper(liquidOutput),
|
||||
Recipe.THERMAL_EVAPORATION_PLANT, new IngredientWrapper(liquidOutput),
|
||||
new IngredientWrapper(liquidInput)));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAllRecipes() {
|
||||
CrafttweakerIntegration.LATE_REMOVALS
|
||||
.add(new RemoveAllMekanismRecipe<ThermalEvaporationRecipe>(NAME, Recipe.THERMAL_EVAPORATION_PLANT));
|
||||
}
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package mekanism.common.integration.crafttweaker.util;
|
||||
|
||||
import com.blamejared.mtlib.helpers.LogHelper;
|
||||
import com.blamejared.mtlib.utils.BaseMapRemoval;
|
||||
import java.util.Map.Entry;
|
||||
import mekanism.common.integration.crafttweaker.helpers.RecipeInfoHelper;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.recipe.inputs.MachineInput;
|
||||
import mekanism.common.recipe.machines.MachineRecipe;
|
||||
|
||||
public class RemoveAllMekanismRecipe<RECIPE extends MachineRecipe> extends BaseMapRemoval<MachineInput, RECIPE> {
|
||||
|
||||
public RemoveAllMekanismRecipe(String name, Recipe recipeType) {
|
||||
super(name, recipeType.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply() {
|
||||
//Don't move this into the constructor so that if an addon registers recipes late, we can still remove them
|
||||
recipes.putAll(map);
|
||||
super.apply();
|
||||
LogHelper.logInfo("Removed all recipes for " + name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe() {
|
||||
//Don't describe anything. It is too early for us to have a full description
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getRecipeInfo(Entry<MachineInput, RECIPE> recipe) {
|
||||
return RecipeInfoHelper.getRecipeInfo(recipe);
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -24,6 +24,7 @@ public class RemoveMekanismRecipe<INPUT extends MachineInput<INPUT>, OUTPUT exte
|
||||
|
||||
@Override
|
||||
public void apply() {
|
||||
//Don't move this into the constructor so that if an addon registers recipes late, we can still remove them
|
||||
map.forEach((key, value) -> {
|
||||
if (IngredientHelper.matches(key, input) && IngredientHelper.matches(value.getOutput(), output)) {
|
||||
recipes.put(key, value);
|
||||
@@ -59,6 +60,6 @@ public class RemoveMekanismRecipe<INPUT extends MachineInput<INPUT>, OUTPUT exte
|
||||
@Override
|
||||
public String describe() {
|
||||
//Don't describe anything. It is too early for us to have a full description
|
||||
return "";
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user