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

Player conditions for chest loot tables don't work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.14.4 Pre-Release 5, Minecraft 1.14.4 Pre-Release 6, 1.14.4, 19w34a, 19w35a, 19w36a, 19w37a
    • Fix Version/s: None
    • Confirmation Status:
      Unconfirmed
    • Category:
      Loot tables

      Description

      There are two instances in which a chest with loot table generates its 'treasure', when its opened or when its broken, and it is expected that these two instances generate the same items if meeting the same requirements.

      When you use player related conditions (like entity_scores, entity_properties) while opening chests, the conditions work fine. But while breaking chests, these conditions don't work. Other items in the loot table without these conditions are generated anyways.

      It seems like chest loot tables forget to grab the data of the entity that broke the chest, unlike block loot tables that are working fine in this aspect.

      For testing this bug I made a loot table and put it into this datapack: test loot table.zip

      To get a chest with this loot table:

      /setblock ~ ~ ~ minecraft:chest{LootTable:"minecraft:chests/test_loot"}
      /give @p minecraft:chest{BlockEntityTag:{LootTable:"minecraft:chests/test_loot"}} 1

      You will get emeralds if you open the chest while sprinting, but not if you break the chest while sprinting.

      You will get diamonds if you open the chest while having "test" dummy score of 0, but not if you break the chest while having "test" dummy score of 0.

      And you always will get maps because they have no conditions.

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                FACS01 Franco Caprile
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: