Fixes, Optionals, Moves and Polishes for Forestry!
This commit is contained in:
parent
8ee2ba2128
commit
0c6a470a69
|
@ -42,9 +42,9 @@ public class Carpenter {
|
|||
*
|
||||
* @param output recipe output
|
||||
* @param ingredients recipe ingredients
|
||||
* @param fluidInput recipe fluid amount
|
||||
* @optionalParam fluidInput recipe fluid amount
|
||||
* @param packagingTime time per crafting operation
|
||||
* @param box recipes casting item (optional)
|
||||
* @optionalParam box recipes casting item (optional)
|
||||
*/
|
||||
@ZenMethod
|
||||
public static void addRecipe(IItemStack output, IIngredient[][] ingredients, @Optional ILiquidStack fluidInput, int packagingTime, @Optional IItemStack box) {
|
||||
|
@ -100,7 +100,7 @@ public class Carpenter {
|
|||
* Removes a recipe for the Carpenter
|
||||
*
|
||||
* @param output = item output
|
||||
* @param liquid = liquid input
|
||||
* @optionalParam liquid = liquid input
|
||||
*/
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IIngredient output, @Optional IIngredient liquid) {
|
||||
|
|
|
@ -35,8 +35,8 @@ public class Centrifuge {
|
|||
* Adds a recipe for the Centrifuge
|
||||
*
|
||||
* @param output List of items to produce with associated chance
|
||||
* @param timePerItem time per item to process
|
||||
* @param ingredient item input
|
||||
* @param timePerItem time per item to process
|
||||
*/
|
||||
@ZenMethod
|
||||
public static void addRecipe(WeightedItemStack[] output, IItemStack ingredient, int timePerItem) {
|
||||
|
|
|
@ -44,6 +44,9 @@ 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()) ));
|
||||
//TODO: this should definitiv solved somehow better
|
||||
MachineSqueezer.RecipeManager.recipeFluids.add(getFluid(fluidOutput));
|
||||
MachineSqueezer.RecipeManager.recipeInputs.addAll(Arrays.asList(toStacks(ingredients)));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
|
|
|
@ -13,6 +13,7 @@ import minetweaker.api.liquid.ILiquidStack;
|
|||
import modtweaker2.helpers.LogHelper;
|
||||
import modtweaker2.utils.BaseListAddition;
|
||||
import modtweaker2.utils.BaseListRemoval;
|
||||
import stanhebben.zenscript.annotations.Optional;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import forestry.factory.gadgets.MachineStill;
|
||||
|
@ -69,7 +70,7 @@ public class Still {
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(ILiquidStack output, ILiquidStack input) {
|
||||
public static void removeRecipe(ILiquidStack output, @Optional ILiquidStack input) {
|
||||
List<Recipe> recipes = new LinkedList<Recipe>();
|
||||
|
||||
for (Recipe r : RecipeManager.recipes) {
|
||||
|
|
|
@ -17,6 +17,7 @@ import modtweaker2.utils.BaseListAddition;
|
|||
import modtweaker2.utils.BaseListRemoval;
|
||||
import net.minecraft.item.ItemStack;
|
||||
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;
|
||||
|
@ -63,7 +64,7 @@ public class ThermionicFabricator {
|
|||
* @param plan recipe plan item
|
||||
*/
|
||||
@ZenMethod
|
||||
public static void addCast(IItemStack product, IItemStack[][] ingredients, int fluidInput, IItemStack plan) {
|
||||
public static void addCast(IItemStack product, IItemStack[][] ingredients, int fluidInput, @Optional IItemStack plan) {
|
||||
ItemStack[] flatList = new ItemStack[9];
|
||||
for ( int i = 0; i < 3; i++) {
|
||||
for ( int j = 0; j < 3; j++) {
|
||||
|
|
Loading…
Reference in a new issue