Update for Forestry 4; Forestry-Dev.jar is now included via gradle
fix #252
This commit is contained in:
parent
5e147f86b9
commit
4bea2e5fc9
11
build.gradle
11
build.gradle
|
@ -37,6 +37,17 @@ minecraft {
|
|||
runDir = "eclipse"
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name = "forestry"
|
||||
url = "http://maven.ic2.player.to/"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "net.sengir.forestry:forestry_${config.minecraft.version}:${config.forestry.version}:dev"
|
||||
}
|
||||
|
||||
processResources
|
||||
{
|
||||
// this will ensure that this task is redone when the versions change.
|
||||
|
|
|
@ -2,3 +2,5 @@ minecraft.version=1.7.10
|
|||
forge.version=10.13.4.1448-1.7.10
|
||||
|
||||
mod.version=0.9.4
|
||||
|
||||
forestry.version=4.0.8.36
|
||||
|
|
Binary file not shown.
|
@ -2,17 +2,19 @@ package modtweaker2.mods.forestry;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import modtweaker2.helpers.ReflectionHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import forestry.factory.gadgets.MachineCarpenter;
|
||||
import forestry.factory.tiles.TileCarpenter;
|
||||
|
||||
public class ForestryHelper {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void addCarpenterRecipeBox(ItemStack box) {
|
||||
ArrayList<ItemStack> recipeBoxes = (ArrayList<ItemStack>) ReflectionHelper.getStaticObject(MachineCarpenter.RecipeManager.class, "boxes");
|
||||
List<ItemStack> recipeBoxes = (ArrayList<ItemStack>) ReflectionHelper.getStaticObject(TileCarpenter.RecipeManager.class, "boxes");
|
||||
|
||||
if(recipeBoxes != null) {
|
||||
recipeBoxes.add(box);
|
||||
|
@ -21,7 +23,7 @@ public class ForestryHelper {
|
|||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void addCarpenterRecipeFluids(Fluid newFluid) {
|
||||
HashSet<Fluid> recipeFluids = (HashSet<Fluid>) ReflectionHelper.getStaticObject(MachineCarpenter.RecipeManager.class, "recipeFluids");
|
||||
Set<Fluid> recipeFluids = (HashSet<Fluid>) ReflectionHelper.getStaticObject(TileCarpenter.RecipeManager.class, "recipeFluids");
|
||||
|
||||
if(recipeFluids != null) {
|
||||
recipeFluids.add(newFluid);
|
||||
|
|
|
@ -25,10 +25,10 @@ import net.minecraft.item.ItemStack;
|
|||
import stanhebben.zenscript.annotations.Optional;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import forestry.core.utils.ShapedRecipeCustom;
|
||||
import forestry.factory.gadgets.MachineCarpenter;
|
||||
import forestry.factory.gadgets.MachineCarpenter.Recipe;
|
||||
import forestry.factory.gadgets.MachineCarpenter.RecipeManager;
|
||||
import forestry.core.recipes.ShapedRecipeCustom;
|
||||
import forestry.factory.tiles.TileCarpenter;
|
||||
import forestry.factory.tiles.TileCarpenter.Recipe;
|
||||
import forestry.factory.tiles.TileCarpenter.RecipeManager;
|
||||
|
||||
@ZenClass("mods.forestry.Carpenter")
|
||||
public class Carpenter {
|
||||
|
@ -83,7 +83,7 @@ public class Carpenter {
|
|||
private static class Add extends BaseListAddition<Recipe> {
|
||||
|
||||
public Add(Recipe recipe) {
|
||||
super(Carpenter.name, MachineCarpenter.RecipeManager.recipes);
|
||||
super(Carpenter.name, TileCarpenter.RecipeManager.recipes);
|
||||
recipes.add(recipe);
|
||||
|
||||
// The Carpenter has a list of valid Fluids, access them via
|
||||
|
@ -130,8 +130,6 @@ public class Carpenter {
|
|||
} else {
|
||||
LogHelper.logWarning(String.format("No %s Recipe found for %s. Command ignored!", Carpenter.name, output.toString()));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static class Remove extends BaseListRemoval<Recipe> {
|
||||
|
|
|
@ -20,8 +20,8 @@ import net.minecraft.item.ItemStack;
|
|||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import forestry.api.recipes.ICentrifugeRecipe;
|
||||
import forestry.factory.gadgets.MachineCentrifuge.CentrifugeRecipe;
|
||||
import forestry.factory.gadgets.MachineCentrifuge.RecipeManager;
|
||||
import forestry.factory.tiles.TileCentrifuge.CentrifugeRecipe;
|
||||
import forestry.factory.tiles.TileCentrifuge.RecipeManager;
|
||||
|
||||
|
||||
@ZenClass("mods.forestry.Centrifuge")
|
||||
|
@ -60,7 +60,6 @@ public class Centrifuge {
|
|||
}
|
||||
|
||||
private static class Add extends BaseListAddition<ICentrifugeRecipe> {
|
||||
|
||||
public Add(ICentrifugeRecipe recipe) {
|
||||
super(Centrifuge.name, RecipeManager.recipes);
|
||||
recipes.add(recipe);
|
||||
|
@ -77,7 +76,7 @@ public class Centrifuge {
|
|||
/**
|
||||
* Removes a recipe for the Centrifuge
|
||||
*
|
||||
* @param ingredient item input
|
||||
* @param input item input
|
||||
*/
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IIngredient input) {
|
||||
|
|
|
@ -28,17 +28,17 @@ import stanhebben.zenscript.annotations.ZenClass;
|
|||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import forestry.api.fuels.FermenterFuel;
|
||||
import forestry.api.fuels.FuelManager;
|
||||
import forestry.factory.gadgets.MachineFermenter.Recipe;
|
||||
import forestry.factory.gadgets.MachineFermenter.RecipeManager;
|
||||
import forestry.factory.tiles.TileFermenter.Recipe;
|
||||
import forestry.factory.tiles.TileFermenter.RecipeManager;
|
||||
|
||||
@ZenClass("mods.forestry.Fermenter")
|
||||
public class Fermenter {
|
||||
|
||||
public static final String name = "Forestry Fermenter";
|
||||
public static final String nameFuel = name + " (Fuel)";
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/**
|
||||
* Adds a fermenter recipe. Amount of fluid output is calculated: fermentationValue * fluidOutputModifier
|
||||
* Note: the actual consumption of fluid input depends on the fermentation fuel
|
||||
|
@ -191,7 +191,6 @@ public class Fermenter {
|
|||
RecipeManager.recipeFluidInputs.add(recipe.liquid.getFluid());
|
||||
RecipeManager.recipeFluidOutputs.add(recipe.output.getFluid());
|
||||
}
|
||||
|
||||
super.undo();
|
||||
}
|
||||
|
||||
|
@ -218,7 +217,7 @@ public class Fermenter {
|
|||
|
||||
private static class AddFuel extends BaseMapAddition<ItemStack, FermenterFuel> {
|
||||
public AddFuel(FermenterFuel fuelEntry) {
|
||||
super(Fermenter.name, FuelManager.fermenterFuel);
|
||||
super(Fermenter.nameFuel, FuelManager.fermenterFuel);
|
||||
recipes.put(fuelEntry.item, fuelEntry);
|
||||
}
|
||||
|
||||
|
@ -254,7 +253,7 @@ public class Fermenter {
|
|||
|
||||
private static class RemoveFuel extends BaseMapRemoval<ItemStack, FermenterFuel> {
|
||||
public RemoveFuel(Map<ItemStack, FermenterFuel> recipes) {
|
||||
super(Fermenter.name, FuelManager.fermenterFuel, recipes);
|
||||
super(Fermenter.nameFuel, FuelManager.fermenterFuel, recipes);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,17 +21,17 @@ import modtweaker2.utils.BaseMapAddition;
|
|||
import modtweaker2.utils.BaseMapRemoval;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import forestry.api.fuels.FermenterFuel;
|
||||
import forestry.api.fuels.FuelManager;
|
||||
import forestry.api.fuels.MoistenerFuel;
|
||||
import forestry.factory.gadgets.MachineMoistener;
|
||||
import forestry.factory.gadgets.MachineMoistener.Recipe;
|
||||
import forestry.factory.gadgets.MachineMoistener.RecipeManager;
|
||||
import forestry.factory.tiles.TileMoistener;
|
||||
import forestry.factory.tiles.TileMoistener.Recipe;
|
||||
import forestry.factory.tiles.TileMoistener.RecipeManager;
|
||||
|
||||
@ZenClass("mods.forestry.Moistener")
|
||||
public class Moistener {
|
||||
|
||||
public static final String name = "Forestry Moistener";
|
||||
public static final String nameFuel = name + " (Fuel)";
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -43,21 +43,19 @@ public class Moistener {
|
|||
* @param timePerItem time per item to process
|
||||
*/
|
||||
@ZenMethod
|
||||
public static void addRecipe(IItemStack product, IItemStack resource, int timePerItem) {
|
||||
MineTweakerAPI.apply(new Add(new Recipe(toStack(resource), toStack(product), timePerItem)));
|
||||
|
||||
public static void addRecipe(IItemStack output, IItemStack resource, int timePerItem) {
|
||||
MineTweakerAPI.apply(new Add(new Recipe(toStack(resource), toStack(output), timePerItem)));
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@ZenMethod
|
||||
public static void addRecipe(int timePerItem, IItemStack resource, IItemStack product) {
|
||||
MineTweakerAPI.apply(new Add(new Recipe(toStack(resource), toStack(product), timePerItem)));
|
||||
|
||||
}
|
||||
|
||||
private static class Add extends BaseListAddition<Recipe> {
|
||||
public Add(Recipe recipe) {
|
||||
super(Moistener.name, MachineMoistener.RecipeManager.recipes);
|
||||
super(Moistener.name, TileMoistener.RecipeManager.recipes);
|
||||
recipes.add(recipe);
|
||||
}
|
||||
|
||||
|
@ -72,7 +70,6 @@ public class Moistener {
|
|||
@ZenMethod
|
||||
public static void removeRecipe(IIngredient output) {
|
||||
List<Recipe> recipes = new LinkedList<Recipe>();
|
||||
|
||||
for (Recipe recipe : RecipeManager.recipes) {
|
||||
if (recipe != null && recipe.product != null && matches(output, toIItemStack(recipe.product))) {
|
||||
recipes.add(recipe);
|
||||
|
@ -118,7 +115,7 @@ public class Moistener {
|
|||
|
||||
private static class AddFuel extends BaseMapAddition<ItemStack, MoistenerFuel> {
|
||||
public AddFuel(MoistenerFuel fuelEntry) {
|
||||
super(Moistener.name, FuelManager.moistenerResource);
|
||||
super(Moistener.nameFuel, FuelManager.moistenerResource);
|
||||
recipes.put(fuelEntry.item, fuelEntry);
|
||||
}
|
||||
|
||||
|
@ -154,7 +151,7 @@ public class Moistener {
|
|||
|
||||
private static class RemoveFuel extends BaseMapRemoval<ItemStack, MoistenerFuel> {
|
||||
public RemoveFuel(Map<ItemStack, MoistenerFuel> recipes) {
|
||||
super(Moistener.name, FuelManager.moistenerResource, recipes);
|
||||
super(Moistener.nameFuel, FuelManager.moistenerResource, recipes);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,9 +22,10 @@ import modtweaker2.utils.BaseListRemoval;
|
|||
import stanhebben.zenscript.annotations.Optional;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import forestry.factory.gadgets.MachineSqueezer;
|
||||
import forestry.factory.gadgets.MachineSqueezer.Recipe;
|
||||
import forestry.factory.gadgets.MachineSqueezer.RecipeManager;
|
||||
import forestry.factory.tiles.TileSqueezer;
|
||||
import forestry.factory.tiles.TileSqueezer.RecipeManager;
|
||||
import forestry.factory.recipes.ISqueezerRecipe;
|
||||
import forestry.factory.recipes.SqueezerRecipe;
|
||||
|
||||
@ZenClass("mods.forestry.Squeezer")
|
||||
public class Squeezer {
|
||||
|
@ -33,7 +34,7 @@ public class Squeezer {
|
|||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
/**
|
||||
* Adds a recipe without additional item output
|
||||
*
|
||||
* @param fluidOutput recipe fluid amount
|
||||
|
@ -42,7 +43,7 @@ public class Squeezer {
|
|||
*/
|
||||
@ZenMethod
|
||||
public static void addRecipe(ILiquidStack fluidOutput, int timePerItem, IItemStack[] ingredients) {
|
||||
MineTweakerAPI.apply(new Add( new Recipe(timePerItem, toStacks(ingredients), toFluid(fluidOutput), null, 0) ));
|
||||
MineTweakerAPI.apply(new Add(new SqueezerRecipe(timePerItem, toStacks(ingredients), toFluid(fluidOutput), null, 0)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -55,40 +56,40 @@ public class Squeezer {
|
|||
*/
|
||||
@ZenMethod
|
||||
public static void addRecipe(ILiquidStack fluidOutput, WeightedItemStack itemOutput, IItemStack[] ingredients, int timePerItem) {
|
||||
MineTweakerAPI.apply(new Add(new Recipe(timePerItem, toStacks(ingredients), toFluid(fluidOutput), toStack(itemOutput.getStack()), (int) itemOutput.getPercent())));
|
||||
MineTweakerAPI.apply(new Add(new SqueezerRecipe(timePerItem, toStacks(ingredients), toFluid(fluidOutput), toStack(itemOutput.getStack()), (int) itemOutput.getPercent())));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
@Deprecated
|
||||
public static void addRecipe(int timePerItem, IItemStack[] resources, ILiquidStack liquid, IItemStack remnants, int chance) {
|
||||
MineTweakerAPI.apply(new Add(new Recipe(timePerItem, toStacks(resources), toFluid(liquid), toStack(remnants), chance)));
|
||||
MineTweakerAPI.apply(new Add(new SqueezerRecipe(timePerItem, toStacks(resources), toFluid(liquid), toStack(remnants), chance)));
|
||||
}
|
||||
|
||||
private static class Add extends BaseListAddition<Recipe> {
|
||||
public Add(Recipe recipe) {
|
||||
super(Squeezer.name, MachineSqueezer.RecipeManager.recipes);
|
||||
private static class Add extends BaseListAddition<ISqueezerRecipe> {
|
||||
public Add(ISqueezerRecipe recipe) {
|
||||
super(Squeezer.name, TileSqueezer.RecipeManager.recipes);
|
||||
recipes.add(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply() {
|
||||
super.apply();
|
||||
for (Recipe recipe : recipes) {
|
||||
RecipeManager.recipeInputs.addAll(Arrays.asList(recipe.resources));
|
||||
for (ISqueezerRecipe recipe : recipes) {
|
||||
RecipeManager.recipeInputs.addAll(Arrays.asList(recipe.getResources()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo() {
|
||||
super.undo();
|
||||
for (Recipe recipe : recipes) {
|
||||
RecipeManager.recipeInputs.removeAll(Arrays.asList(recipe.resources));
|
||||
for (ISqueezerRecipe recipe : recipes) {
|
||||
RecipeManager.recipeInputs.removeAll(Arrays.asList(recipe.getResources()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeInfo(Recipe recipe) {
|
||||
return LogHelper.getStackDescription(recipe.liquid);
|
||||
public String getRecipeInfo(ISqueezerRecipe recipe) {
|
||||
return LogHelper.getStackDescription(recipe.getFluidOutput());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -102,15 +103,15 @@ public class Squeezer {
|
|||
*/
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IIngredient liquid, @Optional IIngredient[] ingredients) {
|
||||
List<Recipe> recipes = new LinkedList<Recipe>();
|
||||
List<ISqueezerRecipe> recipes = new LinkedList<ISqueezerRecipe>();
|
||||
|
||||
for (Recipe r : RecipeManager.recipes) {
|
||||
if (r != null && r.liquid != null && matches(liquid, toILiquidStack(r.liquid))) {
|
||||
for (ISqueezerRecipe r : RecipeManager.recipes) {
|
||||
if (r != null && r.getFluidOutput() != null && matches(liquid, toILiquidStack(r.getFluidOutput()))) {
|
||||
// optional check for ingredients
|
||||
if (ingredients != null) {
|
||||
boolean matched = false;
|
||||
for (int i = 0; i < ingredients.length; i++) {
|
||||
if ( matches(ingredients[i], toIItemStack(r.resources[i])) )
|
||||
if ( matches(ingredients[i], toIItemStack(r.getResources()[i])) )
|
||||
matched = true;
|
||||
else {
|
||||
matched = false;
|
||||
|
@ -134,31 +135,30 @@ public class Squeezer {
|
|||
}
|
||||
}
|
||||
|
||||
private static class Remove extends BaseListRemoval<Recipe> {
|
||||
public Remove(List<Recipe> recipes) {
|
||||
super(Squeezer.name, MachineSqueezer.RecipeManager.recipes, recipes);
|
||||
|
||||
private static class Remove extends BaseListRemoval<ISqueezerRecipe> {
|
||||
public Remove(List<ISqueezerRecipe> recipes) {
|
||||
super(Squeezer.name, TileSqueezer.RecipeManager.recipes, recipes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply() {
|
||||
super.apply();
|
||||
for (Recipe recipe : recipes) {
|
||||
RecipeManager.recipeInputs.removeAll(Arrays.asList(recipe.resources));
|
||||
for (ISqueezerRecipe recipe : recipes) {
|
||||
RecipeManager.recipeInputs.removeAll(Arrays.asList(recipe.getResources()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo() {
|
||||
super.undo();
|
||||
for (Recipe recipe : recipes) {
|
||||
RecipeManager.recipeInputs.addAll(Arrays.asList(recipe.resources));
|
||||
for (ISqueezerRecipe recipe : recipes) {
|
||||
RecipeManager.recipeInputs.addAll(Arrays.asList(recipe.getResources()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeInfo(Recipe recipe) {
|
||||
return LogHelper.getStackDescription(recipe.liquid);
|
||||
public String getRecipeInfo(ISqueezerRecipe recipe) {
|
||||
return LogHelper.getStackDescription(recipe.getFluidOutput());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,9 +16,9 @@ import modtweaker2.utils.BaseListRemoval;
|
|||
import stanhebben.zenscript.annotations.Optional;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import forestry.factory.gadgets.MachineStill;
|
||||
import forestry.factory.gadgets.MachineStill.Recipe;
|
||||
import forestry.factory.gadgets.MachineStill.RecipeManager;
|
||||
import forestry.factory.tiles.TileStill;
|
||||
import forestry.factory.tiles.TileStill.Recipe;
|
||||
import forestry.factory.tiles.TileStill.RecipeManager;
|
||||
|
||||
@ZenClass("mods.forestry.Still")
|
||||
public class Still {
|
||||
|
@ -53,7 +53,7 @@ public class Still {
|
|||
|
||||
private static class Add extends BaseListAddition<Recipe> {
|
||||
public Add(Recipe recipe) {
|
||||
super("Forestry Still", MachineStill.RecipeManager.recipes);
|
||||
super("Forestry Still", TileStill.RecipeManager.recipes);
|
||||
recipes.add(recipe);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,10 +17,11 @@ import net.minecraftforge.fluids.FluidRegistry;
|
|||
import stanhebben.zenscript.annotations.Optional;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import forestry.core.utils.ShapedRecipeCustom;
|
||||
import forestry.factory.gadgets.MachineFabricator.Recipe;
|
||||
import forestry.factory.gadgets.MachineFabricator.RecipeManager;
|
||||
import forestry.factory.gadgets.MachineFabricator.Smelting;
|
||||
import forestry.core.recipes.ShapedRecipeCustom;
|
||||
import forestry.api.recipes.IFabricatorRecipe;
|
||||
import forestry.factory.recipes.FabricatorRecipe;
|
||||
import forestry.factory.tiles.TileFabricator.RecipeManager;
|
||||
import forestry.factory.tiles.TileFabricator.Smelting;
|
||||
|
||||
@ZenClass("mods.forestry.ThermionicFabricator")
|
||||
public class ThermionicFabricator {
|
||||
|
@ -62,14 +63,13 @@ public class ThermionicFabricator {
|
|||
*/
|
||||
@ZenMethod
|
||||
public static void addCast(IItemStack output, IIngredient[][] ingredients, int fluidInput, @Optional IItemStack plan) {
|
||||
MineTweakerAPI.apply(new AddCast(new Recipe(toStack(plan), FluidRegistry.getFluidStack("glass", fluidInput), ShapedRecipeCustom.createShapedRecipe(toStack(output), toShapedObjects(ingredients)))));
|
||||
MineTweakerAPI.apply(new AddCast(new FabricatorRecipe(toStack(plan), FluidRegistry.getFluidStack("glass", fluidInput), ShapedRecipeCustom.createShapedRecipe(toStack(output), toShapedObjects(ingredients)))));
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@ZenMethod
|
||||
public static void addCast(ILiquidStack fluidInput, IIngredient[][] ingredients, IItemStack plan, IItemStack output) {
|
||||
|
||||
MineTweakerAPI.apply(new AddCast(new Recipe(toStack(plan), toFluid(fluidInput), ShapedRecipeCustom.createShapedRecipe(toStack(output), toShapedObjects(ingredients)))));
|
||||
MineTweakerAPI.apply(new AddCast(new FabricatorRecipe(toStack(plan), toFluid(fluidInput), ShapedRecipeCustom.createShapedRecipe(toStack(output), toShapedObjects(ingredients)))));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -89,16 +89,16 @@ public class ThermionicFabricator {
|
|||
}
|
||||
}
|
||||
|
||||
private static class AddCast extends BaseListAddition<Recipe> {
|
||||
private static class AddCast extends BaseListAddition<IFabricatorRecipe> {
|
||||
|
||||
public AddCast(Recipe recipe) {
|
||||
public AddCast(IFabricatorRecipe recipe) {
|
||||
super(ThermionicFabricator.nameCasting, RecipeManager.recipes);
|
||||
recipes.add(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeInfo(Recipe recipe) {
|
||||
return LogHelper.getStackDescription(recipe.asIRecipe().getRecipeOutput());
|
||||
public String getRecipeInfo(IFabricatorRecipe recipe) {
|
||||
return LogHelper.getStackDescription(recipe.getRecipeOutput());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -123,10 +123,10 @@ public class ThermionicFabricator {
|
|||
|
||||
@ZenMethod
|
||||
public static void removeCast(IIngredient product) {
|
||||
List<Recipe> recipes = new LinkedList<Recipe>();
|
||||
List<IFabricatorRecipe> recipes = new LinkedList<IFabricatorRecipe>();
|
||||
|
||||
for (Recipe r : RecipeManager.recipes) {
|
||||
if (r != null && r.asIRecipe().getRecipeOutput() != null && matches(product, toIItemStack(r.asIRecipe().getRecipeOutput()))) {
|
||||
for (IFabricatorRecipe r : RecipeManager.recipes) {
|
||||
if (r != null && r.getRecipeOutput() != null && matches(product, toIItemStack(r.getRecipeOutput()))) {
|
||||
recipes.add(r);
|
||||
}
|
||||
}
|
||||
|
@ -138,13 +138,13 @@ public class ThermionicFabricator {
|
|||
}
|
||||
}
|
||||
|
||||
@Deprecated //Not sure why this is called Casts, Cast aint an array
|
||||
@Deprecated
|
||||
@ZenMethod
|
||||
public static void removeCasts(IIngredient product) {
|
||||
List<Recipe> recipes = new LinkedList<Recipe>();
|
||||
List<IFabricatorRecipe> recipes = new LinkedList<IFabricatorRecipe>();
|
||||
|
||||
for (Recipe r : RecipeManager.recipes) {
|
||||
if (r != null && r.asIRecipe().getRecipeOutput() != null && matches(product, toIItemStack(r.asIRecipe().getRecipeOutput()))) {
|
||||
for (IFabricatorRecipe r : RecipeManager.recipes) {
|
||||
if (r != null && r.getRecipeOutput() != null && matches(product, toIItemStack(r.getRecipeOutput()))) {
|
||||
recipes.add(r);
|
||||
}
|
||||
}
|
||||
|
@ -167,14 +167,14 @@ public class ThermionicFabricator {
|
|||
}
|
||||
}
|
||||
|
||||
private static class RemoveCasts extends BaseListRemoval<Recipe> {
|
||||
public RemoveCasts(List<Recipe> recipes) {
|
||||
private static class RemoveCasts extends BaseListRemoval<IFabricatorRecipe> {
|
||||
public RemoveCasts(List<IFabricatorRecipe> recipes) {
|
||||
super(ThermionicFabricator.nameCasting, RecipeManager.recipes, recipes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeInfo(Recipe recipe) {
|
||||
return LogHelper.getStackDescription(recipe.asIRecipe().getRecipeOutput());
|
||||
public String getRecipeInfo(IFabricatorRecipe recipe) {
|
||||
return LogHelper.getStackDescription(recipe.getRecipeOutput());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue