Search in sources :

Example 1 with ICraftingContext

use of com.codetaylor.mc.artisanworktables.api.internal.recipe.ICraftingContext in project artisan-worktables by codetaylor.

the class Container method updateRecipeOutput.

public void updateRecipeOutput() {
    if (this.tile == null) {
        return;
    }
    IArtisanRecipe recipe = this.tile.getRecipe(this.player);
    if (recipe != null) {
        ICraftingContext context = this.tile.getCraftingContext(this.player);
        this.resultHandler.setStackInSlot(0, recipe.getBaseOutput(context).toItemStack());
    } else {
        this.resultHandler.setStackInSlot(0, ItemStack.EMPTY);
    }
}
Also used : ICraftingContext(com.codetaylor.mc.artisanworktables.api.internal.recipe.ICraftingContext) IArtisanRecipe(com.codetaylor.mc.artisanworktables.api.recipe.IArtisanRecipe)

Aggregations

ICraftingContext (com.codetaylor.mc.artisanworktables.api.internal.recipe.ICraftingContext)1 IArtisanRecipe (com.codetaylor.mc.artisanworktables.api.recipe.IArtisanRecipe)1