Skip to content

Commit

Permalink
Make sure to setIsActive just for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
jchung01 committed Mar 17, 2024
1 parent bb03a68 commit 95a674a
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,16 @@ private void utOptimizedUpdate(CallbackInfo ci)
}
boolean overTicked = tickTime >= Math.max((int) (runTime * (1.0 - getSpeedMultiplier())), 1);
// Now we ensured we can make something. Check energy state.
if (canUseEnergy(getEuPerTick(energyPerTick)) && canMake(craftMatrix) && !overTicked)
if (canUseEnergy(getEuPerTick(energyPerTick)) && canMake(craftMatrix))
{
setIsActive(true);
useEnergy(getEuPerTick(energyPerTick));
tickTime++;
if (!overTicked)
{
useEnergy(getEuPerTick(energyPerTick));
tickTime++;
}
}
else if (!overTicked)
else
{
setIsActive(false);
return;
Expand Down

0 comments on commit 95a674a

Please sign in to comment.