Search in sources :

Example 1 with SmeltingRecipe

use of betterwithaddons.crafting.recipes.SmeltingRecipe in project BetterWithAddons by DaedalusGame.

the class CraftingManagerTatara method getSmeltingResult.

@Nullable
public ItemStack getSmeltingResult(ItemStack input) {
    Iterator<SmeltingRecipe> var2 = this.recipes.iterator();
    SmeltingRecipe entry;
    do {
        if (!var2.hasNext()) {
            return ItemStack.EMPTY;
        }
        entry = var2.next();
    } while (!entry.matchesInput(input));
    return entry.getOutput(input);
}
Also used : SmeltingRecipe(betterwithaddons.crafting.recipes.SmeltingRecipe) Nullable(javax.annotation.Nullable)

Example 2 with SmeltingRecipe

use of betterwithaddons.crafting.recipes.SmeltingRecipe in project BetterWithAddons by DaedalusGame.

the class CraftingManagerTatara method getSmeltingRecipe.

public SmeltingRecipe getSmeltingRecipe(ItemStack input) {
    Iterator<SmeltingRecipe> var2 = this.recipes.iterator();
    SmeltingRecipe entry;
    do {
        if (!var2.hasNext()) {
            return null;
        }
        entry = var2.next();
    } while (!entry.matchesInput(input));
    return entry;
}
Also used : SmeltingRecipe(betterwithaddons.crafting.recipes.SmeltingRecipe)

Example 3 with SmeltingRecipe

use of betterwithaddons.crafting.recipes.SmeltingRecipe in project BetterWithAddons by DaedalusGame.

the class Tatara method add.

@ZenMethod
public static void add(IItemStack output, IItemStack input) {
    SmeltingRecipe recipe = new SmeltingRecipe(InputHelper.toObject(input), InputHelper.toStack(output));
    MineTweakerAPI.apply(new Add(Lists.newArrayList(recipe)));
}
Also used : SmeltingRecipe(betterwithaddons.crafting.recipes.SmeltingRecipe) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Aggregations

SmeltingRecipe (betterwithaddons.crafting.recipes.SmeltingRecipe)3 Nullable (javax.annotation.Nullable)1 ZenMethod (stanhebben.zenscript.annotations.ZenMethod)1