Iron's Spells 'n Spellbooks

Iron's Spells 'n Spellbooks

18M Downloads

[incompatability] Invalid player data when loading/ creating a world

Nokunami opened this issue ยท 3 comments

commented

Observed behaviour

Invalid player data.

Expected behaviour

Load/ create a world with no issues.

Steps to reproduce

Create/ Load a world.

Server Type

Single Player

Crashlog

Debug log

Iron's Spells N Spellbooks version

1.20.1-2.2.1

Forge version

1.20.1-47.1.3

Other mods

Sinytra Connector 1.0.0-beta.34+1.20.1
Connector Extras
Forgified Fabric API 0.91.0+1.10.8+1.20.1
Enchancement 1.20-9
ToolTipFix 1.1.1-1.20

commented

seems to be due to another mod

[27Jan2024 15:04:01.292] [Server thread/ERROR] [net.minecraft.server.network.ServerLoginPacketListenerImpl/]: Couldn't place player in world
java.lang.NullPointerException: Cannot invoke "dev.onyxstudios.cca._generated_.GeneratedComponentContainer.get$enchancement$frozen()" because "<parameter1>" is null
	at dev.onyxstudios.cca._generated_.ComponentType$enchancement$frozen.getInternal(Unknown Source) ~[?:?]
	at dev.onyxstudios.cca.api.v3.component.ComponentKey.get(ComponentKey.java:86) ~[enchancement-1.20-9$cardinal-components-base-5.2.2_mapped_srg_1.20.1.jar%23330!/:?]
	at net.minecraft.world.entity.LivingEntity.handler$zoh000$enchancement$frostbiteAlive(LivingEntity.java:14546) ~[client-1.20.1-20230612.114412-srg.jar%23180!/:?]
	at net.minecraft.world.entity.LivingEntity.m_6084_(LivingEntity.java) ~[client-1.20.1-20230612.114412-srg.jar%23180!/:?]
	at net.minecraft.world.entity.player.Player.getCapability(Player.java:2139) ~[client-1.20.1-20230612.114412-srg.jar%23180!/:?]
	at net.minecraftforge.common.capabilities.ICapabilityProvider.getCapability(ICapabilityProvider.java:33) ~[forge-1.20.1-47.1.3-universal.jar%23185!/:?]
	at io.redspace.ironsspellbooks.capabilities.magic.MagicEvents.onAttachCapabilitiesPlayer(MagicEvents.java:18) ~[irons_spellbooks-1.20.1-2.2.1.jar%23177!/:1.20.1-2.2.1]
	at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:260) ~[eventbus-6.0.5.jar%23133!/:?]
	at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:252) ~[eventbus-6.0.5.jar%23133!/:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.5.jar%23133!/:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.5.jar%23133!/:?]
	at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:621) ~[forge-1.20.1-47.1.3-universal.jar%23185!/:?]
	at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:615) ~[forge-1.20.1-47.1.3-universal.jar%23185!/:?]
	at net.minecraftforge.common.capabilities.CapabilityProvider.doGatherCapabilities(CapabilityProvider.java:72) ~[forge-1.20.1-47.1.3-universal.jar%23185!/:?]
	at net.minecraftforge.common.capabilities.CapabilityProvider.gatherCapabilities(CapabilityProvider.java:67) ~[forge-1.20.1-47.1.3-universal.jar%23185!/:?]
	at net.minecraftforge.common.capabilities.CapabilityProvider.gatherCapabilities(CapabilityProvider.java:51) ~[forge-1.20.1-47.1.3-universal.jar%23185!/:?]
	at net.minecraft.world.entity.Entity.<init>(Entity.java:265) ~[client-1.20.1-20230612.114412-srg.jar%23180!/:?]
	at net.minecraft.world.entity.LivingEntity.<init>(LivingEntity.java:233) ~[client-1.20.1-20230612.114412-srg.jar%23180!/:?]
	at net.minecraft.world.entity.player.Player.<init>(Player.java:177) ~[client-1.20.1-20230612.114412-srg.jar%23180!/:?]
	at net.minecraft.server.level.ServerPlayer.<init>(ServerPlayer.java:249) ~[client-1.20.1-20230612.114412-srg.jar%23180!/:?]
	at net.minecraft.server.players.PlayerList.m_215624_(PlayerList.java:422) ~[client-1.20.1-20230612.114412-srg.jar%23180!/:?]
	at net.minecraft.server.network.ServerLoginPacketListenerImpl.m_10055_(ServerLoginPacketListenerImpl.java:121) ~[client-1.20.1-20230612.114412-srg.jar%23180!/:?]
	at net.minecraft.server.network.ServerLoginPacketListenerImpl.redirect$zlh000$fabric_networking_api_v1$handlePlayerJoin(ServerLoginPacketListenerImpl.java:563) ~[client-1.20.1-20230612.114412-srg.jar%23180!/:?]
	at net.minecraft.server.network.ServerLoginPacketListenerImpl.m_9933_(ServerLoginPacketListenerImpl.java:70) ~[client-1.20.1-20230612.114412-srg.jar%23180!/:?]
	at net.minecraft.network.Connection.m_129483_(Connection.java:263) ~[client-1.20.1-20230612.114412-srg.jar%23180!/:?]
	at net.minecraft.server.network.ServerConnectionListener.m_9721_(ServerConnectionListener.java:142) ~[client-1.20.1-20230612.114412-srg.jar%23180!/:?]
	at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:907) ~[client-1.20.1-20230612.114412-srg.jar%23180!/:?]
	at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:814) ~[client-1.20.1-20230612.114412-srg.jar%23180!/:?]
	at net.minecraft.client.server.IntegratedServer.m_5705_(IntegratedServer.java:89) ~[client-1.20.1-20230612.114412-srg.jar%23180!/:?]
	at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:661) ~[client-1.20.1-20230612.114412-srg.jar%23180!/:?]
	at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251) ~[client-1.20.1-20230612.114412-srg.jar%23180!/:?]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
commented

@iron431
that seems to be the fabric equivalent to capabilities

if (!event.getObject().getCapability(PlayerMagicProvider.PLAYER_MAGIC).isPresent()) {

you shouldn't really check the capability here, just attach it

(capabilities are gathered in the constructor, of Entity e.g. for <Entity> capabilities)

commented

you shouldn't really check the capability here, just attach it

It looks like resolving the capabilities fires something from Enchancement that isn't loaded yet. It's been a long time since we've had to deal with capabilities so I don't know what kind of impact removing that statement would have. In any case, we support only one modloader for a reason