Dying to Carcinogen while wearing Protection armor breaks your character's health
iwishforducks opened this issue ยท 2 comments
Checked for existing issues
- I have checked for existing issues, and have found none.
Tested latest version
- I have checked that this occurs on the latest version.
GregTech CEu Version
1.3.0-a
Recipe Viewer Installed
JEI
Environment
Singleplayer
Cross-Mod Interaction
Unsure
Other Installed Mods
ATM Gravitas2
Expected Behavior
When carrying radioactive materials and reaching max stage Carcinogen, you should outright die.
Actual Behavior
However, if you're wearing any kind of Protective armor, your character health is instead set to NaNf, causing you to be permanently bricked until you edit your health in an external program.
Steps to Reproduce
- Equip some protective armor (Unsure if it has to be armor in general or specifically enchanted Protection armor?)
- Carry loads of radioactive material
- Wait until you reach max stage of Carcinogen
Additional Information
This is the line responsible for the DEATH symptom:
public static final Symptom DEATH = new Symptom(defaultKey("death"), 1, 1,
((medicalConditionTracker, condition, configuredSymptom, baseSymptom, modifier) -> {
if (modifier > 0) {
Player player = medicalConditionTracker.getPlayer();
player.hurt(condition.getDamageSource(medicalConditionTracker), Float.MAX_VALUE);
}
}));
I believe this is caused by the fact that it's hurting the player by infinity, and then getting divided due to armor calculations somewhere along the line, causing a division error.
Note that ATM Gravitas2 has TerrafirmaCraft. I'm unsure if this is TFC specific or not, since I think TFC changes the way health works internally?
that's the same thing /kill does internally so to me it sounds like a TFC issue and that they patched /kill to work again