'lost connection' when join a single world
Closed this issue · 0 comments
Rivmun commented
[15:59:58] [Server thread/ERROR]: Couldn't place player in world
java.lang.NullPointerException: Cannot invoke "net.minecraft.server.network.ServerPlayNetworkHandler.sendPacket(net.minecraft.network.Packet)" because "this.networkHandler" is null
at net.minecraft.server.network.ServerPlayerEntity.onStatusEffectApplied(ServerPlayerEntity.java:1240) ~[client-intermediary.jar:?]
at net.minecraft.entity.LivingEntity.addStatusEffect(LivingEntity.java:975) ~[client-intermediary.jar:?]
at net.minecraft.entity.LivingEntity.addStatusEffect(LivingEntity.java:964) ~[client-intermediary.jar:?]
at net.minecraft.entity.LivingEntity.handler$epo000$setHealth(LivingEntity.java:32621) ~[client-intermediary.jar:?]
at net.minecraft.entity.LivingEntity.setHealth(LivingEntity.java) ~[client-intermediary.jar:?]
at com.github.clevernucleus.dataattributes.DataAttributes.healthModified(DataAttributes.java:76) ~[%5B前置%5D%20data-attributes-1.2.7.jar:?]
at com.github.clevernucleus.dataattributes.api.event.EntityAttributeModifiedEvents.lambda$static$0(EntityAttributeModifiedEvents.java:26) ~[%5B前置%5D%20data-attributes-1.2.7.jar:?]
at net.minecraft.entity.attribute.EntityAttributeInstance.actionModifier(EntityAttributeInstance.java:715) ~[client-intermediary.jar:?]
at net.minecraft.entity.attribute.EntityAttributeInstance.handler$cgk000$data_addModifier(EntityAttributeInstance.java:659) ~[client-intermediary.jar:?]
at net.minecraft.entity.attribute.EntityAttributeInstance.addModifier(EntityAttributeInstance.java) ~[client-intermediary.jar:?]
at net.minecraft.entity.attribute.EntityAttributeInstance.addPersistentModifier(EntityAttributeInstance.java:85) ~[client-intermediary.jar:?]
at de.siphalor.spiceoffabric.SpiceOfFabric.updateMaxHealth(SpiceOfFabric.java:77) ~[%5B生活调味料%5D%20spiceoffabric-1.5.5+1.19.jar:?]
at net.minecraft.server.network.ServerPlayerEntity.handler$jdn000$onConstruct(ServerPlayerEntity.java:24792) ~[client-intermediary.jar:?]
at net.minecraft.server.network.ServerPlayerEntity.<init>(ServerPlayerEntity.java:265) ~[client-intermediary.jar:?]
at net.minecraft.server.PlayerManager.createPlayer(PlayerManager.java:461) ~[client-intermediary.jar:?]
at net.minecraft.server.network.ServerLoginNetworkHandler.acceptPlayer(ServerLoginNetworkHandler.java:133) ~[client-intermediary.jar:?]
at net.minecraft.server.network.ServerLoginNetworkHandler.redirect$dhn000$handlePlayerJoin(ServerLoginNetworkHandler.java:563) ~[client-intermediary.jar:?]
at net.minecraft.server.network.ServerLoginNetworkHandler.tick(ServerLoginNetworkHandler.java:73) ~[client-intermediary.jar:?]
at net.minecraft.network.ClientConnection.tick(ClientConnection.java:248) ~[client-intermediary.jar:?]
at net.minecraft.server.ServerNetworkIo.tick(ServerNetworkIo.java:183) ~[client-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.tickWorlds(MinecraftServer.java:886) ~[client-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:819) ~[client-intermediary.jar:?]
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:98) ~[client-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:665) ~[client-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:257) ~[client-intermediary.jar:?]
at java.lang.Thread.run(Unknown Source) [?:?]
[15:59:58] [Server thread/INFO]: com.mojang.authlib.GameProfile@28075af8[id=*,name=Rivermoon,properties={},legacy=false] (local:E:3a224e5f) lost connection: 无效的玩家数据
Seems like DataAttributes called setHealth()
on early world loading, the ServerPlayNetworkHandler
in ServerPlayerEntity
hasn't initialized at that moment. It's causing addStatuEffect()
injected by ietweaks in setHealth()
failure to call onStatusEffectApplied()
in ServerPlayerEntity
- It's needs ServerPlayNetworkHandler
.