Script API - v1.21.110
    Preparing search index...

    Class LootTableManager

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

    Index

    Constructors

    Methods

    • Parameters

      Returns 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.

      This function can't be called in early-execution mode.

    • Parameters

      • scriptBlockType: BlockType
      • Optionaltool: ItemStack

        Optional. The tool to use in the looting operation.

      Returns 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.

      This function can't be called in early-execution mode.

    • Parameters

      • entity: Entity
      • Optionaltool: ItemStack

        Optional. The tool to use in the looting operation.

      Returns 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

      This function can't be called in early-execution mode.

    • Parameters

      • entityType: EntityType
      • Optionaltool: ItemStack

        Optional. The tool to use in the looting operation.

      Returns ItemStack[]

      An array of item stacks dropped from the loot drop event. Can be empty if no loot dropped.

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

      This function can't be called in early-execution mode.