Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-184348

Luck attribute doesn't apply if loot table updates in opened chest

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 20w20b, 20w21a, 20w22a, 1.16 Pre-release 2, 1.16 Pre-release 4, 1.16 Pre-release 5, 1.16 Pre-release 6, 1.16 Pre-release 8, 1.16 Release Candidate 1, 1.16, 1.16.1, 20w27a, 20w28a, 1.16.2 Pre-release 1, 1.16.3, 20w49a, 21w03a, 1.16.5
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      Data Packs, Loot tables

      Description

      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

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            Chu123 Maxim
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              CHK: