mojira.dev
MCPE-238052

LootItem is missing conditions property in Script API despite entry-level conditions being supported in loot tables

The Script API's LootItem class only exposes name and functions, but does not expose a conditions property. According to the official documentation, conditions can be applied to individual entries within a loot pool. The LootItemCondition class exists in the API and is already exposed on both LootPool.conditions and LootItemFunction.conditions, but is absent from LootItem.

Steps to Reproduce:

  1. Apply the attached mcpack.

  2. Open a world with the pack applied.

  3. Run the custom command /ss_ltm:bug_report.

  4. Observe the output in chat.

Expected Result: The diamond entry's has_conditions returns true and conditions returns the random_chance condition object, since the loot table defines a random_chance condition on that entry:

{
    "type": "item",
    "name": "minecraft:diamond",
    "weight": 1,
    "conditions": [
        {
            "condition": "random_chance",
            "chance": 0.5
        }
    ]
}

Actual Result: has_conditions returns false and conditions returns "N/A" for all entries. There is no conditions property on LootItem, even though LootPool and LootItemFunction both have one.

Current LootItem type surface:

class LootItem extends LootPoolEntry {
    readonly functions: LootItemFunction[];
    readonly name?: ItemType;
    // conditions is missing
}

Observed in: Minecraft Preview, @minecraft/server 2.8.0-beta, engine version 1.26.20

Attachments: Repro mcpack included.

Attachments

Comments 1

Thank you for helping us improve Minecraft! We saved your files:

[media]

SmokeyStack

(Unassigned)

1601262

Confirmed

Windows

11

26.20.26 Preview, 26.13

Retrieved