Added necessary framework for damage reduction upgrades.

This commit is contained in:
WayofTime 2016-01-06 07:13:56 -05:00
parent b736fd3eaa
commit 72ac385861
4 changed files with 205 additions and 3 deletions

View file

@ -3,6 +3,7 @@ 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.util.DamageSource;
import net.minecraft.world.World;
import com.google.common.collect.HashMultimap;
@ -32,6 +33,17 @@ public abstract class LivingArmourUpgrade
this.level = Math.min(level, getMaxTier() - 1);
}
/**
* Percentage of damage blocked. This stacks multiplicatively with other
* upgrades.
*
* @return 0 for no damage blocked, 1 for full damage blocked
*/
public double getArmourProtection(DamageSource source)
{
return 0;
}
public int getUpgradeLevel()
{
return this.level;