程序包 org.bukkit.block

# 接口 Furnace

所有超级接口:
  `BlockInventoryHolder`, `BlockState`, `Container`, `InventoryHolder`, `Lockable`, `Metadatable`, `Nameable`, `PersistentDataHolder`, `TileState`

所有已知子接口:
  `BlastFurnace`, `Smoker`

public interface Furnace extends Container
代表熔炉.

译注:本页出现的时间均以tick为单位, tick(刻)是服务器内部表示时间的方式, 理想状态下1 tick为50ms.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `short`
  `getBurnTime()`
  获取燃烧持续时间.
  `short`
  `getCookTime()`
  获取物品已烧炼时间.
  `int`
  `getCookTimeTotal()`
  获取烧炼总时间.
  `@NotNull FurnaceInventory`
  `getInventory()`
  获取此容器方块的物品栏.
  `@NotNull Map<CookingRecipe<?>,Integer>`
  `getRecipesUsed()`
  Get the recipes used in this furnace.
  `@NotNull FurnaceInventory`
  `getSnapshotInventory()`
  获取本容器的物品栏的快照.
  `void`
  `setBurnTime(short burnTime)`
  设置燃烧持续时间.
  `void`
  `setCookTime(short cookTime)`
  设置物品已烧炼时间.
  `void`
  `setCookTimeTotal(int cookTimeTotal)`
  设置烧炼总时间.

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

  `getBlock`

  ### 从接口继承的方法 org.bukkit.block.BlockState

  `copy, copy, getBlock, getBlockData, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isPlaced, setBlockData, setData, setRawData, setType, update, update, update`

  ### 从接口继承的方法 org.bukkit.block.Lockable

  `getLock, isLocked, setLock`

  ### 从接口继承的方法 org.bukkit.metadata.Metadatable

  `getMetadata, hasMetadata, removeMetadata, setMetadata`

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

  `getCustomName, setCustomName`

  ### 从接口继承的方法 org.bukkit.block.TileState

  `getPersistentDataContainer`

- ## 方法详细资料

  - ### getBurnTime

    short getBurnTime()
    获取燃烧持续时间.

    原文: Get burn time.

    返回:
      燃烧持续时间

  - ### setBurnTime

    void setBurnTime(short burnTime)
    设置燃烧持续时间. 大于0的燃烧持续时间将使熔炉燃烧, 同时小于0的时间将熄灭它.

    原文: Set burn time. A burn time greater than 0 will cause this block to be lit, whilst a time less than 0 will extinguish it.

    参数:
      `burnTime` - 燃烧持续时间

  - ### getCookTime

    short getCookTime()
    获取物品已烧炼时间.

    原文: Get cook time. This is the amount of time the item has been cooking for.

    返回:
      物品已烧炼时间

  - ### setCookTime

    void setCookTime(short cookTime)
    设置物品已烧炼时间.

    原文: Set cook time. This is the amount of time the item has been cooking for.

    参数:
      `cookTime` - 物品已烧炼时间

  - ### getCookTimeTotal

    int getCookTimeTotal()
    获取烧炼总时间. 本时间表示烧炼物品所需的时间.

    原文:Get cook time total. This is the amount of time the item is required to cook for.

    返回:
      烧炼总时间

  - ### setCookTimeTotal

    void setCookTimeTotal(int cookTimeTotal)
    设置烧炼总时间. 本时间表示烧炼物品所需的时间.

    原文:Set cook time. This is the amount of time the item is required to cook for.

    参数:
      `cookTimeTotal` - 烧炼总时间

  - ### getRecipesUsed

    @NotNull @NotNull Map<CookingRecipe<?>,Integer> getRecipesUsed()
    Get the recipes used in this furnace. Note: These recipes used are reset when the result item is manually taken from the furnace.
    返回:
      An immutable map with the recipes used and the times used

  - ### getInventory

    @NotNull @NotNull FurnaceInventory getInventory()
    从接口复制的说明: `Container`
    获取此容器方块的物品栏.

    如果于此同时此方块的类型发生改变, 返回的物品栏可能不再有效.

    如果此方块未被放置, 这将返回物品栏快照.

    原文:Gets the inventory of the block represented by this block state.

    If the block was changed to a different type in the meantime, the returned inventory might no longer be valid.

    If this block state is not placed this will return the captured inventory snapshot instead.

    指定者:
      `getInventory` 在接口中 `Container`
    指定者:
      `getInventory` 在接口中 `InventoryHolder`
    返回:
      物品栏

  - ### getSnapshotInventory

    @NotNull @NotNull FurnaceInventory getSnapshotInventory()
    从接口复制的说明: `Container`
    获取本容器的物品栏的快照.

    返回的快照不与任何方块相关联. 任何对此物品栏快照的修改将不会应用于真实的方块上, 直到调用 `BlockState.update(boolean, boolean)`.

    原文:Gets the captured inventory snapshot of this container.

    The returned inventory is not linked to any block. Any modifications to the returned inventory will not be applied to the block represented by this block state up until `BlockState.update(boolean, boolean)` has been called.

    指定者:
      `getSnapshotInventory` 在接口中 `Container`
    返回:
      物品栏快照