use of net.minecraft.entity.monster.EntityPigZombie in project SecurityCraft by Geforce132.
the class TileEntityProtecto method attackEntity.
@Override
public boolean attackEntity(Entity entity) {
if (entity instanceof EntityLivingBase) {
if ((entity instanceof EntityPlayer && (getOwner().isOwner((EntityPlayer) entity) || (hasModule(EnumCustomModules.WHITELIST) && ModuleUtils.getPlayersFromModule(worldObj, pos, EnumCustomModules.WHITELIST).contains(((EntityLivingBase) entity).getCommandSenderName().toLowerCase())))) || entity instanceof EntityPigZombie || (entity instanceof EntityCreeper && ((EntityCreeper) entity).getPowered()))
return false;
EntityLightningBolt lightning = new EntityLightningBolt(worldObj, entity.posX, entity.posY, entity.posZ);
worldObj.addWeatherEffect(lightning);
BlockUtils.setBlockProperty(worldObj, pos, BlockProtecto.ACTIVATED, false);
return true;
}
return false;
}
Aggregations