Java 类net.minecraft.client.util.RecipeItemHelper 实例源码

项目:PurificatiMagicae    文件:ContainerMagibench.java   
@Override
public void fillStackedContents(RecipeItemHelper helper)
{
    ItemStackHandler handler = ContainerMagibench.this.tile.handler;
    for (int i = 0; i < handler.getSlots(); i++)
    {
        helper.accountStack(handler.getStackInSlot(i));
    }
}
项目:enderutilities    文件:InventoryCraftingEnderUtilities.java   
@Override
public void fillStackedContents(RecipeItemHelper recipeItemHelper)
{
    final int invSize = this.craftMatrix.getSlots();

    for (int slot = 0; slot < invSize; slot++)
    {
        recipeItemHelper.accountStack(this.craftMatrix.getStackInSlot(slot));
    }
}
项目:iChunUtil    文件:ConditionalIngredient.java   
@Override
@Nonnull
public IntList getValidItemStacksPacked() {
    boolean normal = isConditionMet.getAsBoolean();
    IntList validStacks = normal ? packedConditionMet : packedConditionNotMet;
    if (validStacks == null)
    {
        validStacks = IntLists.singleton(RecipeItemHelper.pack(normal ? stackConditionMet : stackConditionNotMet));
        if (normal)
            packedConditionMet = validStacks;
        else
            packedConditionNotMet = validStacks;
    }
    return validStacks;
}