Interface CraftingInventory

  • All Superinterfaces:
    Inventory, ValueContainer

    public interface CraftingInventory
    extends Inventory
    A CraftingInventory represents the inventory of something that can craft items.
    • Method Detail

      • craftingGrid

        CraftingGridInventory craftingGrid()
        Gets the crafting matrix of this CraftingInventory.
        Returns:
        The crafting matrix
      • result

        CraftingOutput result()
        Gets the result slot of this CraftingInventory.
        Returns:
        The result slot
      • recipe

        default Optional<CraftingRecipe> recipe​(ServerWorld world)
        Retrieves the recipe formed by this CraftingInventory, if any.
        Parameters:
        world - The world where the item would be crafted in
        Returns:
        The recipe or Optional.empty() if no recipe is formed