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:
parent
3ad0969644
commit
7516f9c5d3
24 changed files with 187 additions and 1 deletions
|
@ -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.LivingArmourUpgradeSelfSacrifice;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -96,6 +97,12 @@ public class StatTrackerSelfSacrifice extends StatTracker
|
|||
return upgradeList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getProgress(LivingArmour livingArmour, int currentLevel)
|
||||
{
|
||||
return Utils.calculateStandardProgress(totalSacrifices, sacrificesRequired, currentLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean providesUpgrade(String key)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue