mojira.dev
MC-121589

No error message when loot table does not exist

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.

Linked issues

Comments 7

Affects 1.13-pre7. Please keep your issue updated.

Affects 1.15.1

Can also be reproduced with the following command:

/loot give @s loot invalid

The chat prints "Dropped 0 items".

Sorry for the many edits of the report.

@@unknown, that is MC-165536, which might actually be the same underlying bug.

Can confirm in 20w48a.

Can confirm in 1.18.2.

Can confirm in 1.20.2, there was no error output to the log:

[media]

marcono1234

(Unassigned)

Confirmed

Commands

error-message, logging, loot-table

Minecraft 17w43b, Minecraft 17w45a, Minecraft 17w45b, Minecraft 17w47b, Minecraft 17w50a, ..., 1.18.2, 1.20.2, 23w45a, 1.21.1, 24w37a

Retrieved