接口 BlockInventoryHolder

所有超级接口:
InventoryHolder
所有已知子接口:
Barrel, BlastFurnace, BrewingStand, Chest, ChiseledBookshelf, Container, Crafter, DecoratedPot, Dispenser, Dropper, Furnace, Hopper, Jukebox, Lectern, Shelf, ShulkerBox, Smoker

public interface BlockInventoryHolder extends InventoryHolder
代表一个方块物品栏持有者 - 可以是BlockState或普通Block.
  • 方法详细资料

    • getBlock

      @NotNull @NotNull Block getBlock()
      获取与此持有者关联的方块.

      原文: Gets the block associated with this holder.

      返回:
      与此持有者关联的方块
      抛出:
      IllegalStateException - 如果持有者是方块状态且未被放置