Receiving error that closes game related to custom loot/level gen files
mobro09 opened this issue ยท 4 comments
Hey there,
I've been having this error since forever while playing both on a server and single player, I have made custom loot and dungeon generation files. It is quite random in nature sometimes it will crash the game continuously and other times it won't appear again for days and days. This is the start of the crash report while playing a local game.
server crash logs identify it as "n must be positive"
I have never been able to find the cause of the error in my files. All the json is validated, my guess is its a missing value related to a certain loot item's rarity/weight/amount or even a misspelt item but I'm still not certain, if you have any tips they would be welcome :)
Oh... what's probably happening is that there are no chests of some type in the level. It's an oversight i need to fix.
Ohh interesting, I thought I just missed something. I did find errors in my custom spawner file so i removed that and didnt crash last night through 2 hours of play. But I'll keep playing and tell you if it happens again.
EDIT: Nevermind, turns out I just happened to run into the one dungeon that happily generated.
Copying the updated 'TreasureManager.class' from the latest 1.11 version (1.6.2) into the 1.10.2 jar seems to be stable, and generates properly. Interesting side effect of this that I didn't completely notice was that this crash meant that chests ended up partially-filled.
(You'd need 7-zip or similar to open the jars but replacing main/java/greymerk/roguelike/treasure/TreasureManager.class just as seems to fix this without issue)
I released a fix on 1.10.2 for this issue.
https://github.com/Greymerk/minecraft-roguelike/releases/tag/v1.5.5