BloodMagic/src/main/java/WayofTime/bloodmagic/api/livingArmour/ILivingArmour.java

52 lines
1.4 KiB
Java
Raw Normal View History

2016-01-05 21:50:43 +00:00
package WayofTime.bloodmagic.api.livingArmour;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import com.google.common.collect.Multimap;
/**
* An interface this is used purely for internal implementation.
*
* @author WayofTime
*
*/
public interface ILivingArmour
{
Multimap<String, AttributeModifier> getAttributeModifiers();
2016-01-05 21:50:43 +00:00
boolean upgradeArmour(EntityPlayer user, LivingArmourUpgrade upgrade);
2016-01-05 21:50:43 +00:00
boolean removeUpgrade(EntityPlayer user, LivingArmourUpgrade upgrade);
void notifyPlayerOfUpgrade(EntityPlayer user, LivingArmourUpgrade upgrade);
2016-01-05 21:50:43 +00:00
/**
* Ticks the upgrades and stat trackers, passing in the world and player as
* well as the LivingArmour
*
* @param world
2016-03-16 22:41:06 +00:00
* - The World
2016-01-05 21:50:43 +00:00
* @param player
2016-03-16 22:41:06 +00:00
* - The player wearing the Armour
2016-01-05 21:50:43 +00:00
*/
void onTick(World world, EntityPlayer player);
2016-01-05 21:50:43 +00:00
void readFromNBT(NBTTagCompound tag);
2016-01-05 21:50:43 +00:00
void writeToNBT(NBTTagCompound tag, boolean forceWrite);
2016-01-05 21:50:43 +00:00
/**
* Writes the LivingArmour to the NBTTag. This will only write the trackers
* that are dirty.
*
* @param tag
2016-03-16 22:41:06 +00:00
* - The NBT tag to write to
2016-01-05 21:50:43 +00:00
*/
void writeDirtyToNBT(NBTTagCompound tag);
2016-01-05 21:50:43 +00:00
void writeToNBT(NBTTagCompound tag);
2016-01-05 21:50:43 +00:00
}