    001package net.minecraft.entity;
    002
    003import net.minecraft.command.IEntitySelector;
    004import net.minecraft.entity.player.EntityPlayer;
    005import net.minecraft.item.ItemStack;
    006
    007public class EntitySelectorArmoredMob implements IEntitySelector
    008{
    009    private final ItemStack field_96567_c;
    010
    011    public EntitySelectorArmoredMob(ItemStack par1ItemStack)
    012    {
    013        this.field_96567_c = par1ItemStack;
    014    }
    015
    016    /**
    017     * Return whether the specified entity is applicable to this filter.
    018     */
    019    public boolean isEntityApplicable(Entity par1Entity)
    020    {
    021        if (!par1Entity.isEntityAlive())
    022        {
    023            return false;
    024        }
    025        else if (!(par1Entity instanceof EntityLiving))
    026        {
    027            return false;
    028        }
    029        else
    030        {
    031            EntityLiving entityliving = (EntityLiving)par1Entity;
    032            return entityliving.getCurrentItemOrArmor(EntityLiving.func_82159_b(this.field_96567_c)) != null ? false : entityliving.func_98052_bS() || entityliving instanceof EntityPlayer;
    033        }
    034    }
    035}