Scholar

Scholar

193k Downloads

Game crashes when joining a server without the mod

DN2048 opened this issue · 1 comments

commented

Normally when you try to join a server with different mods than the server you get an error like this: https://imgur.com/a/POcNK7U
However entering a server with Scholar on a server without it, you can enter the server but when you open the inventory the game crashes with the following error:

net.minecraftforge.fml.ModLoadingException: Scholar (scholar) encountered an error during the done event phase §7java.lang.NullPointerException: Registry Object not present: scholar:white_writable_book at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:118) ~[javafmllanguage-1.20.1-47.3.0.jar%23218!/:?] {} at net.minecraftforge.fml.ModLoader.lambda$postEvent$29(ModLoader.java:326) ~[fmlcore-1.20.1-47.3.0.jar%23217!/:?] {} at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {re:mixin} at net.minecraftforge.fml.ModList.forEachModInOrder(ModList.java:227) ~[fmlcore-1.20.1-47.3.0.jar%23217!/:?] {} at net.minecraftforge.fml.ModLoader.postEvent(ModLoader.java:326) ~[fmlcore-1.20.1-47.3.0.jar%23217!/:?] {} at net.minecraftforge.common.ForgeHooks.onCreativeModeTabBuildContents(ForgeHooks.java:1633) ~[forge-1.20.1-47.3.0-universal.jar%23221!/:?] {re:classloading} at net.minecraft.world.item.CreativeModeTab.m_269498_(CreativeModeTab.java:129) ~[client-1.20.1-20230612.114412-srg.jar%23216!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B} at net.minecraft.world.item.CreativeModeTabs.m_268957_(CreativeModeTabs.java:1696) ~[client-1.20.1-20230612.114412-srg.jar%23216!/:?] {re:classloading,pl:accesstransformer:B} at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?] {} at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?] {} at java.util.Iterator.forEachRemaining(Iterator.java:133) ~[?:?] {re:mixin} at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845) ~[?:?] {} at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?] {} at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?] {} at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?] {} at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?] {} at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?] {} at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?] {} at net.minecraft.world.item.CreativeModeTabs.m_269421_(CreativeModeTabs.java:1695) ~[client-1.20.1-20230612.114412-srg.jar%23216!/:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.world.item.CreativeModeTabs.m_269226_(CreativeModeTabs.java:1710) ~[client-1.20.1-20230612.114412-srg.jar%23216!/:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.client.gui.screens.inventory.CreativeModeInventoryScreen.<init>(CreativeModeInventoryScreen.java:86) ~[client-1.20.1-20230612.114412-srg.jar%23216!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.gui.screens.inventory.InventoryScreen.m_7856_(InventoryScreen.java:48) ~[client-1.20.1-20230612.114412-srg.jar%23216!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.gui.screens.Screen.m_6575_(Screen.java:321) ~[client-1.20.1-20230612.114412-srg.jar%23216!/:?] {re:computing_frames,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:common.mixins.scholar.json:ScreenMixin,pl:mixin:APP:physicsmod.mixins.json:cloth.MixinScreen,pl:mixin:APP:physicsmod.mixins.json:guiphysics.MixinScreen,pl:mixin:A,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.m_91152_(Minecraft.java:1007) ~[client-1.20.1-20230612.114412-srg.jar%23216!/:?]

Caused by: java.lang.NullPointerException: Registry Object not present: scholar:white_writable_book at java.util.Objects.requireNonNull(Objects.java:334) ~[?:?] {re:mixin} at net.minecraftforge.registries.RegistryObject.get(RegistryObject.java:204) ~[forge-1.20.1-47.3.0-universal.jar%23221!/:?] {re:mixin,re:classloading} at io.github.mortuusars.scholar.forge.event.CommonEvents$ModBus.onCreativeTabsBuild(CommonEvents.java:30) ~[scholar-1.20.1-1.0.0-forge.jar%23203!/:?] {re:classloading} at io.github.mortuusars.scholar.forge.event.__ModBus_onCreativeTabsBuild_BuildCreativeModeTabContentsEvent.invoke(.dynamic) ~[scholar-1.20.1-1.0.0-forge.jar%23203!/:?] {re:classloading,pl:eventbus:B} at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73) ~[eventbus-6.0.5.jar%23109!/:?] {} at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.5.jar%23109!/:?] {} at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.5.jar%23109!/:?] {} at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:114) ~[javafmllanguage-1.20.1-47.3.0.jar%23218!/:?] {} ... 56 more

It would be awesome if the mod could also work client-side only, without the extra book colors. Just the enhanced book UI only.