Give Armor Gear the indestructible item entity treatment. #1009

This commit is contained in:
Bernhard Bonigl committed 2014-09-23 18:18:30 +02:00
1 parent c7a0ed7fed
commit de6e3cc34b
1 file changed
+12
@@ -17,6 +17,7 @@ import net.minecraftforge.common.ISpecialArmor;
import tconstruct.library.TConstructRegistry;
import tconstruct.library.modifier.*;
import tconstruct.library.tools.ToolCore;
import tconstruct.tools.entity.FancyEntityItem;
public abstract class ArmorCore extends ItemArmor implements ISpecialArmor, IModifyable
{
@@ -427,4 +428,15 @@ public abstract class ArmorCore extends ItemArmor implements ISpecialArmor, IMod
displayToolTips = false;
}
}
/* Prevent armor from dying */
public boolean hasCustomEntity (ItemStack stack)
{
return true;
}
public Entity createEntity (World world, Entity location, ItemStack itemstack)
{
return new FancyEntityItem(world, location, itemstack);
}
}