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

Chest Loot Table badly generated if broken instead of opened

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Invalid
    • Affects Version/s: Minecraft 1.14.3, Minecraft 1.14.4 Pre-Release 3, Minecraft 1.14.4 Pre-Release 4, Minecraft 1.14.4 Pre-Release 5
    • Fix Version/s: None
    • Confirmation Status:
      Unconfirmed
    • Category:
      Loot tables

      Description

      If you make a loot table for chests, with a condition that needs a player, and the chest is broken without being open before, the condition will fail and the loot will generate wrong.

       

      To test this, I made a loot table named chest_test.json (I assume you know how to install it).

      In this case, I'm using {"condition": "entity_scores"} to generate golden apples, so you will need to create the scoreboard:

      /scoreboard objectives add gappless dummy
      /scoreboard players set @s gappless 0
      

      Then, do /setblock of a chest using my loot table:

      /setblock ~ ~ ~ minecraft:chest{LootTable:"minecraft:chests/chest_test"}

      If you open it first, you will get some golden apples.
      If you break it first, you will never get golden apples.

      You will also get some other items, just to show that the loot table is still working.

      As a suggestion, to improve scoreboard conditions on loot tables, you could implement a "non_entity_scores" condition that would only check for names on scoreboards, instead of looking for entities. That would also solve some problems, like when blocks/chests/entities get broken/killed by explosions or by non player entities, and entity_scores condition for players doesn't work anymore.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: