Stereowalker / Survive

https://modrinth.com/mod/survive
https://www.curseforge.com/minecraft/mc-mods/survive
Other
19 stars 18 forks source link

[BUG] Heated effect computation checking for presence of chilling effect #239

Closed Wabbit0101 closed 2 years ago

Wabbit0101 commented 2 years ago

Forge version: 40.1.20+ Version: Survive 7.0.7 Description: See the source code in SurviveEvents.java lines 608-619

TemperatureQuery.registerQuery("survive:chilled_effect", ContributingFactor.INTERNAL, (player, temp, level, pos)->{
  if (player.hasEffect(SMobEffects.CHILLED))
    return -(0.05F * (float)(player.getEffect(SMobEffects.CHILLED).getAmplifier() + 1));
  else
    return 0;
});
TemperatureQuery.registerQuery("survive:heated_effect", ContributingFactor.INTERNAL, (player, temp, level, pos)->{
  if (player.hasEffect(SMobEffects.CHILLED))
    return +(0.05F * (float)(player.getEffect(SMobEffects.CHILLED).getAmplifier() + 1));
  else
    return 0;
});

See how the heated effect code is looking for the SMobEffects.CHILLED not SMobEffects.HEATED. Seems like a cut-n-paste error. So the chill effect basically is doing nothing (as it gets cancelled out by this code).

Stereowalker commented 2 years ago

Lol, thanks for pointing it out