Search in sources :

Example 1 with GrindingBall

use of crazypants.enderio.base.recipe.sagmill.GrindingBall in project EnderIO by SleepyTrousers.

the class Grindingball method register.

@Override
public void register(@Nonnull String recipeName) {
    if (!disabled && valid && active) {
        Log.debug("Registering XML recipe '" + getName() + "'");
        SagMillRecipeManager.getInstance().addBall(new GrindingBall(new ThingsRecipeInput(item.getThing()), grinding, chance, power, durability));
    } else {
        Log.debug("Skipping XML recipe '" + getName() + "' (valid=" + valid + ", active=" + active + ", required=" + required + ", disabled=" + disabled + ")");
    }
}
Also used : GrindingBall(crazypants.enderio.base.recipe.sagmill.GrindingBall) ThingsRecipeInput(crazypants.enderio.base.recipe.ThingsRecipeInput)

Example 2 with GrindingBall

use of crazypants.enderio.base.recipe.sagmill.GrindingBall in project EnderIO by SleepyTrousers.

the class SagRecipe method getBalls.

@Nonnull
static List<ItemStack> getBalls() {
    NNList<GrindingBall> daBalls = SagMillRecipeManager.getInstance().getBalls();
    List<ItemStack> res = new ArrayList<ItemStack>();
    // sic! JEI will display null as an empty slot but ignore empty stacks completely
    res.add(null);
    for (GrindingBall ball : daBalls) {
        res.add(ball.getInput());
    }
    return res;
}
Also used : ArrayList(java.util.ArrayList) GrindingBall(crazypants.enderio.base.recipe.sagmill.GrindingBall) ItemStack(net.minecraft.item.ItemStack) Nonnull(javax.annotation.Nonnull)

Aggregations

GrindingBall (crazypants.enderio.base.recipe.sagmill.GrindingBall)2 ThingsRecipeInput (crazypants.enderio.base.recipe.ThingsRecipeInput)1 ArrayList (java.util.ArrayList)1 Nonnull (javax.annotation.Nonnull)1 ItemStack (net.minecraft.item.ItemStack)1