@@ -129,6 +129,8 @@ public void tickUpdate(EntityPlayer player, World world, TickEvent.Phase phase)
129
129
//Increment tick timer
130
130
addTemperatureTickTimer (1 );
131
131
132
+ boolean appliedEffect = false ;
133
+
132
134
if (getTemperatureTickTimer () >= getTemperatureTickLimit ())
133
135
{
134
136
setTemperatureTickTimer (0 );
@@ -147,8 +149,6 @@ public void tickUpdate(EntityPlayer player, World world, TickEvent.Phase phase)
147
149
148
150
//Effects
149
151
150
- boolean appliedEffect = false ;
151
-
152
152
TemperatureEnum tempEnum = getTemperatureEnum ();
153
153
if (tempEnum ==TemperatureEnum .BURNING )
154
154
{
@@ -170,19 +170,19 @@ else if(tempEnum==TemperatureEnum.FREEZING)
170
170
appliedEffect = true ;
171
171
}
172
172
}
173
-
174
- if (!appliedEffect )
173
+ }
174
+
175
+ if (!appliedEffect )
176
+ {
177
+ if (this .getTemperatureDamageCounter () != 0 )
175
178
{
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 )
177
183
{
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 );
186
186
}
187
187
}
188
188
}
0 commit comments