Skip to content

Commit

Permalink
Give Armor Gear the indestructible item entity treatment. #1009
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Sep 23, 2014
1 parent c7a0ed7 commit de6e3cc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/java/tconstruct/library/armor/ArmorCore.java
Expand Up @@ -17,6 +17,7 @@
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
{
Expand Down Expand Up @@ -427,4 +428,15 @@ public void addInformation (ItemStack stack, EntityPlayer player, List list, boo
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);
}
}

0 comments on commit de6e3cc

Please sign in to comment.