Fix AE2 inscriber
This commit is contained in:
parent
e238d545a6
commit
df9ca0fd1a
3 changed files with 6 additions and 14 deletions
|
@ -4,7 +4,6 @@ import static modtweaker2.helpers.InputHelper.toStack;
|
|||
import static modtweaker2.helpers.InputHelper.toStacks;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
|
@ -17,7 +16,7 @@ import appeng.recipes.handlers.Inscribe;
|
|||
import appeng.recipes.handlers.Inscribe.InscriberRecipe;
|
||||
|
||||
@ZenClass("mods.appeng.Inscriber")
|
||||
public class Inscriber{
|
||||
public class Inscriber {
|
||||
@ZenMethod
|
||||
public static void addRecipe(IItemStack[] imprintable, IItemStack plateA, IItemStack plateB, IItemStack out, boolean usePlates) {
|
||||
MineTweakerAPI.apply(new Add(new InscriberRecipe(toStacks(imprintable), toStack(plateA), toStack(plateB), toStack(out), usePlates)));
|
||||
|
@ -49,16 +48,15 @@ public class Inscriber{
|
|||
public static class Remove extends BaseListRemoval {
|
||||
|
||||
public Remove(ItemStack stack) {
|
||||
|
||||
|
||||
super(stack.getUnlocalizedName(), Inscribe.recipes, stack);
|
||||
listToRemove = list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply() {
|
||||
ArrayList<InscriberRecipe> recipesToRemove = new ArrayList<Inscribe.InscriberRecipe>();
|
||||
for (InscriberRecipe recipe : Inscribe.recipes) {
|
||||
if (recipe !=null && recipe.output !=null && recipe.output.isItemEqual(stack)) {
|
||||
if (recipe != null && recipe.output != null && recipe.output.isItemEqual(stack)) {
|
||||
recipesToRemove.add(recipe);
|
||||
}
|
||||
}
|
||||
|
@ -67,8 +65,6 @@ public class Inscriber{
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import minetweaker.MineTweakerAPI;
|
|||
import minetweaker.api.item.IIngredient;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import mods.railcraft.api.crafting.RailcraftCraftingManager;
|
||||
import modtweaker2.helpers.InputHelper;
|
||||
import modtweaker2.mods.railcraft.RailcraftHelper;
|
||||
import modtweaker2.util.BaseCraftingAddition;
|
||||
import modtweaker2.util.BaseCraftingRemoval;
|
||||
|
@ -37,14 +38,12 @@ public class RollingMachine {
|
|||
|
||||
@Override
|
||||
public void applyShaped() {
|
||||
// RailcraftCraftingManager.rollingMachine.addRecipe(output, recipe);
|
||||
RailcraftHelper.rolling.add(new ShapedRecipe(output, recipe));
|
||||
RailcraftCraftingManager.rollingMachine.addRecipe(output, recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyShapeless() {
|
||||
// RailcraftCraftingManager.rollingMachine.addShapelessRecipe(output, recipe);
|
||||
RailcraftHelper.rolling.add(new ShapelessRecipe(output, recipe));
|
||||
RailcraftCraftingManager.rollingMachine.addShapelessRecipe(output, recipe);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,14 +15,11 @@ public abstract class BaseListRemoval implements IUndoableAction {
|
|||
protected final ItemStack stack;
|
||||
protected Object recipe;
|
||||
|
||||
public static List listToRemove;
|
||||
|
||||
public BaseListRemoval(String description, List list, ItemStack stack, FluidStack fluid) {
|
||||
this.list = list;
|
||||
this.stack = stack;
|
||||
this.description = description;
|
||||
this.fluid = fluid;
|
||||
listToRemove = list;
|
||||
}
|
||||
|
||||
public BaseListRemoval(String description, List list, ItemStack stack) {
|
||||
|
|
Loading…
Reference in a new issue