Loot pools with null names added in LootTableLoadEvent
SilentChaos512 opened this issue · 1 comments
Minecolonies version
Version: 0.11.831-ALPHA (also tried 0.11.821-BETA)
Expected behavior
- Loot tables to load correctly, regardless of how many mods modify them.
Actual behaviour
- Minecolonies adds pools without setting a name to some vanilla loot tables, causing a
NullPointerException
the next time a pool is added to that table. This results in empty loot chests, and misleading stacktraces in the log file. - I reproduced this with just Minecolonies and Botania, other combinations could get similar results. In this case, the stacktraces show Botania, but Minecolonies needs to fix this (Forge also needs to improve the
addPool
function, but this needs to be fixed regardless).
Steps to reproduce the problem
- Install Minecolonies and Botania (or another mod that modifies the same loot tables)
- Run game and load up a world
- See errors in the log file
Logs
- latest.log: https://gist.github.com/SilentChaos512/4d9eeb80a764273a2e3810004016de3f#file-gistfile1-txt-L168
- crashlog: N/A (does not crash)
How To Fix
- Call
name()
and set a unique pool name on theLootPool.Builder
at