Luck attribute doesn't apply if loot table updates in opened chest
If player opens a chest and after that chest's loot table will be updated (e. g. with command block) then "quality" and "bonus_rolls" won't work.
Steps to reproduce:
- Download and set attached datapack
- Execute this commands:
/setblock ~ ~-1 ~ command_block{Command:"data merge block ~ ~1 ~ {LootTable:\"test:test\"}"}
/setblock ~ ~ ~ trapped_chest
/effect give @s luck 60 0 true
- Open the chest
Expected that the most of the chest filled with diamond swords, but it filled with bows ("quality" didn't work) and 1 slot is empty ("bonus_rools" didn't work).
It works as intended if command block underneath don't instantly activate and update trapped chest. For example of intended work execute this commands:
/setblock ~ ~ ~ chest{LootTable:"test:test"}
/effect give @s luck 60 0 true
2020-05-18, 05:12 AM
2022-07-31, 08:22 AM
2
2
-