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

No error message when loot table does not exist

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 17w43b, Minecraft 17w45a, Minecraft 17w45b, Minecraft 17w47b, Minecraft 17w50a, Minecraft 18w02a, Minecraft 1.13-pre3, Minecraft 1.13-pre7, Minecraft 18w32a, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 19w04b, Minecraft 19w05a, Minecraft 19w06a, Minecraft 19w08b, Minecraft 19w09a, Minecraft 19w11a, Minecraft 19w11b, Minecraft 19w12b, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, 1.14.4, 19w46a, 19w46b, 1.15.2 Pre-release 2, 1.15.2, 20w07a, 20w14a, 1.16.4, 20w48a, 1.18.2, 1.20.2, 23w45a, 1.21.1, 24w37a
    • Confirmed
    • Commands

      The bug

      In previous version there used to be an error message when a loot table did not exist. In the latest versions this is no longer the case.

      This affects all kinds of loot tables usages, including:

      • /loot
      • block loot tables
      • entity loot tables

      How to reproduce

      1. Use the following command
        /setblock ~ ~ ~ chest{LootTable:"invalid"} replace
        
      2. Open the chest
      3. Look at the log
        No error was logged

      Code analysis

      For 20w07a with Mojang names

      net.minecraft.world.level.storage.loot.LootTables.get(ResourceLocation) simply returns an empty loot table if the loot table is not found.

            Unassigned Unassigned
            marcono1234 Marcono1234
            Votes:
            12 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              CHK: