Player cannot respawn in multiplayer game
RisingInIris2017 opened this issue · 5 comments
Versions
Mod version:
HACLib Version: HeatAndClimateLib_1.12.2-3.2.3
HACMod Version: HeatAndClimateMod_1.12.2-3.2.4
Forge version:
14.23.5.2847
Singleplayer or Multiplayer:
Multiplayer, using Catserver
Installed mods:
Link to full crash log
Game does not crash.
Description of the problem
How to reproduce:
Cannot reproduce on another players, only a single player of my server,
his ID is Gastant, UUID is 6dcf845e-c9d6-392f-b36a-d4a5096762ca
.
When this player dies, regardless of reason, he cannot respawn.
The respawn screen does show, but clicking "Respawn" is of no use.
I checked his playerdata.dat with NBTExplorer, and found his DeathTime data entry was a non-zero number, so that he cannot respawn;
but what confused me is why this problem occurred.
Logs:
This is why I post this issue to you.
When I use /kill command to kill him, the log shows:
[Server thread/ERROR] [FML]: Exception caught during firing event net.minecraftforge.event.entity.player.PlayerSetSpawnEvent@6f7e440f:
java.lang.NullPointerException: null
at net.minecraft.world.World.isOutsideBuildHeight(World.java:356) ~[amu.class:?]
at net.minecraft.world.World.getBlockState(World.java:1086) ~[amu.class:?]
at defeatedcrow.hac.main.event.LivingMainEventDC.onWakeUp(LivingMainEventDC.java:395) ~[LivingMainEventDC.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_345_LivingMainEventDC_onWakeUp_PlayerSetSpawnEvent.invoke(.dynamic) ~[?:?]
The whole log link: https://paste.ubuntu.com/p/Pb5XkzsKmD/
I doubt whether this line means HAC is involved in the problem or not.
But I think to post this issue is good for solving this problem.
Looking forward your reply.
Thanks in advance!
P.S. if you are interested in his playerdata.dat, I attached it here. You may use the NBTExplorer tool to read it.
6dcf845e-c9d6-392f-b36a-d4a5096762ca.zip
Hello, thank you for your report.
This problem seems to have been caused by HaC. The guess of the cause is explained below:
LivingMainEventDC.onWakeUp
Java.lang.NullPointerException: null
HaC respawn events refer to blocks at the feet of sleeping players. But there was an NPE. Normally the block is not null, but it seems that a special condition caused a null.
The reason is,
At net.minecraft.world.World.isOutsideBuildHeight
According to this log, it seems that he was outside the world altitude.
This error can be prevented by modifying HaC. (HaC events will be skipped when players are at special altitudes.)
Thank you for providing information.
Thanks for your reply! You are warmhearted indeed :)
But I still have a question. You mentioned
This error can be prevented by modifying HaC. (HaC events will be skipped when players are at special altitudes.)
I checked my config/defeatedcrow/climate folder. I thought the configuration option may be in dcs_asm.cfg, or core.cfg, or main.cfg. But I searched these three files for keyword "res", nothing related was found.
How should I do to modify HaC to avoid this issue?
Would you like to give me some advice?
Thanks a lot!
This Event is not a core mod, but one of the functions included in the mod. So no config is available. That should be addressed by my fix. (I'm sorry, "modifying HaC" means my fix.)
A new version has been released. Please try. :)
https://github.com/defeatedcrow/HeatAndClimateMod/releases/tag/v3.2.5
I felt it difficult to find a proper word to express my appreciation to both your efforts and your warm heart and just burst into tears because of being moved 😭
Thanks a lot!
And I'll have a try immediately.
Thanks a lot again!