Patchouli

Patchouli

168M Downloads

Unable to load templates from extension book

superaxander opened this issue ยท 2 comments

commented

Looking through the code it seems that when entries of an extension book are being loaded it sets their book to be the book that is being extended. Therefore when they try to acquire the template they look at the original book's contents.templates list:
https://github.com/Vazkii/Patchouli/blob/68cf2e4e62af951d233a8ee737fccb5e8c4e542c/src/main/java/vazkii/patchouli/client/book/template/BookTemplate.java#L63
https://github.com/Vazkii/Patchouli/blob/aa71ea8c6feb90acb0e1021437795dacd37535a3/src/main/java/vazkii/patchouli/client/book/BookEntry.java#L153-L158

commented

Can you send the json files you use to trigger this issue?

commented

The template is here: https://github.com/superaxander/Auraddons/blob/master/src/main/resources/assets/auraddons/patchouli_books/book/en_us/templates/altar_special.json

Where I'm using it(I've tried auraddons, naturesaura and none for the the domains):
https://github.com/superaxander/Auraddons/blob/master/src/main/resources/assets/auraddons/patchouli_books/book/en_us/entries/using/disruption_catalyst.json

If you need any of the other files they're available in the same repository
The stacktrace:

click here to expand

[vazkii.patchouli.client.book.BookContents:reload:157]: java.lang.RuntimeException: Error while loading entry auraddons:using/disruption_catalyst
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at vazkii.patchouli.client.book.BookContents.lambda$reload$3(BookContents.java:143)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at java.util.HashMap.forEach(HashMap.java:1289)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at vazkii.patchouli.client.book.BookContents.reload(BookContents.java:139)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at vazkii.patchouli.common.book.Book.reloadExtensionContents(Book.java:222)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at java.util.HashMap$Values.forEach(HashMap.java:981)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at vazkii.patchouli.common.book.BookRegistry.reload(BookRegistry.java:88)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at vazkii.patchouli.client.base.ClientProxy.postInit(ClientProxy.java:31)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at vazkii.patchouli.common.base.Patchouli.post(Patchouli.java:46)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at java.lang.reflect.Method.invoke(Method.java:498)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:626)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at java.lang.reflect.Method.invoke(Method.java:498)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at com.google.common.eventbus.EventBus.post(EventBus.java:217)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:218)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:196)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at java.lang.reflect.Method.invoke(Method.java:498)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at com.google.common.eventbus.EventBus.post(EventBus.java:217)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:135)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:749)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:336)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at net.minecraft.client.Minecraft.init(Minecraft.java:581)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at net.minecraft.client.Minecraft.run(Minecraft.java:421)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at net.minecraft.client.main.Main.main(Main.java:118)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at java.lang.reflect.Method.invoke(Method.java:498)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at java.lang.reflect.Method.invoke(Method.java:498)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
[vazkii.patchouli.client.book.BookContents:reload:157]: 	at GradleStart.main(GradleStart.java:25)
[java.lang.Throwable:printStackTrace:634]: Caused by: java.lang.IllegalArgumentException: Template auraddons:altar_special does not exist
[java.lang.Throwable:printStackTrace:634]: 	at vazkii.patchouli.client.book.template.BookTemplate.createTemplate(BookTemplate.java:65)
[java.lang.Throwable:printStackTrace:634]: 	at vazkii.patchouli.client.book.page.PageTemplate.canAdd(PageTemplate.java:47)
[java.lang.Throwable:printStackTrace:634]: 	at vazkii.patchouli.client.book.BookEntry.build(BookEntry.java:166)
[java.lang.Throwable:printStackTrace:634]: 	at vazkii.patchouli.client.book.BookContents.lambda$reload$3(BookContents.java:141)
[java.lang.Throwable:printStackTrace:634]: 	... 53 more

I'm extending the Nature's Aura book