infernalstudios / Sortilege

Simple magic staffs, enchanting and brewing tweaks, and more!
https://www.curseforge.com/minecraft/mc-mods/sortilege
Other
5 stars 4 forks source link

xpRefill error #12

Closed Wenzelgood closed 3 months ago

Wenzelgood commented 3 months ago

Some kind of problem when a player logs into the server. The player can't do anything, his inventory doesn't work, he doesn't move, etc. Logs point to Sortilege. But I'm not sure

[21:09:15] [Server thread/ERROR] [ne.mi.ev.EventBus/EVENTBUS]: Exception caught during firing event: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.Map.get(Object)" is null
        Index: 6
        Listeners:
                0: HIGH
                1: ASM: class dev.architectury.event.forge.EventHandlerImplCommon event(Lnet/minecraftforge/event/entity/player/PlayerEvent$PlayerRespawnEvent;)V
                2: NORMAL
                3: ASM: xaero.pac.common.event.CommonEventsForge@4fdeae3 onPlayerRespawn(Lnet/minecraftforge/event/entity/player/PlayerEvent$PlayerRespawnEvent;)V
                4: ASM: com.bobmowzie.mowziesmobs.server.ServerEventHandler@5bb3e53d onPlayerRespawn(Lnet/minecraftforge/event/entity/player/PlayerEvent$PlayerRespawnEvent;)V
                5: ASM: class com.mrcrayfish.backpacked.common.UnlockTracker onPlayerRespawn(Lnet/minecraftforge/event/entity/player/PlayerEvent$PlayerRespawnEvent;)V
                6: ASM: class net.lyof.sortilege.events.ModEvents xpRefill(Lnet/minecraftforge/event/entity/player/PlayerEvent$PlayerRespawnEvent;)V
                7: ASM: class com.minecraftserverzone.weaponmaster.setup.events_on_server.ForgeEvents onPlayerRespawn(Lnet/minecraftforge/event/entity/player/PlayerEvent$PlayerRespawnEvent;)V
                8: ASM: class com.legacy.blue_skies.events.SkiesPlayerEvents onPlayerRespawn(Lnet/minecraftforge/event/entity/player/PlayerEvent$PlayerRespawnEvent;)V
                9: ASM: class com.momosoftworks.coldsweat.common.capability.EntityTempManager resetTempOnRespawn(Lnet/minecraftforge/event/entity/player/PlayerEvent$PlayerRespawnEvent;)V
                10: ASM: class it.hurts.sskirillss.relics.capability.handlers.SyncHandler onPlayerRespawn(Lnet/minecraftforge/event/entity/player/PlayerEvent$PlayerRespawnEvent;)V
                11: ASM: class twilightforest.events.CapabilityEvents onPlayerRespawn(Lnet/minecraftforge/event/entity/player/PlayerEvent$PlayerRespawnEvent;)V
                12: ASM: class twilightforest.events.CharmEvents onPlayerRespawn(Lnet/minecraftforge/event/entity/player/PlayerEvent$PlayerRespawnEvent;)V
                13: ASM: class net.mcreator.brokenbadusableproduct.network.BrokenbadusableproductModVariables$EventBusVariableHandlers onPlayerRespawnedSyncPlayerVariables(Lnet/minecraftforge/event/entity/player/PlayerEvent$PlayerRespawnEvent;)V
                14: ASM: class com.obscuria.obscureapi.network.PlayerDataCapability$EventBusHandlers onPlayerRespawnedSyncPlayerVariables(Lnet/minecraftforge/event/entity/player/PlayerEvent$PlayerRespawnEvent;)V
                15: ASM: class dev.quarris.enigmaticgraves.setup.CommonEvents spawnGraveFinder(Lnet/minecraftforge/event/entity/player/PlayerEvent$PlayerRespawnEvent;)V
                16: ASM: class io.redspace.ironsspellbooks.player.ServerPlayerEvents onPlayerRespawn(Lnet/minecraftforge/event/entity/player/PlayerEvent$PlayerRespawnEvent;)V
                17: ASM: class com.momosoftworks.coldsweat.util.compat.CompatManager onLivingTempDamage(Lnet/minecraftforge/event/entity/living/LivingEvent;)V
java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.Map.get(Object)" is null
        at TRANSFORMER/sortilege@1.5.4/net.lyof.sortilege.events.ModEvents.xpRefill(ModEvents.java:133)
        at TRANSFORMER/sortilege@1.5.4/net.lyof.sortilege.events.__ModEvents_xpRefill_PlayerRespawnEvent.invoke(.dynamic)
        at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73)
        at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:315)
        at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:296)
        at TRANSFORMER/forge@43.4.2/net.minecraftforge.event.ForgeEventFactory.firePlayerRespawnEvent(ForgeEventFactory.java:784)
        at TRANSFORMER/minecraft@1.19.2/net.minecraft.server.players.PlayerList.m_11236_(PlayerList.java:472)
        at TRANSFORMER/minecraft@1.19.2/net.minecraft.server.network.ServerGamePacketListenerImpl.m_6272_(ServerGamePacketListenerImpl.java:1603)
        at TRANSFORMER/minecraft@1.19.2/net.minecraft.network.protocol.game.ServerboundClientCommandPacket.m_5797_(ServerboundClientCommandPacket.java:24)
        at TRANSFORMER/minecraft@1.19.2/net.minecraft.network.protocol.game.ServerboundClientCommandPacket.m_5797_(ServerboundClientCommandPacket.java:6)
        at TRANSFORMER/minecraft@1.19.2/net.minecraft.network.protocol.PacketUtils.m_131356_(PacketUtils.java:22)
        at TRANSFORMER/minecraft@1.19.2/net.minecraft.server.TickTask.run(TickTask.java:18)
        at TRANSFORMER/minecraft@1.19.2/net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:157)
        at TRANSFORMER/minecraft@1.19.2/net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23)
        at TRANSFORMER/minecraft@1.19.2/net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:763)
        at TRANSFORMER/minecraft@1.19.2/net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:157)
        at TRANSFORMER/minecraft@1.19.2/net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:131)
        at TRANSFORMER/minecraft@1.19.2/net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:746)
        at TRANSFORMER/minecraft@1.19.2/net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:740)
        at TRANSFORMER/minecraft@1.19.2/net.minecraft.util.thread.BlockableEventLoop.m_18699_(BlockableEventLoop.java:116)
        at TRANSFORMER/minecraft@1.19.2/net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:725)
        at TRANSFORMER/minecraft@1.19.2/net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:658)
        at TRANSFORMER/minecraft@1.19.2/net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:244)
        at java.base/java.lang.Thread.run(Thread.java:833)
[21:09:15] [Server thread/ERROR] [minecraft/PacketUtils]: Failed to handle packet net.minecraft.network.protocol.game.ServerboundClientCommandPacket@62d0f83f, suppressing error
java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.Map.get(Object)" is null
        at net.lyof.sortilege.events.ModEvents.xpRefill(ModEvents.java:133) ~[Sortilege-1.19.2-1.5.4.jar%23526!/:1.0] {re:classloading}
        at net.lyof.sortilege.events.__ModEvents_xpRefill_PlayerRespawnEvent.invoke(.dynamic) ~[Sortilege-1.19.2-1.5.4.jar%23526!/:1.0] {re:classloading,pl:eventbus:B}
        at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73) ~[eventbus-6.0.3.jar%2351!/:?] {}
        at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.3.jar%2351!/:?] {}
        at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.3.jar%2351!/:?] {}
        at net.minecraftforge.event.ForgeEventFactory.firePlayerRespawnEvent(ForgeEventFactory.java:784) ~[forge-1.19.2-43.4.2-universal.jar%23560!/:?] {re:mixin,re:classloading,pl:mixin:A}
        at net.minecraft.server.players.PlayerList.m_11236_(PlayerList.java:472) ~[server-1.19.2-20220805.130853-srg.jar%23555!/:?] {re:mixin,xf:fml:openpartiesandclaims:xaero_pac_playerlist_sendworldinfo,xf:fml:xaerominimap:xaero_playerlist_sendworldinfo,xf:fml:xaeroworldmap:xaero_wm_playerlist_sendworldinfo,re:classloading,xf:fml:openpartiesandclaims:xaero_pac_playerlist_sendworldinfo,xf:fml:xaerominimap:xaero_playerlist_sendworldinfo,xf:fml:xaeroworldmap:xaero_wm_playerlist_sendworldinfo,pl:mixin:A}
        at net.minecraft.server.network.ServerGamePacketListenerImpl.m_6272_(ServerGamePacketListenerImpl.java:1603) ~[server-1.19.2-20220805.130853-srg.jar%23555!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A}
        at net.minecraft.network.protocol.game.ServerboundClientCommandPacket.m_5797_(ServerboundClientCommandPacket.java:24) ~[server-1.19.2-20220805.130853-srg.jar%23555!/:?] {re:classloading}
        at net.minecraft.network.protocol.game.ServerboundClientCommandPacket.m_5797_(ServerboundClientCommandPacket.java:6) ~[server-1.19.2-20220805.130853-srg.jar%23555!/:?] {re:classloading}
        at net.minecraft.network.protocol.PacketUtils.m_131356_(PacketUtils.java:22) ~[server-1.19.2-20220805.130853-srg.jar%23555!/:?] {re:classloading}
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[server-1.19.2-20220805.130853-srg.jar%23555!/:?] {re:classloading,re:mixin}
        at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:157) ~[server-1.19.2-20220805.130853-srg.jar%23555!/:?] {re:computing_frames,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:perf.fix_loop_spin_waiting.BlockableEventLoopMixin,pl:mixin:A}
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[server-1.19.2-20220805.130853-srg.jar%23555!/:?] {re:computing_frames,re:mixin,re:classloading}
        at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:763) ~[server-1.19.2-20220805.130853-srg.jar%23555!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:openpartiesandclaims:xaero_pac_minecraftserverclass,xf:fml:xaerominimap:xaero_minecraftserver,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,re:classloading,pl:accesstransformer:B,xf:fml:openpartiesandclaims:xaero_pac_minecraftserverclass,xf:fml:xaerominimap:xaero_minecraftserver,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,pl:mixin:APP:servercore.common.mixins.json:features.misc.MinecraftServerMixin,pl:mixin:APP:saturn.mixins.json:allocations.server_directory.MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:core.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:A}
        at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:157) ~[server-1.19.2-20220805.130853-srg.jar%23555!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:openpartiesandclaims:xaero_pac_minecraftserverclass,xf:fml:xaerominimap:xaero_minecraftserver,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,re:classloading,pl:accesstransformer:B,xf:fml:openpartiesandclaims:xaero_pac_minecraftserverclass,xf:fml:xaerominimap:xaero_minecraftserver,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,pl:mixin:APP:servercore.common.mixins.json:features.misc.MinecraftServerMixin,pl:mixin:APP:saturn.mixins.json:allocations.server_directory.MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:core.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:A}
        at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:131) ~[server-1.19.2-20220805.130853-srg.jar%23555!/:?] {re:computing_frames,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:perf.fix_loop_spin_waiting.BlockableEventLoopMixin,pl:mixin:A}
        at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:746) ~[server-1.19.2-20220805.130853-srg.jar%23555!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:openpartiesandclaims:xaero_pac_minecraftserverclass,xf:fml:xaerominimap:xaero_minecraftserver,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,re:classloading,pl:accesstransformer:B,xf:fml:openpartiesandclaims:xaero_pac_minecraftserverclass,xf:fml:xaerominimap:xaero_minecraftserver,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,pl:mixin:APP:servercore.common.mixins.json:features.misc.MinecraftServerMixin,pl:mixin:APP:saturn.mixins.json:allocations.server_directory.MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:core.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:A}
        at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:740) ~[server-1.19.2-20220805.130853-srg.jar%23555!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:openpartiesandclaims:xaero_pac_minecraftserverclass,xf:fml:xaerominimap:xaero_minecraftserver,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,re:classloading,pl:accesstransformer:B,xf:fml:openpartiesandclaims:xaero_pac_minecraftserverclass,xf:fml:xaerominimap:xaero_minecraftserver,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,pl:mixin:APP:servercore.common.mixins.json:features.misc.MinecraftServerMixin,pl:mixin:APP:saturn.mixins.json:allocations.server_directory.MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:core.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:A}
        at net.minecraft.util.thread.BlockableEventLoop.m_18699_(BlockableEventLoop.java:116) ~[server-1.19.2-20220805.130853-srg.jar%23555!/:?] {re:computing_frames,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:perf.fix_loop_spin_waiting.BlockableEventLoopMixin,pl:mixin:A}
        at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:725) ~[server-1.19.2-20220805.130853-srg.jar%23555!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:openpartiesandclaims:xaero_pac_minecraftserverclass,xf:fml:xaerominimap:xaero_minecraftserver,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,re:classloading,pl:accesstransformer:B,xf:fml:openpartiesandclaims:xaero_pac_minecraftserverclass,xf:fml:xaerominimap:xaero_minecraftserver,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,pl:mixin:APP:servercore.common.mixins.json:features.misc.MinecraftServerMixin,pl:mixin:APP:saturn.mixins.json:allocations.server_directory.MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:core.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:A}
        at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:658) ~[server-1.19.2-20220805.130853-srg.jar%23555!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:openpartiesandclaims:xaero_pac_minecraftserverclass,xf:fml:xaerominimap:xaero_minecraftserver,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,re:classloading,pl:accesstransformer:B,xf:fml:openpartiesandclaims:xaero_pac_minecraftserverclass,xf:fml:xaerominimap:xaero_minecraftserver,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,pl:mixin:APP:servercore.common.mixins.json:features.misc.MinecraftServerMixin,pl:mixin:APP:saturn.mixins.json:allocations.server_directory.MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:core.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:A}
        at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:244) ~[server-1.19.2-20220805.130853-srg.jar%23555!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:openpartiesandclaims:xaero_pac_minecraftserverclass,xf:fml:xaerominimap:xaero_minecraftserver,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,re:classloading,pl:accesstransformer:B,xf:fml:openpartiesandclaims:xaero_pac_minecraftserverclass,xf:fml:xaerominimap:xaero_minecraftserver,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,pl:mixin:APP:servercore.common.mixins.json:features.misc.MinecraftServerMixin,pl:mixin:APP:saturn.mixins.json:allocations.server_directory.MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:modernfix-common.mixins.json:core.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:A}
        at java.lang.Thread.run(Thread.java:833) [?:?] {re:mixin}
Lyof429 commented 3 months ago

Uh oops yeah I must have missed a null check I'll fix that and release it in a few days, sorry for the inconvenience

Wenzelgood commented 3 months ago

It's okay. Thank you for you hard work. Can you please tell me if there is any way to dig into the player's .dat file and fix this? Or is there any other way?

Lyof429 commented 3 months ago

nah sorry, this happens because the return value of something isn't loaded yet, it's not handled by any save data one temporary fix would be to turn off the xp keeping module, it'll prevent the method being used until i fix it

Wenzelgood commented 3 months ago

Okay, thank you