Mostly finished the LivingArmour framework, which includes the upgrades and stat trackers.

This commit is contained in:
WayofTime 2015-12-03 10:18:05 -05:00
parent 13d9cb4b5a
commit eaa6226861
5 changed files with 184 additions and 15 deletions

View file

@ -11,13 +11,31 @@ public abstract class StatTracker {
public abstract String getUniqueIdentifier();
/**
* When called the StatTracker should reset all of its data, including
* upgrades.
*/
public abstract void resetTracker();
public abstract void readFromNBT(NBTTagCompound tag);
public abstract void writeToNBT(NBTTagCompound tag);
public abstract void onTick(World world, EntityPlayer player, LivingArmour livingArmour);
/**
* Called each tick to update the tracker's information. Called in
* LivingArmour
*
* @param world
* World the player is in
* @param player
* The player that has the armour equipped
* @param livingArmour
* The equipped LivingArmour
* @return True if there is a new upgrade unlocked this tick.
*/
public abstract boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour);
public abstract LivingArmourUpgrade[] getUpgrades();
public final boolean isDirty() {
return isDirty;