BlackJar72 / DoomlikeDungeons

A procedural multi-room dungeon generator for Minecraft
https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-mods/1293843-doomlike-dungeons
MIT License
23 stars 12 forks source link

[Request] Ways to get errors printed out if a config file theme is faulty? #12

Closed KAfable closed 6 years ago

KAfable commented 6 years ago

Hi again,

Thanks for the really quick fix on the mesa.cfg! If I can have one more last request (which should hopefully mitigate the amount of future requests from me since I can try to figure things out myself), would it be possible to get an error printed out to the console or error log if certain themes are not valid? For some reason whenever I'm altering a

Lastly thanks for your work on the mod - if you are deciding that the last version was final, I just wanted to show you what I managed to pull off with the customization from your mod:

https://ibb.co/cq2rnG https://ibb.co/dUBO1b

I'm personally very happy with the results, and the new loot modifiers you did were helpful in getting the type of rewards I wanted!

BlackJar72 commented 6 years ago

You should get something like this in the console for block related errors:

[18:41:07] [main/INFO] [STDERR]: [jaredbgreat.dldungeons.debug.Logging:LogError:32]: [DLDUNGEONS] ERROR! Block read as "crapy:diarrhea" parsed into an air block! Dec 29, 2017 6:41:07 PM jaredbgreat.dldungeons.debug.Logging LogError SEVERE: [DLDUNGEONS] ERROR! Block read as "crapy:diarrhea" parsed into an air block! [18:41:07] [main/INFO] [STDERR]: [jaredbgreat.dldungeons.themes.ThemeReader:readTheme:296]: [DLDUNGEONS] Theme common.cfg contained a fatal error! [18:41:07] [main/INFO] [STDERR]: [jaredbgreat.dldungeons.themes.ThemeReader:readTheme:298]: java.util.NoSuchElementException: [DLDUNGEONS] ERROR! Block read as "crapy:diarrhea" parsed into an air block! [18:41:07] [main/INFO] [STDERR]: [jaredbgreat.dldungeons.themes.ThemeReader:readTheme:298]: at jaredbgreat.dldungeons.builder.DBlock.<init>(DBlock.java:100)....

And bad themes should show up in a subfolder themes/errors. I don't remember how I handled other errors, but most of them are hard to make. The one tricky part is the mob, since these are simply strings in code -- under the hood spawners don't contain mobs, they contain names of mobs, so a bad name will give an empty spawner. I'm not sure what to do about that, though.

KAfable commented 6 years ago

Perfect, in that case, that's all I really needed.