Loot defaults to level 0
Drakkett opened this issue ยท 1 comments
I found this issue when working on the spin off TFC version. If you move the dungeon levels, everything seems to work great except for some reason the loot in chests defaults to level 0. If the chests generate at normal heights, the loot levels appear to work correctly. I've looked around for somewhere that it has the loot level dependent upon the Y height but I'm not having any luck finding it. Hoping you may have a suggestion of where it could be happening. Everything I've found seems to use the floor level but there is something I'm obviously missing.
-- I should add. The loot levels are coming from settings over rides. I am still working on converting all the vanilla loot in the code to use TFC items but for the modpack we use the loot settings to include loot from other mods in the modpack.
Thanks for the help. I know this isn't something that impacts you now, but is something that would need to be fixed if you ever allow dungeon height to be in a setting.
Drakkett
For your dungeon setting you need to explicitly define the difficulty value or it'll default to guessing based on the Y value.
The default difficulty per Y value is defined here:
https://github.com/Greymerk/minecraft-roguelike/blob/master/src/main/java/greymerk/roguelike/dungeon/Dungeon.java#L142