mojira.dev
MC-197686

Loot tables from blocks don't pass entity conditions when referenced in other loot tables

Loot tables generated directly from containers (Chests) don't pass on the entity that generated them when they are referenced by another loot table.

What I expected to happen was....

The chest I opened to pass me as the entity for conditions, and generate accordingly

What actually happened was....

No entity was passed therefore no entity condition succeeded

 

Steps to reproduce:

  1. Make a loot table with entity conditions

  2. Make another loot table that references it

  3. Run a command that sets a container with the second loot table (ex: "/setblock ~ ~ ~1 chest{LootTable:"spawners:enchanted_evoker_wand"}")

  4. Open the container

  5. →❌  The loot generated will have missing properties (scores, selectors and other properties relying on the entity), but the referenced one works correctly

Attachments

Comments 2

Please attach your datapack

Can this still be reproduced in 1.18.2?

user-16d15

(Unassigned)

Unconfirmed

(Unassigned)

condition, entity_properties, loot-table

1.16.2 Release Candidate 2

Retrieved