From de6e3cc34b83571da5fb1ee0bf005c2a3cbbe0f7 Mon Sep 17 00:00:00 2001 From: Bernhard Bonigl Date: Tue, 23 Sep 2014 18:18:30 +0200 Subject: [PATCH] Give Armor Gear the indestructible item entity treatment. #1009 --- .../java/tconstruct/library/armor/ArmorCore.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/tconstruct/library/armor/ArmorCore.java b/src/main/java/tconstruct/library/armor/ArmorCore.java index 66df49ff..c5c5b3a1 100644 --- a/src/main/java/tconstruct/library/armor/ArmorCore.java +++ b/src/main/java/tconstruct/library/armor/ArmorCore.java @@ -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); + } } \ No newline at end of file