@minecraft
    正在准备搜索索引...

    类 LootTableManager实验性

    Manager for Loot Table related APIs. Allows for generation of drops from blocks and entities according to their loot tables.

    索引

    方法

    • 参数

      返回 ItemStack[]

      An array of item stacks dropped from the loot drop event. Can be empty if no loot dropped, or undefined if the provided tool is insufficient to mine the block.

      Generates loot from a given block permutation as if it had been mined.

    • 参数

      • scriptBlockType: BlockType
      • 可选tool: ItemStack

        Optional. The tool to use in the looting operation.

      返回 ItemStack[]

      An array of item stacks dropped from the loot drop event. Can be empty if no loot dropped, or undefined if the provided tool is insufficient to mine the block.

      Generates loot from a given block type as if it had been mined.

    • 参数

      • entity: Entity
      • 可选tool: ItemStack

        Optional. The tool to use in the looting operation.

      返回 ItemStack[]

      An array of item stacks dropped from the loot drop event. Can be empty if no loot dropped, or undefined if the entity was invalid.

      Generates loot from given a entity as if it had been killed.

      This function can throw errors.

      InvalidEntityError