Search in sources :

Example 21 with ZenMethod

use of stanhebben.zenscript.annotations.ZenMethod in project Binnie by ForestryMC.

the class FruitPressRecipeHandler method addRecipe.

@ZenMethod
public static void addRecipe(IItemStack input, ILiquidStack output) {
    ItemStack inputStack = CraftTweakerUtil.getItemStack(input);
    FluidStack outputStack = CraftTweakerUtil.getLiquidStack(output);
    addRecipe(new FruitPressRecipe(inputStack, outputStack), ExtraTreesRecipeManager.fruitPressManager);
}
Also used : FruitPressRecipe(binnie.extratrees.machines.fruitpress.recipes.FruitPressRecipe) FluidStack(net.minecraftforge.fluids.FluidStack) ItemStack(net.minecraft.item.ItemStack) IItemStack(crafttweaker.api.item.IItemStack) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 22 with ZenMethod

use of stanhebben.zenscript.annotations.ZenMethod in project Minechem by iopleke.

the class Synthesiser method addRecipe.

@ZenMethod
public static void addRecipe(IIngredient[] inputs, IIngredient outputStack, boolean shaped, int energy) {
    boolean someValue = false;
    PotionChemical[] inputFixed = new PotionChemical[9];
    if (shaped) {
        for (int i = 0; i < inputFixed.length && i < inputs.length; i++) {
            if (inputs[i] != null) {
                inputFixed[i] = InputHelper.getChemical(inputs[i]);
                if (inputFixed[i] != null)
                    someValue = true;
            }
        }
    } else {
        List<PotionChemical> input = InputHelper.getChemicals(inputs);
        inputFixed = Arrays.copyOf(input.toArray(new PotionChemical[0]), 9);
        someValue = !input.isEmpty();
    }
    if (someValue) {
        ItemStack output = InputHelper.getInput(outputStack);
        if (output != null) {
            MineTweakerAPI.apply(new AddRecipeAction(output, shaped, energy, inputFixed));
        }
    }
}
Also used : PotionChemical(minechem.potion.PotionChemical) ItemStack(net.minecraft.item.ItemStack) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 23 with ZenMethod

use of stanhebben.zenscript.annotations.ZenMethod in project Minechem by iopleke.

the class Chemicals method addFoodEffect.

@ZenMethod
public static void addFoodEffect(IIngredient ingredient, int level, double saturation) {
    PharmacologyEffect effect = new PharmacologyEffect.Food(level, (float) saturation);
    addEffect(ingredient, effect);
}
Also used : PharmacologyEffect(minechem.potion.PharmacologyEffect) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 24 with ZenMethod

use of stanhebben.zenscript.annotations.ZenMethod in project Minechem by iopleke.

the class Chemicals method addCureEffect.

@ZenMethod
public static void addCureEffect(IIngredient ingredient, String string) {
    PharmacologyEffect effect = new PharmacologyEffect.Cure(string);
    addEffect(ingredient, effect);
}
Also used : PharmacologyEffect(minechem.potion.PharmacologyEffect) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 25 with ZenMethod

use of stanhebben.zenscript.annotations.ZenMethod in project Minechem by iopleke.

the class Chemicals method addBurnEffect.

@ZenMethod
public static void addBurnEffect(IIngredient ingredient, int time) {
    PharmacologyEffect effect = new PharmacologyEffect.Burn(time);
    addEffect(ingredient, effect);
}
Also used : PharmacologyEffect(minechem.potion.PharmacologyEffect) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Aggregations

ZenMethod (stanhebben.zenscript.annotations.ZenMethod)67 ItemStack (net.minecraft.item.ItemStack)23 IItemStack (crafttweaker.api.item.IItemStack)14 FluidStack (net.minecraftforge.fluids.FluidStack)7 PharmacologyEffect (minechem.potion.PharmacologyEffect)6 IItemStack (minetweaker.api.item.IItemStack)6 PotionChemical (minechem.potion.PotionChemical)4 NetRecipe (betterwithaddons.crafting.recipes.NetRecipe)3 CherryBoxRecipe (betterwithaddons.crafting.recipes.CherryBoxRecipe)2 GristSet (com.mraof.minestuck.util.GristSet)2 IAction (crafttweaker.IAction)2 ChemicalRoomStateEnum (minechem.item.ChemicalRoomStateEnum)2 PackingRecipe (betterwithaddons.crafting.recipes.PackingRecipe)1 SmeltingRecipe (betterwithaddons.crafting.recipes.SmeltingRecipe)1 SpindleRecipe (betterwithaddons.crafting.recipes.SpindleRecipe)1 WoodHardness (betterwithaddons.handler.StumpingHandler.WoodHardness)1 ItemMaterial (betterwithaddons.item.ItemMaterial)1 TreeFood (betterwithaddons.tileentity.TileEntityLureTree.TreeFood)1 IngredientCraftTweaker (betterwithaddons.util.IngredientCraftTweaker)1 BrewedGrainRecipe (binnie.extratrees.machines.brewery.recipes.BrewedGrainRecipe)1