From 03f8eed67b2e33500386fc05e131d771d10e1af3 Mon Sep 17 00:00:00 2001 From: Jared Date: Tue, 25 Jul 2017 22:56:19 +0200 Subject: [PATCH] Fixed formatting --- .../compat/betterwithmods/Anvil.java | 82 ++++++++++--------- .../compat/betterwithmods/Buoyancy.java | 11 +-- .../compat/betterwithmods/Cauldron.java | 12 +-- .../compat/betterwithmods/Crucible.java | 6 +- .../compat/betterwithmods/Kiln.java | 19 +++-- .../compat/betterwithmods/Mill.java | 14 ++-- .../blamejared/compat/betterwithmods/Saw.java | 8 +- .../compat/betterwithmods/StokedCauldron.java | 14 ++-- .../compat/betterwithmods/StokedCrucible.java | 6 +- .../compat/betterwithmods/Turntable.java | 20 +++-- .../compat/betterwithmods/util/BMAdd.java | 6 +- .../compat/betterwithmods/util/BMRemove.java | 5 +- .../compat/betterwithmods/util/BulkAdd.java | 6 +- .../betterwithmods/util/BulkRemove.java | 6 +- 14 files changed, 111 insertions(+), 104 deletions(-) diff --git a/src/main/java/com/blamejared/compat/betterwithmods/Anvil.java b/src/main/java/com/blamejared/compat/betterwithmods/Anvil.java index a4ff95f..5de05b1 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/Anvil.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/Anvil.java @@ -25,73 +25,73 @@ import java.util.Iterator; @ZenClass("mods.betterwithmods.Anvil") @Handler("betterwithmods") public class Anvil { - + @ZenMethod public static void addShaped(IItemStack output, IIngredient[][] inputs) { CraftTweakerAPI.apply(new AddShaped(output, inputs)); } - + @ZenMethod public static void addShapeless(IItemStack output, IIngredient[] inputs) { CraftTweakerAPI.apply(new AddShapeless(output, inputs)); } - + @ZenMethod public static void removeShaped(IItemStack output, @Optional IIngredient[][] ingredients) { CraftTweakerAPI.apply(new RemoveShaped(output, ingredients)); } - + @ZenMethod public static void removeShapeless(IItemStack output, @Optional IIngredient[] ingredients) { CraftTweakerAPI.apply(new RemoveShapeless(output, ingredients)); } - + public static class AddShaped extends BaseUndoable { - + private final IItemStack output; private final IIngredient[][] ingredients; - + public AddShaped(IItemStack output, IIngredient[][] ingredients) { super("Add Anvil Shaped Recipe"); this.output = output; this.ingredients = ingredients; } - + @Override public void apply() { AnvilRecipes.addSteelShapedRecipe(new ResourceLocation("crafttweaker", this.name), InputHelper.toStack(output), toShapedAnvilObjects(ingredients)); } - + @Override protected String getRecipeInfo() { return output.getDisplayName(); } } - + public static class AddShapeless extends BaseUndoable { - + private final IItemStack output; private final IIngredient[] ingredients; - + public AddShapeless(IItemStack output, IIngredient[] ingredients) { super("Add Anvil Shapeless Recipe"); this.output = output; this.ingredients = ingredients; } - + @Override public void apply() { AnvilRecipes.addSteelShapelessRecipe(new ResourceLocation("crafttweaker", this.name), InputHelper.toStack(output), InputHelper.toObjects(ingredients)); } - + @Override protected String getRecipeInfo() { return output.getDisplayName(); } } - + public static Object[] toShapedAnvilObjects(IIngredient[][] ingredients) { - if (ingredients == null) + if(ingredients == null) return null; else { ArrayList prep = new ArrayList(); @@ -100,10 +100,10 @@ public class Anvil { prep.add("ijkl"); prep.add("mnop"); char[][] map = new char[][]{{'a', 'b', 'c', 'd'}, {'e', 'f', 'g', 'h'}, {'i', 'j', 'k', 'l'}, {'m', 'n', 'o', 'p'}}; - for (int x = 0; x < ingredients.length; x++) { - if (ingredients[x] != null) { - for (int y = 0; y < ingredients[x].length; y++) { - if (ingredients[x][y] != null && x < map.length && y < map[x].length) { + for(int x = 0; x < ingredients.length; x++) { + if(ingredients[x] != null) { + for(int y = 0; y < ingredients[x].length; y++) { + if(ingredients[x][y] != null && x < map.length && y < map[x].length) { prep.add(map[x][y]); prep.add(InputHelper.toObject(ingredients[x][y])); } @@ -113,73 +113,75 @@ public class Anvil { return prep.toArray(); } } - + public static class RemoveShaped extends BaseUndoable { + private final IItemStack output; private final IIngredient[][] ingredients; - + protected RemoveShaped(IItemStack output, IIngredient[][] ingredients) { super("Remove Shaped Anvil"); this.output = output; this.ingredients = ingredients; } - + @Override public void apply() { - if (ingredients != null) { + if(ingredients != null) { IRecipe removal = new ShapedAnvilRecipe(new ResourceLocation("crafttweaker", this.name), InputHelper.toStack(output), toShapedAnvilObjects(ingredients)); - for (Iterator iterator = AnvilCraftingManager.VANILLA_CRAFTING.iterator(); iterator.hasNext(); ) { + for(Iterator iterator = AnvilCraftingManager.VANILLA_CRAFTING.iterator(); iterator.hasNext(); ) { IRecipe recipe = iterator.next(); - if (recipe.getRecipeOutput().isItemEqual(removal.getRecipeOutput()) && removal.getIngredients().equals(recipe.getIngredients())) + if(recipe.getRecipeOutput().isItemEqual(removal.getRecipeOutput()) && removal.getIngredients().equals(recipe.getIngredients())) iterator.remove(); } } else { - for (Iterator iterator = AnvilCraftingManager.VANILLA_CRAFTING.iterator(); iterator.hasNext(); ) { + for(Iterator iterator = AnvilCraftingManager.VANILLA_CRAFTING.iterator(); iterator.hasNext(); ) { IRecipe recipe = iterator.next(); - if (recipe.getRecipeOutput().isItemEqual(InputHelper.toStack(output))) { + if(recipe.getRecipeOutput().isItemEqual(InputHelper.toStack(output))) { iterator.remove(); } } } } - - + + @Override protected String getRecipeInfo() { return output.getDisplayName(); } } - + public static class RemoveShapeless extends BaseUndoable { + private final IItemStack output; private final IIngredient[] ingredients; - + protected RemoveShapeless(IItemStack output, IIngredient[] ingredients) { super("Remove Shapeless Anvil"); this.output = output; this.ingredients = ingredients; } - + @Override public void apply() { - if (ingredients != null) { + if(ingredients != null) { IRecipe removal = new ShapelessAnvilRecipe(new ResourceLocation("crafttweaker", this.name), InputHelper.toStack(output), InputHelper.toObjects(ingredients)); - for (Iterator iterator = AnvilCraftingManager.VANILLA_CRAFTING.iterator(); iterator.hasNext(); ) { + for(Iterator iterator = AnvilCraftingManager.VANILLA_CRAFTING.iterator(); iterator.hasNext(); ) { IRecipe recipe = iterator.next(); - if (recipe.getRecipeOutput().isItemEqual(removal.getRecipeOutput()) && removal.getIngredients().equals(recipe.getIngredients())) + if(recipe.getRecipeOutput().isItemEqual(removal.getRecipeOutput()) && removal.getIngredients().equals(recipe.getIngredients())) iterator.remove(); } } else { - for (Iterator iterator = AnvilCraftingManager.VANILLA_CRAFTING.iterator(); iterator.hasNext(); ) { + for(Iterator iterator = AnvilCraftingManager.VANILLA_CRAFTING.iterator(); iterator.hasNext(); ) { IRecipe recipe = iterator.next(); - if (recipe.getRecipeOutput().isItemEqual(InputHelper.toStack(output))) { + if(recipe.getRecipeOutput().isItemEqual(InputHelper.toStack(output))) { iterator.remove(); } } } } - - + + @Override protected String getRecipeInfo() { return output.getDisplayName(); diff --git a/src/main/java/com/blamejared/compat/betterwithmods/Buoyancy.java b/src/main/java/com/blamejared/compat/betterwithmods/Buoyancy.java index 3205082..fe3333b 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/Buoyancy.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/Buoyancy.java @@ -17,23 +17,24 @@ import java.util.Map; @ZenClass("mods.betterwithmods.Buoyancy") @Handler("betterwithmods") public class Buoyancy { - + @ZenMethod public static void set(IItemStack stack, float value) { StackMap map = new StackMap(1.0); - map.put(new Stack(InputHelper.toStack(stack)),value); + map.put(new Stack(InputHelper.toStack(stack)), value); CraftTweakerAPI.apply(new Set(map)); } - + public static class Set extends BaseMapAddition { + protected Set(StackMap map) { super("Set Item Buoyancy", HCBuoy.buoyancy, map); } - + @Override protected String getRecipeInfo(Map.Entry recipe) { return recipe.getKey().toString() + " -> " + recipe.getValue(); } - + } } diff --git a/src/main/java/com/blamejared/compat/betterwithmods/Cauldron.java b/src/main/java/com/blamejared/compat/betterwithmods/Cauldron.java index b8b220a..eaef8e5 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/Cauldron.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/Cauldron.java @@ -20,21 +20,21 @@ import stanhebben.zenscript.annotations.ZenMethod; @ZenClass("mods.betterwithmods.Cauldron") @Handler("betterwithmods") public class Cauldron { - + @ZenMethod public static void add(IItemStack output, @Optional IItemStack secondaryOutput, @NotNull IIngredient[] inputs) { CauldronRecipe r = new CauldronRecipe(InputHelper.toStack(output), InputHelper.toStack(secondaryOutput), InputHelper.toObjects(inputs)); ModTweaker.LATE_ADDITIONS.add(new BulkAdd("Set Cauldron Recipe", CauldronManager.getInstance(), r)); } - + @ZenMethod public static void remove(IItemStack output) { ModTweaker.LATE_REMOVALS.add(new BulkRemove("Set Cauldron Recipe", CauldronManager.getInstance(), InputHelper.toStack(output), ItemStack.EMPTY)); } - + @ZenMethod - public static void remove(IItemStack output,@Optional IItemStack secondary, IIngredient[] inputs) { - ModTweaker.LATE_REMOVALS.add(new BulkRemove("Remove Cauldron Recipe", CauldronManager.getInstance(), InputHelper.toStack(output), secondary != null ? InputHelper.toStack(secondary) : ItemStack.EMPTY, InputHelper.toObjects(inputs))); + public static void remove(IItemStack output, @Optional IItemStack secondary, IIngredient[] inputs) { + ModTweaker.LATE_REMOVALS.add(new BulkRemove("Remove Cauldron Recipe", CauldronManager.getInstance(), InputHelper.toStack(output), secondary != null ? InputHelper.toStack(secondary) : ItemStack.EMPTY, InputHelper.toObjects(inputs))); } - + } diff --git a/src/main/java/com/blamejared/compat/betterwithmods/Crucible.java b/src/main/java/com/blamejared/compat/betterwithmods/Crucible.java index c948452..13eba45 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/Crucible.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/Crucible.java @@ -20,18 +20,18 @@ import stanhebben.zenscript.annotations.ZenMethod; @ZenClass("mods.betterwithmods.Crucible") @Handler("betterwithmods") public class Crucible { - + @ZenMethod public static void add(IItemStack output, @Optional IItemStack secondaryOutput, @NotNull IIngredient[] inputs) { CrucibleRecipe r = new CrucibleRecipe(InputHelper.toStack(output), InputHelper.toStack(secondaryOutput), InputHelper.toObjects(inputs)); ModTweaker.LATE_ADDITIONS.add(new BulkAdd("Set Crucible Recipe", CrucibleManager.getInstance(), r)); } - + @ZenMethod public static void remove(IItemStack output) { ModTweaker.LATE_REMOVALS.add(new BulkRemove("Set Crucible Recipe", CrucibleManager.getInstance(), InputHelper.toStack(output), ItemStack.EMPTY)); } - + @ZenMethod public static void remove(IItemStack output, IItemStack secondary, IIngredient[] inputs) { ModTweaker.LATE_REMOVALS.add(new BulkRemove("Remove Crucible Recipe", CrucibleManager.getInstance(), InputHelper.toStack(output), secondary != null ? InputHelper.toStack(secondary) : ItemStack.EMPTY, InputHelper.toObjects(inputs))); diff --git a/src/main/java/com/blamejared/compat/betterwithmods/Kiln.java b/src/main/java/com/blamejared/compat/betterwithmods/Kiln.java index 6a2e54f..3dcf88c 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/Kiln.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/Kiln.java @@ -27,38 +27,39 @@ import java.util.Arrays; @ZenClass("mods.betterwithmods.Kiln") @Handler("betterwithmods") public class Kiln { - + @ZenMethod public static void add(IItemStack[] output, @NotNull IItemStack input) { ItemStack stack = InputHelper.toStack(input); - if (InputHelper.isABlock(stack)) { + if(InputHelper.isABlock(stack)) { Block block = ((ItemBlock) stack.getItem()).getBlock(); ItemStack[] outputs = InputHelper.toStacks(output); KilnRecipe r = new KilnRecipe(block, stack.getMetadata(), Arrays.asList(outputs)); ModTweaker.LATE_ADDITIONS.add(new BMAdd("Set Kiln Recipe", KilnManager.INSTANCE, Lists.newArrayList(r))); } } - + @ZenMethod public static void remove(IItemStack input) { ModTweaker.LATE_REMOVALS.add(new BMRemove("Set Kiln Recipe", KilnManager.INSTANCE, InputHelper.toStack(input))); } - - + + @ZenMethod public static void registerBlock(IItemStack block) { ModTweaker.LATE_ADDITIONS.add(new KilnBlock(BWMRecipes.getStateFromStack(InputHelper.toStack(block)))); } - - + + public static class KilnBlock extends BaseUndoable { + private IBlockState state; - + protected KilnBlock(IBlockState state) { super("Set Kiln Structure Block"); this.state = state; } - + @Override public void apply() { KilnStructureManager.registerKilnBlock(state); diff --git a/src/main/java/com/blamejared/compat/betterwithmods/Mill.java b/src/main/java/com/blamejared/compat/betterwithmods/Mill.java index 5f51963..15a327c 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/Mill.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/Mill.java @@ -20,20 +20,20 @@ import stanhebben.zenscript.annotations.ZenMethod; @ZenClass("mods.betterwithmods.Mill") @Handler("betterwithmods") public class Mill { - + @ZenMethod public static void add(IItemStack output, @Optional IItemStack secondaryOutput, @NotNull IIngredient[] inputs) { - MillRecipe r = new MillRecipe(0,InputHelper.toStack(output),InputHelper.toStack(secondaryOutput),InputHelper.toObjects(inputs)); - ModTweaker.LATE_ADDITIONS.add(new BulkAdd("Set Mill Recipe", MillManager.getInstance(),r)); + MillRecipe r = new MillRecipe(0, InputHelper.toStack(output), InputHelper.toStack(secondaryOutput), InputHelper.toObjects(inputs)); + ModTweaker.LATE_ADDITIONS.add(new BulkAdd("Set Mill Recipe", MillManager.getInstance(), r)); } - + @ZenMethod public static void remove(IItemStack output) { - ModTweaker.LATE_REMOVALS.add(new BulkRemove("Remove Mill Recipe", MillManager.getInstance(),InputHelper.toStack(output), ItemStack.EMPTY)); + ModTweaker.LATE_REMOVALS.add(new BulkRemove("Remove Mill Recipe", MillManager.getInstance(), InputHelper.toStack(output), ItemStack.EMPTY)); } - + @ZenMethod public static void remove(IItemStack output, IIngredient[] inputs) { - ModTweaker.LATE_REMOVALS.add(new BulkRemove("Remove Mill Recipe", MillManager.getInstance(),InputHelper.toStack(output), ItemStack.EMPTY, InputHelper.toObjects(inputs))); + ModTweaker.LATE_REMOVALS.add(new BulkRemove("Remove Mill Recipe", MillManager.getInstance(), InputHelper.toStack(output), ItemStack.EMPTY, InputHelper.toObjects(inputs))); } } diff --git a/src/main/java/com/blamejared/compat/betterwithmods/Saw.java b/src/main/java/com/blamejared/compat/betterwithmods/Saw.java index 876159e..f83c64e 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/Saw.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/Saw.java @@ -24,21 +24,21 @@ import java.util.Arrays; @ZenClass("mods.betterwithmods.Saw") @Handler("betterwithmods") public class Saw { - + @ZenMethod public static void add(IItemStack[] output, @NotNull IItemStack input) { ItemStack stack = InputHelper.toStack(input); - if (InputHelper.isABlock(stack)) { + if(InputHelper.isABlock(stack)) { Block block = ((ItemBlock) stack.getItem()).getBlock(); ItemStack[] outputs = InputHelper.toStacks(output); SawRecipe r = new SawRecipe(block, stack.getMetadata(), Arrays.asList(outputs)); ModTweaker.LATE_ADDITIONS.add(new BMAdd("Set Saw Recipe", SawManager.INSTANCE, Lists.newArrayList(r))); } } - + @ZenMethod public static void remove(IItemStack input) { ModTweaker.LATE_REMOVALS.add(new BMRemove("Remove Saw Recipe", SawManager.INSTANCE, InputHelper.toStack(input))); } - + } diff --git a/src/main/java/com/blamejared/compat/betterwithmods/StokedCauldron.java b/src/main/java/com/blamejared/compat/betterwithmods/StokedCauldron.java index fedf4a7..e3e7b7d 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/StokedCauldron.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/StokedCauldron.java @@ -21,20 +21,20 @@ import stanhebben.zenscript.annotations.ZenMethod; @ZenClass("mods.betterwithmods.StokedCauldron") @Handler("betterwithmods") public class StokedCauldron { - + @ZenMethod public static void add(IItemStack output, @Optional IItemStack secondaryOutput, @NotNull IIngredient[] inputs) { - StokedCauldronRecipe r = new StokedCauldronRecipe(InputHelper.toStack(output), InputHelper.toStack(secondaryOutput),InputHelper.toObjects(inputs)); - ModTweaker.LATE_ADDITIONS.add(new BulkAdd("Set Stoked Cauldron Recipe", StokedCauldronManager.getInstance(),r)); + StokedCauldronRecipe r = new StokedCauldronRecipe(InputHelper.toStack(output), InputHelper.toStack(secondaryOutput), InputHelper.toObjects(inputs)); + ModTweaker.LATE_ADDITIONS.add(new BulkAdd("Set Stoked Cauldron Recipe", StokedCauldronManager.getInstance(), r)); } - + @ZenMethod public static void remove(IItemStack output) { - ModTweaker.LATE_REMOVALS.add(new BulkRemove("Remove Stoked Cauldron Recipe", StokedCauldronManager.getInstance(),InputHelper.toStack(output), ItemStack.EMPTY)); + ModTweaker.LATE_REMOVALS.add(new BulkRemove("Remove Stoked Cauldron Recipe", StokedCauldronManager.getInstance(), InputHelper.toStack(output), ItemStack.EMPTY)); } - + @ZenMethod public static void remove(IItemStack output, IIngredient[] inputs) { - ModTweaker.LATE_REMOVALS.add(new BulkRemove("Remove Stoked Cauldron Recipe", StokedCauldronManager.getInstance(),InputHelper.toStack(output), ItemStack.EMPTY, InputHelper.toObjects(inputs))); + ModTweaker.LATE_REMOVALS.add(new BulkRemove("Remove Stoked Cauldron Recipe", StokedCauldronManager.getInstance(), InputHelper.toStack(output), ItemStack.EMPTY, InputHelper.toObjects(inputs))); } } diff --git a/src/main/java/com/blamejared/compat/betterwithmods/StokedCrucible.java b/src/main/java/com/blamejared/compat/betterwithmods/StokedCrucible.java index 953caa0..6bd7f44 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/StokedCrucible.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/StokedCrucible.java @@ -20,18 +20,18 @@ import stanhebben.zenscript.annotations.ZenMethod; @ZenClass("mods.betterwithmods.StokedCrucible") @Handler("betterwithmods") public class StokedCrucible { - + @ZenMethod public static void add(IItemStack output, @Optional IItemStack secondaryOutput, @NotNull IIngredient[] inputs) { StokedCrucibleRecipe r = new StokedCrucibleRecipe(InputHelper.toStack(output), InputHelper.toStack(secondaryOutput), InputHelper.toObjects(inputs)); ModTweaker.LATE_ADDITIONS.add(new BulkAdd("Set Stoked Crucible Recipe", StokedCrucibleManager.getInstance(), r)); } - + @ZenMethod public static void remove(IItemStack output, @Optional IItemStack secondary) { ModTweaker.LATE_REMOVALS.add(new BulkRemove("Set Stoked Crucible Recipe", StokedCrucibleManager.getInstance(), InputHelper.toStack(output), secondary != null ? InputHelper.toStack(secondary) : ItemStack.EMPTY)); } - + @ZenMethod public static void remove(IItemStack output, @Optional IItemStack secondary, @NotNull IIngredient[] inputs) { ModTweaker.LATE_REMOVALS.add(new BulkRemove("Remove Stoked Crucible Recipe", StokedCrucibleManager.getInstance(), InputHelper.toStack(output), secondary != null ? InputHelper.toStack(secondary) : ItemStack.EMPTY, InputHelper.toObjects(inputs))); diff --git a/src/main/java/com/blamejared/compat/betterwithmods/Turntable.java b/src/main/java/com/blamejared/compat/betterwithmods/Turntable.java index ea43a09..182a112 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/Turntable.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/Turntable.java @@ -23,37 +23,39 @@ import java.util.List; @ZenClass("mods.betterwithmods.Turntable") @Handler("betterwithmods") public class Turntable { - + @ZenMethod public static void add(IItemStack inputBlock, IItemStack outputBlock, IItemStack[] additionalOutput) { - if (InputHelper.isABlock(inputBlock)) + if(InputHelper.isABlock(inputBlock)) LogHelper.logError("Input must be a block", new IllegalArgumentException()); ModTweaker.LATE_ADDITIONS.add(new Add(InputHelper.toStack(inputBlock), InputHelper.toStack(outputBlock), Lists.newArrayList(InputHelper.toStacks(additionalOutput)))); } - + public static class Add extends BMAdd { + public Add(ItemStack input, ItemStack output, List scraps) { super(TurntableRecipeCategory.UID, TurntableManager.INSTANCE, Lists.newArrayList(new TurntableRecipe(input, output, scraps))); } } - + @ZenMethod public static void remove(IItemStack inputBlock) { - if (!InputHelper.isABlock(inputBlock)) + if(!InputHelper.isABlock(inputBlock)) LogHelper.logError("Input must be a block", new IllegalArgumentException()); ModTweaker.LATE_REMOVALS.add(new Remove(InputHelper.toStack(inputBlock))); } - + public static class Remove extends BaseListRemoval { + protected Remove(ItemStack input) { super("Remove Turntable Recipe", TurntableManager.INSTANCE.getRecipes(), TurntableManager.INSTANCE.removeTurntableRecipe(input)); } - + @Override protected String getRecipeInfo(TurntableRecipe recipe) { return recipe.getStack().getDisplayName(); } } - - + + } diff --git a/src/main/java/com/blamejared/compat/betterwithmods/util/BMAdd.java b/src/main/java/com/blamejared/compat/betterwithmods/util/BMAdd.java index bba47a6..d15e03d 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/util/BMAdd.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/util/BMAdd.java @@ -7,14 +7,14 @@ import com.blamejared.mtlib.utils.BaseListAddition; import java.util.List; public class BMAdd extends BaseListAddition { - + public BMAdd(String name, BlockMetaManager handler, List recipes) { super(name, handler.getRecipes(), recipes); } - + @Override protected String getRecipeInfo(BlockMetaRecipe recipe) { return recipe.getStack().getDisplayName(); } - + } \ No newline at end of file diff --git a/src/main/java/com/blamejared/compat/betterwithmods/util/BMRemove.java b/src/main/java/com/blamejared/compat/betterwithmods/util/BMRemove.java index 488e419..9451980 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/util/BMRemove.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/util/BMRemove.java @@ -6,13 +6,14 @@ import com.blamejared.mtlib.utils.BaseListRemoval; import net.minecraft.item.ItemStack; public class BMRemove extends BaseListRemoval { + public BMRemove(String name, BlockMetaManager recipes, ItemStack input) { super(name, recipes.getRecipes(), recipes.removeRecipes(input)); } - + @Override protected String getRecipeInfo(BlockMetaRecipe recipe) { return recipe.getStack().getDisplayName(); } - + } \ No newline at end of file diff --git a/src/main/java/com/blamejared/compat/betterwithmods/util/BulkAdd.java b/src/main/java/com/blamejared/compat/betterwithmods/util/BulkAdd.java index 86e90f7..7752a84 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/util/BulkAdd.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/util/BulkAdd.java @@ -6,14 +6,14 @@ import com.blamejared.mtlib.utils.BaseListAddition; import com.google.common.collect.Lists; public class BulkAdd extends BaseListAddition { - + public BulkAdd(String name, CraftingManagerBulk recipes, T recipe) { super(name, recipes.getRecipes(), Lists.newArrayList(recipe)); } - + @Override protected String getRecipeInfo(T recipe) { return recipe.getOutput().getDisplayName(); } - + } \ No newline at end of file diff --git a/src/main/java/com/blamejared/compat/betterwithmods/util/BulkRemove.java b/src/main/java/com/blamejared/compat/betterwithmods/util/BulkRemove.java index a1abd16..56d92fe 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/util/BulkRemove.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/util/BulkRemove.java @@ -8,14 +8,14 @@ import net.minecraft.item.ItemStack; public class BulkRemove extends BaseListRemoval { - + public BulkRemove(String name, CraftingManagerBulk recipes, ItemStack output, ItemStack secondary, Object... inputs) { super(name, recipes.getRecipes(), recipes.findRecipeForRemoval(output, secondary, inputs)); } - + @Override protected String getRecipeInfo(BulkRecipe recipe) { return recipe.getOutput().getDisplayName(); } - + } \ No newline at end of file