[1.12.2] Changing the "outOfWorld" to anything but 0.0 can cause some strange side effects when you die.
SonicX8000 opened this issue ยท 5 comments
Minecraft: 1.12.2
Forge: 14.23.3.2686
Mods:
CTM-MC1.12-0.2.3.12
ScalingHealth-1.12-1.3.15-98
SilentLib-1.12.2-2.3.1-107
SilentsGems-1.12.2-2.7.1-268
twilightforest-1.12.2-3.7.424-universal
Video of the bug:
https://www.youtube.com/watch?v=gu_FZMK2SQA
I forgot to increase Minecraft's Volume so the video is very quiet.
So... for some odd reason... messing with the "outOfWorld" damage value causes a strange side effect if you get revived from... say a Charm of Life from the Twilight Forest mod and you happen to die again. Vanilla Totem of Undying apparently doesn't cause this to happen.
It seems to only be from the /kill command but I recall other damage sources doing this.
In the video I used /kill while the "outOfWorld" value was at 0.0 just to show that it works... but when I changed it to 0.1 and used /kill... I got stuck in an endless death animation loop where I can't open any chests, mobs can't see me, I can move around with 0 health, etc. Oh... and you cannot die ever again which forces a world back-up or editing the player data with a NBT Editor.
While I understand that /kill isn't by normal means... this can also happen by other damage sources such as dying in Cyberware's Robo-Surgeon when having augments put into your body, although I had the Absorption potion effect at that time.
Even if you use /kill once and get revived... getting hit by ANYTHING such as touching a Cactus will cause you to 'die' again no matter how much health you have. Difficultly at 0 and touching a Cactus instantly dropped my health to 0 and the bug occurs.
Leaving the value at 0.0 won't cause the issue to occur.
Well, that's... interesting. I see in your video that your current health is going to NaN somehow. I imagine that's the cause of the strange behavior. I'll take a look at it tomorrow.
The bug still occurs, using...
ScalingHealth-1.12-1.3.16-99
...just did a test with it using a Charm of Life with 'outOfWorld' at 0.1 with /kill and got the endless death animation loop.
If I may take a guess... when using /kill... the game will ignore Vanilla Totems of Undying and just kill you even if holding it. However some revival items from other mods allows you to revive even after getting /kill'd or by something that causes it.
Charm Of Life I & II - As seen in the video, you can revive from a /kill.
Totem of Undying from Totem Expansion. - Allows you to use Totems of Undying from your inventory/baubles slot. Allows you to revive from a /kill.
Revival Potion effect from Potion Core. - Heals you when health hits 0, also can revive from a /kill.
Health still goes to NaN.
A slight update. Doesn't seem to be 'outOfWorld' damage only as I managed to get the NaN Health by overflowing my PSI from the PSI mod though only once. Couldn't get it to happen again after checking the level.dat and changing the Health & Absorption values from NaN to like 2 or something. I also changed HurtTime to 1 as it was set to 0 and wasn't sure if that was needed to get out of death limbo.
It's damage is scaled by about 15.0 and PSI's base damage varies depending on how much of an overflow you get when you don't have enough PSI to use. I think it's scaled via Generic since it's not listed in the damage list and that one affects all damage sources, even modded ones. I noticed that there's a 'Generic' line in there but that's perhaps only from regular damage sources, not sure. The 'outOfWorld' damage scale was 0.0 when it happened.
Just a shot in the dark here but is it be possible for a failsafe to be added... like if the player's Health/Absorption went to NaN, it would set the value from NaN to 0? Unless 0 doesn't work or it could cause something to break.
Done, new version pending approval.
commit: 5f94802
It looks like it's fixed now in 1.3.17. I set the "outOfWorld" damage to 5.0 and used /kill with a reviving item from the list above and it didn't put me in death limbo with NaN health.
I also did a test with Cyberware's Robo-Surgeon damage & PSI's overflow damage since I recall getting NaN health from those and those didn't put me in death limbo either.
If it happens again by any chance, I'll let you know.