package com.JasonILTG.ScienceMod.item.armor.exo;

import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import net.minecraft.world.World;

import com.JasonILTG.ScienceMod.item.armor.ArmorScience;
import com.JasonILTG.ScienceMod.reference.Names;

public abstract class Exoskeleton extends ArmorScience
{
	protected int shieldCapacity;
	protected int shield;
	
	private static final int DEFAULT_DURABILITY = 2500;
	
	public Exoskeleton(String name)
	{
		super(Names.Items.Armor.EXO_PREFIX + name);
		shieldCapacity = 100;
		shield = 0;
		
		maxStackSize = 1;
		this.setMaxDamage(DEFAULT_DURABILITY);
	}
	
	@Override
	public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot)
	{
		// TODO Auto-generated method stub
		return null;
	}
	
	@Override
	public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot)
	{
		// TODO Auto-generated method stub
		
	}
	
	@Override
	public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected)
	{
		// TODO Auto-generated method stub
		super.onUpdate(stack, worldIn, entityIn, itemSlot, isSelected);
	}
	
	@Override
	public void onUsingTick(ItemStack stack, EntityPlayer player, int count)
	{
		// TODO Auto-generated method stub
		super.onUsingTick(stack, player, count);
	}
	
	@Override
	public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack)
	{
		// TODO Auto-generated method stub
		super.onArmorTick(world, player, itemStack);
	}
	
	@Override
	public boolean isValidArmor(ItemStack stack, int armorType, Entity entity)
	{
		// TODO Auto-generated method stub
		return super.isValidArmor(stack, armorType, entity);
	}
	
}

@@ -43,16 +43,40 @@
 r.exo;%0A%0A
+import java.util.List;%0A%0A
 import n
@@ -103,16 +103,16 @@
 Entity;%0A
-
 import n
@@ -308,16 +308,114 @@
 d.World;
+%0Aimport net.minecraftforge.fml.relauncher.Side;%0Aimport net.minecraftforge.fml.relauncher.SideOnly;
 %0A%0Aimport
@@ -681,16 +681,136 @@
 = 2500;%0A
+%09private static final double UNBLOCKABLE_DMG_REDUCTION = 0.1;%0A%09private static final int UNBLOCKABLE_DMG_MAX_ABSORB = 4;%0A
 %09%0A%09publi
@@ -1175,19 +1175,178 @@
 b%0A%09%09
-return null
+if (source.isUnblockable()) return new ArmorProperties(0, UNBLOCKABLE_DMG_REDUCTION, UNBLOCKABLE_DMG_MAX_ABSORB);%0A%09%09return new ArmorProperties(0, 0.25, Integer.MAX_VALUE)
 ;%0A%09%7D
@@ -1909,32 +1909,205 @@
 r, count);%0A%09%7D%0A%09%0A
+%09private void rechargeShield()%0A%09%7B%0A%09%09// TODO consume power to recharge%0A%09%09if (shield %3C shieldCapacity - 5) %7B%0A%09%09%09shield += 5;%0A%09%09%7D%0A%09%09else %7B%0A%09%09%09shield = shieldCapacity;%0A%09%09%7D%0A%09%7D%0A%09%0A
 %09@Override%0A%09publ
@@ -2193,84 +2193,42 @@
 %09// 
-TODO Auto-generated method stub%0A%09%09super.onArmorTick(world, player, itemStack
+Recharges shield%0A%09%09rechargeShield(
 );%0A%09
@@ -2330,89 +2330,319 @@
 %09// 
-TODO Auto-generated method stub%0A%09%09return super.isValidArmor(stack, armorType, ent
+Player only%0A%09%09return (entity instanceof EntityPlayer);%0A%09%7D%0A%09%0A%09@Override%0A%09@SideOnly(Side.CLIENT)%0A%09public void addInformation(ItemStack stack, EntityPlayer playerIn, List tooltip, boolean advanced)%0A%09%7B%0A%09%09super.addInformation(stack, playerIn, tooltip, advanced);%0A%09%09tooltip.add(%22Shield: %22 + shield + %22/%22 + shieldCapac
 ity)

Work on exoskeleton