diff --git a/libs/Chisel2_DEV-2.3.3.c08a900-deobf.jar b/libs/Chisel2_DEV-2.3.5.0064ec3-deobf.jar similarity index 80% rename from libs/Chisel2_DEV-2.3.3.c08a900-deobf.jar rename to libs/Chisel2_DEV-2.3.5.0064ec3-deobf.jar index dbc246e..f248e27 100644 Binary files a/libs/Chisel2_DEV-2.3.3.c08a900-deobf.jar and b/libs/Chisel2_DEV-2.3.5.0064ec3-deobf.jar differ diff --git a/libs/forestry_1.7.10-3.3.0.452-unstable-dev.jar b/libs/forestry_1.7.10-3.3.0.452-unstable-dev.jar new file mode 100644 index 0000000..6088bee Binary files /dev/null and b/libs/forestry_1.7.10-3.3.0.452-unstable-dev.jar differ diff --git a/libs/forestry_1.7.10-3.3.0.6-dev.jar b/libs/forestry_1.7.10-3.3.0.6-dev.jar deleted file mode 100644 index 5645760..0000000 Binary files a/libs/forestry_1.7.10-3.3.0.6-dev.jar and /dev/null differ diff --git a/src/main/java/modtweaker/Commands.java b/src/main/java/modtweaker/Commands.java index c0f3681..853c647 100644 --- a/src/main/java/modtweaker/Commands.java +++ b/src/main/java/modtweaker/Commands.java @@ -5,6 +5,7 @@ import minetweaker.api.player.IPlayer; import minetweaker.api.server.ICommandFunction; import modtweaker.commands.EntityMappingLogger; import modtweaker.mods.botania.commands.BotaniaBrewLogger; +import modtweaker.mods.botania.commands.BotaniaOrchidLogger; import modtweaker.mods.botania.lexicon.commands.LexiconCategoryLogger; import modtweaker.mods.botania.lexicon.commands.LexiconEntryLogger; import modtweaker.mods.botania.lexicon.commands.LexiconKnowledgeTypesLogger; @@ -26,8 +27,8 @@ public class Commands { } }); - MineTweakerAPI.server.addMineTweakerCommand("entities", new String[] { "/minetweaker entities", " Outputs a list of entities class mapping keys" }, new EntityMappingLogger()); - + MineTweakerAPI.server.addMineTweakerCommand("entities", new String[] { "/minetweaker entities", " Outputs a list of entities class mapping keys and the entity IDs" }, new EntityMappingLogger()); + if (TweakerPlugin.isLoaded("Mekanism")) { MineTweakerAPI.server.addMineTweakerCommand("gases", new String[] { "/minetweaker gases", " Outputs a list of all gas names in the game to the minetweaker log" }, new GasLogger()); } @@ -47,6 +48,7 @@ public class Commands { MineTweakerAPI.server.addMineTweakerCommand("lexiconPages", new String[] { "/minetweaker lexiconPages", "/minetweaker lexiconPages [ENTRY]", " Outputs a list of lexicon pages for the entry" }, new LexiconPageLogger()); MineTweakerAPI.server.addMineTweakerCommand("botaniaBrews", new String[] { "/minetweaker botaniaBrews", " Outputs a list of keys for botania brews" }, new BotaniaBrewLogger()); MineTweakerAPI.server.addMineTweakerCommand("lexiconKnowledgeTypes", new String[] { "/minetweaker lexiconKnowledgeTypes", " Outputs a list of keys for lexicon knowledge types" }, new LexiconKnowledgeTypesLogger()); + MineTweakerAPI.server.addMineTweakerCommand("botaniaOrchids", new String[] { "/minetweaker botaniaOrchids", " Outputs a list of keys for botania orchid weights" }, new BotaniaOrchidLogger()); } diff --git a/src/main/java/modtweaker/commands/EntityMappingLogger.java b/src/main/java/modtweaker/commands/EntityMappingLogger.java index ea94431..98fc0d7 100644 --- a/src/main/java/modtweaker/commands/EntityMappingLogger.java +++ b/src/main/java/modtweaker/commands/EntityMappingLogger.java @@ -1,30 +1,30 @@ package modtweaker.commands; -import java.util.Collections; -import java.util.List; import java.util.Set; -import net.minecraft.entity.EntityList; -import vazkii.botania.api.BotaniaAPI; -import vazkii.botania.api.lexicon.LexiconCategory; +import cpw.mods.fml.common.registry.EntityRegistry; import minetweaker.MineTweakerAPI; import minetweaker.MineTweakerImplementationAPI; import minetweaker.api.player.IPlayer; import minetweaker.api.server.ICommandFunction; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityList; -public class EntityMappingLogger implements ICommandFunction{ +public class EntityMappingLogger implements ICommandFunction { - @Override - public void execute(String[] arguments, IPlayer player) { - Set keys=EntityList.stringToClassMapping.keySet(); - System.out.println("Mob Keys: " + keys.size()); - for (String key : keys) { - System.out.println("Mob Key " + key); - MineTweakerAPI.logCommand(key); - } + @Override + public void execute(String[] arguments, IPlayer player) { - if (player != null) { - player.sendChat(MineTweakerImplementationAPI.platform.getMessage("List generated; see minetweaker.log in your minecraft dir")); - } - } + Set keys = EntityList.stringToIDMapping.keySet(); + System.out.println("Mob Keys: " + keys.size()); + for (Integer key : keys) { + System.out.println("Mob Key " + EntityList.getStringFromID(key) + " : " + key); + MineTweakerAPI.logCommand("Mob Key " + EntityList.getStringFromID(key) + " : " + key); + + } + + if (player != null) { + player.sendChat(MineTweakerImplementationAPI.platform.getMessage("List generated; see minetweaker.log in your minecraft dir")); + } + } } diff --git a/src/main/java/modtweaker/mods/botania/commands/BotaniaOrchidLogger.java b/src/main/java/modtweaker/mods/botania/commands/BotaniaOrchidLogger.java new file mode 100644 index 0000000..8061761 --- /dev/null +++ b/src/main/java/modtweaker/mods/botania/commands/BotaniaOrchidLogger.java @@ -0,0 +1,30 @@ +package modtweaker.mods.botania.commands; + +import java.util.Set; + +import vazkii.botania.api.BotaniaAPI; +import vazkii.botania.common.Botania; +import minetweaker.MineTweakerAPI; +import minetweaker.MineTweakerImplementationAPI; +import minetweaker.api.player.IPlayer; +import minetweaker.api.server.ICommandFunction; +import modtweaker.mods.botania.BotaniaHelper; +import net.minecraft.entity.EntityList; + +public class BotaniaOrchidLogger implements ICommandFunction { + + @Override + public void execute(String[] arguments, IPlayer player) { + + Set keys = BotaniaAPI.oreWeights.keySet(); + System.out.println("Orchid Keys: " + keys.size()); + for (String str : BotaniaAPI.oreWeights.keySet()) { + System.out.println("Orchid Key: " + str); + MineTweakerAPI.logCommand(str + ": " + BotaniaAPI.oreWeights.get(str) + "\n"); + } + + if (player != null) { + player.sendChat(MineTweakerImplementationAPI.platform.getMessage("List generated; see minetweaker.log in your minecraft dir")); + } + } +} diff --git a/src/main/java/modtweaker/mods/botania/handlers/Orechid.java b/src/main/java/modtweaker/mods/botania/handlers/Orechid.java index 05213df..df02faa 100644 --- a/src/main/java/modtweaker/mods/botania/handlers/Orechid.java +++ b/src/main/java/modtweaker/mods/botania/handlers/Orechid.java @@ -30,7 +30,6 @@ public class Orechid { @Override public void apply() { - BotaniaAPI.addOreWeight(oreDict, weight); } diff --git a/src/main/java/modtweaker/mods/exnihilo/handlers/Hammer.java b/src/main/java/modtweaker/mods/exnihilo/handlers/Hammer.java index a9443de..1771177 100644 --- a/src/main/java/modtweaker/mods/exnihilo/handlers/Hammer.java +++ b/src/main/java/modtweaker/mods/exnihilo/handlers/Hammer.java @@ -2,12 +2,15 @@ package modtweaker.mods.exnihilo.handlers; import static modtweaker.helpers.InputHelper.isABlock; import static modtweaker.helpers.InputHelper.toStack; -import static modtweaker.helpers.StackHelper.areEqual; + +import java.util.Iterator; + import minetweaker.MineTweakerAPI; import minetweaker.api.item.IItemStack; import modtweaker.util.BaseListAddition; import modtweaker.util.BaseListRemoval; import net.minecraft.block.Block; +import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import stanhebben.zenscript.annotations.ZenClass; import stanhebben.zenscript.annotations.ZenMethod; @@ -16,59 +19,70 @@ import exnihilo.registries.helpers.Smashable; @ZenClass("mods.exnihilo.Hammer") public class Hammer { - //Adding a Ex Nihilo Hammer recipe - @ZenMethod - public static void addRecipe(IItemStack input, IItemStack output, double chance, double luck) { - if (isABlock(input)) { - Block theBlock = Block.getBlockFromItem(toStack(input).getItem()); - int theMeta = toStack(input).getItemDamage(); - MineTweakerAPI.apply(new Add(new Smashable(theBlock, theMeta, toStack(output).getItem(), toStack(output).getItemDamage(), (float) chance, (float) luck))); - } - } + // Adding a Ex Nihilo Hammer recipe + @ZenMethod + public static void addRecipe(IItemStack input, IItemStack output, double chance, double luck) { + if (isABlock(input)) { + Block theBlock = Block.getBlockFromItem(toStack(input).getItem()); + int theMeta = toStack(input).getItemDamage(); + MineTweakerAPI.apply(new Add(new Smashable(theBlock, theMeta, toStack(output).getItem(), toStack(output).getItemDamage(), (float) chance, (float) luck))); + } + } - //Passes the list to the base list implementation, and adds the recipe - private static class Add extends BaseListAddition { - public Add(Smashable recipe) { - super("ExNihilo Hammer", HammerRegistry.rewards, recipe); - } + // Passes the list to the base list implementation, and adds the recipe + private static class Add extends BaseListAddition { + public Add(Smashable recipe) { + super("ExNihilo Hammer", HammerRegistry.rewards, recipe); + } - @Override - public String getRecipeInfo() { - return new ItemStack(((Smashable) recipe).source, 1, ((Smashable) recipe).sourceMeta).getDisplayName(); - } - } + @Override + public String getRecipeInfo() { + return new ItemStack(((Smashable) recipe).source, 1, ((Smashable) recipe).sourceMeta).getDisplayName(); + } + } - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - //Removing a Ex Nihilo Hammer recipe - @ZenMethod - public static void removeRecipe(IItemStack output) { - MineTweakerAPI.apply(new Remove(toStack(output))); - } + // Removing a Ex Nihilo Hammer recipe + @ZenMethod + public static void removeRecipe(IItemStack output) { + MineTweakerAPI.apply(new Remove(toStack(output))); + } - //Removes a recipe, apply is never the same for anything, so will always need to override it - private static class Remove extends BaseListRemoval { - public Remove(ItemStack stack) { - super("ExNihilo Hammer", HammerRegistry.rewards, stack); - } + // Removes a recipe, apply is never the same for anything, so will always + // need to override it + private static class Remove extends BaseListRemoval { + public Remove(ItemStack stack) { + super("ExNihilo Hammer", HammerRegistry.rewards, stack); + } - //Loops through the registry, to find the item that matches, saves that recipe then removes it - @Override - public void apply() { - for (Smashable r : HammerRegistry.rewards) { - ItemStack check = new ItemStack(r.item, 1, r.meta); - if (check != null && areEqual(check, stack)) { - recipe = r; - break; - } - } + // Loops through the registry, to find the item that matches, saves that + // recipe then removes it + @Override + public void apply() { + boolean found = false; + Iterator smashables = HammerRegistry.rewards.iterator(); + while (!found && smashables.hasNext()) { + Smashable reward = smashables.next(); + if (reward.source == Block.getBlockFromItem(stack.getItem())) { + reward.source = Blocks.air; + found = true; + } + } - HammerRegistry.rewards.remove(recipe); - } + // for (Smashable r : HammerRegistry.rewards.) { + // ItemStack check = new ItemStack(r.item, 1, r.meta); + // if (check != null && areEqual(check, stack)) { + // recipe = r; + // break; + // } + // } - @Override - public String getRecipeInfo() { - return stack.getDisplayName(); - } - } + } + + @Override + public String getRecipeInfo() { + return stack.getDisplayName(); + } + } } diff --git a/src/main/java/modtweaker/mods/forestry/handlers/Carpenter.java b/src/main/java/modtweaker/mods/forestry/handlers/Carpenter.java index a017c06..8ae8a6f 100644 --- a/src/main/java/modtweaker/mods/forestry/handlers/Carpenter.java +++ b/src/main/java/modtweaker/mods/forestry/handlers/Carpenter.java @@ -18,12 +18,14 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import stanhebben.zenscript.annotations.ZenClass; import stanhebben.zenscript.annotations.ZenMethod; +import forestry.Forestry; +import forestry.api.core.ForestryAPI; import forestry.api.recipes.RecipeManagers; +import forestry.core.utils.RecipeUtil; import forestry.core.utils.ShapedRecipeCustom; import forestry.factory.gadgets.MachineCarpenter; import forestry.factory.gadgets.MachineCarpenter.Recipe; import forestry.factory.gadgets.MachineCarpenter.RecipeManager; - import modtweaker.mods.forestry.ForestryHelper; @ZenClass("mods.forestry.Carpenter") diff --git a/src/main/java/modtweaker/mods/fsp/handlers/Crucible.java b/src/main/java/modtweaker/mods/fsp/handlers/Crucible.java index 8791c1a..eae7d4c 100644 --- a/src/main/java/modtweaker/mods/fsp/handlers/Crucible.java +++ b/src/main/java/modtweaker/mods/fsp/handlers/Crucible.java @@ -76,6 +76,11 @@ public class Crucible { super("FSP Crucible Melting", SteamcraftRegistry.smeltThings, key); this.stack = stack; } + + public void apply(){ + SteamcraftRegistry.smeltThings.remove(stack); + MutablePair pair; + } @Override public String getRecipeInfo() {