程序包 org.bukkit.inventory

# 接口 CraftingInventory

所有超级接口:
  `Inventory`, `Iterable<ItemStack>`

public interface CraftingInventory extends Inventory
合成台的用户界面接口.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@NotNull ItemStack[]`
  `getMatrix()`
  获取合成公式.
  `@Nullable Recipe`
  `getRecipe()`
  Get the current recipe formed on the crafting inventory, if any.
  `@Nullable ItemStack`
  `getResult()`
  获取合成台产生的合成品.
  `void`
  `setMatrix(@NotNull ItemStack[] contents)`
  Replace the contents of the crafting matrix
  `void`
  `setResult(@Nullable ItemStack newResult)`
  设置最终合成品.

  ### 从接口继承的方法 org.bukkit.inventory.Inventory

  `addItem, all, all, clear, clear, contains, contains, contains, contains, containsAtLeast, first, first, firstEmpty, getContents, getHolder, getItem, getLocation, getMaxStackSize, getSize, getStorageContents, getType, getViewers, isEmpty, iterator, iterator, remove, remove, removeItem, setContents, setItem, setMaxStackSize, setStorageContents`

  ### 从接口继承的方法 java.lang.Iterable

  `forEach, spliterator`

- ## 方法详细资料

  - ### getResult

    @Nullable @Nullable ItemStack getResult()
    获取合成台产生的合成品.

    原文:Check what item is in the result slot of this crafting inventory.

    返回:
      合成品.

  - ### getMatrix

    @NotNull @NotNull ItemStack[] getMatrix()
    获取合成公式.

    原文:Get the contents of the crafting matrix.

    返回:
      合成公式. 个别条目可能为null.

  - ### setResult

    void setResult(@Nullable @Nullable ItemStack newResult)
    设置最终合成品.

    原文:Set the item in the result slot of the crafting inventory.

    参数:
      `newResult` - 新合成品.

  - ### setMatrix

    void setMatrix(@NotNull @NotNull ItemStack[] contents)
    Replace the contents of the crafting matrix
    参数:
      `contents` - The new contents. Individual entries may be null.
    抛出:
      `IllegalArgumentException` - if the length of contents is greater than the size of the crafting matrix.

  - ### getRecipe

    @Nullable @Nullable Recipe getRecipe()
    Get the current recipe formed on the crafting inventory, if any.
    返回:
      The recipe, or null if the current contents don't match any recipe.