Fixed API referencing the main mod.

This commit is contained in:
WayofTime 2016-01-05 16:50:43 -05:00
parent 3980c0fc6c
commit 1a7ae8d99c
7 changed files with 65 additions and 8 deletions

View file

@ -0,0 +1,46 @@
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
{
public Multimap<String, AttributeModifier> getAttributeModifiers();
public boolean upgradeArmour(EntityPlayer user, LivingArmourUpgrade upgrade);
public void notifyPlayerOfUpgrade(EntityPlayer user, LivingArmourUpgrade upgrade);
/**
* Ticks the upgrades and stat trackers, passing in the world and player as
* well as the LivingArmour
*
* @param world
* @param player
*/
public void onTick(World world, EntityPlayer player);
public void readFromNBT(NBTTagCompound tag);
public void writeToNBT(NBTTagCompound tag, boolean forceWrite);
/**
* Writes the LivingArmour to the NBTTag. This will only write the trackers
* that are dirty.
*
* @param tag
*/
public void writeDirtyToNBT(NBTTagCompound tag);
public void writeToNBT(NBTTagCompound tag);
}

View file

@ -4,7 +4,6 @@ import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import WayofTime.bloodmagic.livingArmour.LivingArmour;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
@ -49,7 +48,7 @@ public abstract class LivingArmourUpgrade
public abstract int getCostOfUpgrade();
public void onTick(World world, EntityPlayer player, LivingArmour livingArmour)
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour)
{
}