Search in sources :

Example 66 with ZenMethod

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

the class Condensed method setContainer.

@ZenMethod
public static void setContainer(@NotNull IItemStack condensed, @NotNull IItemStack input) {
    ItemStack item = InputHelper.toStack(condensed);
    ItemStack container = InputHelper.toStack(input);
    if (item.getItem() instanceof ItemMaterial)
        MineTweakerAPI.apply(new SetContainer((ItemMaterial) item.getItem(), container));
}
Also used : ItemMaterial(betterwithaddons.item.ItemMaterial) IItemStack(minetweaker.api.item.IItemStack) ItemStack(net.minecraft.item.ItemStack) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 67 with ZenMethod

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

the class SoakingBox method add.

@ZenMethod
public static void add(IItemStack output, IItemStack input) {
    CherryBoxRecipe recipe = new CherryBoxRecipe(BlockCherryBox.CherryBoxType.SOAKING, InputHelper.toObject(input), InputHelper.toStack(output));
    MineTweakerAPI.apply(new Add("SoakingBox", SoakingBoxRecipeCategory.UID, CraftingManagerSoakingBox.instance(), Lists.newArrayList(recipe)));
}
Also used : CherryBoxRecipe(betterwithaddons.crafting.recipes.CherryBoxRecipe) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 68 with ZenMethod

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

the class Spindle method add.

@ZenMethod
public static void add(IItemStack[] outputs, @NotNull IIngredient input, boolean consumesSpindle) {
    SpindleRecipe r = new SpindleRecipe(consumesSpindle, InputHelper.toObject(input), InputHelper.toStacks(outputs));
    MineTweakerAPI.apply(new Add(r));
}
Also used : SpindleRecipe(betterwithaddons.crafting.recipes.SpindleRecipe) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 69 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 70 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)

Aggregations

ZenMethod (stanhebben.zenscript.annotations.ZenMethod)102 ItemStack (net.minecraft.item.ItemStack)45 IItemStack (minetweaker.api.item.IItemStack)28 IItemStack (crafttweaker.api.item.IItemStack)14 FluidStack (net.minecraftforge.fluids.FluidStack)9 PharmacologyEffect (minechem.potion.PharmacologyEffect)6 PotionChemical (minechem.potion.PotionChemical)4 NetRecipe (betterwithaddons.crafting.recipes.NetRecipe)3 MineTweakerMC.getItemStack (minetweaker.api.minecraft.MineTweakerMC.getItemStack)3 Method (net.minecraftforge.fml.common.Optional.Method)3 CherryBoxRecipe (betterwithaddons.crafting.recipes.CherryBoxRecipe)2 GristSet (com.mraof.minestuck.util.GristSet)2 IAction (crafttweaker.IAction)2 FluidKey (gregtech.api.recipes.FluidKey)2 ChemicalRoomStateEnum (minechem.item.ChemicalRoomStateEnum)2 Block (net.minecraft.block.Block)2 IRecipe (net.minecraft.item.crafting.IRecipe)2 FusionReactorRecipe (techreborn.api.reactor.FusionReactorRecipe)2 AlloySmelterRecipe (techreborn.api.recipe.machines.AlloySmelterRecipe)2 CentrifugeRecipe (techreborn.api.recipe.machines.CentrifugeRecipe)2