Skip to content

Commit 1c39294

Browse files
committed
Quicker Temperature Scaling Reset
Temperature scaling resets sooner. It's still absolutely brutal... Also changed a word in the config.
1 parent 28a07c5 commit 1c39294

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/main/java/com/charles445/simpledifficulty/capability/TemperatureCapability.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ public void tickUpdate(EntityPlayer player, World world, TickEvent.Phase phase)
129129
//Increment tick timer
130130
addTemperatureTickTimer(1);
131131

132+
boolean appliedEffect = false;
133+
132134
if(getTemperatureTickTimer() >= getTemperatureTickLimit())
133135
{
134136
setTemperatureTickTimer(0);
@@ -147,8 +149,6 @@ public void tickUpdate(EntityPlayer player, World world, TickEvent.Phase phase)
147149

148150
//Effects
149151

150-
boolean appliedEffect = false;
151-
152152
TemperatureEnum tempEnum = getTemperatureEnum();
153153
if(tempEnum==TemperatureEnum.BURNING)
154154
{
@@ -170,19 +170,19 @@ else if(tempEnum==TemperatureEnum.FREEZING)
170170
appliedEffect = true;
171171
}
172172
}
173-
174-
if(!appliedEffect)
173+
}
174+
175+
if(!appliedEffect)
176+
{
177+
if(this.getTemperatureDamageCounter() != 0)
175178
{
176-
if(this.getTemperatureDamageCounter() != 0)
179+
//Test whether to reset the temperature damage counter
180+
boolean hasHypothermia = player.isPotionActive(SDPotions.hypothermia);
181+
boolean hasHyperthermia = player.isPotionActive(SDPotions.hyperthermia);
182+
if(!hasHypothermia && !hasHyperthermia)
177183
{
178-
//Test whether to reset the temperature damage counter
179-
boolean hasHypothermia = player.isPotionActive(SDPotions.hypothermia);
180-
boolean hasHyperthermia = player.isPotionActive(SDPotions.hyperthermia);
181-
if(!hasHypothermia && !hasHyperthermia)
182-
{
183-
//Reset the temperature damage counter
184-
this.setTemperatureDamageCounter(0);
185-
}
184+
//Reset the temperature damage counter
185+
this.setTemperatureDamageCounter(0);
186186
}
187187
}
188188
}

src/main/java/com/charles445/simpledifficulty/config/ModConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ public class ConfigThirst
351351
@Config.RangeDouble(min=0.0, max=1.0)
352352
public double thirstParasitesDamage = 0.2d;
353353

354-
@Config.Comment("Thirst Damage Scaling - Extra damage from thirst over time")
354+
@Config.Comment("Thirst Damage Scaling - Extra damage from dehydration over time")
355355
@Config.Name("ThirstDamageScaling")
356356
@Config.RangeDouble(min=0.0)
357357
public double thirstDamageScaling = 0.0d;

0 commit comments

Comments
 (0)