NuclearCraft

NuclearCraft

31M Downloads

Radiation death persist interaction with PlayerRevive Mod

ubergarm opened this issue ยท 4 comments

commented

Description

There seems to be some mod interactions between PlayerRevive and NuclearCraft:Overhauled with default configurations. When a player dies due to excessive radiation, it is possible to get stuck in a PlayerRevie "loop" that is difficult to escape. You can see an example in this twitch stream video showing the glitch. Essentially before you can click "respawn" or "title screen" you end up in the PlayerRevive count-down again immediately and can't escape even with disconnect/reconnect.

The author of PlayerRevive has responded graciously on this issue which I originally posted there: CreativeMD/PlayerRevive#73

To recreate this you have to have a multiplayer session and could use my modpack Rotten Economy v0.90

Work Around

The safest solution for now is to change the config in nuclearcraft.cfg to disable persisting radiation levels like this:

# If enabled, players' radiation levels will persist on death.
B:radiation_death_persist=false

In addition, adding the fatal_rads line into playerrevive.json might help in some cases:

"bypassDamageSources": [
    "gorgon",
    "death.attack.sgcraft:transient",
    "death.attack.sgcraft:iris",
    "death.attack.fatal_rads"
]

I use this work-around in newer versions of my modpack config. Also thanks so much for Nuclearcraft:Overhauled! I've been having a lot of fun with it and built some quests around the radiation system in latest version of my modpack. Also I've been able to configure it to work pretty well with Tech Guns (which has a very similar but non-functional radiation system).

Musings

My impression is that the NuclearCraft: Overhauled Github onPlayerRespawn event is maybe not triggering properly. If that is the case, the "revive loop" glitch might occur say if a player has high radiation but the actual death.attack happens to be due to something else than fatal_rads. But I'm not sure how to test this hypothesis.

Versions

commented

Could be, but honestly I got no idea either :|

commented

A brief summary of how PlayerRevive works:

It subscribes to the LivingDeathEvent (source). If a player dies it will cancel the death and set the player into a bleeding state. This will prevent the player from getting damage and set the health to one heart (source).
Either the player will get revived (which will remove the bleeding state) or the player gets killed by bledToDeath damage once the time has run out or the player gave up.

I have no clue how this issue occurs, maybe you can help out.

commented

Hey there @ubergarm and @CreativeMD! I've been rather busy lately, so not had as much time to work on NCO in general as I would have liked :P

I tried recreating this just be installing PlayerRevive (for logging etc. in the dev environment), and I couldn't. Trying to follow how the death and respawn events are connected is quite a minefield, so for now I don't have any good ideas about what might be happening.

It's possible that it doesn't have anything to do with NCO's subscription to the PlayerEvent.Clone event that you link to, but rather the dealing of the fatal radiation damage itself in the PlayerTickEvent subscription.

commented

Unfortunately, I could not work out what the cause of this could be. For anyone else who runs into this, I would simply recommend the workaround detailed in ubergarm's original post!