Search in sources :

Example 41 with ZenMethod

use of stanhebben.zenscript.annotations.ZenMethod in project BetterWithAddons by DaedalusGame.

the class Packing method add.

@ZenMethod
public static void add(IItemStack output, IIngredient input) {
    ItemStack stack = CraftTweakerMC.getItemStack(output);
    if (stack.getItem() instanceof ItemBlock) {
        Block block = ((ItemBlock) stack.getItem()).getBlock();
        PackingRecipe r = new PackingRecipe(new IngredientCraftTweaker(input), block.getStateFromMeta(stack.getMetadata()));
        r.setJeiOutput(stack);
        CraftTweaker.LATE_ACTIONS.add(new Add(r));
    }
}
Also used : PackingRecipe(betterwithaddons.crafting.recipes.PackingRecipe) Block(net.minecraft.block.Block) ItemBlock(net.minecraft.item.ItemBlock) IngredientCraftTweaker(betterwithaddons.util.IngredientCraftTweaker) ItemStack(net.minecraft.item.ItemStack) IItemStack(crafttweaker.api.item.IItemStack) ItemBlock(net.minecraft.item.ItemBlock) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 42 with ZenMethod

use of stanhebben.zenscript.annotations.ZenMethod in project Charset by CharsetMC.

the class MaterialRegistry method registerTypes.

@ZenMethod
public static boolean registerTypes(IItemStack stack, String... tags) {
    ItemStack mcStack = CraftTweakerMC.getItemStack(stack);
    if (mcStack.isEmpty()) {
        return false;
    }
    CraftTweakerAPI.apply(new IAction() {

        @Override
        public void apply() {
            ItemMaterial material = ItemMaterialRegistry.INSTANCE.getOrCreateMaterial(mcStack);
            ItemMaterialRegistry.INSTANCE.registerTypes(material, tags);
        }

        @Override
        public String describe() {
            return "Registering stack " + stack + " as material with types " + JOINER.join(tags);
        }
    });
    return true;
}
Also used : IAction(crafttweaker.IAction) ItemMaterial(pl.asie.charset.lib.material.ItemMaterial) ItemStack(net.minecraft.item.ItemStack) IItemStack(crafttweaker.api.item.IItemStack) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 43 with ZenMethod

use of stanhebben.zenscript.annotations.ZenMethod in project TechReborn by TechReborn.

the class CTVacuumFreezer method addRecipe.

@ZenMethod
public static void addRecipe(IItemStack output, IIngredient input, int ticktime, int euTick) {
    Object oInput1 = CraftTweakerCompat.toObject(input);
    VacuumFreezerRecipe r = new VacuumFreezerRecipe(oInput1, CraftTweakerCompat.toStack(output), ticktime, euTick);
    addRecipe(r);
}
Also used : VacuumFreezerRecipe(techreborn.api.recipe.machines.VacuumFreezerRecipe) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 44 with ZenMethod

use of stanhebben.zenscript.annotations.ZenMethod in project TechReborn by TechReborn.

the class CTChemicalReactor method addRecipe.

@ZenMethod
public static void addRecipe(IItemStack output1, IIngredient input1, IIngredient input2, int ticktime, int euTick) {
    Object oInput1 = CraftTweakerCompat.toObject(input1);
    Object oInput2 = CraftTweakerCompat.toObject(input2);
    ChemicalReactorRecipe r = new ChemicalReactorRecipe(oInput1, oInput2, CraftTweakerCompat.toStack(output1), ticktime, euTick);
    addRecipe(r);
}
Also used : ChemicalReactorRecipe(techreborn.api.recipe.machines.ChemicalReactorRecipe) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 45 with ZenMethod

use of stanhebben.zenscript.annotations.ZenMethod in project TechReborn by TechReborn.

the class CTCompressor method addRecipe.

@ZenMethod
public static void addRecipe(IItemStack output1, IIngredient input1, int ticktime, int euTick) {
    Object oInput1 = CraftTweakerCompat.toObject(input1);
    CompressorRecipe r = new CompressorRecipe(oInput1, CraftTweakerCompat.toStack(output1), ticktime, euTick);
    addRecipe(r);
}
Also used : CompressorRecipe(techreborn.api.recipe.machines.CompressorRecipe) 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