Description:
When using the Script API's LootTableManager.getLootTable() to read a loot table containing both custom (add-on defined) and vanilla entries, the LootItem.name property correctly returns the identifier for vanilla items and blocks (e.g., minecraft:diamond, minecraft:diamond_block) but returns undefined for custom items and blocks (e.g., ss_ltm:custom_item, ss_ltm:custom_block).
Steps to Reproduce:
Apply the attached mcaddon.
Open a world with the pack applied.
Run the custom command
/ss_ltm:bug_report.Observe the output in chat.
Expected Result: All four loot table entries return their respective identifiers via LootItem.name.id:
ss_ltm:custom_blockss_ltm:custom_itemminecraft:diamond_blockminecraft:diamond
Actual Result: Only the vanilla entries return their identifiers. The two custom entries return undefined for LootItem.name, resulting in N/A when accessed:
pool_entries: [
{ "name": "N/A" }, // ss_ltm:custom_block - MISSING
{ "name": "N/A" }, // ss_ltm:custom_item - MISSING
{ "name": "minecraft:diamond_block" }, // OK
{ "name": "minecraft:diamond" } // OK
]
Observed in: Minecraft Preview, @minecraft/server 2.8.0-beta, engine version 1.26.20
Attachments: Repro mcaddon included.
Thank you for helping us improve Minecraft! We saved your files: