diff --git a/build.gradle b/build.gradle index 2cd0127..66a2b8b 100644 --- a/build.gradle +++ b/build.gradle @@ -17,9 +17,9 @@ buildscript { apply plugin: 'forge' -version = "0.8.1" +version = "0.8.3b5" group= "modtweaker" // http://maven.apache.org/guides/mini/guide-naming-conventions.html -archivesBaseName = "ModTweaker 2" +archivesBaseName = "ModTweaker~2" minecraft { version = "${mc_version}-${forge_version}" diff --git a/libs/Ex-Nihilo-1.38-31-deobf.jar b/libs/Ex-Nihilo-1.38-43-deobf.jar similarity index 67% rename from libs/Ex-Nihilo-1.38-31-deobf.jar rename to libs/Ex-Nihilo-1.38-43-deobf.jar index e7737ed..69db660 100644 Binary files a/libs/Ex-Nihilo-1.38-31-deobf.jar and b/libs/Ex-Nihilo-1.38-43-deobf.jar differ diff --git a/libs/Ex-Nihilo-1.38-43-sources.jar b/libs/Ex-Nihilo-1.38-43-sources.jar new file mode 100644 index 0000000..a0a8e2d Binary files /dev/null and b/libs/Ex-Nihilo-1.38-43-sources.jar differ diff --git a/libs/HardcoreEnderExpansion MC-1.7.10 v1.-dev.jar b/libs/HardcoreEnderExpansion MC-1.7.10 v1.-dev.jar deleted file mode 100644 index 04681f9..0000000 Binary files a/libs/HardcoreEnderExpansion MC-1.7.10 v1.-dev.jar and /dev/null differ diff --git a/src/main/java/modtweaker2/mods/exnihilo/handlers/Hammer.java b/src/main/java/modtweaker2/mods/exnihilo/handlers/Hammer.java index e3e4f0d..6c27e89 100644 --- a/src/main/java/modtweaker2/mods/exnihilo/handlers/Hammer.java +++ b/src/main/java/modtweaker2/mods/exnihilo/handlers/Hammer.java @@ -15,6 +15,7 @@ import stanhebben.zenscript.annotations.ZenClass; import stanhebben.zenscript.annotations.ZenMethod; import exnihilo.registries.HammerRegistry; import exnihilo.registries.helpers.Smashable; +import exnihilo.utils.ItemInfo; @ZenClass("mods.exnihilo.Hammer") public class Hammer { @@ -30,14 +31,14 @@ public class Hammer { // Passes the list to the base list implementation, and adds the recipe private static class Add implements IUndoableAction { - + Block block; int blockMeta; Item output; int outputMeta; float chance; float luck; - + public Add(Block block, int blockMeta, Item output, int outputMeta, float chance, float luck) { this.block = block; this.blockMeta = blockMeta; @@ -67,7 +68,7 @@ public class Hammer { return null; } - public void undo() { + public void undo() { } } @@ -75,31 +76,30 @@ public class Hammer { // Removing a Ex Nihilo Hammer recipe @ZenMethod - public static void removeRecipe(IItemStack output) { - MineTweakerAPI.apply(new Remove(toStack(output))); + public static void removeRecipe(IItemStack inputBlock, int inputBlockMeta, IItemStack outputItem, int outputItemMeta) { + MineTweakerAPI.apply(new Remove(Block.getBlockFromItem(toStack(inputBlock).getItem()), inputBlockMeta, toStack(outputItem).getItem(), outputItemMeta)); } // Removes a recipe, apply is never the same for anything, so will always // need to override it private static class Remove implements IUndoableAction { - ItemStack stack; - - public Remove(ItemStack stack) { - this.stack = stack; + Block block; + int inputBlockMeta; + Item output; + int outputItemMeta; + + + public Remove(Block block, int inputBlockMeta, Item output, int outputItemMeta) { + this.block = block; + this.inputBlockMeta = inputBlockMeta; + this.output = output; + this.outputItemMeta = outputItemMeta; } // Loops through the registry, to find the item that matches, saves that // recipe then removes it - public void apply(){ - List smashables = HammerRegistry.rewards; - for(int i = 0; i < smashables.size(); i++){ - Smashable smash = smashables.get(i); - if (smash != null && smash.source != null && Block.getBlockFromItem(stack.getItem()) != null) - if (smash.source == Block.getBlockFromItem(stack.getItem())){ - HammerRegistry.rewards.remove(smash); - return; - } - } + public void apply() { + HammerRegistry.remove(block, inputBlockMeta, output, outputItemMeta); } public boolean canUndo() { @@ -107,7 +107,7 @@ public class Hammer { } public String describe() { - return "Removing ExNihilo Hammer recipe of obtaining " + stack.getUnlocalizedName(); + return "Removing ExNihilo Hammer recipe"; } public String describeUndo() {