MysticMods / Roots

Home of the Roots Minecraft Mod
GNU Lesser General Public License v3.0
44 stars 33 forks source link

Spell Library GUI doesn't show up on Divine Journey 2 Server #805

Closed EldrML closed 7 months ago

EldrML commented 8 months ago

General Information

Describe the bug:

To Reproduce:

Log in to a roots (3.1.7) supporting server and press the spell library keybind while holding a staff
Nothing shows up

Environment Versions

Encountered while running roots 3.1.7

Mystic Mods Versions

Other Versions:

Additional Information

-Changing keybind doesn't fix the issue -The issue isn't in the server recognizing the input as not holding the staff prompts a message stating you need a wand to access the spell library

StreamVersus commented 8 months ago

same, shows up an error: [16:08:32] [Client thread/FATAL] [minecraft/Minecraft]: Error executing task java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_392] at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_392] at net.minecraft.util.Util.runTask(SourceFile:531) [h.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1088) [bib.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:3942) [bib.class:?] at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_392] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_392] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_392] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_392] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:87) [NewLaunch.jar:?] at org.prismlauncher.EntryPoint.listen(EntryPoint.java:130) [NewLaunch.jar:?] at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) [NewLaunch.jar:?] Caused by: java.lang.NullPointerException at epicsquid.roots.world.data.UUIDRegistry.getDataInternal(UUIDRegistry.java:25) ~[UUIDRegistry.class:?] at epicsquid.roots.world.data.SpellLibraryRegistry.getData(SpellLibraryRegistry.java:15) ~[SpellLibraryRegistry.class:?] at epicsquid.roots.world.data.SpellLibraryRegistry.getData(SpellLibraryRegistry.java:19) ~[SpellLibraryRegistry.class:?] at epicsquid.roots.GuiHandler.getClientGuiElement(GuiHandler.java:127) ~[GuiHandler.class:?] at net.minecraftforge.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:276) ~[NetworkRegistry.class:?] at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:111) ~[FMLNetworkHandler.class:?] at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2550) ~[aed.class:?] at net.minecraftforge.fml.common.network.internal.OpenGuiHandler.process(OpenGuiHandler.java:50) ~[OpenGuiHandler.class:?] at net.minecraftforge.fml.common.network.internal.OpenGuiHandler.lambda$channelRead0$0(OpenGuiHandler.java:43) ~[OpenGuiHandler.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_392] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_392] at net.minecraft.util.Util.runTask(SourceFile:529) ~[h.class:?] ... 12 more

StreamVersus commented 8 months ago

So problem are in UUIDRegistry#getDataInternal(), probably beacuse gui are client-side, while MapStorage are server side, easiest workaround is to just change: if (storage == null) { throw new NullPointerException("Map storage is null"); } to: if (storage == null) { return null; } its definetly not the best way, but works for me, no desyncs or any other troubles.