Added a way to view the progress towards the next upgrade level

Override `getProgress()` and return a value between 0.0 (0%) and 1.0 (100%)
This commit is contained in:
Nicholas Ignoffo 2016-07-29 21:10:22 -07:00
parent 3ad0969644
commit 7516f9c5d3
24 changed files with 187 additions and 1 deletions

View file

@ -3,6 +3,7 @@ package WayofTime.bloodmagic.livingArmour.tracker;
import java.util.ArrayList;
import java.util.List;
import WayofTime.bloodmagic.util.Utils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.MobEffects;
import net.minecraft.nbt.NBTTagCompound;
@ -78,6 +79,12 @@ public class StatTrackerPoison extends StatTracker
return upgradeList;
}
@Override
public double getProgress(LivingArmour livingArmour, int currentLevel)
{
return Utils.calculateStandardProgress(totalPoisonTicks, poisonTicksRequired, currentLevel);
}
@Override
public boolean providesUpgrade(String key)
{