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:
Apply the attached mcpack.
Open a world with the pack applied.
Run the custom command
/ss_ltm:bug_report.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.
Thank you for helping us improve Minecraft! We saved your files: