Debugging Loot Table Error Messages - LootrMinecraft/Lootr GitHub Wiki
This error shows as a message in chat whenever you open a container and the loot table for that container could not be properly resolved.
As text:
[16Jan2025 17:30:31.717] [Server thread/ERROR] [noobanidus.mods.lootr.api.LootrAPI/]: Unable to fill loot chest in minecraft:overworld at BlockPos{x=338, y=-46, z=976} as the loot table 'minecraft:chests/simple_dungeon' couldn't be resolved! Please search the loot table in latest.log to see if there are errors in loading.
There are several possible causes for this issue.
1.20.1 and 1.21
On 1.21, this issue can potentially be resolved by installing the mod Save Loot Tables, which is available for Fabric and NeoForge.
This mod is also available for Fabric and Forge on 1.20.1.
If this mod doesn't resolve the issue, please follow the steps below.
Step 1
If the loot table starts with minecraft
, you can check that the loot table actually exists. Consult a list such as this one on the MCreator wiki and cross-reference that the named loot table exists.
If the loot table does not exist, but it starts with minecraft
this means that a mod developer has made a mistake in one of their structure files. You will need to determine what structure the container was found in, and then contact the developer of the mod that generated that structure to fix it.
If the loot table does exist, or does not start with minecraft
, move on to Step 2.
Step 2
Consult the latest.log
file from your server. Search the file for a key word found in the error message. For example, from our text version of the error message, "simple_dungeon" is the name of the loot table. So, we'll search for "simple_dungeon" in the latest.log
.
For the example image above, we extracted the following information from the latest.log
file, with only the first few lines:
[16Jan2025 17:42:10.973] [Worker-Main-5/ERROR] [net.minecraftforge.common.ForgeHooks/]: Couldn't parse element loot_tables:minecraft:chests/simple_dungeon
com.google.gson.JsonSyntaxException: Expected name to be an item, was unknown string 'scattered_weapons:hauntedbow'
at net.minecraft.util.GsonHelper.m_13866_(GsonHelper.java:145) ~[server-1.20.1-20230612.114412-srg.jar%23359!/:?]
at java.util.Optional.orElseThrow(Optional.java:403) ~[?:?]
at net.minecraft.util.GsonHelper.m_13874_(GsonHelper.java:145) ~[server-1.20.1-20230612.114412-srg.jar%23359!/:?]
at net.minecraft.util.GsonHelper.m_13909_(GsonHelper.java:153) ~[server-1.20.1-20230612.114412-srg.jar%23359!/:?]
at net.minecraft.world.level.storage.loot.entries.LootItem$Serializer.m_7267_(LootItem.java:55) ~[server-1.20.1-20230612.114412-srg.jar%23359!/:?]
at net.minecraft.world.level.storage.loot.entries.LootItem$Serializer.m_7267_(LootItem.java:40) ~[server-1.20.1-20230612.114412-srg.jar%23359!/:?]
From this we can see the error "Expected name to be an item, was unknown string". This error means that a mod or mod pack has added an entry to the minecraft:chests/simple_dungeon
loot table, but the item they are referencing does not exist.
In this example, we know what the item was supposed to be from the second part of the message, scattered_weapons:hauntedbow
. This means that the item from scattered_weapons is either incorrectly named or missing.
This most likely means that the mod Scattered Weapons has a problem with its code for loot. You can check that mod for updates if available, or, create a new world without the mod installed and see if the issue resolves itself. Please note that removing the mod may cause further issues.
Alternately, it could mean that a modpack instead is changing the loot tables and has an error. If you are playing a mod pack, check if there are issues filed about this error.
If you cannot find mention of the loot table by searching, continue to Step 3.
Step 3
When there is no mention of the loot table in latest.log
, it means that the loot table does not exist. One mod that you may experience this with is When Dungeons Arise, especially when you update from one version to another.
This error exists for a few reasons:
- The structure file within the mod references the wrong loot table, either because of a typo, or because the loot table's name was changed at some point, but the structure itself wasn't updated.
- The structure was generated with an older version of the mod, and, at the time it generated, referenced a loot table that did exist. However, an update has renamed the loot table to something else, meaning that the existing (already-generated) containers reference a loot table that doesn't exist.
In both cases, as the structure has already been generated with an incorrect loot table reference, there is no way to fix the issue.
Step 4
If none of the above steps help you to resolve this issue, please open a GitHub issue on our tracker.