bedrock-kit
    Preparing search index...

    Class TradingTable

    Represents a villager trading table from the behavior pack's trading/ directory. Trading tables define the tiers of trades available for a villager profession.

    Access via addon.trading.get(id).

    const table = addon.trading.get("armorer_trades");
    console.log(table?.tiers[0].trades[0]);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    data: Record<string, unknown>

    The raw parsed JSON data of the asset file.

    docstrings: CommentBlock[]

    All JSDoc-style comment blocks parsed from this asset's source file, in document order. Empty array when no /** … */ blocks are present.

    filePath: string

    Absolute path to the asset's file on disk. Empty string in browser mode.

    id: string

    The trading table identifier — the filename without extension, e.g. "armorer_trades".

    tiers: TradeTier[]

    The ordered list of trade tiers. Players unlock higher tiers by completing trades.

    Methods

    • Returns a flat deduplicated list of every item identifier referenced across all tiers and trades, including both wanted and given items.

      Returns string[]