GregTechCEu Modern

GregTechCEu Modern

6M Downloads

Dying to Carcinogen while wearing Protection armor breaks your character's health

iwishforducks opened this issue ยท 2 comments

commented

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

  1. Equip some protective armor (Unsure if it has to be armor in general or specifically enchanted Protection armor?)
  2. Carry loads of radioactive material
  3. 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?

commented

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

commented

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

Just tested and it is indeed a TFC thing, or perhaps something in the modpack. Should I put up an issue on TFC's github?