Search in sources :

Example 1 with AssemblingMachineRecipe

use of techreborn.api.recipe.machines.AssemblingMachineRecipe in project TechReborn by TechReborn.

the class CTAssemblingMachine method addRecipe.

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

Example 2 with AssemblingMachineRecipe

use of techreborn.api.recipe.machines.AssemblingMachineRecipe in project TechReborn by TechReborn.

the class MTAssemblingMachine method addRecipe.

@ZenMethod
public static void addRecipe(IItemStack output, IIngredient input1, IIngredient input2, int ticktime, int euTick) {
    ItemStack oInput1 = (ItemStack) MinetweakerCompat.toObject(input1);
    ItemStack oInput2 = (ItemStack) MinetweakerCompat.toObject(input2);
    AssemblingMachineRecipe r = new AssemblingMachineRecipe(oInput1, oInput2, MinetweakerCompat.toStack(output), ticktime, euTick);
    addRecipe(r);
}
Also used : AssemblingMachineRecipe(techreborn.api.recipe.machines.AssemblingMachineRecipe) IItemStack(minetweaker.api.item.IItemStack) ItemStack(net.minecraft.item.ItemStack) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 3 with AssemblingMachineRecipe

use of techreborn.api.recipe.machines.AssemblingMachineRecipe in project TechReborn by TechReborn.

the class TechRebornJeiPlugin method addDebugRecipes.

private static void addDebugRecipes(IModRegistry registry) {
    ItemStack diamondBlock = new ItemStack(Blocks.DIAMOND_BLOCK);
    ItemStack dirtBlock = new ItemStack(Blocks.DIRT);
    List<Object> debugRecipes = new ArrayList<>();
    for (int i = 0; i < 10; i++) {
        int time = (int) Math.round(200 + Math.random() * 100);
        AssemblingMachineRecipe assemblingMachineRecipe = new AssemblingMachineRecipe(diamondBlock, diamondBlock, dirtBlock, time, 120);
        debugRecipes.add(assemblingMachineRecipe);
    }
    for (int i = 0; i < 10; i++) {
        int time = (int) Math.round(200 + Math.random() * 100);
        ImplosionCompressorRecipe recipe = new ImplosionCompressorRecipe(diamondBlock, diamondBlock, dirtBlock, dirtBlock, time, 120);
        debugRecipes.add(recipe);
    }
    registry.addRecipes(debugRecipes);
}
Also used : AssemblingMachineRecipe(techreborn.api.recipe.machines.AssemblingMachineRecipe) ArrayList(java.util.ArrayList) ItemStack(net.minecraft.item.ItemStack) ImplosionCompressorRecipe(techreborn.api.recipe.machines.ImplosionCompressorRecipe)

Aggregations

AssemblingMachineRecipe (techreborn.api.recipe.machines.AssemblingMachineRecipe)3 ItemStack (net.minecraft.item.ItemStack)2 ZenMethod (stanhebben.zenscript.annotations.ZenMethod)2 ArrayList (java.util.ArrayList)1 IItemStack (minetweaker.api.item.IItemStack)1 ImplosionCompressorRecipe (techreborn.api.recipe.machines.ImplosionCompressorRecipe)1