advancement_tab assumes there are no subfolders
williewillus opened this issue ยท 0 comments
Botania's advancements are stored in /data/botania/advancements/main/root.json.... (since there's also a challenges folder beside main).
But if I set advancement_tab
of a book to "botania:main/root" it crashes, same with "botania:main", because https://github.com/Vazkii/Patchouli/blob/1.14/src/main/java/vazkii/patchouli/client/gui/GuiAdvancementsExt.java#L18 assumes that the value is always a domain and there will always be a root advancement there, but the assumption doesn't hold in general.
Fix would be to split the user defined value on : and prepend the right side to the path, using the left side as the domain. Alternatively, change the advancement_tab value to require a full advancement ID (which imo is the more elegant solution but breaks backward compat).