[2.0.5] Editing the chestloot condition causes unexpected behavior
Rosethorns opened this issue ยท 5 comments
I wanted to edit the loot conditions for lost cities so I could make them more specific so I removed the vanilla loot table values leaving it as just this.
I then changed the asset location in the general.cfg from
/assets/lostcities/citydata/conditions.json
to
$lostcities/conditions.json
After launching the game, loading or creating a world would softlock at "building terrain" and I would have to force Minecraft to close.
So I thought maybe that the original conditions.json asset location could not be changed.
So instead I made a new conditions file apocalypticconditions.json which looks like this
And then changed the asset list in general.cfg to look like this.
Now when I attempt to load MC I get this crash
https://pastebin.com/9AWAAnMB
So to recap,
Loading an edited conditions.json from the config folder causes a softlock when loading/creating a world.
Loading a replacement "chestloot" condition causes a crash as its unable to return the table.
Thanks for reading
Ah. Error in the log:
java.lang.RuntimeException: Condition 'chestloot' did not return a table under certain conditions!
There must always be a fallback in case none of the conditions is true. If needed an empty loot table can be used or something
@McJty The issue is that I think even with the vanilla loot tables removed it should always validate to true? All levels of buildings are covered and all subways are covered no?
If the answer is simply to add a low factor fallback I will try that :) I don't think anything needs to be changed. Although perhaps I suggest adding that as a tip to the conditions documentation something like "always make sure there is at least one option that will validate to true"