Search in sources :

Example 26 with ZenMethod

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

the class Chemicals method addPotionEffect.

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

Example 27 with ZenMethod

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

the class Chemicals method addElement.

@ZenMethod
public static void addElement(int id, String name, String descriptiveName, String classification, String roomState, String radioactivity) {
    if (id < 0) {
        throw new IllegalArgumentException(id + " is invalid");
    }
    if (ElementEnum.getByID(id) != null) {
        throw new IllegalArgumentException(id + ": " + name + " is already registered as an element");
    }
    ElementClassificationEnum eClass = InputHelper.getClassification(classification);
    ChemicalRoomStateEnum state = InputHelper.getRoomState(roomState);
    RadiationEnum radiation = InputHelper.getRadiation(radioactivity);
    MineTweakerAPI.apply(new AddElementAction(id, name, descriptiveName, eClass, state, radiation));
}
Also used : RadiationEnum(minechem.radiation.RadiationEnum) ChemicalRoomStateEnum(minechem.item.ChemicalRoomStateEnum) ElementClassificationEnum(minechem.item.element.ElementClassificationEnum) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 28 with ZenMethod

use of stanhebben.zenscript.annotations.ZenMethod in project ImmersiveEngineering by BluSunrize.

the class BlastFurnace method addRecipe.

@ZenMethod
public static void addRecipe(IItemStack output, IIngredient input, int time, @Optional IItemStack slag) {
    Object oInput = CraftTweakerHelper.toObject(input);
    if (oInput == null)
        return;
    BlastFurnaceRecipe r = new BlastFurnaceRecipe(CraftTweakerHelper.toStack(output), oInput, time, CraftTweakerHelper.toStack(slag));
    CraftTweakerAPI.apply(new Add(r));
}
Also used : BlastFurnaceRecipe(blusunrize.immersiveengineering.api.crafting.BlastFurnaceRecipe) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 29 with ZenMethod

use of stanhebben.zenscript.annotations.ZenMethod in project ImmersiveEngineering by BluSunrize.

the class BottlingMachine method addRecipe.

@ZenMethod
public static void addRecipe(IItemStack output, IIngredient input, ILiquidStack fluid) {
    Object oInput = CraftTweakerHelper.toObject(input);
    if (oInput == null || output == null || fluid == null)
        return;
    BottlingMachineRecipe r = new BottlingMachineRecipe(CraftTweakerHelper.toStack(output), oInput, CraftTweakerHelper.toFluidStack(fluid));
    CraftTweakerAPI.apply(new Add(r));
}
Also used : BottlingMachineRecipe(blusunrize.immersiveengineering.api.crafting.BottlingMachineRecipe) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 30 with ZenMethod

use of stanhebben.zenscript.annotations.ZenMethod in project ImmersiveEngineering by BluSunrize.

the class MetalPress method addRecipe.

@ZenMethod
public static void addRecipe(IItemStack output, IIngredient input, IItemStack mold, int energy, @Optional int inputSize) {
    Object oInput = CraftTweakerHelper.toObject(input);
    if (oInput == null)
        return;
    ItemStack sOut = CraftTweakerHelper.toStack(output);
    ItemStack sMold = CraftTweakerHelper.toStack(mold);
    if (!sOut.isEmpty() && !sMold.isEmpty()) {
        MetalPressRecipe r = new MetalPressRecipe(sOut, oInput, ApiUtils.createComparableItemStack(sMold, true), energy);
        if (inputSize > 0)
            r.setInputSize(inputSize);
        CraftTweakerAPI.apply(new Add(r));
    }
}
Also used : MetalPressRecipe(blusunrize.immersiveengineering.api.crafting.MetalPressRecipe) ComparableItemStack(blusunrize.immersiveengineering.api.ComparableItemStack) ItemStack(net.minecraft.item.ItemStack) IItemStack(crafttweaker.api.item.IItemStack) 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