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

@ -5,6 +5,7 @@ import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade;
import WayofTime.bloodmagic.api.livingArmour.StatTracker;
import WayofTime.bloodmagic.livingArmour.LivingArmour;
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeSpeed;
import WayofTime.bloodmagic.util.Utils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
@ -105,6 +106,12 @@ public class StatTrackerMovement extends StatTracker
return upgradeList;
}
@Override
public double getProgress(LivingArmour livingArmour, int currentLevel)
{
return Utils.calculateStandardProgress(totalMovement, blocksRequired, currentLevel);
}
@Override
public boolean providesUpgrade(String key)
{