commit
e237301cbe
BIN
libs/Galacticraft-Planets-Dev-BETA-1.7-3.0.1.8.jar
Normal file
BIN
libs/Galacticraft-Planets-Dev-BETA-1.7-3.0.1.8.jar
Normal file
Binary file not shown.
BIN
libs/GalacticraftCore-Dev-BETA-1.7-3.0.1.8.jar
Normal file
BIN
libs/GalacticraftCore-Dev-BETA-1.7-3.0.1.8.jar
Normal file
Binary file not shown.
|
@ -1,11 +1,8 @@
|
|||
package modtweaker;
|
||||
|
||||
import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
|
||||
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.player.IPlayer;
|
||||
import minetweaker.api.server.ICommandFunction;
|
||||
import modtweaker.mods.bloodmagic.BloodMagic;
|
||||
import modtweaker.mods.botania.Botania;
|
||||
import modtweaker.mods.exnihilo.ExNihilo;
|
||||
import modtweaker.mods.extendedworkbench.ExtendedWorkbench;
|
||||
|
@ -25,14 +22,16 @@ import modtweaker.mods.thaumcraft.Thaumcraft;
|
|||
import modtweaker.mods.thaumcraft.research.ResearchLogger;
|
||||
import modtweaker.mods.thermalexpansion.ThermalExpansion;
|
||||
import modtweaker.util.TweakerPlugin;
|
||||
import net.minecraft.util.RegistryNamespaced;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import pneumaticCraft.common.thirdparty.bloodmagic.BloodMagic;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerStartingEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import forestry.factory.gadgets.MachineFermenter;
|
||||
import static modtweaker.helpers.LogHelper.print;
|
||||
|
||||
@Mod(modid = ModProps.modid, name = ModProps.name, dependencies = ModProps.dependencies)
|
||||
public class ModTweaker {
|
||||
|
@ -54,6 +53,7 @@ public class ModTweaker {
|
|||
TweakerPlugin.register("Thaumcraft", Thaumcraft.class);
|
||||
TweakerPlugin.register("ThermalExpansion", ThermalExpansion.class);
|
||||
TweakerPlugin.register("Forestry", Forestry.class);
|
||||
|
||||
if (FMLCommonHandler.instance().getSide() == Side.CLIENT) {
|
||||
MinecraftForge.EVENT_BUS.register(new ClientEvents());
|
||||
}
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
package modtweaker.mods.bloodmagic;
|
||||
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import modtweaker.mods.bloodmagic.handlers.Alchemy;
|
||||
import modtweaker.mods.bloodmagic.handlers.Binding;
|
||||
import modtweaker.mods.bloodmagic.handlers.BloodAltar;
|
||||
import modtweaker.mods.bloodmagic.handlers.BloodOrb;
|
||||
|
||||
public class BloodMagic {
|
||||
public BloodMagic() {
|
||||
MineTweakerAPI.registerClass(Alchemy.class);
|
||||
MineTweakerAPI.registerClass(Binding.class);
|
||||
MineTweakerAPI.registerClass(BloodAltar.class);
|
||||
MineTweakerAPI.registerClass(BloodOrb.class);
|
||||
}
|
||||
}
|
|
@ -1,68 +0,0 @@
|
|||
package modtweaker.mods.bloodmagic.handlers;
|
||||
|
||||
import static modtweaker.helpers.InputHelper.toStack;
|
||||
import static modtweaker.helpers.InputHelper.toStacks;
|
||||
import static modtweaker.helpers.StackHelper.areEqual;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import modtweaker.util.BaseListAddition;
|
||||
import modtweaker.util.BaseListRemoval;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
|
||||
@ZenClass("mods.bloodmagic.Alchemy")
|
||||
public class Alchemy {
|
||||
//Adding a Blood Magic Alchemical Chemistry Set recipe
|
||||
@ZenMethod
|
||||
public static void addRecipe(IItemStack output, IItemStack[] input, int tier, int lp) {
|
||||
MineTweakerAPI.apply(new Add(new AlchemyRecipe(toStack(output), (int) (((double) lp) / 100), toStacks(input), tier)));
|
||||
}
|
||||
|
||||
//Passes the list to the base list implementation, and adds the recipe
|
||||
private static class Add extends BaseListAddition {
|
||||
public Add(AlchemyRecipe recipe) {
|
||||
super("Alchemical Chemistry Set", AlchemyRecipeRegistry.recipes, recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeInfo() {
|
||||
return ((AlchemyRecipe) recipe).getResult().getDisplayName();
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//Removing a Blood Magic Alchemical Chemistry Set recipe
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack output) {
|
||||
MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
}
|
||||
|
||||
//Removes a recipe, apply is never the same for anything, so will always need to override it
|
||||
private static class Remove extends BaseListRemoval {
|
||||
public Remove(ItemStack stack) {
|
||||
super("Alchemical Chemistry Set", AlchemyRecipeRegistry.recipes, stack);
|
||||
}
|
||||
|
||||
//Loops through the registry, to find the item that matches, saves that recipe then removes it
|
||||
@Override
|
||||
public void apply() {
|
||||
for (AlchemyRecipe r : AlchemyRecipeRegistry.recipes) {
|
||||
if (r.getResult() != null && areEqual(r.getResult(), stack)) {
|
||||
recipe = r;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
AlchemyRecipeRegistry.recipes.remove(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeInfo() {
|
||||
return stack.getDisplayName();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,67 +0,0 @@
|
|||
package modtweaker.mods.bloodmagic.handlers;
|
||||
|
||||
import static modtweaker.helpers.InputHelper.toStack;
|
||||
import static modtweaker.helpers.StackHelper.areEqual;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import modtweaker.util.BaseListAddition;
|
||||
import modtweaker.util.BaseListRemoval;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry;
|
||||
|
||||
@ZenClass("mods.bloodmagic.Binding")
|
||||
public class Binding {
|
||||
//Adding a Blood Magic Binding recipe
|
||||
@ZenMethod
|
||||
public static void addRecipe(IItemStack input, IItemStack output) {
|
||||
MineTweakerAPI.apply(new Add(new BindingRecipe(toStack(output), toStack(input))));
|
||||
}
|
||||
|
||||
//Passes the list to the base list implementation, and adds the recipe
|
||||
private static class Add extends BaseListAddition {
|
||||
public Add(BindingRecipe recipe) {
|
||||
super("Binding", BindingRegistry.bindingRecipes, recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeInfo() {
|
||||
return ((BindingRecipe) recipe).getResult().getDisplayName();
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//Removing a Blood Magic Binding recipe
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack output) {
|
||||
MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
}
|
||||
|
||||
//Removes a recipe, apply is never the same for anything, so will always need to override it
|
||||
private static class Remove extends BaseListRemoval {
|
||||
public Remove(ItemStack stack) {
|
||||
super("Binding", BindingRegistry.bindingRecipes, stack);
|
||||
}
|
||||
|
||||
//Loops through the registry, to find the item that matches, saves that recipe then removes it
|
||||
@Override
|
||||
public void apply() {
|
||||
for (BindingRecipe r : BindingRegistry.bindingRecipes) {
|
||||
if (r.getResult() != null && areEqual(r.getResult(), stack)) {
|
||||
recipe = r;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
BindingRegistry.bindingRecipes.remove(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeInfo() {
|
||||
return stack.getDisplayName();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
package modtweaker.mods.bloodmagic.handlers;
|
||||
|
||||
import static modtweaker.helpers.InputHelper.toStack;
|
||||
import static modtweaker.helpers.StackHelper.areEqual;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import modtweaker.util.BaseListAddition;
|
||||
import modtweaker.util.BaseListRemoval;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import stanhebben.zenscript.annotations.Optional;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
|
||||
|
||||
@ZenClass("mods.bloodmagic.Altar")
|
||||
public class BloodAltar {
|
||||
//Adding a Blood Magic Altar recipe
|
||||
@ZenMethod
|
||||
public static void addRecipe(IItemStack output, IItemStack input, int tier, int lp, @Optional int consume, @Optional int drain) {
|
||||
consume = consume > 0 ? consume : 20;
|
||||
drain = drain > 0 ? drain : 20;
|
||||
|
||||
MineTweakerAPI.apply(new Add(new AltarRecipe(toStack(output), toStack(input), tier, lp, consume, drain, false)));
|
||||
}
|
||||
|
||||
//Passes the list to the base list implementation, and adds the recipe
|
||||
private static class Add extends BaseListAddition {
|
||||
public Add(AltarRecipe recipe) {
|
||||
super("Blood Altar", AltarRecipeRegistry.altarRecipes, recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeInfo() {
|
||||
return ((AltarRecipe) recipe).getResult().getDisplayName();
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//Removing a Blood Magic Altar recipe
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack output) {
|
||||
MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
}
|
||||
|
||||
//Removes a recipe, apply is never the same for anything, so will always need to override it
|
||||
private static class Remove extends BaseListRemoval {
|
||||
public Remove(ItemStack stack) {
|
||||
super("Blood Altar", AltarRecipeRegistry.altarRecipes, stack);
|
||||
}
|
||||
|
||||
//Loops through the registry, to find the item that matches, saves that recipe then removes it
|
||||
@Override
|
||||
public void apply() {
|
||||
for (AltarRecipe r : AltarRecipeRegistry.altarRecipes) {
|
||||
if (r.getResult() != null && areEqual(r.getResult(), stack)) {
|
||||
recipe = r;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
AltarRecipeRegistry.altarRecipes.remove(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeInfo() {
|
||||
return stack.getDisplayName();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,58 +0,0 @@
|
|||
package modtweaker.mods.bloodmagic.handlers;
|
||||
|
||||
import static modtweaker.helpers.InputHelper.toObjects;
|
||||
import static modtweaker.helpers.InputHelper.toShapedObjects;
|
||||
import static modtweaker.helpers.InputHelper.toStack;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IIngredient;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import modtweaker.util.BaseCraftingAddition;
|
||||
import modtweaker.util.BaseCraftingRemoval;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe;
|
||||
|
||||
@ZenClass("mods.bloodmagic.BloodOrb")
|
||||
public class BloodOrb {
|
||||
@ZenMethod
|
||||
public static void addShaped(IItemStack output, IIngredient[][] ingredients) {
|
||||
MineTweakerAPI.apply(new Add(false, toStack(output), toShapedObjects(ingredients)));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addShapeless(IItemStack output, IIngredient[] ingredients) {
|
||||
MineTweakerAPI.apply(new Add(true, toStack(output), toObjects(ingredients)));
|
||||
}
|
||||
|
||||
private static class Add extends BaseCraftingAddition {
|
||||
public Add(boolean shapeless, ItemStack output, Object... recipe) {
|
||||
super("Blood Orb", shapeless, CraftingManager.getInstance().getRecipeList(), output, recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyShaped() {
|
||||
list.add(new ShapedBloodOrbRecipe(output, recipe));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyShapeless() {
|
||||
list.add(new ShapelessBloodOrbRecipe(output, recipe));
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack output) {
|
||||
MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
}
|
||||
|
||||
private static class Remove extends BaseCraftingRemoval {
|
||||
public Remove(ItemStack stack) {
|
||||
super("Blood Orb", CraftingManager.getInstance().getRecipeList(), stack);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
package modtweaker.mods.forestry;
|
||||
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import modtweaker.mods.forestry.handlers.Bees;
|
||||
import modtweaker.mods.forestry.handlers.Carpenter;
|
||||
import modtweaker.mods.forestry.handlers.Fermenter;
|
||||
import modtweaker.mods.forestry.handlers.Moistener;
|
||||
|
@ -11,12 +10,10 @@ import modtweaker.mods.forestry.handlers.Still;
|
|||
public class Forestry {
|
||||
public Forestry() {
|
||||
MineTweakerAPI.registerClass(Fermenter.class);
|
||||
MineTweakerAPI.registerClass(Bees.class);
|
||||
MineTweakerAPI.registerClass(Still.class);
|
||||
MineTweakerAPI.registerClass(Moistener.class);
|
||||
MineTweakerAPI.registerClass(Carpenter.class);
|
||||
MineTweakerAPI.registerClass(Squeezer.class);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
package modtweaker.mods.forestry.handlers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import modtweaker.helpers.InputHelper;
|
||||
import modtweaker.util.BaseListAddition;
|
||||
import modtweaker.util.BaseListRemoval;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import forestry.api.apiculture.BeeManager;
|
||||
import forestry.api.apiculture.FlowerManager;
|
||||
import forestry.apiculture.genetics.BeeMutation;
|
||||
import forestry.factory.gadgets.MachineFermenter.Recipe;
|
||||
import forestry.factory.gadgets.MachineFermenter.RecipeManager;
|
||||
|
||||
@ZenClass("mods.forestry.Bees")
|
||||
public class Bees {
|
||||
|
||||
@ZenMethod
|
||||
public static void addFlower(IItemStack stack) {
|
||||
MineTweakerAPI.apply(new Add(InputHelper.toStack(stack)));
|
||||
}
|
||||
|
||||
private static class Add extends BaseListAddition {
|
||||
public Add(ItemStack recipe) {
|
||||
super("Forestry Bees Flowers", FlowerManager.plainFlowers, recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeInfo() {
|
||||
return ((Recipe) recipe).output.getLocalizedName();
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeFlower(IItemStack stack) {
|
||||
MineTweakerAPI.apply(new Remove(FlowerManager.plainFlowers, InputHelper.toStack(stack)));
|
||||
}
|
||||
|
||||
private static class Remove extends BaseListRemoval {
|
||||
|
||||
public Remove(List list, ItemStack stack) {
|
||||
super(list, stack);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply() {
|
||||
for (ItemStack r : FlowerManager.plainFlowers) {
|
||||
if (r != null && r.isItemEqual(stack)) {
|
||||
recipe = r;
|
||||
break;
|
||||
}
|
||||
}
|
||||
FlowerManager.plainFlowers.remove(recipe);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void clearFlowerList() {
|
||||
MineTweakerAPI.apply(new Clear());
|
||||
}
|
||||
|
||||
private static class Clear extends BaseListRemoval {
|
||||
|
||||
public Clear() {
|
||||
super(FlowerManager.plainFlowers, new ItemStack(Blocks.air));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply() {
|
||||
FlowerManager.plainFlowers.clear();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@ package modtweaker.mods.forestry.handlers;
|
|||
import static modtweaker.helpers.InputHelper.toStack;
|
||||
import static modtweaker.helpers.InputHelper.toFluid;
|
||||
import static modtweaker.helpers.InputHelper.toStacks;
|
||||
import static modtweaker.helpers.LogHelper.print;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -20,8 +21,10 @@ import net.minecraft.item.ItemStack;
|
|||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.apiculture.FlowerProviderCacti;
|
||||
import forestry.core.utils.ShapedRecipeCustom;
|
||||
import forestry.factory.gadgets.MachineCarpenter;
|
||||
import forestry.factory.gadgets.MachineFermenter;
|
||||
import forestry.factory.gadgets.MachineCarpenter.Recipe;
|
||||
import forestry.factory.gadgets.MachineCarpenter.RecipeManager;
|
||||
|
||||
|
@ -29,7 +32,7 @@ import forestry.factory.gadgets.MachineCarpenter.RecipeManager;
|
|||
public class Carpenter {
|
||||
|
||||
@ZenMethod
|
||||
public static void addRecipe(int packagingTime, ILiquidStack liquid, IItemStack box, IItemStack[] ingredients, IItemStack product) {
|
||||
public static void addRecipe(int packagingTime, ILiquidStack liquid, IItemStack product, IItemStack[] ingredients, IItemStack ingredient) {
|
||||
ArrayList<ItemStack> stacks = new ArrayList<ItemStack>();
|
||||
for (ItemStack stack : toStacks(ingredients)) {
|
||||
if (stack != null) {
|
||||
|
@ -40,11 +43,11 @@ public class Carpenter {
|
|||
}
|
||||
|
||||
}
|
||||
MineTweakerAPI.apply(new Add(new Recipe(packagingTime, toFluid(liquid), toStack(box), new ShapedRecipeCustom(3, 3, toStacks(ingredients), toStack(product)))));
|
||||
MineTweakerAPI.apply(new Add(new Recipe(packagingTime, toFluid(liquid), toStack(ingredient), new ShapedRecipeCustom(3, 3, toStacks(ingredients), toStack(product)))));
|
||||
}
|
||||
|
||||
public ShapedRecipeCustom convertToRecipeCustom() {
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
package modtweaker.mods.forestry.handlers;
|
||||
|
||||
public class Entity {
|
||||
|
||||
}
|
|
@ -18,6 +18,7 @@ import stanhebben.zenscript.annotations.ZenClass;
|
|||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import forestry.Forestry;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.core.utils.LiquidHelper;
|
||||
import forestry.factory.gadgets.MachineFermenter;
|
||||
import forestry.factory.gadgets.MachineFermenter.Recipe;
|
||||
|
@ -31,7 +32,6 @@ public class Fermenter {
|
|||
MineTweakerAPI.apply(new Add(new Recipe(toStack(resource), fermentationValue, modifier, toFluid(output), toFluid(liquid))));
|
||||
MachineFermenter.RecipeManager.recipeFluidInputs.add(getFluid(liquid));
|
||||
MachineFermenter.RecipeManager.recipeFluidOutputs.add(getFluid(output));
|
||||
|
||||
}
|
||||
|
||||
private static class Add extends BaseListAddition {
|
||||
|
|
|
@ -19,7 +19,7 @@ import forestry.factory.gadgets.MachineMoistener.RecipeManager;
|
|||
public class Moistener {
|
||||
|
||||
@ZenMethod
|
||||
public static void addRecipe(IItemStack resource, IItemStack product, int timePerItem) {
|
||||
public static void addRecipe(int timePerItem, IItemStack resource, IItemStack product) {
|
||||
MineTweakerAPI.apply(new Add(new Recipe(toStack(resource), toStack(product), timePerItem)));
|
||||
|
||||
}
|
||||
|
|
|
@ -46,14 +46,14 @@ public class Still {
|
|||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(ILiquidStack output) {
|
||||
MineTweakerAPI.apply(new Remove(MachineStill.RecipeManager.recipes, toFluid(output)));
|
||||
public static void removeRecipe(ILiquidStack output, ILiquidStack input) {
|
||||
MineTweakerAPI.apply(new Remove(MachineStill.RecipeManager.recipes, toFluid(input)));
|
||||
}
|
||||
|
||||
private static class Remove extends BaseListRemoval {
|
||||
|
||||
public Remove(List list, FluidStack stack) {
|
||||
super(list, stack);
|
||||
public Remove(List list, FluidStack input) {
|
||||
super(list, input);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import static modtweaker.helpers.InputHelper.toObjects;
|
|||
import static modtweaker.helpers.InputHelper.toShapedObjects;
|
||||
import static modtweaker.helpers.InputHelper.toStack;
|
||||
import static modtweaker.helpers.StackHelper.areEqual;
|
||||
import forestry.api.apiculture.FlowerManager;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IIngredient;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
|
@ -20,60 +21,59 @@ import thaumcraft.api.crafting.ShapelessArcaneRecipe;
|
|||
|
||||
@ZenClass("mods.thaumcraft.Arcane")
|
||||
public class Arcane {
|
||||
@ZenMethod
|
||||
public static void addShaped(String key, IItemStack output, String aspects, IIngredient[][] ingredients) {
|
||||
MineTweakerAPI.apply(new Add(new ShapedArcaneRecipe(key, toStack(output), ThaumcraftHelper.parseAspects(aspects), toShapedObjects(ingredients))));
|
||||
}
|
||||
@ZenMethod
|
||||
public static void addShaped(String key, IItemStack output, String aspects, IIngredient[][] ingredients) {
|
||||
MineTweakerAPI.apply(new Add(new ShapedArcaneRecipe(key, toStack(output), ThaumcraftHelper.parseAspects(aspects), toShapedObjects(ingredients))));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addShapeless(String key, IItemStack output, String aspects, IIngredient[] ingredients) {
|
||||
MineTweakerAPI.apply(new Add(new ShapelessArcaneRecipe(key, toStack(output), ThaumcraftHelper.parseAspects(aspects), toObjects(ingredients))));
|
||||
}
|
||||
@ZenMethod
|
||||
public static void addShapeless(String key, IItemStack output, String aspects, IIngredient[] ingredients) {
|
||||
MineTweakerAPI.apply(new Add(new ShapelessArcaneRecipe(key, toStack(output), ThaumcraftHelper.parseAspects(aspects), toObjects(ingredients))));
|
||||
}
|
||||
|
||||
private static class Add extends BaseListAddition {
|
||||
public Add(IArcaneRecipe recipe) {
|
||||
super("Thaumcraft Arcane Worktable", ThaumcraftApi.getCraftingRecipes(), recipe);
|
||||
}
|
||||
private static class Add extends BaseListAddition {
|
||||
public Add(IArcaneRecipe recipe) {
|
||||
super("Thaumcraft Arcane Worktable", ThaumcraftApi.getCraftingRecipes(), recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeInfo() {
|
||||
Object out = ((IArcaneRecipe) recipe).getRecipeOutput();
|
||||
if (out instanceof ItemStack) {
|
||||
return ((ItemStack) out).getDisplayName();
|
||||
} else return super.getRecipeInfo();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public String getRecipeInfo() {
|
||||
Object out = ((IArcaneRecipe) recipe).getRecipeOutput();
|
||||
if (out instanceof ItemStack) {
|
||||
return ((ItemStack) out).getDisplayName();
|
||||
} else
|
||||
return super.getRecipeInfo();
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack output) {
|
||||
MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
}
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack output) {
|
||||
MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
}
|
||||
|
||||
private static class Remove extends BaseListRemoval {
|
||||
public Remove(ItemStack stack) {
|
||||
super("Thaumcraft Infusion", ThaumcraftApi.getCraftingRecipes(), stack);
|
||||
}
|
||||
private static class Remove extends BaseListRemoval {
|
||||
public Remove(ItemStack stack) {
|
||||
super("Thaumcraft Arcane Worktable", ThaumcraftApi.getCraftingRecipes(), stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply() {
|
||||
for (Object o : ThaumcraftApi.getCraftingRecipes()) {
|
||||
if (o instanceof IArcaneRecipe) {
|
||||
IArcaneRecipe r = (IArcaneRecipe) o;
|
||||
if (r.getRecipeOutput() != null && r.getRecipeOutput() instanceof ItemStack && areEqual((ItemStack) r.getRecipeOutput(), stack)) {
|
||||
recipe = r;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void apply() {
|
||||
for (Object o : ThaumcraftApi.getCraftingRecipes()) {
|
||||
if (o instanceof IArcaneRecipe) {
|
||||
IArcaneRecipe r = (IArcaneRecipe) o;
|
||||
if (r.getRecipeOutput() != null && r.getRecipeOutput().isItemEqual(stack)) {
|
||||
ThaumcraftApi.getCraftingRecipes().remove(r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ThaumcraftApi.getCraftingRecipes().remove(recipe);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeInfo() {
|
||||
return stack.getDisplayName();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public String getRecipeInfo() {
|
||||
return stack.getDisplayName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
17
src/main/java/modtweaker/util/ArrayUtils.java
Normal file
17
src/main/java/modtweaker/util/ArrayUtils.java
Normal file
|
@ -0,0 +1,17 @@
|
|||
package modtweaker.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ArrayUtils {
|
||||
|
||||
|
||||
public static ArrayList<ItemStack> toArrayList(ItemStack[] array){
|
||||
ArrayList<ItemStack> stacks = new ArrayList<ItemStack>();
|
||||
for(ItemStack stack : array){
|
||||
stacks.add(stack);
|
||||
}
|
||||
return stacks;
|
||||
}
|
||||
}
|
|
@ -40,7 +40,8 @@ public abstract class BaseListRemoval implements IUndoableAction {
|
|||
this(description, list, null, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
public boolean canUndo() {
|
||||
return list != null;
|
||||
}
|
||||
|
|
32
src/main/resources/micdoodlecore_at.cfg
Normal file
32
src/main/resources/micdoodlecore_at.cfg
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Micdoodle Core Access Transformer configuration file
|
||||
# Fields
|
||||
public net.minecraft.client.gui.inventory.GuiContainer field_147003_i #guiLeft
|
||||
public net.minecraft.client.gui.inventory.GuiContainer field_147009_r #guiLeft
|
||||
public net.minecraft.client.gui.GuiScreen field_146292_n #buttonList
|
||||
public net.minecraft.inventory.InventoryCrafting field_70465_c #eventHandler
|
||||
public net.minecraft.client.renderer.entity.RenderPlayer field_77109_a #modelBipedMain
|
||||
public net.minecraft.client.renderer.entity.RenderPlayer field_77108_b #modelArmorChestplate
|
||||
public net.minecraft.client.renderer.entity.RenderPlayer field_77111_i #modelArmor
|
||||
public net.minecraft.entity.player.EntityPlayer field_71083_bS #sleeping
|
||||
public net.minecraft.entity.player.EntityPlayer field_71076_b #sleepTimer
|
||||
public net.minecraft.entity.EntityLivingBase field_70718_bc #recentlyHit
|
||||
public net.minecraft.entity.EntityLivingBase field_70717_bb #attackingPlayer
|
||||
public net.minecraft.network.EnumConnectionState field_150761_f
|
||||
public net.minecraft.network.EnumConnectionState field_150770_i
|
||||
public net.minecraft.client.renderer.EntityRenderer field_78490_B #thirdPersonDistance
|
||||
public net.minecraft.client.renderer.EntityRenderer field_78491_C #thirdPersonDistanceTemp
|
||||
public net.minecraft.client.renderer.WorldRenderer field_78942_y #glRenderList
|
||||
public net.minecraft.client.audio.MusicTicker field_147679_a
|
||||
public net.minecraft.client.audio.MusicTicker field_147677_b
|
||||
public net.minecraft.client.audio.MusicTicker field_147678_c
|
||||
public net.minecraft.client.audio.MusicTicker field_147676_d
|
||||
public net.minecraft.client.gui.GuiIngame field_73838_g #recordPlaying
|
||||
# Methods
|
||||
public net.minecraft.entity.player.EntityPlayer func_71053_j()V #closeScreen
|
||||
public net.minecraft.entity.player.EntityPlayerMP func_71053_j()V #closeScreen
|
||||
public net.minecraft.client.entity.EntityClientPlayerMP func_71053_j()V #closeScreen
|
||||
public net.minecraft.client.entity.EntityPlayerSP func_71053_j()V #closeScreen
|
||||
public net.minecraft.world.World func_72847_b(Lnet/minecraft/entity/Entity;)V #onEntityRemoved
|
||||
public net.minecraft.client.multiplayer.WorldClient func_72847_b(Lnet/minecraft/entity/Entity;)V #onEntityRemoved
|
||||
public net.minecraft.world.WorldServer func_72847_b(Lnet/minecraft/entity/Entity;)V #onEntityRemoved
|
||||
public net.minecraft.entity.DataWatcher func_75691_i(I)Lnet/minecraft/entity/DataWatcher$WatchableObject; #getWatchedObject
|
Loading…
Reference in a new issue