diff --git a/ModTweaker2_Client.launch b/ModTweaker2_Client.launch
new file mode 100644
index 0000000..1dc175b
--- /dev/null
+++ b/ModTweaker2_Client.launch
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/ModTweaker2_Server.launch b/ModTweaker2_Server.launch
new file mode 100644
index 0000000..424ec8b
--- /dev/null
+++ b/ModTweaker2_Server.launch
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index da68dbe..ab62150 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,27 +1,20 @@
buildscript {
repositories {
- mavenCentral()
+ jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
- maven {
- name = "sonatype"
- url = "https://oss.sonatype.org/content/repositories/snapshots/"
- }
}
dependencies {
- classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
+ classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
}
}
-apply plugin: 'forge'
-apply plugin: 'java'
+apply plugin: 'net.minecraftforge.gradle.forge'
-// define the properties file
ext.configFile = file "build.properties"
configFile.withReader {
- // read config. it shall from now on be referenced as simply config or as project.config
def prop = new Properties()
prop.load(it)
project.ext.config = new ConfigSlurper().parse prop
@@ -35,6 +28,7 @@ minecraft {
version = "${config.minecraft.version}-${config.forge.version}"
runDir = "eclipse"
replace "@modVersion@", config.mod.version
+ mappings = "stable_20"
}
repositories {
@@ -44,25 +38,18 @@ repositories {
}
}
-dependencies {
- compile "net.sengir.forestry:forestry_${config.minecraft.version}:${config.forestry.version}:api"
-}
processResources
{
- // this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", config.minecraft.version
- // replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
- // replace version and mcversion
expand 'version':project.version, 'mcversion':config.minecraft.version
}
-
- // copy everything else, thats not the mcmod.info
+
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
diff --git a/build.properties b/build.properties
index 99af6ea..065b026 100644
--- a/build.properties
+++ b/build.properties
@@ -1,6 +1,4 @@
-minecraft.version=1.7.10
-forge.version=10.13.4.1448-1.7.10
+minecraft.version=1.8.9
+forge.version=11.15.0.1701
-mod.version=0.9.5
-
-forestry.version=4.1.0.43
+mod.version=1.0.0
\ No newline at end of file
diff --git a/libs/AuraCascade-552-dev.jar b/libs/AuraCascade-552-dev.jar
deleted file mode 100644
index a0838c6..0000000
Binary files a/libs/AuraCascade-552-dev.jar and /dev/null differ
diff --git a/libs/Baubles-deobf-1.7.10-1.0.1.10.jar b/libs/Baubles-deobf-1.7.10-1.0.1.10.jar
deleted file mode 100644
index 8585569..0000000
Binary files a/libs/Baubles-deobf-1.7.10-1.0.1.10.jar and /dev/null differ
diff --git a/libs/Baubles-deobf.jar b/libs/Baubles-deobf.jar
new file mode 100644
index 0000000..addccc7
Binary files /dev/null and b/libs/Baubles-deobf.jar differ
diff --git a/libs/BloodMagic-1.7.10-1.3.0b-3-deobf.jar b/libs/BloodMagic-1.7.10-1.3.0b-3-deobf.jar
deleted file mode 100644
index 8db3ee6..0000000
Binary files a/libs/BloodMagic-1.7.10-1.3.0b-3-deobf.jar and /dev/null differ
diff --git a/libs/Botania r1.7-223-deobf.jar b/libs/Botania r1.7-223-deobf.jar
deleted file mode 100644
index 95d1e7a..0000000
Binary files a/libs/Botania r1.7-223-deobf.jar and /dev/null differ
diff --git a/libs/CTMLib-1.2.0-11.jar b/libs/CTMLib-1.2.0-11.jar
deleted file mode 100644
index f4d5905..0000000
Binary files a/libs/CTMLib-1.2.0-11.jar and /dev/null differ
diff --git a/libs/Chisel-MC1.8.9-0.0.2.6-api.jar b/libs/Chisel-MC1.8.9-0.0.2.6-api.jar
new file mode 100644
index 0000000..3d0fbcb
Binary files /dev/null and b/libs/Chisel-MC1.8.9-0.0.2.6-api.jar differ
diff --git a/libs/Chisel2_DEV-2.5.0.163-deobf.jar b/libs/Chisel2_DEV-2.5.0.163-deobf.jar
deleted file mode 100644
index 7d7bf1e..0000000
Binary files a/libs/Chisel2_DEV-2.5.0.163-deobf.jar and /dev/null differ
diff --git a/libs/CoFHCore-[1.7.10]3.0.4B1-308-dev.jar b/libs/CoFHCore-[1.7.10]3.0.4B1-308-dev.jar
deleted file mode 100644
index c5b1e44..0000000
Binary files a/libs/CoFHCore-[1.7.10]3.0.4B1-308-dev.jar and /dev/null differ
diff --git a/libs/CoFHLib-[1.7.10]1.0.4B1-176-dev.jar b/libs/CoFHLib-[1.7.10]1.0.4B1-176-dev.jar
deleted file mode 100644
index a62a2e3..0000000
Binary files a/libs/CoFHLib-[1.7.10]1.0.4B1-176-dev.jar and /dev/null differ
diff --git a/libs/CodeChickenCore-1.7.10-1.0.4.29-dev (2).jar b/libs/CodeChickenCore-1.7.10-1.0.4.29-dev (2).jar
deleted file mode 100644
index 40a38e3..0000000
Binary files a/libs/CodeChickenCore-1.7.10-1.0.4.29-dev (2).jar and /dev/null differ
diff --git a/libs/CodeChickenLib-1.7.10-1.1.1.110-dev.jar b/libs/CodeChickenLib-1.7.10-1.1.1.110-dev.jar
deleted file mode 100644
index f7a9ecc..0000000
Binary files a/libs/CodeChickenLib-1.7.10-1.1.1.110-dev.jar and /dev/null differ
diff --git a/libs/MineTweaker3-Dev-Full-1.7.10-3.0.10B.jar b/libs/CraftTweaker-Customized-Dev-Full-1.8.8-3.0.2.jar
similarity index 52%
rename from libs/MineTweaker3-Dev-Full-1.7.10-3.0.10B.jar
rename to libs/CraftTweaker-Customized-Dev-Full-1.8.8-3.0.2.jar
index 299ae58..8cf8aa0 100644
Binary files a/libs/MineTweaker3-Dev-Full-1.7.10-3.0.10B.jar and b/libs/CraftTweaker-Customized-Dev-Full-1.8.8-3.0.2.jar differ
diff --git a/libs/Enchiridion 2-1.7.10-2.0.2a-73-dev.jar b/libs/Enchiridion 2-1.7.10-2.0.2a-73-dev.jar
deleted file mode 100644
index 5199e25..0000000
Binary files a/libs/Enchiridion 2-1.7.10-2.0.2a-73-dev.jar and /dev/null differ
diff --git a/libs/Ex-Nihilo-1.38-46-deobf.jar b/libs/Ex-Nihilo-1.38-46-deobf.jar
deleted file mode 100644
index e5d4837..0000000
Binary files a/libs/Ex-Nihilo-1.38-46-deobf.jar and /dev/null differ
diff --git a/libs/ForgeMultipart-1.7.10-1.2.0.345-dev.jar b/libs/ForgeMultipart-1.7.10-1.2.0.345-dev.jar
deleted file mode 100644
index 7244bfb..0000000
Binary files a/libs/ForgeMultipart-1.7.10-1.2.0.345-dev.jar and /dev/null differ
diff --git a/libs/IC2.Classic.Version.1.1.0.19.Dev.jar b/libs/IC2.Classic.Version.1.1.0.19.Dev.jar
deleted file mode 100644
index 8db0d5c..0000000
Binary files a/libs/IC2.Classic.Version.1.1.0.19.Dev.jar and /dev/null differ
diff --git a/libs/Mantle-1.7.10-0.3.2.jenkins190-deobf.jar b/libs/Mantle-1.7.10-0.3.2.jenkins190-deobf.jar
deleted file mode 100644
index ba29253..0000000
Binary files a/libs/Mantle-1.7.10-0.3.2.jenkins190-deobf.jar and /dev/null differ
diff --git a/libs/Mariculture-Deluxe-1.7.10-1.2.4.2-51-dev.jar b/libs/Mariculture-Deluxe-1.7.10-1.2.4.2-51-dev.jar
deleted file mode 100644
index 036ae95..0000000
Binary files a/libs/Mariculture-Deluxe-1.7.10-1.2.4.2-51-dev.jar and /dev/null differ
diff --git a/libs/Metallurgy-1.7.10-4.0.8.128-deobf.jar b/libs/Metallurgy-1.7.10-4.0.8.128-deobf.jar
deleted file mode 100644
index 1357d50..0000000
Binary files a/libs/Metallurgy-1.7.10-4.0.8.128-deobf.jar and /dev/null differ
diff --git a/libs/MetallurgyCore-1.7.10-4.0.4.24-deobf.jar b/libs/MetallurgyCore-1.7.10-4.0.4.24-deobf.jar
deleted file mode 100644
index 868c458..0000000
Binary files a/libs/MetallurgyCore-1.7.10-4.0.4.24-deobf.jar and /dev/null differ
diff --git a/libs/NotEnoughItems-1.7.10-1.0.4.83-dev.jar b/libs/NotEnoughItems-1.7.10-1.0.4.83-dev.jar
deleted file mode 100644
index da520d5..0000000
Binary files a/libs/NotEnoughItems-1.7.10-1.0.4.83-dev.jar and /dev/null differ
diff --git a/libs/Railcraft_1.7.10-9.7.0.0-dev.jar b/libs/Railcraft_1.7.10-9.7.0.0-dev.jar
deleted file mode 100644
index e598037..0000000
Binary files a/libs/Railcraft_1.7.10-9.7.0.0-dev.jar and /dev/null differ
diff --git a/libs/Steamcraft-0.27.3-dev.jar b/libs/Steamcraft-0.27.3-dev.jar
deleted file mode 100644
index a58eba7..0000000
Binary files a/libs/Steamcraft-0.27.3-dev.jar and /dev/null differ
diff --git a/libs/Mekanism-1.7.10-8.1.7.252.jar b/libs/TC-deobf.jar
similarity index 56%
rename from libs/Mekanism-1.7.10-8.1.7.252.jar
rename to libs/TC-deobf.jar
index e2731a7..689b114 100644
Binary files a/libs/Mekanism-1.7.10-8.1.7.252.jar and b/libs/TC-deobf.jar differ
diff --git a/libs/TConstruct-1.7.10-1.8.7.build982-deobf.jar b/libs/TConstruct-1.7.10-1.8.7.build982-deobf.jar
deleted file mode 100644
index f466980..0000000
Binary files a/libs/TConstruct-1.7.10-1.8.7.build982-deobf.jar and /dev/null differ
diff --git a/libs/ThermalExpansion-[1.7.10]4.0.3B1-218-dev.jar b/libs/ThermalExpansion-[1.7.10]4.0.3B1-218-dev.jar
deleted file mode 100644
index 94a2f7f..0000000
Binary files a/libs/ThermalExpansion-[1.7.10]4.0.3B1-218-dev.jar and /dev/null differ
diff --git a/libs/ThermalFoundation-[1.7.10]1.2.0-102-dev.jar b/libs/ThermalFoundation-[1.7.10]1.2.0-102-dev.jar
deleted file mode 100644
index e1d406f..0000000
Binary files a/libs/ThermalFoundation-[1.7.10]1.2.0-102-dev.jar and /dev/null differ
diff --git a/libs/appliedenergistics2-rv2-stable-10-dev.jar b/libs/appliedenergistics2-rv2-stable-10-dev.jar
deleted file mode 100644
index b087987..0000000
Binary files a/libs/appliedenergistics2-rv2-stable-10-dev.jar and /dev/null differ
diff --git a/libs/extrautilities-1.2.11-deobf.jar b/libs/extrautilities-1.2.11-deobf.jar
deleted file mode 100644
index e4099e5..0000000
Binary files a/libs/extrautilities-1.2.11-deobf.jar and /dev/null differ
diff --git a/src/api/java/naruto1310/extendedWorkbench/crafting/ExtendedCraftingManager.java b/src/api/java/naruto1310/extendedWorkbench/crafting/ExtendedCraftingManager.java
deleted file mode 100644
index 26a0bfb..0000000
--- a/src/api/java/naruto1310/extendedWorkbench/crafting/ExtendedCraftingManager.java
+++ /dev/null
@@ -1,141 +0,0 @@
-package naruto1310.extendedWorkbench.crafting;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.inventory.InventoryCrafting;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.item.crafting.IRecipe;
-import net.minecraft.world.World;
-
-public class ExtendedCraftingManager
-{
- /** The static instance of this class */
- private static final ExtendedCraftingManager instance = new ExtendedCraftingManager();
-
- /** A list of all the recipes added */
- private List recipes = new ArrayList();
-
- /**
- * Returns the static instance of this class
- */
- public static final ExtendedCraftingManager getInstance()
- {
- return instance;
- }
-
- private void addExtendedRecipe(ItemStack par1ItemStack, Object ... par2ArrayOfObj)
- {
- String var3 = "";
- int var4 = 0;
- int var5 = 0;
- int var6 = 0;
-
- if(par2ArrayOfObj[var4] instanceof String[])
- {
- String[] var7 =((String[])par2ArrayOfObj[var4++]);
-
- for(int var8 = 0; var8 < var7.length; ++var8)
- {
- String var9 = var7[var8];
- ++var6;
- var5 = var9.length();
- var3 = var3 + var9;
- }
- }
- else
- {
- while(par2ArrayOfObj[var4] instanceof String)
- {
- String var11 =(String)par2ArrayOfObj[var4++];
- ++var6;
- var5 = var11.length();
- var3 = var3 + var11;
- }
- }
-
- HashMap var12;
-
- for(var12 = new HashMap(); var4 < par2ArrayOfObj.length; var4 += 2)
- {
- Character var13 =(Character)par2ArrayOfObj[var4];
- ItemStack var14 = null;
-
- if(par2ArrayOfObj[var4 + 1] instanceof Item)
- var14 = new ItemStack((Item)par2ArrayOfObj[var4 + 1], 1, 32767);
- if(par2ArrayOfObj[var4 + 1] instanceof Block)
- var14 = new ItemStack((Block)par2ArrayOfObj[var4 + 1], 1, 32767);
- if(par2ArrayOfObj[var4 + 1] instanceof ItemStack)
- var14 =(ItemStack)par2ArrayOfObj[var4 + 1];
-
- var12.put(var13, var14);
- }
-
- ItemStack[] var15 = new ItemStack[var5 * var6];
-
- for(int var16 = 0; var16 < var5 * var6; ++var16)
- {
- char var10 = var3.charAt(var16);
-
- if(var12.containsKey(Character.valueOf(var10)))
- var15[var16] = var12.get(Character.valueOf(var10)).copy();
- else
- var15[var16] = null;
- }
-
- this.recipes.add(new ExtendedShapedRecipes(var5, var6, var15, par1ItemStack));
- }
-
- private void addExtendedShapelessRecipe(ItemStack par1ItemStack, Object ... par2ArrayOfObj)
- {
- ArrayList var3 = new ArrayList();
- Object[] var4 = par2ArrayOfObj;
- int var5 = par2ArrayOfObj.length;
-
- for(int var6 = 0; var6 < var5; var6++)
- {
- Object var7 = var4[var6];
-
- if(var7 instanceof Item)
- var3.add(new ItemStack((Item)var7, 1, 32767));
- else if(var7 instanceof Block)
- var3.add(new ItemStack((Block)var7, 1, 32767));
- else if(var7 instanceof ItemStack)
- var3.add(((ItemStack)var7).copy());
- else throw new RuntimeException("Invalid shapeless recipy!");
- }
-
- this.recipes.add(new ExtendedShapelessRecipes(par1ItemStack, var3));
- }
-
- public ItemStack findMatchingRecipe(InventoryCrafting inv, World world)
- {
- for(int i = 0; i < this.recipes.size(); i++)
- {
- IRecipe recipe = this.recipes.get(i);
-
- if(recipe.matches(inv, world))
- return recipe.getCraftingResult(inv);
- }
-
- return null;
- }
-
- public List getRecipeList()
- {
- return this.recipes;
- }
-
- public static void addRecipe(ItemStack output, Object ... input)
- {
- ExtendedCraftingManager.getInstance().addExtendedRecipe(output, input);
- }
-
- public static void addShapelessRecipe(ItemStack output, Object ... input)
- {
- ExtendedCraftingManager.getInstance().addExtendedShapelessRecipe(output, input);
- }
-}
diff --git a/src/api/java/naruto1310/extendedWorkbench/crafting/ExtendedShapedRecipes.java b/src/api/java/naruto1310/extendedWorkbench/crafting/ExtendedShapedRecipes.java
deleted file mode 100644
index 78c6c09..0000000
--- a/src/api/java/naruto1310/extendedWorkbench/crafting/ExtendedShapedRecipes.java
+++ /dev/null
@@ -1,103 +0,0 @@
-package naruto1310.extendedWorkbench.crafting;
-
-import net.minecraft.inventory.InventoryCrafting;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-
-public class ExtendedShapedRecipes implements IExtendedRecipe
-{
- private int maxRecipeSize = 6;
-
- /** How many horizontal slots this recipe is wide. */
- private int recipeWidth;
-
- /** How many vertical slots this recipe uses. */
- private int recipeHeight;
-
- /** Is a array of ItemStack that composes the recipe. */
- private ItemStack[] recipeItems;
-
- /** Is the ItemStack that you get when craft the recipe. */
- private ItemStack recipeOutput;
-
- public ExtendedShapedRecipes(int par1, int par2, ItemStack[] par3ArrayOfItemStack, ItemStack par4ItemStack)
- {
- this.recipeWidth = par1;
- this.recipeHeight = par2;
- this.recipeItems = par3ArrayOfItemStack;
- this.recipeOutput = par4ItemStack;
- }
-
- @Override
- public ItemStack getRecipeOutput()
- {
- return this.recipeOutput;
- }
-
- /**
- * Used to check if a recipe matches current crafting inventory
- */
- @Override
- public boolean matches(InventoryCrafting par1InventoryCrafting, World world)
- {
- for(int x = 0; x <= this.maxRecipeSize - this.recipeWidth; ++x)
- for(int y = 0; y <= this.maxRecipeSize - this.recipeHeight; ++y)
- if(this.checkMatch(par1InventoryCrafting, x, y, true) || this.checkMatch(par1InventoryCrafting, x, y, false))
- return true;
-
- return false;
- }
-
- /**
- * Checks if the region of a crafting inventory is match for the recipe.
- */
- private boolean checkMatch(InventoryCrafting par1InventoryCrafting, int x, int y, boolean mirrored)
- {
- for(int i = 0; i < this.maxRecipeSize; ++i)
- {
- for(int j = 0; j < this.maxRecipeSize; ++j)
- {
- int var7 = i - x;
- int var8 = j - y;
- ItemStack stackFound = null;
-
- if(var7 >= 0 && var8 >= 0 && var7 < this.recipeWidth && var8 < this.recipeHeight)
- if(mirrored)
- stackFound = this.recipeItems[this.recipeWidth - var7 - 1 + var8 * this.recipeWidth];
- else
- stackFound = this.recipeItems[var7 + var8 * this.recipeWidth];
-
- ItemStack stackExcpected = par1InventoryCrafting.getStackInRowAndColumn(i, j);
-
- if(stackFound == null && stackExcpected == null)
- continue;
- if((stackExcpected == null && stackFound != null) || (stackExcpected != null && stackFound == null))
- return false;
- if(stackFound.getItem() != stackExcpected.getItem())
- return false;
- if(stackFound.getItemDamage() != 32767 && stackFound.getItemDamage() != stackExcpected.getItemDamage())
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * Returns an Item that is the result of this recipe
- */
- @Override
- public ItemStack getCraftingResult(InventoryCrafting par1InventoryCrafting)
- {
- return this.getRecipeOutput().copy();
- }
-
- /**
- * Returns the size of the recipe area
- */
- @Override
- public int getRecipeSize()
- {
- return this.recipeWidth * this.recipeHeight;
- }
-}
diff --git a/src/api/java/naruto1310/extendedWorkbench/crafting/ExtendedShapelessRecipes.java b/src/api/java/naruto1310/extendedWorkbench/crafting/ExtendedShapelessRecipes.java
deleted file mode 100644
index 077e823..0000000
--- a/src/api/java/naruto1310/extendedWorkbench/crafting/ExtendedShapelessRecipes.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package naruto1310.extendedWorkbench.crafting;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import net.minecraft.inventory.InventoryCrafting;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-
-public class ExtendedShapelessRecipes implements IExtendedRecipe
-{
- private int maxRecipeSize = 6;
-
- /** Is the ItemStack that you get when craft the recipe. */
- private final ItemStack recipeOutput;
-
- /** Is a List of ItemStack that composes the recipe. */
- private final List recipeItems;
-
- public ExtendedShapelessRecipes(ItemStack par1ItemStack, List par2List)
- {
- this.recipeOutput = par1ItemStack;
- this.recipeItems = par2List;
- }
-
- @Override
- public ItemStack getRecipeOutput()
- {
- return this.recipeOutput;
- }
-
- /**
- * Used to check if a recipe matches current crafting inventory
- */
- @Override
- public boolean matches(InventoryCrafting par1InventoryCrafting, World world)
- {
- ArrayList var2 = new ArrayList(this.recipeItems);
-
- for (int var3 = 0; var3 < this.maxRecipeSize; ++var3)
- {
- for (int var4 = 0; var4 < this.maxRecipeSize; ++var4)
- {
- ItemStack var5 = par1InventoryCrafting.getStackInRowAndColumn(var4, var3);
-
- if (var5 != null)
- {
- boolean var6 = false;
- Iterator var7 = var2.iterator();
-
- while (var7.hasNext())
- {
- ItemStack var8 = var7.next();
-
- if (var5 == var8 && (var8.getItemDamage() == 32767 || var5.getItemDamage() == var8.getItemDamage()))
- {
- var6 = true;
- var2.remove(var8);
- break;
- }
- }
-
- if (!var6)
- {
- return false;
- }
- }
- }
- }
-
- return var2.isEmpty();
- }
-
- /**
- * Returns an Item that is the result of this recipe
- */
- @Override
- public ItemStack getCraftingResult(InventoryCrafting par1InventoryCrafting)
- {
- return this.recipeOutput.copy();
- }
-
- /**
- * Returns the size of the recipe area
- */
- @Override
- public int getRecipeSize()
- {
- return this.recipeItems.size();
- }
-}
diff --git a/src/api/java/naruto1310/extendedWorkbench/crafting/IExtendedRecipe.java b/src/api/java/naruto1310/extendedWorkbench/crafting/IExtendedRecipe.java
deleted file mode 100644
index 526cfca..0000000
--- a/src/api/java/naruto1310/extendedWorkbench/crafting/IExtendedRecipe.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package naruto1310.extendedWorkbench.crafting;
-
-import net.minecraft.item.crafting.IRecipe;
-
-public interface IExtendedRecipe extends IRecipe
-{
-
-}
diff --git a/src/api/java/pneumaticCraft/api/recipe/AssemblyRecipe.java b/src/api/java/pneumaticCraft/api/recipe/AssemblyRecipe.java
deleted file mode 100644
index 8c74b4b..0000000
--- a/src/api/java/pneumaticCraft/api/recipe/AssemblyRecipe.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package pneumaticCraft.api.recipe;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-
-public class AssemblyRecipe{
- public static List drillRecipes = new ArrayList();
- public static List laserRecipes = new ArrayList();
- public static List drillLaserRecipes = new ArrayList();
-
- private final ItemStack input;
- private final ItemStack output;
-
- public AssemblyRecipe(ItemStack input, ItemStack output){
- this.input = input;
- this.output = output;
- }
-
- public ItemStack getInput(){
- return input;
- }
-
- public ItemStack getOutput(){
- return output;
- }
-
- public static void addDrillRecipe(Object input, Object output){
- drillRecipes.add(new AssemblyRecipe(getStackFromObject(input), getStackFromObject(output)));
- }
-
- public static void addLaserRecipe(Object input, Object output){
- laserRecipes.add(new AssemblyRecipe(getStackFromObject(input), getStackFromObject(output)));
- }
-
- private static ItemStack getStackFromObject(Object object){
- if(object instanceof Block) {
- return new ItemStack((Block)object);
- } else if(object instanceof Item) {
- return new ItemStack((Item)object);
- } else {
- return (ItemStack)object;
- }
- }
-
-}
diff --git a/src/api/java/pneumaticCraft/api/recipe/IPressureChamberRecipe.java b/src/api/java/pneumaticCraft/api/recipe/IPressureChamberRecipe.java
deleted file mode 100644
index 93eba67..0000000
--- a/src/api/java/pneumaticCraft/api/recipe/IPressureChamberRecipe.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package pneumaticCraft.api.recipe;
-
-import net.minecraft.item.ItemStack;
-
-public interface IPressureChamberRecipe{
-
- /**
- * Returns the threshold which is minimal to craft the recipe. Negative pressures also work.
- * @return threshold pressure
- */
- public float getCraftingPressure();
-
- /**
- * This method should return the used items in the recipe when the right items are provided to craft this recipe.
- * @param inputStacks
- * @return usedStacks, return null when the inputStacks aren't valid for this recipe.
- */
- public ItemStack[] isValidRecipe(ItemStack[] inputStacks);
-
- /**
- * When returned true, only the exact same references of the stacks returned by isValidRecipe() will be removed. This is useful
- * to remove stacks with a certain NBT value (like Enchanted Books). Return false for normal behaviour.
- * @return true if exact stacks should be removed only.
- */
- public boolean shouldRemoveExactStacks();
-
- /**
- * This method will be called when the recipe should output its items. the stacks the recipe output, may be dependent on the input stacks.
- * @param removedStacks same reference to the stacks returned by isValidRecipe.
- * @param inputStacks. These stacks can be modified (like adding/removing NBT data eg.)
- * @return outputStacks. Stacks that will pop 'out of the chamber'
- */
- public ItemStack[] craftRecipe(ItemStack[] inputStacks, ItemStack[] removedStacks);
-}
diff --git a/src/api/java/pneumaticCraft/api/recipe/PressureChamberRecipe.java b/src/api/java/pneumaticCraft/api/recipe/PressureChamberRecipe.java
deleted file mode 100644
index 5d6b29e..0000000
--- a/src/api/java/pneumaticCraft/api/recipe/PressureChamberRecipe.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package pneumaticCraft.api.recipe;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import net.minecraft.item.ItemStack;
-
-public class PressureChamberRecipe{
- public static List chamberRecipes = new ArrayList();
- public static List specialRecipes = new ArrayList();
-
- public final ItemStack[] input;
- public final ItemStack[] output;
- public final float pressure;
- public final boolean outputAsBlock;
-
- public PressureChamberRecipe(ItemStack[] input, float pressureRequired, ItemStack[] output, boolean outputAsBlock){
- this.input = input;
- this.output = output;
- pressure = pressureRequired;
- this.outputAsBlock = outputAsBlock;
- }
-
-}
diff --git a/src/api/java/thaumcraft b/src/api/java/thaumcraft
deleted file mode 160000
index ced30ed..0000000
--- a/src/api/java/thaumcraft
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit ced30ed35097d53cdb2a843d705477e52896e54b
diff --git a/src/main/java/modtweaker2/ClientEvents.java b/src/main/java/modtweaker2/ClientEvents.java
index abcfb4f..e8d98b7 100644
--- a/src/main/java/modtweaker2/ClientEvents.java
+++ b/src/main/java/modtweaker2/ClientEvents.java
@@ -1,13 +1,14 @@
package modtweaker2;
import static modtweaker2.helpers.LogHelper.print;
+
import minetweaker.api.item.IItemStack;
import minetweaker.api.minecraft.MineTweakerMC;
import minetweaker.api.player.IPlayer;
import net.minecraft.client.Minecraft;
import net.minecraft.client.settings.GameSettings;
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
public class ClientEvents {
public static int cooldown;
diff --git a/src/main/java/modtweaker2/Commands.java b/src/main/java/modtweaker2/Commands.java
index 792b04d..7aff945 100644
--- a/src/main/java/modtweaker2/Commands.java
+++ b/src/main/java/modtweaker2/Commands.java
@@ -4,27 +4,8 @@ import minetweaker.MineTweakerAPI;
import minetweaker.api.player.IPlayer;
import minetweaker.api.server.ICommandFunction;
import modtweaker2.commands.EntityMappingLogger;
-import modtweaker2.mods.appeng.commands.AppliedEnergisticsLogger;
-import modtweaker2.mods.auracascade.commands.AuraLogger;
-import modtweaker2.mods.botania.commands.BotaniaBrewLogger;
-import modtweaker2.mods.botania.commands.BotaniaLogger;
-import modtweaker2.mods.botania.commands.BotaniaOrechidLogger;
-import modtweaker2.mods.botania.lexicon.commands.LexiconCategoryLogger;
-import modtweaker2.mods.botania.lexicon.commands.LexiconKnowledgeTypesLogger;
-import modtweaker2.mods.botania.lexicon.commands.LexiconPageLogger;
-import modtweaker2.mods.chisel.commands.ChiselGroupLogger;
-import modtweaker2.mods.chisel.commands.ChiselVariationLogger;
-import modtweaker2.mods.exnihilo.commands.ExNihiloLogger;
-import modtweaker2.mods.factorization.commands.FactorizationLogger;
-import modtweaker2.mods.mekanism.commands.GasLogger;
-import modtweaker2.mods.mekanism.commands.MekanismLogger;
-import modtweaker2.mods.railcraft.commands.RailcraftLogger;
-import modtweaker2.mods.tconstruct.commands.MaterialLogger;
-import modtweaker2.mods.tconstruct.commands.ModifierLogger;
-import modtweaker2.mods.tconstruct.commands.TConstructLogger;
import modtweaker2.mods.thaumcraft.commands.AspectLogger;
import modtweaker2.mods.thaumcraft.research.commands.ResearchLogger;
-import modtweaker2.mods.thermalexpansion.commands.ThermalExpansionLogger;
import modtweaker2.utils.TweakerPlugin;
public class Commands {
@@ -41,59 +22,12 @@ public class Commands {
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("appliedenergistics2-core")) {
- MineTweakerAPI.server.addMineTweakerCommand("appeng", new String[] {"/minetweaker appeng [HANDLER]", " Outputs a list of all Applied Energistics 2 recipes."}, new AppliedEnergisticsLogger());
- }
-
- if (TweakerPlugin.isLoaded("aura")) {
- MineTweakerAPI.server.addMineTweakerCommand("auras", new String[] { "/minetweaker auras", "Outputs a list of Aura Types" }, new AuraLogger());
- }
-
- if (TweakerPlugin.isLoaded("Botania")) {
- MineTweakerAPI.server.addMineTweakerCommand("lexiconCategories", new String[] { "/minetweaker lexiconCategories", " Outputs a list of lexicon categories" }, new LexiconCategoryLogger());
- 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("botaniaOrechid", new String[] { "/minetweaker botaniaOrechid", " Outputs a list of keys for botania orechid weights" }, new BotaniaOrechidLogger());
- MineTweakerAPI.server.addMineTweakerCommand("botania", new String[] { "/minetweaker botania [HANDLER]", " Outputs a list of all Botania recipes." }, new BotaniaLogger());
- }
-
- if (TweakerPlugin.isLoaded("chisel")) {
- MineTweakerAPI.server.addMineTweakerCommand("chiselGroups", new String[] { "/minetweaker chiselGroups", " Outputs a list of chisel groups" }, new ChiselGroupLogger());
- MineTweakerAPI.server.addMineTweakerCommand("chiselVariations", new String[] { "/minetweaker chiselVariations", "/minetweaker chiselVariations [GROUP]", " Outputs a list of chisel variations" }, new ChiselVariationLogger());
- }
-
- if (TweakerPlugin.isLoaded("exnihilo")) {
- MineTweakerAPI.server.addMineTweakerCommand("exnihilo", new String[] {"/minetweaker exnihilo [HANDLER]", " Outputs a list of all ExNihilo recipes."}, new ExNihiloLogger());
- }
-
- if (TweakerPlugin.isLoaded("factorization")) {
- MineTweakerAPI.server.addMineTweakerCommand("factorization", new String[] {"/minetweaker factorization [HANDLER]", " Outputs a list of all Factorization recipes."}, new FactorizationLogger());
- }
-
- 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());
- MineTweakerAPI.server.addMineTweakerCommand("mekanism", new String[] { "/minetweaker mekanism [HANDLER]", " Outputs a list of all Mekanism recipes." }, new MekanismLogger());
- }
-
- if (TweakerPlugin.isLoaded("Railcraft")) {
- MineTweakerAPI.server.addMineTweakerCommand("railcraft", new String[] {"/minetweaker railcraft [HANDLER]", " Outputs a list of all Railcraft recipes."}, new RailcraftLogger());
- }
-
- if (TweakerPlugin.isLoaded("TConstruct")) {
- MineTweakerAPI.server.addMineTweakerCommand("materials", new String[] { "/minetweaker materials", " Outputs a list of all Tinker's Construct material names in the game to the minetweaker log" }, new MaterialLogger());
- MineTweakerAPI.server.addMineTweakerCommand("modifiers", new String[] { "/minetweaker modifiers", " Outputs a list of all Tinker's Construct modifier names in the game to the minetweaker log" }, new ModifierLogger());
- MineTweakerAPI.server.addMineTweakerCommand("tconstruct", new String[]{ "/minetweaker tconstruct [HANDLER]", " Outputs a list of all Tinkers Construct recipes."}, new TConstructLogger());
- }
if (TweakerPlugin.isLoaded("Thaumcraft")) {
MineTweakerAPI.server.addMineTweakerCommand("research", new String[] { "/minetweaker research", "/minetweaker research [CATEGORY]", " Outputs a list of all category names in the game to the minetweaker log," + " or outputs a list of all research keys in a category to the log." }, new ResearchLogger());
MineTweakerAPI.server.addMineTweakerCommand("aspectList", new String[] { "/minetweaker aspectList", " Outputs a list of all aspects registered to entities and items" }, new AspectLogger());
}
- if (TweakerPlugin.isLoaded("ThermalExpansion")) {
- MineTweakerAPI.server.addMineTweakerCommand("thermalexpansion", new String[] {"/minetweaker thermalexpansion [HANDLER]", " Outputs a list of all Thermal Expansion recipes."}, new ThermalExpansionLogger());
- }
}
}
diff --git a/src/main/java/modtweaker2/ModProps.java b/src/main/java/modtweaker2/ModProps.java
index ce1a1a1..54c7d16 100644
--- a/src/main/java/modtweaker2/ModProps.java
+++ b/src/main/java/modtweaker2/ModProps.java
@@ -5,5 +5,5 @@ public class ModProps {
public static final String NAME = "Mod Tweaker 2", name = NAME;
public static final String MODID = "modtweaker2", modid = MODID;
public static final String VERSION = "@modVersion@", version = VERSION;
- public static final String DEPENDENCIES = "required-after:MineTweaker3;after:Forestry@[4.1.0,);", dependencies = DEPENDENCIES;
+ public static final String DEPENDENCIES = "required-after:crafttweaker;", dependencies = DEPENDENCIES;
}
diff --git a/src/main/java/modtweaker2/ModTweaker2.java b/src/main/java/modtweaker2/ModTweaker2.java
index e15a7bd..3a01a59 100644
--- a/src/main/java/modtweaker2/ModTweaker2.java
+++ b/src/main/java/modtweaker2/ModTweaker2.java
@@ -2,117 +2,79 @@ package modtweaker2;
import java.io.File;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
import minetweaker.MineTweakerImplementationAPI;
import minetweaker.MineTweakerImplementationAPI.ReloadEvent;
import minetweaker.runtime.providers.ScriptProviderDirectory;
import minetweaker.util.IEventHandler;
-import modtweaker2.mods.appeng.AppliedEnergistics;
-import modtweaker2.mods.auracascade.AuraCascade;
-import modtweaker2.mods.botania.Botania;
-import modtweaker2.mods.chisel.Chisel;
-import modtweaker2.mods.exnihilo.ExNihilo;
-import modtweaker2.mods.extendedworkbench.ExtendedWorkbench;
-import modtweaker2.mods.extraUtils.ExtraUtils;
-import modtweaker2.mods.factorization.Factorization;
-import modtweaker2.mods.forestry.Forestry;
-import modtweaker2.mods.fsp.Steamcraft;
-import modtweaker2.mods.ic2c.IC2C;
-import modtweaker2.mods.mariculture.Mariculture;
-import modtweaker2.mods.mekanism.Mekanism;
-import modtweaker2.mods.metallurgy.Metallurgy;
-import modtweaker2.mods.pneumaticcraft.PneumaticCraft;
-import modtweaker2.mods.railcraft.Railcraft;
-import modtweaker2.mods.tconstruct.TConstruct;
import modtweaker2.mods.thaumcraft.Thaumcraft;
-import modtweaker2.mods.thermalexpansion.ThermalExpansion;
import modtweaker2.proxy.CommonProxy;
import modtweaker2.utils.TweakerPlugin;
import net.minecraftforge.common.MinecraftForge;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-import cpw.mods.fml.common.FMLCommonHandler;
-import cpw.mods.fml.common.Mod;
-import cpw.mods.fml.common.Mod.EventHandler;
-import cpw.mods.fml.common.Mod.Instance;
-import cpw.mods.fml.common.SidedProxy;
-import cpw.mods.fml.common.event.FMLInitializationEvent;
-import cpw.mods.fml.common.event.FMLPostInitializationEvent;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.event.FMLServerStartingEvent;
-import cpw.mods.fml.relauncher.Side;
+import net.minecraftforge.fml.common.FMLCommonHandler;
+import net.minecraftforge.fml.common.Mod;
+import net.minecraftforge.fml.common.Mod.EventHandler;
+import net.minecraftforge.fml.common.Mod.Instance;
+import net.minecraftforge.fml.common.SidedProxy;
+import net.minecraftforge.fml.common.event.FMLInitializationEvent;
+import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
+import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
+import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
+import net.minecraftforge.fml.relauncher.Side;
@Mod(modid = ModProps.modid, version = ModProps.version, dependencies = ModProps.dependencies)
public class ModTweaker2 {
- public static Logger logger = LogManager.getLogger(ModProps.modid);
+ public static Logger logger = LogManager.getLogger(ModProps.modid);
- public static File baseIMCFolder;
- @Instance(ModProps.modid)
- public ModTweaker2 instance;
+ @SidedProxy(clientSide = "modtweaker2.proxy.ClientProxy", serverSide = "modtweaker2.proxy.CommonProxy")
+ public static CommonProxy proxy;
- @EventHandler
- public void preInit(FMLPreInitializationEvent event) {
- logger.info("Starting PreInitialization for " + ModProps.modid);
- }
+ @Instance(ModProps.modid)
+ public ModTweaker2 instance;
- @SidedProxy(clientSide = "modtweaker2.proxy.ClientProxy", serverSide = "modtweaker2.proxy.CommonProxy")
- public static CommonProxy proxy;
+ @EventHandler
+ public void preInit(FMLPreInitializationEvent event) {
+ logger.info("Starting PreInitialization for " + ModProps.modid);
+ }
- @EventHandler
- public void init(FMLInitializationEvent event) {
- logger.info("Starting Initialization for " + ModProps.modid);
- TweakerPlugin.register("appliedenergistics2-core", AppliedEnergistics.class);
- TweakerPlugin.register("Botania", Botania.class);
- TweakerPlugin.register("exnihilo", ExNihilo.class);
- TweakerPlugin.register("extendedWorkbench", ExtendedWorkbench.class);
- TweakerPlugin.register("factorization", Factorization.class);
- TweakerPlugin.register("Mariculture", Mariculture.class);
- TweakerPlugin.register("Mekanism", Mekanism.class);
- TweakerPlugin.register("Metallurgy", Metallurgy.class);
- TweakerPlugin.register("PneumaticCraft", PneumaticCraft.class);
- TweakerPlugin.register("Railcraft", Railcraft.class);
- TweakerPlugin.register("Steamcraft", Steamcraft.class);
- TweakerPlugin.register("TConstruct", TConstruct.class);
- TweakerPlugin.register("Thaumcraft", Thaumcraft.class);
- TweakerPlugin.register("ThermalExpansion", ThermalExpansion.class);
- TweakerPlugin.register("Forestry", Forestry.class);
- TweakerPlugin.register("chisel", Chisel.class);
- TweakerPlugin.register("aura", AuraCascade.class);
- TweakerPlugin.register("ExtraUtilities", ExtraUtils.class);
- TweakerPlugin.register("IC2", IC2C.class);
-
+
+ @EventHandler
+ public void init(FMLInitializationEvent event) {
+ logger.info("Starting Initialization for " + ModProps.modid);
+ TweakerPlugin.register("Thaumcraft", Thaumcraft.class);
- if (FMLCommonHandler.instance().getSide() == Side.CLIENT) {
- MinecraftForge.EVENT_BUS.register(new ClientEvents());
- }
+ if (FMLCommonHandler.instance().getSide() == Side.CLIENT) {
+ MinecraftForge.EVENT_BUS.register(new ClientEvents());
+ }
- MineTweakerImplementationAPI.onReloadEvent(new IEventHandler() {
+ MineTweakerImplementationAPI.onReloadEvent(new IEventHandler() {
- @Override
- public void handle(ReloadEvent event) {
- proxy.registerCommands();
+ @Override
+ public void handle(ReloadEvent event) {
+ proxy.registerCommands();
- }
- });
+ }
+ });
- File scripts = new File("scripts");
- if (!scripts.exists()) {
- scripts.mkdir();
- }
- MineTweakerImplementationAPI.setScriptProvider(new ScriptProviderDirectory(scripts));
- }
+ File scripts = new File("scripts");
+ if (!scripts.exists()) {
+ scripts.mkdir();
+ }
+ MineTweakerImplementationAPI.setScriptProvider(new ScriptProviderDirectory(scripts));
+ }
- @EventHandler
- public void postInit(FMLPostInitializationEvent event) {
- logger.info("Starting PostInitialization for " + ModProps.modid);
- }
+ @EventHandler
+ public void postInit(FMLPostInitializationEvent event) {
+ logger.info("Starting PostInitialization for " + ModProps.modid);
+ }
- @EventHandler
- public void serverStart(FMLServerStartingEvent event) {
- logger.info("Starting ServerStart for " + ModProps.modid);
- proxy.registerCommands();
+ @EventHandler
+ public void serverStart(FMLServerStartingEvent event) {
+ logger.info("Starting ServerStart for " + ModProps.modid);
+ proxy.registerCommands();
- }
+ }
}
diff --git a/src/main/java/modtweaker2/commands/EntityMappingLogger.java b/src/main/java/modtweaker2/commands/EntityMappingLogger.java
index 309fb63..ed11480 100644
--- a/src/main/java/modtweaker2/commands/EntityMappingLogger.java
+++ b/src/main/java/modtweaker2/commands/EntityMappingLogger.java
@@ -11,22 +11,22 @@ import net.minecraft.entity.EntityList;
public class EntityMappingLogger implements ICommandFunction {
- @Override
- public void execute(String[] arguments, IPlayer player) {
+ @Override
+ public void execute(String[] arguments, IPlayer player) {
- @SuppressWarnings("unchecked")
- Set keys = EntityList.stringToIDMapping.keySet();
-
- System.out.println("Mob Keys: " + keys.size());
-
- for (Integer key : keys) {
- ModTweaker2.logger.info("Mob Key " + EntityList.getStringFromID(key) + " : " + key);
- MineTweakerAPI.logCommand("Mob Key " + EntityList.getStringFromID(key) + " : " + key);
+ @SuppressWarnings("unchecked")
+ Set keys = EntityList.stringToClassMapping.keySet();
- }
+ System.out.println("Mob Keys: " + keys.size());
- if (player != null) {
- player.sendChat(MineTweakerImplementationAPI.platform.getMessage("List generated; see minetweaker.log in your minecraft dir"));
- }
- }
+ for (String key : keys) {
+ ModTweaker2.logger.info("Mob Key " + key);
+ MineTweakerAPI.logCommand("Mob 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/modtweaker2/helpers/ForgeHelper.java b/src/main/java/modtweaker2/helpers/ForgeHelper.java
index b196bea..88bb687 100644
--- a/src/main/java/modtweaker2/helpers/ForgeHelper.java
+++ b/src/main/java/modtweaker2/helpers/ForgeHelper.java
@@ -13,9 +13,9 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import net.minecraftforge.common.ChestGenHooks;
import net.minecraftforge.common.ForgeHooks;
-import cpw.mods.fml.client.FMLClientHandler;
-import cpw.mods.fml.common.FMLCommonHandler;
-import cpw.mods.fml.relauncher.Side;
+import net.minecraftforge.fml.client.FMLClientHandler;
+import net.minecraftforge.fml.common.FMLCommonHandler;
+import net.minecraftforge.fml.relauncher.Side;
public class ForgeHelper {
@SuppressWarnings("rawtypes")
@@ -29,15 +29,15 @@ public class ForgeHelper {
seeds = getStaticObject(ForgeHooks.class, "seedList");
loot = getStaticObject(ChestGenHooks.class, "chestInfo");
translate = getFinalObject(getStaticObject(StatCollector.class, "localizedName", "field_74839_a"), "languageList", "field_74816_c");
- } catch (Exception e) { }
+ } catch (Exception e) {
+ }
}
private ForgeHelper() {
}
public static Object getSeedEntry(ItemStack stack, int weight) {
- Object seedEntry = getInstance(getConstructor("net.minecraftforge.common.ForgeHooks$SeedEntry",
- ItemStack.class, int.class), stack, weight);
+ Object seedEntry = getInstance(getConstructor("net.minecraftforge.common.ForgeHooks$SeedEntry", ItemStack.class, int.class), stack, weight);
if (seedEntry == null) {
throw new NullPointerException("Failed to instantiate SeedEntry");
@@ -47,7 +47,6 @@ public class ForgeHelper {
}
public static boolean isLangActive(String lang) {
- return FMLCommonHandler.instance().getSide() == Side.SERVER ? null
- : FMLClientHandler.instance().getCurrentLanguage().equals(lang);
+ return FMLCommonHandler.instance().getSide() == Side.SERVER ? null : FMLClientHandler.instance().getCurrentLanguage().equals(lang);
}
}
diff --git a/src/main/java/modtweaker2/helpers/InputHelper.java b/src/main/java/modtweaker2/helpers/InputHelper.java
index 83a8fd7..ab3e192 100644
--- a/src/main/java/modtweaker2/helpers/InputHelper.java
+++ b/src/main/java/modtweaker2/helpers/InputHelper.java
@@ -8,8 +8,8 @@ import minetweaker.api.item.IIngredient;
import minetweaker.api.item.IItemStack;
import minetweaker.api.liquid.ILiquidStack;
import minetweaker.api.oredict.IOreDictEntry;
-import minetweaker.mc1710.item.MCItemStack;
-import minetweaker.mc1710.liquid.MCLiquidStack;
+import minetweaker.mc18.item.MCItemStack;
+import minetweaker.mc18.liquid.MCLiquidStack;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
diff --git a/src/main/java/modtweaker2/helpers/LogHelper.java b/src/main/java/modtweaker2/helpers/LogHelper.java
index a92ead4..22bd852 100644
--- a/src/main/java/modtweaker2/helpers/LogHelper.java
+++ b/src/main/java/modtweaker2/helpers/LogHelper.java
@@ -4,14 +4,12 @@ import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
-import mekanism.api.gas.GasStack;
import minetweaker.MineTweakerAPI;
import minetweaker.MineTweakerImplementationAPI;
import minetweaker.api.item.IIngredient;
import minetweaker.api.oredict.IOreDictEntry;
import minetweaker.api.player.IPlayer;
-import minetweaker.mc1710.item.MCItemStack;
-import modtweaker2.mods.mekanism.gas.MCGasStack;
+import minetweaker.mc18.item.MCItemStack;
import modtweaker2.mods.thaumcraft.aspect.AspectStack;
import modtweaker2.mods.thaumcraft.aspect.MCAspectStack;
import modtweaker2.utils.TweakerPlugin;
@@ -64,6 +62,7 @@ public class LogHelper {
/**
* Returns a string representation of the item which can also be used in scripts
*/
+ @SuppressWarnings("rawtypes")
public static String getStackDescription(Object object) {
if(object instanceof IIngredient) {
return getStackDescription((IIngredient)object);
@@ -73,9 +72,7 @@ public class LogHelper {
return getStackDescription((FluidStack) object);
} else if (object instanceof Block) {
return new MCItemStack(new ItemStack((Block)object, 1, 0)).toString();
- } else if (TweakerPlugin.isLoaded("Mekanism") && object instanceof GasStack) {
- return new MCGasStack((GasStack)object).toString();
- } else if (TweakerPlugin.isLoaded("Thaumcraft") && object instanceof AspectStack) {
+ } else if (TweakerPlugin.isLoaded("Thaumcraft") && object instanceof AspectStack) {
return new MCAspectStack((AspectStack)object).toString();
} else if(TweakerPlugin.isLoaded("Thaumcraft") && object instanceof AspectList) {
List stacks = new LinkedList();
diff --git a/src/main/java/modtweaker2/helpers/ReflectionHelper.java b/src/main/java/modtweaker2/helpers/ReflectionHelper.java
index 73fb3c5..1a367c0 100644
--- a/src/main/java/modtweaker2/helpers/ReflectionHelper.java
+++ b/src/main/java/modtweaker2/helpers/ReflectionHelper.java
@@ -155,6 +155,6 @@ public class ReflectionHelper {
@SuppressWarnings({ "rawtypes", "unchecked" })
public static void setPrivateValue( Class cls, Object o, String field, Object var) {
- cpw.mods.fml.relauncher.ReflectionHelper.setPrivateValue(cls, o, var, field);
+ net.minecraftforge.fml.relauncher.ReflectionHelper.setPrivateValue(cls, o, var, field);
}
}
diff --git a/src/main/java/modtweaker2/helpers/StackHelper.java b/src/main/java/modtweaker2/helpers/StackHelper.java
index 2702254..f9003d9 100644
--- a/src/main/java/modtweaker2/helpers/StackHelper.java
+++ b/src/main/java/modtweaker2/helpers/StackHelper.java
@@ -1,13 +1,11 @@
package modtweaker2.helpers;
import static modtweaker2.helpers.InputHelper.toStack;
+
import minetweaker.api.item.IIngredient;
import minetweaker.api.item.IItemStack;
import minetweaker.api.item.IngredientAny;
import minetweaker.api.liquid.ILiquidStack;
-import modtweaker2.mods.botania.Botania;
-import modtweaker2.mods.mekanism.MekanismHelper;
-import modtweaker2.mods.mekanism.gas.IGasStack;
import modtweaker2.utils.TweakerPlugin;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
@@ -19,9 +17,7 @@ public class StackHelper {
public static boolean areEqual(ItemStack stack1, ItemStack stack2) {
if (stack1 == null || stack2 == null) {
return false;
- } else if (TweakerPlugin.isLoaded("Botania") && Botania.isSubtile(stack1) && Botania.isSubtile(stack2)) {
- return Botania.subtileMatches(stack1, stack2);
- } else {
+ } else {
return stack1.isItemEqual(stack2);
}
}
@@ -69,18 +65,7 @@ public class StackHelper {
return false;
}
- // Check for Botania special flowers
- if(ingredient.getItems() != null && TweakerPlugin.isLoaded("Botania") && Botania.isSubtile(toStack(itemStack))) {
- for(IItemStack item : ingredient.getItems()) {
- if(areEqual(toStack(item), toStack(itemStack))) {
- return true;
- }
- }
- } else {
return true;
- }
-
- return false;
}
/**
@@ -109,20 +94,5 @@ public class StackHelper {
return false;
}
- public static boolean matches(IIngredient ingredient, IGasStack gasStack) {
- if(ingredient == null) {
- return false;
- }
-
- if(ingredient == IngredientAny.INSTANCE) {
- return true;
- }
-
- if(ingredient instanceof IGasStack) {
- return MekanismHelper.toGas((IGasStack)ingredient).isGasEqual(MekanismHelper.toGas(gasStack));
- }
-
- return false;
- }
}
diff --git a/src/main/java/modtweaker2/mods/appeng/AppliedEnergistics.java b/src/main/java/modtweaker2/mods/appeng/AppliedEnergistics.java
deleted file mode 100644
index 42ba6af..0000000
--- a/src/main/java/modtweaker2/mods/appeng/AppliedEnergistics.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package modtweaker2.mods.appeng;
-
-import minetweaker.MineTweakerAPI;
-import modtweaker2.mods.appeng.handlers.Grind;
-import modtweaker2.mods.appeng.handlers.Inscriber;
-
-public class AppliedEnergistics {
-
- public AppliedEnergistics() {
- MineTweakerAPI.registerClass(Inscriber.class);
- MineTweakerAPI.registerClass(Grind.class);
- }
-}
diff --git a/src/main/java/modtweaker2/mods/appeng/AppliedEnergisticsHelper.java b/src/main/java/modtweaker2/mods/appeng/AppliedEnergisticsHelper.java
deleted file mode 100644
index c1579d1..0000000
--- a/src/main/java/modtweaker2/mods/appeng/AppliedEnergisticsHelper.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package modtweaker2.mods.appeng;
-
-import static modtweaker2.helpers.StackHelper.areEqualOrNull;
-import net.minecraft.item.ItemStack;
-import appeng.api.features.IGrinderEntry;
-import appeng.api.features.IInscriberRecipe;
-
-public class AppliedEnergisticsHelper {
- /**
- * Compares two IInscriberRecipe objects, if they are the same or have the same inputs
- */
- public static boolean equals(IInscriberRecipe r1, IInscriberRecipe r2) {
- if(r1 == r2) {
- return true;
- }
-
- if (r1 == null || r2 == null) {
- return false;
- }
-
- if(!areEqualOrNull(r1.getTopOptional().orNull(), r2.getTopOptional().orNull())) {
- return false;
- }
-
- if(!areEqualOrNull(r1.getBottomOptional().orNull(), r2.getBottomOptional().orNull())) {
- return false;
- }
-
- if(r1.getInputs() == null && r2.getInputs() != null || r1.getInputs() != null && r2.getInputs() == null) {
- return false;
- }
-
- if(r1.getInputs() != null && r2.getInputs() != null) {
- if(r1.getInputs().size() != r2.getInputs().size()) {
- return false;
- }
-
- // Check if every item in recipe 1 is in recipe 2
- for(ItemStack i1 : r1.getInputs()) {
- boolean found = false;
-
- for(ItemStack i2 : r2.getInputs()) {
- if(areEqualOrNull(i1, i2)) {
- found = true;
- }
- }
-
- if(!found) {
- return false;
- }
- }
- }
-
- return true;
- }
-
- /**
- * Compares two IGrinderEntry objects, if they are the same or have the same inputs
- */
- public static boolean equals(IGrinderEntry r1, IGrinderEntry r2) {
- if(r1 == r2) {
- return true;
- }
-
- if (r1 == null || r2 == null) {
- return false;
- }
-
- if(!areEqualOrNull(r1.getInput(), r2.getInput())) {
- return false;
- }
-
- return true;
- }
-
-
-}
diff --git a/src/main/java/modtweaker2/mods/appeng/commands/AppliedEnergisticsLogger.java b/src/main/java/modtweaker2/mods/appeng/commands/AppliedEnergisticsLogger.java
deleted file mode 100644
index 3fa9ef6..0000000
--- a/src/main/java/modtweaker2/mods/appeng/commands/AppliedEnergisticsLogger.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package modtweaker2.mods.appeng.commands;
-
-import java.util.Arrays;
-import java.util.LinkedList;
-import java.util.List;
-
-import minetweaker.MineTweakerAPI;
-import minetweaker.MineTweakerImplementationAPI;
-import minetweaker.api.player.IPlayer;
-import minetweaker.api.server.ICommandFunction;
-import modtweaker2.helpers.LogHelper;
-import modtweaker2.helpers.StringHelper;
-import appeng.api.AEApi;
-import appeng.api.features.IGrinderEntry;
-import appeng.api.features.IInscriberRecipe;
-
-public class AppliedEnergisticsLogger implements ICommandFunction {
-
- private static final List validArguments = new LinkedList();
-
- static {
- validArguments.add("Grinder");
- validArguments.add("Inscriber");
- }
-
- @Override
- public void execute(String[] arguments, IPlayer player) {
- List args = StringHelper.toLowerCase(Arrays.asList(arguments));
-
- if(!validArguments.containsAll(args)) {
- if(player != null) {
- player.sendChat(MineTweakerImplementationAPI.platform.getMessage("Invalid arguments for command. Valid arguments: " + StringHelper.join(validArguments, ", ")));
- }
- } else {
- if(args.isEmpty() || args.contains("Grinder")) {
- for(IGrinderEntry recipe : AEApi.instance().registries().grinder().getRecipes()) {
- MineTweakerAPI.logCommand(String.format("mods.appeng.Grinder.addRecipe(%s, %s, %d, %s, %s, %s, %s);",
- LogHelper.getStackDescription(recipe.getInput()),
- LogHelper.getStackDescription(recipe.getOutput()),
- recipe.getEnergyCost(),
- LogHelper.getStackDescription(recipe.getOptionalOutput()),
- recipe.getOptionalChance(),
- LogHelper.getStackDescription(recipe.getSecondOptionalOutput()),
- recipe.getSecondOptionalChance()));
- }
- }
-
- if(args.isEmpty() || args.contains("Inscriber")) {
- for(IInscriberRecipe recipe : AEApi.instance().registries().inscriber().getRecipes()) {
- MineTweakerAPI.logCommand(String.format("mods.appeng.Inscriber.addRecipe(%s, %s, %s, %s, \"%s\");",
- LogHelper.getListDescription(recipe.getInputs()),
- LogHelper.getStackDescription(recipe.getTopOptional().orNull()),
- LogHelper.getStackDescription(recipe.getBottomOptional().orNull()),
- LogHelper.getStackDescription(recipe.getOutput()),
- recipe.getProcessType().toString()));
- }
- }
-
- if (player != null) {
- player.sendChat(MineTweakerImplementationAPI.platform.getMessage("List generated; see minetweaker.log in your minecraft dir"));
- }
- }
- }
-}
diff --git a/src/main/java/modtweaker2/mods/appeng/handlers/Grind.java b/src/main/java/modtweaker2/mods/appeng/handlers/Grind.java
deleted file mode 100644
index f6794ab..0000000
--- a/src/main/java/modtweaker2/mods/appeng/handlers/Grind.java
+++ /dev/null
@@ -1,192 +0,0 @@
-package modtweaker2.mods.appeng.handlers;
-
-import appeng.api.AEApi;
-import appeng.api.features.IGrinderEntry;
-import appeng.core.features.registries.entries.AppEngGrinderRecipe;
-import minetweaker.MineTweakerAPI;
-import minetweaker.api.item.IIngredient;
-import minetweaker.api.item.IItemStack;
-import minetweaker.api.item.WeightedItemStack;
-import modtweaker2.helpers.InputHelper;
-import modtweaker2.helpers.LogHelper;
-import modtweaker2.mods.appeng.AppliedEnergisticsHelper;
-import modtweaker2.utils.BaseListAddition;
-import modtweaker2.utils.BaseListRemoval;
-import stanhebben.zenscript.annotations.Optional;
-import stanhebben.zenscript.annotations.ZenClass;
-import stanhebben.zenscript.annotations.ZenMethod;
-
-import java.util.LinkedList;
-
-import static modtweaker2.helpers.InputHelper.toIItemStack;
-import static modtweaker2.helpers.InputHelper.toStack;
-import static modtweaker2.helpers.StackHelper.matches;
-
-@ZenClass("mods.appeng.Grinder")
-public class Grind {
-
- protected static final String name = "Applied Energistics 2 Grindstone";
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- /**
- * Adds a shaped recipe for the Grindstone
- * @param outputs
- * @param inputStack
- * @param turns
- */
- @ZenMethod
- public static void addRecipe(WeightedItemStack[] outputs, IItemStack inputStack, int turns) {
- IGrinderEntry recipe;
- if (outputs.length == 1)
- recipe = new AppEngGrinderRecipe(InputHelper.toStack(inputStack), InputHelper.toStack(outputs[0].getStack()), turns);
- else if (outputs.length == 2)
- recipe = new AppEngGrinderRecipe(InputHelper.toStack(inputStack), InputHelper.toStack(outputs[0].getStack()), InputHelper.toStack(outputs[1].getStack()), outputs[1].getChance(), turns);
- else if (outputs.length == 3)
- recipe = new AppEngGrinderRecipe(InputHelper.toStack(inputStack), InputHelper.toStack(outputs[0].getStack()), InputHelper.toStack(outputs[1].getStack()), InputHelper.toStack(outputs[2].getStack()), outputs[1].getChance(), outputs[2].getChance(), turns);
- else {
- LogHelper.logWarning(String.format("No more then 3 output stacks are allowed in %s. Command ignored!", name, LogHelper.getStackDescription(toStack(inputStack))));
- return;
- }
-
- // Check if the recipe is already present, we don't want to add duplicates
- for (IGrinderEntry r : AEApi.instance().registries().grinder().getRecipes()) {
- if (r != null && AppliedEnergisticsHelper.equals(r, recipe)) {
- LogHelper.logWarning(String.format("Duplicate %s Recipe found for %s. Command ignored!", name, LogHelper.getStackDescription(toStack(inputStack))));
- return;
- }
- }
-
- MineTweakerAPI.apply(new Add(recipe));
- }
-
- /**
- * Adds a shaped recipe for the Grindstone
- *
- * @param outputStack - Product of the Recipe
- * @param inputStack - Ingredient of the Recipe
- * @param inputEnergy - Energy requirement of the Recipe
- * @optionalParam outputStack2 - Second product of the Recipe
- * @optionalParam outputStack2Chance - Chance for the acquirement of the second product
- * @optionalParam outputStack3 - Third product of the Recipe
- * @optionalParam outputStack3Chance - Chance for the acquirement of the third product
- **/
- @Deprecated
- @ZenMethod
- public static void addRecipe(IItemStack outputStack, IItemStack inputStack, @Optional IItemStack outputStack2, @Optional float outputStack2Chance, @Optional IItemStack outputStack3, @Optional float outputStack3Chance, int inputEnergy) {
- if (inputStack == null || outputStack == null) {
- LogHelper.logError(String.format("Required parameters missing for %s Recipe.", name));
- return;
- }
-
- // Create recipe
- IGrinderEntry recipe;
-
- if (outputStack2 != null && outputStack3 != null)
- recipe = new AppEngGrinderRecipe(InputHelper.toStack(inputStack), InputHelper.toStack(outputStack), InputHelper.toStack(outputStack2), InputHelper.toStack(outputStack3), outputStack2Chance, outputStack3Chance, inputEnergy);
- else if (outputStack2 != null)
- recipe = new AppEngGrinderRecipe(InputHelper.toStack(inputStack), InputHelper.toStack(outputStack), InputHelper.toStack(outputStack2), outputStack2Chance, inputEnergy);
- else
- recipe = new AppEngGrinderRecipe(InputHelper.toStack(inputStack), InputHelper.toStack(outputStack), inputEnergy);
-
- // Check if the recipe is already present, we don't want to add duplicates
- for (IGrinderEntry r : AEApi.instance().registries().grinder().getRecipes()) {
- if (r != null && AppliedEnergisticsHelper.equals(r, recipe)) {
- LogHelper.logWarning(String.format("Duplicate %s Recipe found for %s. Command ignored!", name, LogHelper.getStackDescription(toStack(inputStack))));
- return;
- }
- }
-
- MineTweakerAPI.apply(new Add(recipe));
- }
-
- @Deprecated
- @ZenMethod
- public static void addRecipe(IItemStack input, IItemStack output, int energy, @Optional IItemStack output2, @Optional float chance2, @Optional IItemStack output3, @Optional float chance3) {
- if (input == null || output == null) {
- LogHelper.logError(String.format("Required parameters missing for %s Recipe.", name));
- return;
- }
-
- // Create recipe
- IGrinderEntry recipe;
-
- if (output2 != null && output3 != null)
- recipe = new AppEngGrinderRecipe(InputHelper.toStack(input), InputHelper.toStack(output), InputHelper.toStack(output2), InputHelper.toStack(output3), chance2, chance3, energy);
- else if (output2 != null)
- recipe = new AppEngGrinderRecipe(InputHelper.toStack(input), InputHelper.toStack(output), InputHelper.toStack(output2), chance2, energy);
- else
- recipe = new AppEngGrinderRecipe(InputHelper.toStack(input), InputHelper.toStack(output), energy);
-
- // Check if the recipe is already present, we don't want to add duplicates
- for (IGrinderEntry r : AEApi.instance().registries().grinder().getRecipes()) {
- if (r != null && AppliedEnergisticsHelper.equals(r, recipe)) {
- LogHelper.logWarning(String.format("Duplicate %s Recipe found for %s. Command ignored!", name, LogHelper.getStackDescription(toStack(input))));
- return;
- }
- }
-
- MineTweakerAPI.apply(new Add(recipe));
- }
-
- private static class Add extends BaseListAddition {
-
- public Add(IGrinderEntry recipe) {
- super(Grind.name, AEApi.instance().registries().grinder().getRecipes());
- recipes.add(recipe);
- }
-
- @Override
- public String getRecipeInfo(IGrinderEntry recipe) {
- return LogHelper.getStackDescription(recipe.getInput());
- }
-
- @Override
- protected boolean equals(IGrinderEntry recipe, IGrinderEntry otherRecipe) {
- return AppliedEnergisticsHelper.equals(recipe, otherRecipe);
- }
- }
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- /**
- * Removes a recipe for the Grindstone
- *
- * @param input - Product of the Recipe
- **/
- @ZenMethod
- public static void removeRecipe(IIngredient input) {
- if (input == null) {
- LogHelper.logError(String.format("Required parameters missing for %s Recipe.", name));
- return;
- }
-
- // Get list of existing recipes, matching with parameter
- LinkedList result = new LinkedList();
-
- for (IGrinderEntry entry : AEApi.instance().registries().grinder().getRecipes()) {
- if (entry != null && entry.getOutput() != null && matches(input, toIItemStack(entry.getOutput()))) {
- result.add(entry);
- }
- }
-
- // Check if we found the recipes and apply the action
- if (!result.isEmpty()) {
- MineTweakerAPI.apply(new Remove(result));
- } else {
- LogHelper.logWarning(String.format("No %s Recipe found for %s. Command ignored!", name, input.toString()));
- }
- }
-
- private static class Remove extends BaseListRemoval {
- public Remove(LinkedList recipes) {
- super(Grind.name, AEApi.instance().registries().grinder().getRecipes(), recipes);
- }
-
- @Override
- public String getRecipeInfo(IGrinderEntry recipe) {
- return LogHelper.getStackDescription(recipe.getInput());
- }
- }
-
-}
\ No newline at end of file
diff --git a/src/main/java/modtweaker2/mods/appeng/handlers/Inscriber.java b/src/main/java/modtweaker2/mods/appeng/handlers/Inscriber.java
deleted file mode 100644
index 650edb5..0000000
--- a/src/main/java/modtweaker2/mods/appeng/handlers/Inscriber.java
+++ /dev/null
@@ -1,196 +0,0 @@
-package modtweaker2.mods.appeng.handlers;
-
-import static modtweaker2.helpers.InputHelper.toIItemStack;
-import static modtweaker2.helpers.InputHelper.toStack;
-import static modtweaker2.helpers.InputHelper.toStacks;
-import static modtweaker2.helpers.StackHelper.matches;
-
-import java.util.LinkedList;
-
-import minetweaker.MineTweakerAPI;
-import minetweaker.api.item.IIngredient;
-import minetweaker.api.item.IItemStack;
-import modtweaker2.helpers.LogHelper;
-import modtweaker2.mods.appeng.AppliedEnergisticsHelper;
-import modtweaker2.utils.ArrayUtils;
-import modtweaker2.utils.BaseListAddition;
-import modtweaker2.utils.BaseListRemoval;
-import stanhebben.zenscript.annotations.ZenClass;
-import stanhebben.zenscript.annotations.ZenMethod;
-import appeng.api.AEApi;
-import appeng.api.features.IInscriberRecipe;
-import appeng.api.features.InscriberProcessType;
-import appeng.core.features.registries.entries.InscriberRecipe;
-
-@ZenClass("mods.appeng.Inscriber")
-public class Inscriber {
-
- protected static final String name = "Applied Energistics 2 Inscriber";
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- /**
- * Adds a shaped recipe for the Carpenter
- *
- * @param outputStack - Product of the Recipe
- * @param inputArray - Ingredients of the Recipe
- * @param inputStackPlateA - Ingredient of the Recipe for Plate Slot A
- * @param inputStackPlateB - Ingredient of the Recipe for Plate Slot B
- * @param typeString - Type that decides whether to consume the ItemStack in Plate Slot A/B
- **/
- @ZenMethod
- public static void addRecipe(IItemStack outputStack, IItemStack[] inputArray, IItemStack inputStackPlateA, IItemStack inputStackPlateB, String typeString) {
- if(inputArray == null || outputStack == null || (!typeString.equals("Press") && !typeString.equals("Inscribe"))) {
- LogHelper.logError(String.format("Required parameters missing for %s Recipe.", Inscriber.name));
- return;
- }
-
- // Create recipe
- IInscriberRecipe recipe = new InscriberRecipe(ArrayUtils.toArrayList(toStacks(inputArray)), toStack(outputStack), toStack(inputStackPlateA), toStack(inputStackPlateB), InscriberProcessType.valueOf(typeString));
-
- // Check if the recipe is already present, we don't want to add duplicates
- for(IInscriberRecipe r : AEApi.instance().registries().inscriber().getRecipes()) {
- if(r != null && AppliedEnergisticsHelper.equals(r, recipe)) {
- LogHelper.logWarning(String.format("Duplicate %s Recipe found for %s. Command ignored!", Inscriber.name, LogHelper.getStackDescription(toStack(outputStack))));
- return;
- }
- }
-
- MineTweakerAPI.apply(new Add(recipe));
- }
-
- @Deprecated
- @ZenMethod
- public static void addRecipe(IItemStack[] imprintable, IItemStack plateA, IItemStack plateB, IItemStack out, String type) {
- if(imprintable == null || out == null || (!type.equals("Press") && !type.equals("Inscribe"))) {
- LogHelper.logError(String.format("Required parameters missing for %s Recipe.", Inscriber.name));
- return;
- }
-
- // Create recipe
- IInscriberRecipe recipe = new InscriberRecipe(ArrayUtils.toArrayList(toStacks(imprintable)), toStack(out), toStack(plateA), toStack(plateB), InscriberProcessType.valueOf(type));
-
- // Check if the recipe is already present, we don't want to add duplicates
- for(IInscriberRecipe r : AEApi.instance().registries().inscriber().getRecipes()) {
- if(r != null && AppliedEnergisticsHelper.equals(r, recipe)) {
- LogHelper.logWarning(String.format("Duplicate %s Recipe found for %s. Command ignored!", Inscriber.name, LogHelper.getStackDescription(toStack(out))));
- return;
- }
- }
-
- MineTweakerAPI.apply(new Add(recipe));
- }
-
- public static class Add extends BaseListAddition {
- public Add(IInscriberRecipe recipe) {
- super(Inscriber.name, AEApi.instance().registries().inscriber().getRecipes());
- recipes.add(recipe);
- }
-
- @Override
- public void apply() {
- if(recipes.isEmpty()) {
- return;
- }
-
- for(IInscriberRecipe recipe : recipes) {
- try {
- AEApi.instance().registries().inscriber().addRecipe(recipe);
- successful.add(recipe);
- } catch (Exception ex) { LogHelper.logError("Error adding inscriber recipe.", ex); }
- }
- }
-
- @Override
- public void undo() {
- if(successful.isEmpty()) {
- return;
- }
-
- for(IInscriberRecipe recipe : successful) {
- try {
- AEApi.instance().registries().inscriber().removeRecipe(recipe);
- } catch (Exception ex) { LogHelper.logError("Error removing inscriber recipe.", ex); }
- }
- }
-
- @Override
- public String getRecipeInfo(IInscriberRecipe recipe) {
- return LogHelper.getStackDescription(recipe.getOutput());
- }
-
- @Override
- protected boolean equals(IInscriberRecipe recipe, IInscriberRecipe otherRecipe) {
- return AppliedEnergisticsHelper.equals(recipe, otherRecipe);
- }
- }
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- /**
- * Adds a shaped recipe for the Carpenter
- *
- * @param outputStack - Product of the Recipe
- **/
- @ZenMethod
- public static void removeRecipe(IIngredient outputStack) {
- if(outputStack == null) {
- LogHelper.logError(String.format("Required parameters missing for %s Recipe.", Inscriber.name));
- return;
- }
-
- // Get list of existing recipes, matching with parameter
- LinkedList result = new LinkedList();
-
- for(IInscriberRecipe entry : AEApi.instance().registries().inscriber().getRecipes()) {
- if(entry != null && entry.getOutput() != null && matches(outputStack, toIItemStack(entry.getOutput()))) {
- result.add(entry);
- }
- }
-
- // Check if we found the recipes and apply the action
- if(!result.isEmpty()) {
- MineTweakerAPI.apply(new Remove(result));
- } else {
- LogHelper.logWarning(String.format("No %s Recipe found for %s. Command ignored!", Inscriber.name, outputStack.toString()));
- }
- }
-
- public static class Remove extends BaseListRemoval {
- public Remove(LinkedList recipes) {
- super(Inscriber.name, AEApi.instance().registries().inscriber().getRecipes(), recipes);
- }
-
- @Override
- public void apply() {
- if(this.recipes.isEmpty()) {
- return;
- }
-
- for(IInscriberRecipe recipe : recipes) {
- try {
- AEApi.instance().registries().inscriber().removeRecipe(recipe);
- successful.add(recipe);
- } catch (Exception ex) { LogHelper.logError("Error removing inscriber recipe.", ex); }
- }
- }
-
- @Override
- public void undo() {
- if(successful.isEmpty()) {
- return;
- }
-
- for(IInscriberRecipe recipe : successful) {
- try {
- AEApi.instance().registries().inscriber().addRecipe(recipe);
- } catch (Exception ex) { LogHelper.logError("Error restoring inscriber recipe.", ex); }
- }
- }
-
- @Override
- public String getRecipeInfo(IInscriberRecipe recipe) {
- return LogHelper.getStackDescription(recipe.getOutput());
- }
- }
-}
diff --git a/src/main/java/modtweaker2/mods/auracascade/AuraCascade.java b/src/main/java/modtweaker2/mods/auracascade/AuraCascade.java
deleted file mode 100644
index 3833d02..0000000
--- a/src/main/java/modtweaker2/mods/auracascade/AuraCascade.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package modtweaker2.mods.auracascade;
-
-import minetweaker.MineTweakerAPI;
-import modtweaker2.mods.auracascade.aura.AuraBracketHandler;
-import modtweaker2.mods.auracascade.handlers.Pylon;
-
-public class AuraCascade {
- public AuraCascade(){
- MineTweakerAPI.registerBracketHandler(new AuraBracketHandler());
- MineTweakerAPI.registerClass(Pylon.class);
- }
-
-}
diff --git a/src/main/java/modtweaker2/mods/auracascade/AuraCascadeHelper.java b/src/main/java/modtweaker2/mods/auracascade/AuraCascadeHelper.java
deleted file mode 100644
index 5d581e0..0000000
--- a/src/main/java/modtweaker2/mods/auracascade/AuraCascadeHelper.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package modtweaker2.mods.auracascade;
-
-import modtweaker2.mods.auracascade.aura.IAuraStack;
-import pixlepix.auracascade.data.AuraQuantity;
-import pixlepix.auracascade.data.EnumAura;
-
-public class AuraCascadeHelper {
- public static AuraQuantity toAura(IAuraStack iStack) {
- if (iStack == null) {
- return null;
- } else return new AuraQuantity(EnumAura.valueOf(iStack.getName()), iStack.getAmount());
- }
-
-// public static GasStack[] toGases(IIngredient[] input) {
-// return toGases((IGasStack[]) input);
-// }
-//
-// public static GasStack[] toGases(IGasStack[] iStack) {
-// GasStack[] stack = new GasStack[iStack.length];
-// for (int i = 0; i < stack.length; i++)
-// stack[i] = toGas(iStack[i]);
-// return stack;
-// }
-}
diff --git a/src/main/java/modtweaker2/mods/auracascade/aura/AuraBracketHandler.java b/src/main/java/modtweaker2/mods/auracascade/aura/AuraBracketHandler.java
deleted file mode 100644
index d773a5f..0000000
--- a/src/main/java/modtweaker2/mods/auracascade/aura/AuraBracketHandler.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package modtweaker2.mods.auracascade.aura;
-
-import java.util.List;
-
-import minetweaker.IBracketHandler;
-import minetweaker.MineTweakerAPI;
-import minetweaker.annotations.BracketHandler;
-import minetweaker.api.item.IngredientAny;
-import pixlepix.auracascade.data.AuraQuantity;
-import pixlepix.auracascade.data.EnumAura;
-import stanhebben.zenscript.compiler.IEnvironmentGlobal;
-import stanhebben.zenscript.expression.ExpressionCallStatic;
-import stanhebben.zenscript.expression.ExpressionString;
-import stanhebben.zenscript.expression.partial.IPartialExpression;
-import stanhebben.zenscript.parser.Token;
-import stanhebben.zenscript.symbols.IZenSymbol;
-import stanhebben.zenscript.type.natives.IJavaMethod;
-import stanhebben.zenscript.util.ZenPosition;
-
-@BracketHandler(priority = 100)
-public class AuraBracketHandler implements IBracketHandler {
-
- public static IAuraStack getAura(String name) {
- EnumAura aura = EnumAura.valueOf(name);
- if (aura != null) {
- return new MCAuraStack(new AuraQuantity(aura, 1));
- } else {
- return null;
- }
- }
-
- private final IZenSymbol symbolAny;
- private final IJavaMethod method;
-
- public AuraBracketHandler() {
- symbolAny = MineTweakerAPI.getJavaStaticFieldSymbol(IngredientAny.class, "INSTANCE");
- method = MineTweakerAPI.getJavaMethod(AuraBracketHandler.class, "getAura", String.class);
- }
-
- @Override
- public IZenSymbol resolve(IEnvironmentGlobal environment, List tokens) {
- // any symbol
- if (tokens.size() == 1 && tokens.get(0).getValue().equals("*")) {
- return symbolAny;
- }
-
- if (tokens.size() > 2) {
- if (tokens.get(0).getValue().equals("aura") && tokens.get(1).getValue().equals(":")) {
- return find(environment, tokens, 2, tokens.size());
- }
- }
-
- return null;
- }
-
- private IZenSymbol find(IEnvironmentGlobal environment, List tokens, int startIndex, int endIndex) {
- //StringBuilder valueBuilder = new StringBuilder();
-
- for (EnumAura a : EnumAura.values()) {
- for (int i = startIndex; i < endIndex; i++) {
- Token token = tokens.get(i);
- if (a.name().equals(token.getValue())) {
- return new AuraReferenceSymbol(environment, token.getValue());
- }
- }
- }
-
- return null;
- }
-
- private class AuraReferenceSymbol implements IZenSymbol {
- private final IEnvironmentGlobal environment;
- private final String name;
-
- public AuraReferenceSymbol(IEnvironmentGlobal environment, String name) {
- this.environment = environment;
- this.name = name;
- }
-
- @Override
- public IPartialExpression instance(ZenPosition position) {
- return new ExpressionCallStatic(position, environment, method, new ExpressionString(position, name));
- }
- }
-}
\ No newline at end of file
diff --git a/src/main/java/modtweaker2/mods/auracascade/aura/IAuraDefinition.java b/src/main/java/modtweaker2/mods/auracascade/aura/IAuraDefinition.java
deleted file mode 100644
index 9a4fc83..0000000
--- a/src/main/java/modtweaker2/mods/auracascade/aura/IAuraDefinition.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package modtweaker2.mods.auracascade.aura;
-
-import stanhebben.zenscript.annotations.OperatorType;
-import stanhebben.zenscript.annotations.ZenClass;
-import stanhebben.zenscript.annotations.ZenGetter;
-import stanhebben.zenscript.annotations.ZenOperator;
-
-@ZenClass("modtweaker.auraCascade.IAuraDefinition")
-public interface IAuraDefinition {
-
- @ZenOperator(OperatorType.MUL)
- public IAuraStack asAura(int amount);
-
- @ZenGetter("name")
- public String getName();
-
- @ZenGetter("displayName")
- public String getDisplayName();
-}
\ No newline at end of file
diff --git a/src/main/java/modtweaker2/mods/auracascade/aura/IAuraStack.java b/src/main/java/modtweaker2/mods/auracascade/aura/IAuraStack.java
deleted file mode 100644
index 66fa51e..0000000
--- a/src/main/java/modtweaker2/mods/auracascade/aura/IAuraStack.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package modtweaker2.mods.auracascade.aura;
-
-import stanhebben.zenscript.annotations.OperatorType;
-import stanhebben.zenscript.annotations.ZenClass;
-import stanhebben.zenscript.annotations.ZenGetter;
-import stanhebben.zenscript.annotations.ZenMethod;
-import stanhebben.zenscript.annotations.ZenOperator;
-
-@ZenClass("modtweaker.auraCascade.IAuraStack")
-public interface IAuraStack {
- @ZenGetter("definition")
- public IAuraDefinition getDefinition();
-
- @ZenGetter("name")
- public String getName();
-
- @ZenGetter("displayName")
- public String getDisplayName();
-
- @ZenGetter("amount")
- public int getAmount();
-
- @ZenOperator(OperatorType.MUL)
- @ZenMethod
- public IAuraStack withAmount(int amount);
-
- public Object getInternal();
-}
\ No newline at end of file
diff --git a/src/main/java/modtweaker2/mods/auracascade/aura/MCAuraDefinition.java b/src/main/java/modtweaker2/mods/auracascade/aura/MCAuraDefinition.java
deleted file mode 100644
index 8bda113..0000000
--- a/src/main/java/modtweaker2/mods/auracascade/aura/MCAuraDefinition.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package modtweaker2.mods.auracascade.aura;
-
-import pixlepix.auracascade.data.AuraQuantity;
-
-
-public class MCAuraDefinition implements IAuraDefinition {
- private final AuraQuantity aura;
-
- public MCAuraDefinition(AuraQuantity aura) {
- this.aura = aura;
- }
-
- @Override
- public String getName() {
- return aura.getType().name;
- }
-
- @Override
- public String getDisplayName() {
- return aura.getType().name;
- }
-
- @Override
- public IAuraStack asAura(int amount) {
- return new MCAuraStack(new AuraQuantity(aura.getType(), aura.getNum()));
- }
-}
\ No newline at end of file
diff --git a/src/main/java/modtweaker2/mods/auracascade/aura/MCAuraStack.java b/src/main/java/modtweaker2/mods/auracascade/aura/MCAuraStack.java
deleted file mode 100644
index b710d6b..0000000
--- a/src/main/java/modtweaker2/mods/auracascade/aura/MCAuraStack.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package modtweaker2.mods.auracascade.aura;
-
-import pixlepix.auracascade.data.AuraQuantity;
-
-
-public class MCAuraStack implements IAuraStack {
- private final AuraQuantity aura;
-
- public MCAuraStack(AuraQuantity aura) {
- this.aura = aura;
- }
-
- @Override
- public IAuraDefinition getDefinition() {
- return new MCAuraDefinition(aura);
- }
-
- @Override
- public String getName() {
- return aura.getType().name();
- }
-
- @Override
- public String getDisplayName() {
- return aura.getType().name();
- }
-
- @Override
- public int getAmount() {
- return aura.getNum();
- }
-
- @Override
- public IAuraStack withAmount(int amount) {
- AuraQuantity result = new AuraQuantity(aura.getType(), amount);
- return new MCAuraStack(result);
- }
-
- @Override
- public Object getInternal() {
- return aura;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/modtweaker2/mods/auracascade/commands/AuraLogger.java b/src/main/java/modtweaker2/mods/auracascade/commands/AuraLogger.java
deleted file mode 100644
index 24d5d1e..0000000
--- a/src/main/java/modtweaker2/mods/auracascade/commands/AuraLogger.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package modtweaker2.mods.auracascade.commands;
-
-import minetweaker.MineTweakerAPI;
-import minetweaker.MineTweakerImplementationAPI;
-import minetweaker.api.player.IPlayer;
-import minetweaker.api.server.ICommandFunction;
-import modtweaker2.ModTweaker2;
-import pixlepix.auracascade.data.EnumAura;
-
-public class AuraLogger implements ICommandFunction {
-
- @Override
- public void execute(String[] arguments, IPlayer player) {
-
-
- System.out.println("Aura Types: " + EnumAura.values().length);
- MineTweakerAPI.logCommand("Aura Types: " + EnumAura.values().length);
- for (EnumAura aura : EnumAura.values()) {
- ModTweaker2.logger.info("Aura Type: " + aura.name() + ".");
- MineTweakerAPI.logCommand("Aura Type: " + aura.name() + ".");
-
- }
-
- if (player != null) {
- player.sendChat(MineTweakerImplementationAPI.platform.getMessage("List generated; see minetweaker.log in your minecraft dir"));
- }
- }
-}
diff --git a/src/main/java/modtweaker2/mods/auracascade/handlers/Pylon.java b/src/main/java/modtweaker2/mods/auracascade/handlers/Pylon.java
deleted file mode 100644
index 6dc2544..0000000
--- a/src/main/java/modtweaker2/mods/auracascade/handlers/Pylon.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package modtweaker2.mods.auracascade.handlers;
-
-import static modtweaker2.helpers.InputHelper.toIItemStack;
-import static modtweaker2.helpers.InputHelper.toStack;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import minetweaker.MineTweakerAPI;
-import minetweaker.api.item.IIngredient;
-import minetweaker.api.item.IItemStack;
-import modtweaker2.helpers.LogHelper;
-import modtweaker2.mods.auracascade.AuraCascadeHelper;
-import modtweaker2.mods.auracascade.aura.IAuraStack;
-import modtweaker2.utils.BaseListAddition;
-import modtweaker2.utils.BaseListRemoval;
-import pixlepix.auracascade.data.recipe.PylonRecipe;
-import pixlepix.auracascade.data.recipe.PylonRecipeComponent;
-import pixlepix.auracascade.data.recipe.PylonRecipeRegistry;
-import stanhebben.zenscript.annotations.ZenClass;
-import stanhebben.zenscript.annotations.ZenMethod;
-
-@ZenClass("mods.auraCascade.Pylon")
-public class Pylon {
-
- protected static final String name = "Aura Cascade Pylon";
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- @ZenMethod
- public static void addRecipe(IItemStack ouput, IAuraStack stack, IItemStack input) {
- addRecipe(ouput, stack, input, stack, input, stack, input, stack, input);
- }
-
- @ZenMethod
- public static void addRecipe(IItemStack ouput, IAuraStack aura1, IItemStack input1, IAuraStack aura2, IItemStack input2, IAuraStack aura3, IItemStack input3, IAuraStack aura4, IItemStack input4) {
- List recipes = new LinkedList();
-
- recipes.add(new PylonRecipe(toStack(ouput), new PylonRecipeComponent(AuraCascadeHelper.toAura(aura1), toStack(input1)), new PylonRecipeComponent(AuraCascadeHelper.toAura(aura2), toStack(input2)), new PylonRecipeComponent(AuraCascadeHelper.toAura(aura3), toStack(input3)), new PylonRecipeComponent(AuraCascadeHelper.toAura(aura1), toStack(input4))));
-
- MineTweakerAPI.apply(new Add(recipes));
- }
-
- private static class Add extends BaseListAddition {
-
- public Add(List recipes) {
- super(Pylon.name, PylonRecipeRegistry.recipes, recipes);
- }
-
- @Override
- protected String getRecipeInfo(PylonRecipe recipe) {
- return LogHelper.getStackDescription(recipe.result);
- }
- }
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- @ZenMethod
- public static void removeRecipe(IIngredient output) {
- List recipes = new LinkedList();
-
- for (PylonRecipe r : PylonRecipeRegistry.recipes) {
- if (output.matches(toIItemStack(r.result))) {
- recipes.add(r);
- }
- }
-
- // Check if we found the recipes and apply the action
- if(!recipes.isEmpty()) {
- MineTweakerAPI.apply(new Remove(recipes));
- } else {
- LogHelper.logWarning(String.format("No %s Recipe found for %s. Command ignored!", Pylon.name, output.toString()));
- }
- }
-
- private static class Remove extends BaseListRemoval {
- public Remove(List recipes) {
- super(Pylon.name, PylonRecipeRegistry.recipes, recipes);
- }
-
- @Override
- protected String getRecipeInfo(PylonRecipe recipe) {
- return LogHelper.getStackDescription(recipe.result);
- }
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/Botania.java b/src/main/java/modtweaker2/mods/botania/Botania.java
deleted file mode 100644
index 0797b23..0000000
--- a/src/main/java/modtweaker2/mods/botania/Botania.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package modtweaker2.mods.botania;
-
-import minetweaker.MineTweakerAPI;
-import modtweaker2.mods.botania.handlers.Apothecary;
-import modtweaker2.mods.botania.handlers.Brew;
-import modtweaker2.mods.botania.handlers.ElvenTrade;
-import modtweaker2.mods.botania.handlers.Lexicon;
-import modtweaker2.mods.botania.handlers.ManaInfusion;
-import modtweaker2.mods.botania.handlers.Orechid;
-import modtweaker2.mods.botania.handlers.PureDaisy;
-import modtweaker2.mods.botania.handlers.RuneAltar;
-import net.minecraft.item.ItemStack;
-import vazkii.botania.common.item.block.ItemBlockSpecialFlower;
-
-public class Botania {
- public Botania() {
- MineTweakerAPI.registerClass(Apothecary.class);
- MineTweakerAPI.registerClass(Brew.class);
- MineTweakerAPI.registerClass(ElvenTrade.class);
- MineTweakerAPI.registerClass(ManaInfusion.class);
- MineTweakerAPI.registerClass(Orechid.class);
- MineTweakerAPI.registerClass(PureDaisy.class);
- MineTweakerAPI.registerClass(RuneAltar.class);
- MineTweakerAPI.registerClass(Lexicon.class);
- }
-
- public static boolean isSubtile(ItemStack stack) {
- return stack.getItem() instanceof ItemBlockSpecialFlower;
- }
-
- public static boolean subtileMatches(ItemStack stack, ItemStack stack2) {
- return (ItemBlockSpecialFlower.getType(stack2).equals(ItemBlockSpecialFlower.getType(stack)));
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/BotaniaHelper.java b/src/main/java/modtweaker2/mods/botania/BotaniaHelper.java
deleted file mode 100644
index 124a523..0000000
--- a/src/main/java/modtweaker2/mods/botania/BotaniaHelper.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package modtweaker2.mods.botania;
-
-import java.util.List;
-
-import vazkii.botania.api.BotaniaAPI;
-import vazkii.botania.api.lexicon.KnowledgeType;
-import vazkii.botania.api.lexicon.LexiconCategory;
-import vazkii.botania.api.lexicon.LexiconEntry;
-
-public class BotaniaHelper {
- public static LexiconCategory findCatagory(String name)
- {
- List catagories=BotaniaAPI.getAllCategories();
- for(int i=0;i entries=BotaniaAPI.getAllEntries();
- for(int i=0;i brew_keys=BotaniaAPI.brewMap.keySet();
- System.out.println("Brews: " + brew_keys.size());
- for (String key : brew_keys) {
- System.out.println("Brew " + key);
- MineTweakerAPI.logCommand(key);
- }
-
- if (player != null) {
- player.sendChat(MineTweakerImplementationAPI.platform.getMessage("List generated; see minetweaker.log in your minecraft dir"));
- }
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/commands/BotaniaLogger.java b/src/main/java/modtweaker2/mods/botania/commands/BotaniaLogger.java
deleted file mode 100644
index 39fae4f..0000000
--- a/src/main/java/modtweaker2/mods/botania/commands/BotaniaLogger.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package modtweaker2.mods.botania.commands;
-
-import java.util.Arrays;
-import java.util.LinkedList;
-import java.util.List;
-
-import minetweaker.MineTweakerAPI;
-import minetweaker.MineTweakerImplementationAPI;
-import minetweaker.api.player.IPlayer;
-import minetweaker.api.server.ICommandFunction;
-import modtweaker2.helpers.LogHelper;
-import modtweaker2.helpers.StringHelper;
-import net.minecraft.item.ItemStack;
-import vazkii.botania.api.BotaniaAPI;
-import vazkii.botania.api.recipe.RecipeBrew;
-import vazkii.botania.api.recipe.RecipeElvenTrade;
-import vazkii.botania.api.recipe.RecipeManaInfusion;
-import vazkii.botania.api.recipe.RecipePetals;
-import vazkii.botania.api.recipe.RecipePureDaisy;
-import vazkii.botania.api.recipe.RecipeRuneAltar;
-
-public class BotaniaLogger implements ICommandFunction {
-
- private static final List validArguments = new LinkedList();
-
- static {
- validArguments.add("Apothecary");
- validArguments.add("Brew");
- validArguments.add("ElvenTrade");
- validArguments.add("ManaInfusion");
- validArguments.add("PureDaisy");
- validArguments.add("RuneAltar");
- }
-
- @Override
- public void execute(String[] arguments, IPlayer player) {
- List args = StringHelper.toLowerCase(Arrays.asList(arguments));
-
- if(!validArguments.containsAll(args)) {
- if(player != null) {
- player.sendChat(MineTweakerImplementationAPI.platform.getMessage("Invalid arguments for command. Valid arguments: " + StringHelper.join(validArguments, ", ")));
- }
- } else {
- if(args.isEmpty() || args.contains("Apothecary")) {
- for(RecipePetals recipe : BotaniaAPI.petalRecipes) {
- MineTweakerAPI.logCommand(String.format("mods.botania.Apothecary.addRecipe(%s, %s);",
- LogHelper.getStackDescription(recipe.getOutput()),
- LogHelper.getListDescription(recipe.getInputs()) // Need to resolve "petalXXX" to an item
- ));
- }
- }
-
- if(args.isEmpty() || args.contains("Brew")) {
- for(RecipeBrew recipe : BotaniaAPI.brewRecipes) {
- MineTweakerAPI.logCommand(String.format("mods.botania.Brew.addRecipe(%s, \"%s\");",
- LogHelper.getListDescription(recipe.getInputs()),
- recipe.getBrew().getKey()));
- }
- }
-
- if(args.isEmpty() || args.contains("ElvenTrade")) {
- for(RecipeElvenTrade recipe : BotaniaAPI.elvenTradeRecipes) {
- MineTweakerAPI.logCommand(String.format("mods.botania.ElvenTrade.addRecipe(%s, %s);",
- LogHelper.getStackDescription(recipe.getOutput()),
- LogHelper.getListDescription(recipe.getInputs()
- )));
- }
- }
-
- if(args.isEmpty() || args.contains("ManaInfusion")) {
- for(RecipeManaInfusion recipe : BotaniaAPI.manaInfusionRecipes) {
- MineTweakerAPI.logCommand(String.format("mods.botania.ManaInfusion.add%s(%s, %s, %d);",
- recipe.isAlchemy() ? "Alchemy" : recipe.isConjuration() ? "Conjuration" : "Infusion",
- LogHelper.getStackDescription(recipe.getOutput()),
- LogHelper.getStackDescription(recipe.getInput()),
- recipe.getManaToConsume()
- ));
- }
- }
-
- if(args.isEmpty() || args.contains("PureDaisy")) {
- for(RecipePureDaisy recipe : BotaniaAPI.pureDaisyRecipes) {
- MineTweakerAPI.logCommand(String.format("mods.botania.PureDaisy.addRecipe(%s, %s);",
- LogHelper.getStackDescription(recipe.getInput()),
- LogHelper.getStackDescription(new ItemStack(recipe.getOutput(), 1, recipe.getOutputMeta()))));
- }
- }
-
- if(args.isEmpty() || args.contains("RuneAltar")) {
- for(RecipeRuneAltar recipe : BotaniaAPI.runeAltarRecipes) {
- MineTweakerAPI.logCommand(String.format("mods.botania.RuneAltar.addRecipe(%s, %s, %d);",
- LogHelper.getStackDescription(recipe.getOutput()),
- LogHelper.getListDescription(recipe.getInputs()),
- recipe.getManaUsage()
- ));
- }
- }
-
- if (player != null) {
- player.sendChat(MineTweakerImplementationAPI.platform.getMessage("List generated; see minetweaker.log in your minecraft dir"));
- }
- }
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/commands/BotaniaOrechidLogger.java b/src/main/java/modtweaker2/mods/botania/commands/BotaniaOrechidLogger.java
deleted file mode 100644
index 402dd3a..0000000
--- a/src/main/java/modtweaker2/mods/botania/commands/BotaniaOrechidLogger.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package modtweaker2.mods.botania.commands;
-
-import java.util.Set;
-
-import minetweaker.MineTweakerAPI;
-import minetweaker.MineTweakerImplementationAPI;
-import minetweaker.api.player.IPlayer;
-import minetweaker.api.server.ICommandFunction;
-import vazkii.botania.api.BotaniaAPI;
-
-public class BotaniaOrechidLogger implements ICommandFunction {
-
- @Override
- public void execute(String[] arguments, IPlayer player) {
-
- Set keys = BotaniaAPI.oreWeights.keySet();
- System.out.println("Orechid Keys: " + keys.size());
- for (String str : BotaniaAPI.oreWeights.keySet()) {
- System.out.println("Orechid 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/modtweaker2/mods/botania/handlers/Apothecary.java b/src/main/java/modtweaker2/mods/botania/handlers/Apothecary.java
deleted file mode 100644
index d61b4ae..0000000
--- a/src/main/java/modtweaker2/mods/botania/handlers/Apothecary.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package modtweaker2.mods.botania.handlers;
-
-import static modtweaker2.helpers.InputHelper.toIItemStack;
-import static modtweaker2.helpers.InputHelper.toObjects;
-import static modtweaker2.helpers.InputHelper.toStack;
-import static modtweaker2.helpers.StackHelper.matches;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import minetweaker.MineTweakerAPI;
-import minetweaker.api.item.IIngredient;
-import minetweaker.api.item.IItemStack;
-import modtweaker2.helpers.LogHelper;
-import modtweaker2.utils.BaseListAddition;
-import modtweaker2.utils.BaseListRemoval;
-import stanhebben.zenscript.annotations.ZenClass;
-import stanhebben.zenscript.annotations.ZenMethod;
-import vazkii.botania.api.BotaniaAPI;
-import vazkii.botania.api.recipe.RecipePetals;
-import vazkii.botania.common.item.block.ItemBlockSpecialFlower;
-
-@ZenClass("mods.botania.Apothecary")
-public class Apothecary {
-
- protected static final String name = "Botania Petal";
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- @ZenMethod
- public static void addRecipe(IItemStack output, IIngredient[] input) {
- MineTweakerAPI.apply(new Add(new RecipePetals(toStack(output), toObjects(input))));
- }
-
- @ZenMethod
- public static void addRecipe(String output, IIngredient[] input) {
- addRecipe(toIItemStack(ItemBlockSpecialFlower.ofType(output)), input);
- }
-
- private static class Add extends BaseListAddition {
- public Add(RecipePetals recipe) {
- super("Botania Petal", BotaniaAPI.petalRecipes);
- recipes.add(recipe);
- }
-
- @Override
- public String getRecipeInfo(RecipePetals recipe) {
- return LogHelper.getStackDescription(recipe.getOutput());
- }
- }
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- @ZenMethod
- public static void removeRecipe(IIngredient output) {
- // Get list of existing recipes, matching with parameter
- LinkedList result = new LinkedList();
-
- for(RecipePetals entry : BotaniaAPI.petalRecipes) {
- if(entry != null && entry.getOutput() != null && matches(output, toIItemStack(entry.getOutput()))) {
- result.add(entry);
- }
- }
-
- // Check if we found the recipes and apply the action
- if(!result.isEmpty()) {
- MineTweakerAPI.apply(new Remove(result));
- } else {
- LogHelper.logWarning(String.format("No %s Recipe found for %s. Command ignored!", Apothecary.name, output.toString()));
- }
- }
-
- @ZenMethod
- public static void removeRecipe(String output) {
- removeRecipe(toIItemStack(ItemBlockSpecialFlower.ofType(output)));
- }
-
- private static class Remove extends BaseListRemoval {
- public Remove(List recipes) {
- super(Apothecary.name, BotaniaAPI.petalRecipes, recipes);
- }
-
- @Override
- public String getRecipeInfo(RecipePetals recipe) {
- return LogHelper.getStackDescription(recipe.getOutput());
- }
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/handlers/Brew.java b/src/main/java/modtweaker2/mods/botania/handlers/Brew.java
deleted file mode 100644
index e325dda..0000000
--- a/src/main/java/modtweaker2/mods/botania/handlers/Brew.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package modtweaker2.mods.botania.handlers;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import minetweaker.MineTweakerAPI;
-import minetweaker.api.item.IIngredient;
-import modtweaker2.helpers.InputHelper;
-import modtweaker2.helpers.LogHelper;
-import modtweaker2.helpers.StringHelper;
-import modtweaker2.utils.BaseListAddition;
-import modtweaker2.utils.BaseListRemoval;
-import stanhebben.zenscript.annotations.ZenClass;
-import stanhebben.zenscript.annotations.ZenMethod;
-import vazkii.botania.api.BotaniaAPI;
-import vazkii.botania.api.recipe.RecipeBrew;
-
-@ZenClass("mods.botania.Brew")
-public class Brew {
-
- public static final String name = "Botania Brew";
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- @ZenMethod
- public static void addRecipe(IIngredient[] inputItems, String brewName) {
- if(inputItems == null || inputItems.length == 0 || brewName == null || brewName.length() == 0) {
- LogHelper.logError(String.format("Required parameters missing for %s Recipe.", name));
- return;
- }
-
- if(!BotaniaAPI.brewMap.containsKey(brewName)) {
- LogHelper.logError(String.format("Unknown brew name \"%s\" for %s recipe.", brewName, name));
- }
-
- RecipeBrew recipe = new RecipeBrew(BotaniaAPI.brewMap.get(brewName), InputHelper.toObjects(inputItems));
-
- MineTweakerAPI.apply(new Add(recipe));
- }
-
- private static class Add extends BaseListAddition {
-
- protected Add(RecipeBrew recipe) {
- super(Brew.name, BotaniaAPI.brewRecipes);
- recipes.add(recipe);
- }
-
- @Override
- protected String getRecipeInfo(RecipeBrew recipe) {
- return recipe.getBrew().getKey();
- }
- }
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- @ZenMethod
- public static void removeRecipe(String brewName) {
- List recipes = new LinkedList();
- Matcher matcher = Pattern.compile(StringHelper.wildcardToRegex(brewName)).matcher("");
-
- for(RecipeBrew recipe : BotaniaAPI.brewRecipes) {
- matcher.reset(recipe.getBrew().getKey());
- if(matcher.matches()) {
- recipes.add(recipe);
- }
- }
-
- if(!recipes.isEmpty()) {
- MineTweakerAPI.apply(new Remove(recipes));
- } else {
- LogHelper.logWarning(String.format("No %s recipe found for %s. Command ignored!", name, brewName));
- }
- }
-
- public static class Remove extends BaseListRemoval {
-
- protected Remove(List recipes) {
- super(Brew.name, BotaniaAPI.brewRecipes, recipes);
- }
-
- @Override
- protected String getRecipeInfo(RecipeBrew recipe) {
- return recipe.getBrew().getKey();
- }
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/handlers/ElvenTrade.java b/src/main/java/modtweaker2/mods/botania/handlers/ElvenTrade.java
deleted file mode 100644
index 78cfcde..0000000
--- a/src/main/java/modtweaker2/mods/botania/handlers/ElvenTrade.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package modtweaker2.mods.botania.handlers;
-
-import static modtweaker2.helpers.InputHelper.toIItemStack;
-import static modtweaker2.helpers.InputHelper.toObjects;
-import static modtweaker2.helpers.InputHelper.toStack;
-import static modtweaker2.helpers.StackHelper.matches;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import minetweaker.MineTweakerAPI;
-import minetweaker.api.item.IIngredient;
-import minetweaker.api.item.IItemStack;
-import modtweaker2.helpers.LogHelper;
-import modtweaker2.utils.BaseListAddition;
-import modtweaker2.utils.BaseListRemoval;
-import stanhebben.zenscript.annotations.ZenClass;
-import stanhebben.zenscript.annotations.ZenMethod;
-import vazkii.botania.api.BotaniaAPI;
-import vazkii.botania.api.recipe.RecipeElvenTrade;
-
-@ZenClass("mods.botania.ElvenTrade")
-public class ElvenTrade {
-
- protected static final String name = "Botania Eleven Trade";
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- @ZenMethod
- public static void addRecipe(IItemStack output, IIngredient[] input) {
- MineTweakerAPI.apply(new Add(new RecipeElvenTrade(toStack(output), toObjects(input))));
- }
-
- private static class Add extends BaseListAddition {
- public Add(RecipeElvenTrade recipe) {
- super(ElvenTrade.name, BotaniaAPI.elvenTradeRecipes);
- recipes.add(recipe);
- }
-
- @Override
- public String getRecipeInfo(RecipeElvenTrade recipe) {
- return LogHelper.getStackDescription(recipe.getOutput());
- }
- }
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- @ZenMethod
- public static void removeRecipe(IIngredient output) {
- // Get list of existing recipes, matching with parameter
- LinkedList recipes = new LinkedList();
-
- for(RecipeElvenTrade entry : BotaniaAPI.elvenTradeRecipes) {
- if(entry != null && entry.getOutput() != null && matches(output, toIItemStack(entry.getOutput()))) {
- recipes.add(entry);
- }
- }
-
- // Check if we found the recipes and apply the action
- if(!recipes.isEmpty()) {
- MineTweakerAPI.apply(new Remove(recipes));
- } else {
- LogHelper.logWarning(String.format("No %s Recipe found for %s. Command ignored!", ElvenTrade.name, output.toString()));
- }
- }
-
- private static class Remove extends BaseListRemoval {
- public Remove(List recipes) {
- super(ElvenTrade.name, BotaniaAPI.elvenTradeRecipes, recipes);
- }
-
- @Override
- public String getRecipeInfo(RecipeElvenTrade recipe) {
- return LogHelper.getStackDescription(recipe.getOutput());
- }
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/handlers/Lexicon.java b/src/main/java/modtweaker2/mods/botania/handlers/Lexicon.java
deleted file mode 100644
index b0b910e..0000000
--- a/src/main/java/modtweaker2/mods/botania/handlers/Lexicon.java
+++ /dev/null
@@ -1,472 +0,0 @@
-package modtweaker2.mods.botania.handlers;
-
-import static modtweaker2.helpers.InputHelper.toObject;
-import static modtweaker2.helpers.InputHelper.toObjects;
-import static modtweaker2.helpers.InputHelper.toStack;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import net.minecraft.item.ItemStack;
-import net.minecraft.init.Blocks;
-import minetweaker.MineTweakerAPI;
-import minetweaker.api.item.IIngredient;
-import minetweaker.api.item.IItemStack;
-import minetweaker.api.recipes.ShapedRecipe;
-import minetweaker.mc1710.recipes.RecipeConverter;
-import modtweaker2.mods.botania.BotaniaHelper;
-import modtweaker2.mods.botania.lexicon.AddCategory;
-import modtweaker2.mods.botania.lexicon.AddEntry;
-import modtweaker2.mods.botania.lexicon.AddPage;
-import modtweaker2.mods.botania.lexicon.AddRecipeMapping;
-import modtweaker2.mods.botania.lexicon.RemoveCategory;
-import modtweaker2.mods.botania.lexicon.RemoveEntry;
-import modtweaker2.mods.botania.lexicon.RemovePage;
-import modtweaker2.mods.botania.lexicon.RemoveRecipeMapping;
-import modtweaker2.mods.botania.lexicon.SetCategoryIcon;
-import modtweaker2.mods.botania.lexicon.SetCategoryPriority;
-import modtweaker2.mods.botania.lexicon.SetEntryKnowledgeType;
-import net.minecraft.entity.EntityList;
-import net.minecraft.item.crafting.IRecipe;
-import stanhebben.zenscript.annotations.ZenClass;
-import stanhebben.zenscript.annotations.ZenMethod;
-import vazkii.botania.api.BotaniaAPI;
-import vazkii.botania.api.lexicon.KnowledgeType;
-import vazkii.botania.api.lexicon.LexiconCategory;
-import vazkii.botania.api.lexicon.LexiconEntry;
-import vazkii.botania.api.lexicon.LexiconPage;
-import vazkii.botania.api.lexicon.LexiconRecipeMappings;
-import vazkii.botania.api.recipe.RecipeBrew;
-import vazkii.botania.api.recipe.RecipeElvenTrade;
-import vazkii.botania.api.recipe.RecipeManaInfusion;
-import vazkii.botania.api.recipe.RecipePetals;
-import vazkii.botania.api.recipe.RecipeRuneAltar;
-import vazkii.botania.common.lexicon.page.PageBrew;
-import vazkii.botania.common.lexicon.page.PageCraftingRecipe;
-import vazkii.botania.common.lexicon.page.PageElvenRecipe;
-import vazkii.botania.common.lexicon.page.PageEntity;
-import vazkii.botania.common.lexicon.page.PageImage;
-import vazkii.botania.common.lexicon.page.PageLoreText;
-import vazkii.botania.common.lexicon.page.PageManaInfusionRecipe;
-import vazkii.botania.common.lexicon.page.PagePetalRecipe;
-import vazkii.botania.common.lexicon.page.PageRuneRecipe;
-import vazkii.botania.common.lexicon.page.PageText;
-
-@ZenClass("mods.botania.Lexicon")
-public class Lexicon {
-
- @ZenMethod
- public static void addBrewPage(String name, String entry, int page_number, String brew, IIngredient[] recipe, String bottomText) {
- LexiconEntry lexiconEntry=BotaniaHelper.findEntry(entry);
- if(lexiconEntry==null)
- {
- MineTweakerAPI.getLogger().logError("Cannot find lexicon entry "+entry);
- return;
- }
- if(page_number>lexiconEntry.pages.size())
- {
- MineTweakerAPI.getLogger().logError("Page Number " + page_number + " out of bounds for "+entry);
- return;
- }
- if(BotaniaAPI.getBrewFromKey(brew)==null)
- {
- MineTweakerAPI.getLogger().logError("Cannot find brew "+brew);
- return;
- }
- RecipeBrew page_recipe=new RecipeBrew(BotaniaAPI.getBrewFromKey(brew),toObjects(recipe));
- LexiconPage page=new PageBrew(page_recipe,name,bottomText);
- MineTweakerAPI.apply(new AddPage(name,lexiconEntry,page,page_number));
- }
-
- @ZenMethod
- public static void addCraftingPage(String name, String entry, int page_number, IItemStack[] outputs, IIngredient[][][] inputs) {
- LexiconEntry lexiconEntry=BotaniaHelper.findEntry(entry);
- if(lexiconEntry==null)
- {
- MineTweakerAPI.getLogger().logError("Cannot find lexicon entry "+entry);
- return;
- }
- if(page_number>lexiconEntry.pages.size())
- {
- MineTweakerAPI.getLogger().logError("Page Number " + page_number + " out of bounds for "+entry);
- return;
- }
- if(outputs.length!=inputs.length)
- {
- MineTweakerAPI.getLogger().logError("Length of input and output must match");
- return;
- }
- List recipes=new ArrayList();
- for(int i=0;ilexiconEntry.pages.size())
- {
- MineTweakerAPI.getLogger().logError("Page Number " + page_number + " out of bounds for "+entry);
- return;
- }
- if(outputs.length!=inputs.length)
- {
- MineTweakerAPI.getLogger().logError("Length of input and output must match");
- return;
- }
- List recipes=new ArrayList();
- for(int i=0;ilexiconEntry.pages.size())
- {
- MineTweakerAPI.getLogger().logError("Page Number " + page_number + " out of bounds for "+entry);
- return;
- }
- if(!EntityList.stringToClassMapping.containsKey(entity))
- {
- MineTweakerAPI.getLogger().logError("No such entity "+entity);
- return;
- }
- LexiconPage page=new PageEntity(entity, entity, size);
- MineTweakerAPI.apply(new AddPage(name,lexiconEntry,page,page_number));
- }
-
- @ZenMethod
- public static void addImagePage(String name, String entry, int page_number, String resource) {
- LexiconEntry lexiconEntry=BotaniaHelper.findEntry(entry);
- if(lexiconEntry==null)
- {
- MineTweakerAPI.getLogger().logError("Cannot find lexicon entry "+entry);
- return;
- }
- if(page_number>lexiconEntry.pages.size())
- {
- MineTweakerAPI.getLogger().logError("Page Number " + page_number + " out of bounds for "+entry);
- return;
- }
- LexiconPage page=new PageImage(name, resource);
- MineTweakerAPI.apply(new AddPage(name,lexiconEntry,page,page_number));
- }
-
- @ZenMethod
- public static void addLorePage(String name, String entry, int page_number) {
- LexiconEntry lexiconEntry=BotaniaHelper.findEntry(entry);
- if(lexiconEntry==null)
- {
- MineTweakerAPI.getLogger().logError("Cannot find lexicon entry "+entry);
- return;
- }
- if(page_number>lexiconEntry.pages.size())
- {
- MineTweakerAPI.getLogger().logError("Page Number " + page_number + " out of bounds for "+entry);
- return;
- }
- LexiconPage page=new PageLoreText(name);
- MineTweakerAPI.apply(new AddPage(name,lexiconEntry,page,page_number));
- }
-
- @ZenMethod
- public static void addInfusionPage(String name, String entry, int page_number, IItemStack[] outputs, IIngredient[] inputs, int[] mana) {
- LexiconEntry lexiconEntry=BotaniaHelper.findEntry(entry);
- if(lexiconEntry==null)
- {
- MineTweakerAPI.getLogger().logError("Cannot find lexicon entry "+entry);
- return;
- }
- if(page_number>lexiconEntry.pages.size())
- {
- MineTweakerAPI.getLogger().logError("Page Number " + page_number + " out of bounds for "+entry);
- return;
- }
- if(outputs.length!=inputs.length || outputs.length!=mana.length)
- {
- MineTweakerAPI.getLogger().logError("Length of input and output must match");
- return;
- }
- List recipes=new ArrayList();
- for(int i=0;ilexiconEntry.pages.size())
- {
- MineTweakerAPI.getLogger().logError("Page Number " + page_number + " out of bounds for "+entry);
- return;
- }
- if(outputs.length!=inputs.length || outputs.length!=mana.length)
- {
- MineTweakerAPI.getLogger().logError("Length of input and output must match");
- return;
- }
- List recipes=new ArrayList();
- for(int i=0;ilexiconEntry.pages.size())
- {
- MineTweakerAPI.getLogger().logError("Page Number " + page_number + " out of bounds for "+entry);
- return;
- }
- if(outputs.length!=inputs.length || outputs.length!=mana.length)
- {
- MineTweakerAPI.getLogger().logError("Length of input and output must match");
- return;
- }
- List recipes=new ArrayList();
- for(int i=0;ilexiconEntry.pages.size())
- {
- MineTweakerAPI.getLogger().logError("Page Number " + page_number + " out of bounds for "+entry);
- return;
- }
- if(outputs.length!=inputs.length)
- {
- MineTweakerAPI.getLogger().logError("Length of input and output must match");
- return;
- }
- List recipes=new ArrayList();
- for(int i=0;ilexiconEntry.pages.size())
- {
- MineTweakerAPI.getLogger().logError("Page Number " + page_number + " out of bounds for "+entry);
- return;
- }
- if(outputs.length!=inputs.length || outputs.length!=mana.length)
- {
- MineTweakerAPI.getLogger().logError("Length of input and output must match");
- return;
- }
- List recipes=new ArrayList();
- for(int i=0;ilexiconEntry.pages.size())
- {
- MineTweakerAPI.getLogger().logError("Page Number " + page_number + " out of bounds for "+entry);
- return;
- }
- LexiconPage page=new PageText(name);
- MineTweakerAPI.apply(new AddPage(name,lexiconEntry,page,page_number));
- }
-
- @ZenMethod
- public static void removePage(String entry, int page_number) {
- LexiconEntry lexiconEntry=BotaniaHelper.findEntry(entry);
- if(lexiconEntry==null)
- {
- MineTweakerAPI.getLogger().logError("Cannot find lexicon entry "+entry);
- return;
- }
- if(page_number>=lexiconEntry.pages.size())
- {
- MineTweakerAPI.getLogger().logError("Page Number " + page_number + " out of bounds for "+entry);
- return;
- }
- MineTweakerAPI.apply(new RemovePage(lexiconEntry,page_number));
- }
-
- @ZenMethod
- public static void addEntry(String entry, String catagory, IItemStack stack) {
- LexiconCategory lexiconCategory=BotaniaHelper.findCatagory(catagory);
- if(lexiconCategory==null)
- {
- MineTweakerAPI.getLogger().logError("Cannot find lexicon category "+catagory);
- return;
- }
- LexiconEntry lexiconEntry=new LexiconEntry(entry,lexiconCategory);
- lexiconEntry.setIcon(toStack(stack));
- MineTweakerAPI.apply(new AddEntry(lexiconEntry));
- }
- @ZenMethod
- public static void removeEntry(String entry) {
- LexiconEntry lexiconEntry=BotaniaHelper.findEntry(entry);
- if(lexiconEntry==null)
- {
- MineTweakerAPI.getLogger().logError("Cannot find lexicon entry "+entry);
- return;
- }
- MineTweakerAPI.apply(new RemoveEntry(lexiconEntry));
- }
-
- @ZenMethod
- public static void setEntryKnowledgeType(String entry, String knowledgeType) {
- LexiconEntry lexiconEntry=BotaniaHelper.findEntry(entry);
- KnowledgeType type=BotaniaHelper.findKnowledgeType(knowledgeType);
- if(lexiconEntry==null)
- {
- MineTweakerAPI.getLogger().logError("Cannot find lexicon entry "+entry);
- return;
- }
- if(type==null)
- {
- MineTweakerAPI.getLogger().logError("Cannot find knowledge type "+knowledgeType);
- return;
- }
- MineTweakerAPI.apply(new SetEntryKnowledgeType(lexiconEntry,type));
- }
-
- @ZenMethod
- public static void addCategory(String name) {
- LexiconCategory lexiconCategory=new LexiconCategory(name);
- MineTweakerAPI.apply(new AddCategory(lexiconCategory));
- }
-
- @ZenMethod
- public static void removeCategory(String name) {
- LexiconCategory lexiconCategory=BotaniaHelper.findCatagory(name);
- if(lexiconCategory==null)
- {
- MineTweakerAPI.getLogger().logError("Cannot find lexicon category "+name);
- return;
- }
- MineTweakerAPI.apply(new RemoveCategory(lexiconCategory));
- }
-
- @ZenMethod
- public static void setCategoryPriority(String name, int priority) {
- LexiconCategory lexiconCategory=BotaniaHelper.findCatagory(name);
- if(lexiconCategory==null)
- {
- MineTweakerAPI.getLogger().logError("Cannot find lexicon category "+name);
- return;
- }
- MineTweakerAPI.apply(new SetCategoryPriority(lexiconCategory,priority));
- }
-
- @ZenMethod
- public static void setCategoryIcon(String name, String icon) {
- LexiconCategory lexiconCategory=BotaniaHelper.findCatagory(name);
- if(lexiconCategory==null)
- {
- MineTweakerAPI.getLogger().logError("Cannot find lexicon category "+name);
- return;
- }
- MineTweakerAPI.apply(new SetCategoryIcon(lexiconCategory,icon));
- }
-
- @ZenMethod
- public static void addRecipeMapping(IItemStack stack, String Entry, int page) {
- LexiconEntry lexiconEntry=BotaniaHelper.findEntry(Entry);
- if(LexiconRecipeMappings.getDataForStack(toStack(stack))!=null)
- {
- MineTweakerAPI.getLogger().logError("There is already a recipe mapping for "+stack);
- return;
- }
- if(lexiconEntry==null)
- {
- MineTweakerAPI.getLogger().logError("Cannot find lexicon entry "+Entry);
- return;
- }
- if(lexiconEntry.pages.size() {
- public Add(RecipeManaInfusion recipe) {
- super(ManaInfusion.name, BotaniaAPI.manaInfusionRecipes);
- recipes.add(recipe);
- }
-
- @Override
- public String getRecipeInfo(RecipeManaInfusion recipe) {
- return LogHelper.getStackDescription(recipe.getOutput());
- }
- }
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- @ZenMethod
- public static void removeRecipe(IIngredient output) {
- // Get list of existing recipes, matching with parameter
- List recipes = new LinkedList();
-
- for (RecipeManaInfusion r : BotaniaAPI.manaInfusionRecipes) {
- if (r.getOutput() != null && matches(output, toIItemStack(r.getOutput()))) {
- recipes.add(r);
- }
- }
-
- // Check if we found the recipes and apply the action
- if(!recipes.isEmpty()) {
- MineTweakerAPI.apply(new Remove(recipes));
- } else {
- LogHelper.logWarning(String.format("No %s Recipe found for %s. Command ignored!", ManaInfusion.name, output.toString()));
- }
- }
-
- private static class Remove extends BaseListRemoval {
- public Remove(List recipes) {
- super(ManaInfusion.name, BotaniaAPI.manaInfusionRecipes, recipes);
- }
-
- @Override
- public String getRecipeInfo(RecipeManaInfusion recipe) {
- return LogHelper.getStackDescription(recipe.getOutput());
- }
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/handlers/Orechid.java b/src/main/java/modtweaker2/mods/botania/handlers/Orechid.java
deleted file mode 100644
index fa83f86..0000000
--- a/src/main/java/modtweaker2/mods/botania/handlers/Orechid.java
+++ /dev/null
@@ -1,113 +0,0 @@
-package modtweaker2.mods.botania.handlers;
-
-import minetweaker.IUndoableAction;
-import minetweaker.MineTweakerAPI;
-import minetweaker.api.oredict.IOreDictEntry;
-import stanhebben.zenscript.annotations.ZenClass;
-import stanhebben.zenscript.annotations.ZenMethod;
-import vazkii.botania.api.BotaniaAPI;
-
-@ZenClass("mods.botania.Orechid")
-public class Orechid {
- @ZenMethod
- public static void addOre(IOreDictEntry oreDict, int weight) {
- MineTweakerAPI.apply(new Add(oreDict.getName(), weight));
- }
-
- @ZenMethod
- public static void addOre(String oreDict, int weight) {
- MineTweakerAPI.apply(new Add(oreDict, weight));
- }
-
- private static class Add implements IUndoableAction {
- String oreDict;
- int weight;
-
- public Add(String ore, int prop) {
- oreDict = ore;
- weight = prop;
- }
-
- @Override
- public void apply() {
- BotaniaAPI.addOreWeight(oreDict, weight);
- }
-
- @Override
- public String describe() {
- return "Adding Orechid Ore Weight: " + oreDict + ":" + weight;
- }
-
- @Override
- public boolean canUndo() {
- return oreDict != null;
- }
-
- @Override
- public void undo() {
- BotaniaAPI.oreWeights.remove(oreDict);
- }
-
- @Override
- public String describeUndo() {
- return "Removing Orechid Ore: " + oreDict;
- }
-
- @Override
- public String getOverrideKey() {
- return null;
- }
- }
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- @ZenMethod
- public static void removeOre(IOreDictEntry oreDict) {
- MineTweakerAPI.apply(new Remove(oreDict.getName()));
- }
-
- @ZenMethod
- public static void removeOre(String oreDict) {
- MineTweakerAPI.apply(new Remove(oreDict));
- }
-
- private static class Remove implements IUndoableAction {
- String oreDict;
- int weight;
-
- public Remove(String ore) {
- oreDict = ore;
- }
-
- @Override
- public void apply() {
- weight = BotaniaAPI.getOreWeight(oreDict);
- BotaniaAPI.oreWeights.remove(oreDict);
- }
-
- @Override
- public String describe() {
- return "Removing Orechid Ore: " + oreDict;
- }
-
- @Override
- public boolean canUndo() {
- return weight > 0;
- }
-
- @Override
- public void undo() {
- BotaniaAPI.addOreWeight(oreDict, weight);
- }
-
- @Override
- public String describeUndo() {
- return "Restoring Orechid Ore Weight: " + oreDict + ":" + weight;
- }
-
- @Override
- public String getOverrideKey() {
- return null;
- }
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/handlers/PureDaisy.java b/src/main/java/modtweaker2/mods/botania/handlers/PureDaisy.java
deleted file mode 100644
index 2c4fdd6..0000000
--- a/src/main/java/modtweaker2/mods/botania/handlers/PureDaisy.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package modtweaker2.mods.botania.handlers;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import minetweaker.MineTweakerAPI;
-import minetweaker.api.item.IIngredient;
-import minetweaker.api.item.IItemStack;
-import modtweaker2.helpers.InputHelper;
-import modtweaker2.helpers.LogHelper;
-import modtweaker2.helpers.StackHelper;
-import modtweaker2.utils.BaseListAddition;
-import modtweaker2.utils.BaseListRemoval;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-import stanhebben.zenscript.annotations.ZenClass;
-import stanhebben.zenscript.annotations.ZenMethod;
-import vazkii.botania.api.BotaniaAPI;
-import vazkii.botania.api.recipe.RecipePureDaisy;
-
-@ZenClass("mods.botania.PureDaisy")
-public class PureDaisy {
-
- public static final String name = "Botania PureDaisy";
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- @ZenMethod
- public static void addRecipe(IIngredient blockInput, IItemStack blockOutput) {
- if(blockInput == null || blockOutput == null) {
- LogHelper.logError(String.format("Required parameters missing for %s Recipe.", name));
- return;
- }
-
- Object input = InputHelper.toObject(blockInput);
-
- if(input == null || (input instanceof ItemStack && !InputHelper.isABlock((ItemStack)input))) {
- LogHelper.logError(String.format("Input must be a block or an oredict entry."));
- return;
- }
-
- if(input instanceof ItemStack) input = Block.getBlockFromItem(((ItemStack)input).getItem());
- ItemStack output = InputHelper.toStack(blockOutput);
-
- RecipePureDaisy recipe = new RecipePureDaisy(input, Block.getBlockFromItem(output.getItem()), output.getItemDamage());
-
- MineTweakerAPI.apply(new Add(recipe));
- }
-
- private static class Add extends BaseListAddition {
- public Add(RecipePureDaisy recipe) {
- super(PureDaisy.name, BotaniaAPI.pureDaisyRecipes);
- recipes.add(recipe);
- }
-
- @Override
- protected String getRecipeInfo(RecipePureDaisy recipe) {
- return LogHelper.getStackDescription(new ItemStack(recipe.getOutput(), 1, recipe.getOutputMeta()));
- }
- }
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- @ZenMethod
- public static void removeRecipe(IIngredient output) {
- List recipes = new LinkedList();
-
- for(RecipePureDaisy recipe : BotaniaAPI.pureDaisyRecipes) {
- IItemStack out = InputHelper.toIItemStack(new ItemStack(recipe.getOutput(), 1, recipe.getOutputMeta()));
-
- if(StackHelper.matches(output, out)) {
- recipes.add(recipe);
- }
- }
-
- if(!recipes.isEmpty()) {
- MineTweakerAPI.apply(new Remove(recipes));
- } else {
-
- }
- }
-
- private static class Remove extends BaseListRemoval {
- public Remove(List recipes) {
- super(PureDaisy.name, BotaniaAPI.pureDaisyRecipes, recipes);
- }
-
- @Override
- protected String getRecipeInfo(RecipePureDaisy recipe) {
- return LogHelper.getStackDescription(new ItemStack(recipe.getOutput(), 1, recipe.getOutputMeta()));
- }
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/handlers/RuneAltar.java b/src/main/java/modtweaker2/mods/botania/handlers/RuneAltar.java
deleted file mode 100644
index 51bf2eb..0000000
--- a/src/main/java/modtweaker2/mods/botania/handlers/RuneAltar.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package modtweaker2.mods.botania.handlers;
-
-import static modtweaker2.helpers.InputHelper.toIItemStack;
-import static modtweaker2.helpers.InputHelper.toObjects;
-import static modtweaker2.helpers.InputHelper.toStack;
-import static modtweaker2.helpers.StackHelper.matches;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import minetweaker.MineTweakerAPI;
-import minetweaker.api.item.IIngredient;
-import minetweaker.api.item.IItemStack;
-import modtweaker2.helpers.LogHelper;
-import modtweaker2.utils.BaseListAddition;
-import modtweaker2.utils.BaseListRemoval;
-import stanhebben.zenscript.annotations.ZenClass;
-import stanhebben.zenscript.annotations.ZenMethod;
-import vazkii.botania.api.BotaniaAPI;
-import vazkii.botania.api.recipe.RecipeRuneAltar;
-
-@ZenClass("mods.botania.RuneAltar")
-public class RuneAltar {
-
- protected static final String name = "Botania Rune Altar";
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- @ZenMethod
- public static void addRecipe(IItemStack output, IIngredient[] input, int mana) {
- MineTweakerAPI.apply(new Add(new RecipeRuneAltar(toStack(output), mana, toObjects(input))));
- }
-
- private static class Add extends BaseListAddition {
- public Add(RecipeRuneAltar recipe) {
- super(RuneAltar.name, BotaniaAPI.runeAltarRecipes);
-
- recipes.add(recipe);
- }
-
- @Override
- public String getRecipeInfo(RecipeRuneAltar recipe) {
- return LogHelper.getStackDescription(recipe.getOutput());
- }
- }
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- @ZenMethod
- public static void removeRecipe(IIngredient output) {
- // Get list of existing recipes, matching with parameter
- List recipes = new LinkedList();
-
- for (RecipeRuneAltar r : BotaniaAPI.runeAltarRecipes) {
- if (r != null && r.getOutput() != null && matches(output, toIItemStack(r.getOutput()))) {
- recipes.add(r);
- }
- }
-
- // Check if we found the recipes and apply the action
- if(!recipes.isEmpty()) {
- MineTweakerAPI.apply(new Remove(recipes));
- } else {
- LogHelper.logWarning(String.format("No %s Recipe found for %s. Command ignored!", ElvenTrade.name, output.toString()));
- }
- }
-
- private static class Remove extends BaseListRemoval {
- public Remove(List recipes) {
- super(RuneAltar.name, BotaniaAPI.runeAltarRecipes, recipes);
- }
-
- @Override
- public String getRecipeInfo(RecipeRuneAltar recipe) {
- return LogHelper.getStackDescription(recipe.getOutput());
- }
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/lexicon/AddCategory.java b/src/main/java/modtweaker2/mods/botania/lexicon/AddCategory.java
deleted file mode 100644
index 9747066..0000000
--- a/src/main/java/modtweaker2/mods/botania/lexicon/AddCategory.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package modtweaker2.mods.botania.lexicon;
-
-import minetweaker.IUndoableAction;
-import vazkii.botania.api.BotaniaAPI;
-import vazkii.botania.api.lexicon.LexiconCategory;
-
-public class AddCategory implements IUndoableAction {
-
- LexiconCategory category;
-
- public AddCategory(LexiconCategory category) {
- this.category=category;
- }
-
- @Override
- public void apply() {
- BotaniaAPI.addCategory(category);
- }
-
- @Override
- public boolean canUndo() {
- return category != null;
- }
-
- @Override
- public String describe() {
- return "Adding Lexicon Category: " + category.getUnlocalizedName();
- }
-
- @Override
- public String describeUndo() {
- return "Removing Lexicon Category: " + category.getUnlocalizedName();
- }
-
- @Override
- public void undo() {
- BotaniaAPI.getAllCategories().remove(category);
- }
-
- @Override
- public Object getOverrideKey() {
- return null;
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/lexicon/AddEntry.java b/src/main/java/modtweaker2/mods/botania/lexicon/AddEntry.java
deleted file mode 100644
index b3c4068..0000000
--- a/src/main/java/modtweaker2/mods/botania/lexicon/AddEntry.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package modtweaker2.mods.botania.lexicon;
-
-import minetweaker.IUndoableAction;
-import vazkii.botania.api.BotaniaAPI;
-import vazkii.botania.api.lexicon.LexiconEntry;
-
-public class AddEntry implements IUndoableAction {
-
- LexiconEntry Entry;
-
- public AddEntry(LexiconEntry Entry) {
- this.Entry=Entry;
- }
-
- @Override
- public void apply() {
- BotaniaAPI.addEntry(Entry, Entry.category);
- }
-
- @Override
- public boolean canUndo() {
- return Entry != null;
- }
-
- @Override
- public String describe() {
- return "Adding Lexicon Entry: " + Entry.getUnlocalizedName();
- }
-
- @Override
- public String describeUndo() {
- return "Removing Lexicon Entry: " + Entry.getUnlocalizedName();
- }
-
- @Override
- public void undo() {
- Entry.category.entries.remove(Entry);
- BotaniaAPI.getAllEntries().remove(Entry);
- }
-
- @Override
- public Object getOverrideKey() {
- return null;
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/lexicon/AddPage.java b/src/main/java/modtweaker2/mods/botania/lexicon/AddPage.java
deleted file mode 100644
index af5f0cf..0000000
--- a/src/main/java/modtweaker2/mods/botania/lexicon/AddPage.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package modtweaker2.mods.botania.lexicon;
-
-import minetweaker.IUndoableAction;
-import vazkii.botania.api.lexicon.LexiconEntry;
-import vazkii.botania.api.lexicon.LexiconPage;
-
-public class AddPage implements IUndoableAction {
-
- String Name;
- int page_number;
- LexiconEntry Entry;
- LexiconPage page;
-
- public AddPage(String Name, LexiconEntry Entry, LexiconPage page, int page_number) {
- this.Name=Name;
- this.Entry=Entry;
- this.page=page;
- this.page_number=page_number;
- }
-
- @Override
- public void apply() {
- Entry.pages.add(page_number, page);
- }
-
- @Override
- public boolean canUndo() {
- return Name != null && Entry != null && page != null;
- }
-
- @Override
- public String describe() {
- return "Adding Lexicon Page: " + Name;
- }
-
- @Override
- public String describeUndo() {
- return "Removing Lexicon Page: " + Name;
- }
-
- @Override
- public void undo() {
- Entry.pages.remove(page_number);
- }
-
- @Override
- public Object getOverrideKey() {
- return null;
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/lexicon/AddRecipeMapping.java b/src/main/java/modtweaker2/mods/botania/lexicon/AddRecipeMapping.java
deleted file mode 100644
index 90b3f67..0000000
--- a/src/main/java/modtweaker2/mods/botania/lexicon/AddRecipeMapping.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package modtweaker2.mods.botania.lexicon;
-
-import minetweaker.IUndoableAction;
-import net.minecraft.item.ItemStack;
-import vazkii.botania.api.lexicon.LexiconEntry;
-import vazkii.botania.api.lexicon.LexiconRecipeMappings;
-
-public class AddRecipeMapping implements IUndoableAction {
-
- ItemStack stack;
- LexiconEntry entry;
- int page;
-
- public AddRecipeMapping(ItemStack stack, LexiconEntry entry, int page) {
- this.stack =stack;
- this.entry=entry;
- this.page=page;
- }
-
- @Override
- public void apply() {
- LexiconRecipeMappings.map(stack, entry, page);
- }
-
- @Override
- public boolean canUndo() {
- return true;
- }
-
- @Override
- public String describe() {
- return "Adding Lexicon Recipe Lookup: " + stack.getUnlocalizedName();
- }
-
- @Override
- public String describeUndo() {
- return "Removing Lexicon Recipe Lookup: " + stack.getUnlocalizedName();
- }
-
- @Override
- public void undo() {
- LexiconRecipeMappings.remove(stack);
- }
-
- @Override
- public Object getOverrideKey() {
- return null;
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/lexicon/RemoveCategory.java b/src/main/java/modtweaker2/mods/botania/lexicon/RemoveCategory.java
deleted file mode 100644
index edbea43..0000000
--- a/src/main/java/modtweaker2/mods/botania/lexicon/RemoveCategory.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package modtweaker2.mods.botania.lexicon;
-
-import minetweaker.IUndoableAction;
-import vazkii.botania.api.BotaniaAPI;
-import vazkii.botania.api.lexicon.LexiconCategory;
-
-public class RemoveCategory implements IUndoableAction {
-
- LexiconCategory category;
-
- public RemoveCategory(LexiconCategory category) {
- this.category=category;
- }
-
- @Override
- public void apply() {
- BotaniaAPI.getAllCategories().remove(category);
- }
-
- @Override
- public boolean canUndo() {
- return category != null;
- }
-
- @Override
- public String describe() {
- return "Removing Lexicon Category: " + category.getUnlocalizedName();
- }
-
- @Override
- public String describeUndo() {
- return "Adding Lexicon Category: " + category.getUnlocalizedName();
- }
-
- @Override
- public void undo() {
- BotaniaAPI.addCategory(category);
- }
-
- @Override
- public Object getOverrideKey() {
- return null;
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/lexicon/RemoveEntry.java b/src/main/java/modtweaker2/mods/botania/lexicon/RemoveEntry.java
deleted file mode 100644
index 4c6cf13..0000000
--- a/src/main/java/modtweaker2/mods/botania/lexicon/RemoveEntry.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package modtweaker2.mods.botania.lexicon;
-
-import minetweaker.IUndoableAction;
-import vazkii.botania.api.BotaniaAPI;
-import vazkii.botania.api.lexicon.LexiconEntry;
-
-public class RemoveEntry implements IUndoableAction {
-
- LexiconEntry Entry;
-
- public RemoveEntry(LexiconEntry Entry) {
- this.Entry=Entry;
- }
-
- @Override
- public void apply() {
- Entry.category.entries.remove(Entry);
- BotaniaAPI.getAllEntries().remove(Entry);
- }
-
- @Override
- public boolean canUndo() {
- return Entry != null;
- }
-
- @Override
- public String describe() {
- return "Removing Lexicon Entry: " + Entry.getUnlocalizedName();
- }
-
- @Override
- public String describeUndo() {
- return "Adding Lexicon Entry: " + Entry.getUnlocalizedName();
- }
-
- @Override
- public void undo() {
- BotaniaAPI.addEntry(Entry, Entry.category);
- }
-
- @Override
- public Object getOverrideKey() {
- return null;
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/lexicon/RemovePage.java b/src/main/java/modtweaker2/mods/botania/lexicon/RemovePage.java
deleted file mode 100644
index a971984..0000000
--- a/src/main/java/modtweaker2/mods/botania/lexicon/RemovePage.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package modtweaker2.mods.botania.lexicon;
-
-import minetweaker.IUndoableAction;
-import vazkii.botania.api.lexicon.LexiconEntry;
-import vazkii.botania.api.lexicon.LexiconPage;
-
-public class RemovePage implements IUndoableAction {
-
- int page_number;
- LexiconEntry Entry;
- LexiconPage page;
-
- public RemovePage(LexiconEntry Entry, int page_number) {
- this.Entry=Entry;
- this.page_number=page_number;
- }
-
- @Override
- public void apply() {
- this.page=Entry.pages.get(page_number);
- Entry.pages.remove(page);
- }
-
- @Override
- public boolean canUndo() {
- return Entry != null && page != null;
- }
-
- @Override
- public String describe() {
- return "Removing Lexicon Page: " + Entry.pages.get(page_number).getUnlocalizedName();
- }
-
- @Override
- public String describeUndo() {
- return "Adding Lexicon Page: " + page.getUnlocalizedName();
- }
-
- @Override
- public void undo() {
- Entry.pages.add(page_number,page);
- }
-
- @Override
- public Object getOverrideKey() {
- return null;
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/lexicon/RemoveRecipeMapping.java b/src/main/java/modtweaker2/mods/botania/lexicon/RemoveRecipeMapping.java
deleted file mode 100644
index e1b7e2a..0000000
--- a/src/main/java/modtweaker2/mods/botania/lexicon/RemoveRecipeMapping.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package modtweaker2.mods.botania.lexicon;
-
-import minetweaker.IUndoableAction;
-import net.minecraft.item.ItemStack;
-import vazkii.botania.api.lexicon.LexiconEntry;
-import vazkii.botania.api.lexicon.LexiconRecipeMappings;
-import vazkii.botania.api.lexicon.LexiconRecipeMappings.EntryData;
-
-public class RemoveRecipeMapping implements IUndoableAction {
-
- ItemStack stack;
- LexiconEntry entry;
- int page;
-
- public RemoveRecipeMapping(ItemStack stack) {
- this.stack =stack;
- }
-
- @Override
- public void apply() {
- EntryData data=LexiconRecipeMappings.getDataForStack(stack);
- this.entry=data.entry;
- this.page=data.page;
- LexiconRecipeMappings.remove(stack);
- }
-
- @Override
- public boolean canUndo() {
- return true;
- }
-
- @Override
- public String describe() {
- return "Removing Lexicon Recipe Lookup: " + stack.getUnlocalizedName();
- }
-
- @Override
- public String describeUndo() {
- return "Adding Lexicon Recipe Lookup: " + stack.getUnlocalizedName();
- }
-
- @Override
- public void undo() {
- LexiconRecipeMappings.map(stack,entry,page);
- }
-
- @Override
- public Object getOverrideKey() {
- return null;
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/lexicon/SetCategoryIcon.java b/src/main/java/modtweaker2/mods/botania/lexicon/SetCategoryIcon.java
deleted file mode 100644
index 491d1af..0000000
--- a/src/main/java/modtweaker2/mods/botania/lexicon/SetCategoryIcon.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package modtweaker2.mods.botania.lexicon;
-
-import minetweaker.IUndoableAction;
-import net.minecraft.util.ResourceLocation;
-import vazkii.botania.api.lexicon.LexiconCategory;
-
-public class SetCategoryIcon implements IUndoableAction {
-
- LexiconCategory category;
- ResourceLocation oldIcon;
- ResourceLocation newIcon;
-
- public SetCategoryIcon(LexiconCategory category, String icon) {
- this.category=category;
- this.newIcon=new ResourceLocation(icon);
- }
-
- @Override
- public void apply() {
- oldIcon=category.getIcon();
- category.setIcon(newIcon);
- }
-
- @Override
- public boolean canUndo() {
- return category != null;
- }
-
- @Override
- public String describe() {
- return "Setting Lexicon Category priority: " + category.getUnlocalizedName();
- }
-
- @Override
- public String describeUndo() {
- return "Unsetting Lexicon Category priority: " + category.getUnlocalizedName();
- }
-
- @Override
- public void undo() {
- category.setIcon(oldIcon);
- }
-
- @Override
- public Object getOverrideKey() {
- return null;
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/lexicon/SetCategoryPriority.java b/src/main/java/modtweaker2/mods/botania/lexicon/SetCategoryPriority.java
deleted file mode 100644
index 2c049c3..0000000
--- a/src/main/java/modtweaker2/mods/botania/lexicon/SetCategoryPriority.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package modtweaker2.mods.botania.lexicon;
-
-import minetweaker.IUndoableAction;
-import vazkii.botania.api.lexicon.LexiconCategory;
-
-public class SetCategoryPriority implements IUndoableAction {
-
- LexiconCategory category;
- int oldPriority;
- int newPriority;
-
- public SetCategoryPriority(LexiconCategory category, int priority) {
- this.category=category;
- this.newPriority=priority;
- }
-
- @Override
- public void apply() {
- oldPriority=category.getSortingPriority();
- category.setPriority(newPriority);
- }
-
- @Override
- public boolean canUndo() {
- return category != null;
- }
-
- @Override
- public String describe() {
- return "Setting Lexicon Category priority: " + category.getUnlocalizedName();
- }
-
- @Override
- public String describeUndo() {
- return "Unsetting Lexicon Category priority: " + category.getUnlocalizedName();
- }
-
- @Override
- public void undo() {
- category.setPriority(oldPriority);
- }
-
- @Override
- public Object getOverrideKey() {
- return null;
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/lexicon/SetEntryKnowledgeType.java b/src/main/java/modtweaker2/mods/botania/lexicon/SetEntryKnowledgeType.java
deleted file mode 100644
index aa438c5..0000000
--- a/src/main/java/modtweaker2/mods/botania/lexicon/SetEntryKnowledgeType.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package modtweaker2.mods.botania.lexicon;
-
-import minetweaker.IUndoableAction;
-import vazkii.botania.api.lexicon.KnowledgeType;
-import vazkii.botania.api.lexicon.LexiconEntry;
-
-public class SetEntryKnowledgeType implements IUndoableAction {
-
- LexiconEntry Entry;
- KnowledgeType newType;
- KnowledgeType oldType;
-
- public SetEntryKnowledgeType(LexiconEntry Entry, KnowledgeType type) {
- this.Entry=Entry;
- this.newType=type;
- }
-
- @Override
- public void apply() {
- oldType=Entry.getKnowledgeType();
- Entry.setKnowledgeType(newType);
- }
-
- @Override
- public boolean canUndo() {
- return Entry != null && oldType != null;
- }
-
- @Override
- public String describe() {
- return "Setting Knowledge type for: " + Entry.getUnlocalizedName();
- }
-
- @Override
- public String describeUndo() {
- return "Unsetting Knowledge type for: " + Entry.getUnlocalizedName();
- }
-
- @Override
- public void undo() {
- Entry.setKnowledgeType(oldType);
- }
-
- @Override
- public Object getOverrideKey() {
- return null;
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/lexicon/commands/LexiconCategoryLogger.java b/src/main/java/modtweaker2/mods/botania/lexicon/commands/LexiconCategoryLogger.java
deleted file mode 100644
index 64a502d..0000000
--- a/src/main/java/modtweaker2/mods/botania/lexicon/commands/LexiconCategoryLogger.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package modtweaker2.mods.botania.lexicon.commands;
-
-import java.util.List;
-
-import minetweaker.MineTweakerAPI;
-import minetweaker.MineTweakerImplementationAPI;
-import minetweaker.api.player.IPlayer;
-import minetweaker.api.server.ICommandFunction;
-import vazkii.botania.api.BotaniaAPI;
-import vazkii.botania.api.lexicon.LexiconCategory;
-
-public class LexiconCategoryLogger implements ICommandFunction{
-
- @Override
- public void execute(String[] arguments, IPlayer player) {
- List categories=BotaniaAPI.getAllCategories();
- System.out.println("Categories: " + categories.size());
- for (LexiconCategory category : categories) {
- System.out.println("Category " + category.getUnlocalizedName());
- MineTweakerAPI.logCommand(category.getUnlocalizedName());
- }
-
- if (player != null) {
- player.sendChat(MineTweakerImplementationAPI.platform.getMessage("List generated; see minetweaker.log in your minecraft dir"));
- }
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/lexicon/commands/LexiconEntryLogger.java b/src/main/java/modtweaker2/mods/botania/lexicon/commands/LexiconEntryLogger.java
deleted file mode 100644
index 4eb4534..0000000
--- a/src/main/java/modtweaker2/mods/botania/lexicon/commands/LexiconEntryLogger.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package modtweaker2.mods.botania.lexicon.commands;
-
-import java.util.List;
-
-import minetweaker.MineTweakerAPI;
-import minetweaker.MineTweakerImplementationAPI;
-import minetweaker.api.player.IPlayer;
-import minetweaker.api.server.ICommandFunction;
-import modtweaker2.mods.botania.BotaniaHelper;
-import vazkii.botania.api.BotaniaAPI;
-import vazkii.botania.api.lexicon.LexiconCategory;
-import vazkii.botania.api.lexicon.LexiconEntry;
-
-public class LexiconEntryLogger implements ICommandFunction{
-
- @Override
- public void execute(String[] arguments, IPlayer player) {
- LexiconCategory category=null;
- if(arguments.length>0)
- {
- category=BotaniaHelper.findCatagory(arguments[0]);
- if(category==null)
- {
- MineTweakerAPI.getLogger().logError("Category not found (" + arguments[0]+")");
- return;
- }
- }
- List entries=BotaniaAPI.getAllEntries();
- System.out.println("Entries: " + entries.size());
- for (LexiconEntry entry : entries) {
- if(category==null || entry.category==category)
- {
- System.out.println("Entry " + entry.getUnlocalizedName());
- MineTweakerAPI.logCommand(entry.getUnlocalizedName());
- }
- }
-
- if (player != null) {
- player.sendChat(MineTweakerImplementationAPI.platform.getMessage("List generated; see minetweaker.log in your minecraft dir"));
- }
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/lexicon/commands/LexiconKnowledgeTypesLogger.java b/src/main/java/modtweaker2/mods/botania/lexicon/commands/LexiconKnowledgeTypesLogger.java
deleted file mode 100644
index 60b67c0..0000000
--- a/src/main/java/modtweaker2/mods/botania/lexicon/commands/LexiconKnowledgeTypesLogger.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package modtweaker2.mods.botania.lexicon.commands;
-
-import java.util.Set;
-
-import minetweaker.MineTweakerAPI;
-import minetweaker.MineTweakerImplementationAPI;
-import minetweaker.api.player.IPlayer;
-import minetweaker.api.server.ICommandFunction;
-import vazkii.botania.api.BotaniaAPI;
-
-public class LexiconKnowledgeTypesLogger implements ICommandFunction{
-
- @Override
- public void execute(String[] arguments, IPlayer player) {
- Set types=BotaniaAPI.knowledgeTypes.keySet();
- System.out.println("Knowledge Types: " + types.size());
- for (String key : types) {
- System.out.println("Knowledge Type " + key);
- MineTweakerAPI.logCommand(key);
- }
-
- if (player != null) {
- player.sendChat(MineTweakerImplementationAPI.platform.getMessage("List generated; see minetweaker.log in your minecraft dir"));
- }
- }
-}
diff --git a/src/main/java/modtweaker2/mods/botania/lexicon/commands/LexiconPageLogger.java b/src/main/java/modtweaker2/mods/botania/lexicon/commands/LexiconPageLogger.java
deleted file mode 100644
index 870ca9a..0000000
--- a/src/main/java/modtweaker2/mods/botania/lexicon/commands/LexiconPageLogger.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package modtweaker2.mods.botania.lexicon.commands;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import minetweaker.MineTweakerAPI;
-import minetweaker.MineTweakerImplementationAPI;
-import minetweaker.api.player.IPlayer;
-import minetweaker.api.server.ICommandFunction;
-import modtweaker2.mods.botania.BotaniaHelper;
-import vazkii.botania.api.BotaniaAPI;
-import vazkii.botania.api.lexicon.LexiconEntry;
-import vazkii.botania.api.lexicon.LexiconPage;
-
-public class LexiconPageLogger implements ICommandFunction{
-
- @Override
- public void execute(String[] arguments, IPlayer player) {
- LexiconEntry entry=null;
- if(arguments.length>0)
- {
- entry=BotaniaHelper.findEntry(arguments[0]);
- if(entry==null)
- {
- MineTweakerAPI.getLogger().logError("Entry not found (" + arguments[0]+")");
- return;
- }
- }
- List entries;
- List pages=new ArrayList();
- if(entry!=null)
- pages.addAll(entry.pages);
- else
- for (LexiconEntry current_Entry : BotaniaAPI.getAllEntries())
- pages.addAll(current_Entry.pages);
- System.out.println("Pages: " + pages.size());
-
- for (LexiconPage page : pages) {
- System.out.println("Page " + page.getUnlocalizedName() + " (" + page.getClass() + ")");
- MineTweakerAPI.logCommand(page.getUnlocalizedName() + " (" + page.getClass() + ")");
- }
-
- if (player != null) {
- player.sendChat(MineTweakerImplementationAPI.platform.getMessage("List generated; see minetweaker.log in your minecraft dir"));
- }
- }
-}
diff --git a/src/main/java/modtweaker2/mods/chisel/Chisel.java b/src/main/java/modtweaker2/mods/chisel/Chisel.java
deleted file mode 100644
index e113be5..0000000
--- a/src/main/java/modtweaker2/mods/chisel/Chisel.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package modtweaker2.mods.chisel;
-
-import minetweaker.MineTweakerAPI;
-import modtweaker2.mods.chisel.handlers.Groups;
-
-public class Chisel {
- public Chisel() {
- MineTweakerAPI.registerClass(Groups.class);
- }
-
-}
diff --git a/src/main/java/modtweaker2/mods/chisel/ChiselHelper.java b/src/main/java/modtweaker2/mods/chisel/ChiselHelper.java
deleted file mode 100644
index 90215c4..0000000
--- a/src/main/java/modtweaker2/mods/chisel/ChiselHelper.java
+++ /dev/null
@@ -1,158 +0,0 @@
-package modtweaker2.mods.chisel;
-
-import static modtweaker2.helpers.InputHelper.toStack;
-
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import minetweaker.api.item.IItemStack;
-import net.minecraft.block.Block;
-
-import com.cricketcraft.chisel.api.carving.CarvingUtils;
-import com.cricketcraft.chisel.api.carving.ICarvingGroup;
-import com.cricketcraft.chisel.api.carving.ICarvingVariation;
-import com.google.common.collect.Lists;
-
-public class ChiselHelper {
-
- public static ICarvingGroup getGroup(String name)
- {
- return CarvingUtils.getChiselRegistry().getGroup(name);
- }
-
- public static ICarvingGroup getGroup(IItemStack stack)
- {
- return CarvingUtils.getChiselRegistry().getGroup(Block.getBlockFromItem(toStack(stack).getItem()), stack.getDamage());
- }
-
- public static ICarvingVariation getVariation(IItemStack stack)
- {
- ICarvingGroup g = getGroup(stack);
- if (g != null) {
- for (ICarvingVariation v : g.getVariations()) {
- if (v.getBlock() == Block.getBlockFromItem(toStack(stack).getItem()) && v.getBlockMeta() == stack.getDamage()) {
- return v;
- }
- }
- }
- return null;
- }
-
- public static ICarvingVariation makeVariation(IItemStack stack)
- {
- return new CarvingVariation(Block.getBlockFromItem(toStack(stack).getItem()), stack.getDamage());
- }
-
- public static ICarvingGroup makeGroup(String name)
- {
- return new CarvingGroup(name);
- }
-
- public static boolean groupContainsVariation(ICarvingGroup group, ICarvingVariation variation)
- {
- for(ICarvingVariation otherVariation : group.getVariations())
- {
- if(otherVariation.getBlock()==variation.getBlock() && otherVariation.getBlockMeta()==variation.getBlockMeta())
- return true;
- }
- return false;
- }
-
- static class CarvingVariation implements ICarvingVariation
- {
- Block block;
- int meta;
-
- public CarvingVariation(Block block, int meta)
- {
- this.block=block;
- this.meta=meta;
- }
-
- @Override
- public Block getBlock() {
- return block;
- }
-
- @Override
- public int getBlockMeta() {
- return meta;
- }
-
- @Override
- public int getItemMeta() {
- return meta;
- }
-
- @Override
- public int getOrder() {
- return 99;
- }
- }
-
- static class CarvingGroup implements ICarvingGroup
- {
- private String name;
- private String sound;
- private String oreName;
-
- private List variations = Lists.newArrayList();
-
- public CarvingGroup(String name) {
- this.name = name;
- }
-
- public List getVariations() {
- return Lists.newArrayList(variations);
- }
-
- @Override
- public void addVariation(ICarvingVariation variation) {
- variations.add(variation);
- Collections.sort(variations, new Comparator() {
-
- @Override
- public int compare(ICarvingVariation o1, ICarvingVariation o2) {
- return CarvingUtils.compare(o1, o2);
- }
- });
- }
-
- @Override
- public boolean removeVariation(ICarvingVariation variation) {
- ICarvingVariation toRemove = null;
- for (ICarvingVariation v : variations) {
- if (v.getBlock() == variation.getBlock() && v.getBlockMeta() == variation.getBlockMeta()) {
- toRemove = v;
- }
- }
- return toRemove == null ? false : variations.remove(toRemove);
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public String getSound() {
- return sound;
- }
-
- @Override
- public void setSound(String sound) {
- this.sound = sound;
- }
-
- @Override
- public String getOreName() {
- return oreName;
- }
-
- @Override
- public void setOreName(String oreName) {
- this.oreName = oreName;
- }
- }
-}
diff --git a/src/main/java/modtweaker2/mods/chisel/commands/ChiselGroupLogger.java b/src/main/java/modtweaker2/mods/chisel/commands/ChiselGroupLogger.java
deleted file mode 100644
index 55dd684..0000000
--- a/src/main/java/modtweaker2/mods/chisel/commands/ChiselGroupLogger.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package modtweaker2.mods.chisel.commands;
-
-import java.util.List;
-
-import minetweaker.MineTweakerAPI;
-import minetweaker.MineTweakerImplementationAPI;
-import minetweaker.api.player.IPlayer;
-import minetweaker.api.server.ICommandFunction;
-
-import com.cricketcraft.chisel.api.carving.CarvingUtils;
-
-public class ChiselGroupLogger implements ICommandFunction{
-
- @Override
- public void execute(String[] arguments, IPlayer player) {
- List keys=CarvingUtils.getChiselRegistry().getSortedGroupNames();
- System.out.println("Chisel Groups: " + keys.size());
- for (String key : keys) {
- System.out.println("Chisel Group " + key);
- MineTweakerAPI.logCommand(key);
- }
-
- if (player != null) {
- player.sendChat(MineTweakerImplementationAPI.platform.getMessage("List generated; see minetweaker.log in your minecraft dir"));
- }
- }
-}
diff --git a/src/main/java/modtweaker2/mods/chisel/commands/ChiselVariationLogger.java b/src/main/java/modtweaker2/mods/chisel/commands/ChiselVariationLogger.java
deleted file mode 100644
index 61817eb..0000000
--- a/src/main/java/modtweaker2/mods/chisel/commands/ChiselVariationLogger.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package modtweaker2.mods.chisel.commands;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import minetweaker.MineTweakerAPI;
-import minetweaker.MineTweakerImplementationAPI;
-import minetweaker.api.player.IPlayer;
-import minetweaker.api.server.ICommandFunction;
-import modtweaker2.mods.chisel.ChiselHelper;
-import net.minecraft.item.Item;
-
-import com.cricketcraft.chisel.api.carving.CarvingUtils;
-import com.cricketcraft.chisel.api.carving.ICarvingGroup;
-import com.cricketcraft.chisel.api.carving.ICarvingVariation;
-
-public class ChiselVariationLogger implements ICommandFunction{
-
- @Override
- public void execute(String[] arguments, IPlayer player) {
- Map variations=new HashMap();
- List keys=CarvingUtils.getChiselRegistry().getSortedGroupNames();
- if(arguments.length>0)
- {
- ICarvingGroup group=ChiselHelper.getGroup(arguments[0]);
- if(group==null)
- {
- MineTweakerAPI.getLogger().logError("Group not found (" + arguments[0]+")");
- return;
- }
- else
- {
- keys.clear();
- keys.add(arguments[0]);
- }
- }
- for (String key : keys) {
- ICarvingGroup group=CarvingUtils.getChiselRegistry().getGroup(key);
- for(ICarvingVariation variation : group.getVariations())
- variations.put(variation, group);
- }
- System.out.println("Chisel Variations: " + variations.size());
- for (Entry entry: variations.entrySet()) {
- String stringedVariation="<"+Item.itemRegistry.getNameForObject(Item.getItemFromBlock(entry.getKey().getBlock()))+":"+entry.getKey().getBlockMeta()+">";
- if(arguments.length==0)
- stringedVariation+=" "+entry.getValue().getName();
- System.out.println("Chisel Variation " + stringedVariation);
- MineTweakerAPI.logCommand(stringedVariation);
- }
-
- if (player != null) {
- player.sendChat(MineTweakerImplementationAPI.platform.getMessage("List generated; see minetweaker.log in your minecraft dir"));
- }
- }
-}
diff --git a/src/main/java/modtweaker2/mods/chisel/handlers/Groups.java b/src/main/java/modtweaker2/mods/chisel/handlers/Groups.java
deleted file mode 100644
index e59eb5c..0000000
--- a/src/main/java/modtweaker2/mods/chisel/handlers/Groups.java
+++ /dev/null
@@ -1,233 +0,0 @@
-package modtweaker2.mods.chisel.handlers;
-
-import minetweaker.IUndoableAction;
-import minetweaker.MineTweakerAPI;
-import minetweaker.api.item.IItemStack;
-import modtweaker2.mods.chisel.ChiselHelper;
-import stanhebben.zenscript.annotations.ZenClass;
-import stanhebben.zenscript.annotations.ZenMethod;
-
-import com.cricketcraft.chisel.api.carving.CarvingUtils;
-import com.cricketcraft.chisel.api.carving.ICarvingGroup;
-import com.cricketcraft.chisel.api.carving.ICarvingVariation;
-
-@ZenClass("mods.chisel.Groups")
-public class Groups {
- @ZenMethod
- public static void addVariation(String groupName, IItemStack stack) {
- ICarvingGroup group=ChiselHelper.getGroup(groupName);
- ICarvingVariation variation=ChiselHelper.makeVariation(stack);
- if(group==null)
- {
- MineTweakerAPI.getLogger().logError("Cannot find group " + groupName);
- return;
- }
- if(variation==null)
- {
- MineTweakerAPI.getLogger().logError("Can't create variation from " + stack);
- return;
- }
- MineTweakerAPI.apply(new AddVariation(group,variation, stack.toString()));
- }
-
- static class AddVariation implements IUndoableAction {
-
- ICarvingGroup group;
- ICarvingVariation variation;
- String variationName;
-
- public AddVariation(ICarvingGroup group,ICarvingVariation variation, String variationName) {
- this.group=group;
- this.variation=variation;
- this.variationName=variationName;
- }
-
- @Override
- public void apply() {
- CarvingUtils.getChiselRegistry().addVariation(group.getName(),variation);
- }
-
- @Override
- public boolean canUndo() {
- return group != null && variation != null;
- }
-
- @Override
- public String describe() {
- return "Adding Variation: " + variationName;
- }
-
- @Override
- public String describeUndo() {
- return "Removing Variation: " + variationName;
- }
-
- @Override
- public void undo() {
- CarvingUtils.getChiselRegistry().removeVariation(variation.getBlock(),variation.getBlockMeta());
- }
-
- @Override
- public Object getOverrideKey() {
- return null;
- }
- }
-
-
- @ZenMethod
- public static void removeVariation(IItemStack stack) {
- ICarvingVariation variation=ChiselHelper.getVariation(stack);
- if(variation==null)
- {
- MineTweakerAPI.getLogger().logError("Can't find variation from " + stack);
- return;
- }
- MineTweakerAPI.apply(new RemoveVariation(variation, stack.toString()));
- }
-
-
- static class RemoveVariation implements IUndoableAction {
-
- ICarvingVariation variation;
- String variationName;
- ICarvingGroup group;
-
- public RemoveVariation(ICarvingVariation variation, String variationName) {
- this.variation=variation;
- this.variationName=variationName;
- }
-
- @Override
- public void apply() {
- group=CarvingUtils.getChiselRegistry().getGroup(variation.getBlock(),variation.getBlockMeta());
- CarvingUtils.getChiselRegistry().removeVariation(variation.getBlock(),variation.getBlockMeta());
- }
-
- @Override
- public boolean canUndo() {
- return group!= null && variation != null;
- }
-
- @Override
- public String describe() {
- return "Removing Variation: " + variationName;
- }
-
- @Override
- public String describeUndo() {
- return "Adding Variation: " + variationName;
- }
-
- @Override
- public void undo() {
- CarvingUtils.getChiselRegistry().addVariation(group.getName(),variation);
- }
-
- @Override
- public Object getOverrideKey() {
- return null;
- }
- }
-
- @ZenMethod
- public static void addGroup(String groupName) {
- ICarvingGroup group=ChiselHelper.getGroup(groupName);
- if(group!=null)
- {
- MineTweakerAPI.getLogger().logError("Group already exists " + groupName);
- return;
- }
- group=ChiselHelper.makeGroup(groupName);
- MineTweakerAPI.apply(new AddGroup(group));
- }
-
- static class AddGroup implements IUndoableAction {
-
- ICarvingGroup group;
-
- public AddGroup(ICarvingGroup group) {
- this.group=group;
- }
-
- @Override
- public void apply() {
- CarvingUtils.getChiselRegistry().addGroup(group);
- }
-
- @Override
- public boolean canUndo() {
- return group != null;
- }
-
- @Override
- public String describe() {
- return "Adding Group: " + group.getName();
- }
-
- @Override
- public String describeUndo() {
- return "Removing Group: " + group.getName();
- }
-
- @Override
- public void undo() {
- CarvingUtils.getChiselRegistry().removeGroup(group.getName());
- }
-
- @Override
- public Object getOverrideKey() {
- return null;
- }
- }
-
- @ZenMethod
- public static void removeGroup(String groupName) {
- ICarvingGroup group=ChiselHelper.getGroup(groupName);
- if(group==null)
- {
- MineTweakerAPI.getLogger().logError("Could not find group " + groupName);
- return;
- }
- MineTweakerAPI.apply(new RemoveGroup(group));
- }
-
- static class RemoveGroup implements IUndoableAction {
-
- ICarvingGroup group;
-
- public RemoveGroup(ICarvingGroup group) {
- this.group=group;
- }
-
- @Override
- public void apply() {
- CarvingUtils.getChiselRegistry().removeGroup(group.getName());
- }
-
- @Override
- public boolean canUndo() {
- return group != null;
- }
-
- @Override
- public String describe() {
- return "Removing Group: " + group.getName();
- }
-
- @Override
- public String describeUndo() {
- return "Adding Group: " + group.getName();
- }
-
- @Override
- public void undo() {
- CarvingUtils.getChiselRegistry().addGroup(group);
- }
-
- @Override
- public Object getOverrideKey() {
- return null;
- }
- }
-
-}
diff --git a/src/main/java/modtweaker2/mods/exnihilo/ExNihilo.java b/src/main/java/modtweaker2/mods/exnihilo/ExNihilo.java
deleted file mode 100644
index 62991ed..0000000
--- a/src/main/java/modtweaker2/mods/exnihilo/ExNihilo.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package modtweaker2.mods.exnihilo;
-
-import minetweaker.MineTweakerAPI;
-import modtweaker2.mods.exnihilo.handlers.Compost;
-import modtweaker2.mods.exnihilo.handlers.Crucible;
-import modtweaker2.mods.exnihilo.handlers.Hammer;
-import modtweaker2.mods.exnihilo.handlers.Sieve;
-
-public class ExNihilo {
- public ExNihilo() {
- MineTweakerAPI.registerClass(Compost.class);
- MineTweakerAPI.registerClass(Crucible.class);
- MineTweakerAPI.registerClass(Hammer.class);
- MineTweakerAPI.registerClass(Sieve.class);
- }
-}
diff --git a/src/main/java/modtweaker2/mods/exnihilo/ExNihiloHelper.java b/src/main/java/modtweaker2/mods/exnihilo/ExNihiloHelper.java
deleted file mode 100644
index d4eca5b..0000000
--- a/src/main/java/modtweaker2/mods/exnihilo/ExNihiloHelper.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package modtweaker2.mods.exnihilo;
-
-import java.util.Map;
-
-import modtweaker2.helpers.ReflectionHelper;
-import exnihilo.registries.HeatRegistry;
-import exnihilo.utils.ItemInfo;
-
-public class ExNihiloHelper {
- public static Map getHeatMap() {
- return ReflectionHelper.