@Override public boolean attackEntityAsMob(Entity e) { if (e instanceof ReplicatorEntity) { this.hunger -= 0.4; ((ReplicatorEntity) e).hunger += 0.4; } return super.attackEntityAsMob(e); }
@Override public boolean attackEntityAsMob(Entity entity) { return super.attackEntityAsMob(entity); // I know this does nothing! - But it may soon! }
public boolean attackEntityAsMob(Entity entity) { if (canEntityBeSeen(entity)) if (super.attackEntityAsMob(entity)) return true; return false; }
@Override public boolean attackEntityAsMob(Entity entity) { if (canEntityBeSeen(entity)) return super.attackEntityAsMob(entity); else return false; }
@Override public boolean attackEntityAsMob(Entity entityIn) { if (super.attackEntityAsMob(entityIn)) { if (entityIn instanceof EntityLivingBase) { // This zombie gives health boost and regeneration when it attacks ((EntityLivingBase)entityIn).addPotionEffect(new PotionEffect(MobEffects.HEALTH_BOOST, 200)); ((EntityLivingBase)entityIn).addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 200)); } return true; } else { return false; } }
@Override public boolean attackEntityAsMob(Entity entityIn) { boolean flag = super.attackEntityAsMob(entityIn); if (flag) { float f = this.world.getDifficultyForLocation(new BlockPos(this)).getAdditionalDifficulty(); if (this.getHeldItemMainhand().isEmpty() && this.isBurning() && this.rand.nextFloat() < f * 0.3F) { entityIn.setFire(2 * (int) f); } } return flag; }
@Override public boolean attackEntityAsMob(Entity entity) { if (super.attackEntityAsMob(entity)) { if (GaiaConfig.DAMAGE.baseDamage) { if (entity instanceof EntityPlayer && GaiaConfig.DAMAGE.shieldsBlockPiercing) { EntityPlayer player = (EntityPlayer) entity; ItemStack itemstack = player.getActiveItemStack(); if (itemstack.getItem() == Items.SHIELD) { return true; } } ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.INSTANT_DAMAGE, 2, 0)); } return true; } else { return false; } }
@Override public boolean attackEntityAsMob(Entity entity) { if (super.attackEntityAsMob(entity)) { if (entity instanceof EntityLivingBase) { byte duration = 0; if (getEntityWorld().getDifficulty() == EnumDifficulty.NORMAL) duration = 7; else if (getEntityWorld().getDifficulty() == EnumDifficulty.HARD) duration = 15; if (duration > 0) { if (rand.nextBoolean()) ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.WITHER, duration * 20, 0)); } } return true; } else return false; }
@Override public boolean attackEntityAsMob(Entity entity) { if (canEntityBeSeen(entity)) { if (getIsInvulnerable()) return false; else if (super.attackEntityAsMob(entity)) { Entity target = entity; if (getRidingEntity() != target) { if (target != this) if (!getEntityWorld().isRemote && getBloodConsumed() < maxBloodLevel) { startRiding(entity); motionY += 0.5F; return true; } } return true; } else return true; } return false; }
@Override public boolean attackEntityAsMob(Entity entity) { if (super.attackEntityAsMob(entity)) { if (entity instanceof EntityLiving) { byte duration = 0; if (getEntityWorld().getDifficulty().ordinal() > EnumDifficulty.EASY.ordinal() && rand.nextInt(19) == 0) if (getEntityWorld().getDifficulty() == EnumDifficulty.NORMAL) duration = 5; else if (getEntityWorld().getDifficulty() == EnumDifficulty.HARD) duration = 10; if (duration > 0) ((EntityLiving) entity).addPotionEffect(new PotionEffect(MobEffects.POISON, duration * 20, 0)); } return true; } else return false; }
@Override public boolean attackEntityAsMob(Entity entity) { if (super.attackEntityAsMob(entity)) { if (entity instanceof EntityPlayer) if (rand.nextInt(20) == 0 && !entity.isBeingRidden()) { EntityBotFlyLarva entityBotFlyLarva = new EntityBotFlyLarva(getEntityWorld()); entityBotFlyLarva.setPosition(entity.posX, entity.posY + 1, entity.posZ); entityBotFlyLarva.setParasiteCount((byte) 1); entityBotFlyLarva.startRiding(entity, true); getEntityWorld().spawnEntity(entityBotFlyLarva); } else if (rand.nextInt(20) == 0 && getParasite((EntityPlayer) entity) != null) if (((EntityBotFlyLarva) getParasite((EntityPlayer) entity)).getParasiteCount() < 3) ((EntityBotFlyLarva) getParasite((EntityPlayer) entity)).setParasiteCount((byte) (((EntityBotFlyLarva) getParasite((EntityPlayer) entity)).getParasiteCount() + 1)); return true; } return false; }
public boolean attackEntityAsMob(Entity entityIn) { boolean blindness = this.isPotionActive(MobEffects.BLINDNESS) || this.getAttackTarget() != null && this.getAttackTarget().isPotionActive(MobEffects.BLINDNESS) || this.getAttackTarget() != null && this.getAttackTarget() instanceof IBlacklistedFromStatues && !((IBlacklistedFromStatues) this.getAttackTarget()).canBeTurnedToStone(); if (blindness && this.deathTime == 0) { if (this.getAnimation() != ANIMATION_HIT) { this.setAnimation(ANIMATION_HIT); } if (entityIn instanceof EntityLivingBase) { ((EntityLivingBase) entityIn).addPotionEffect(new PotionEffect(MobEffects.POISON, 100, 2, false, true)); } } return super.attackEntityAsMob(entityIn); }
@Override public boolean attackEntityAsMob(Entity entity) { if (super.attackEntityAsMob(entity)) { if (entity instanceof EntityLivingBase) { byte duration = 0; if (getEntityWorld().getDifficulty().ordinal() > EnumDifficulty.EASY.ordinal()) if (getEntityWorld().getDifficulty() == EnumDifficulty.NORMAL) duration = 7; else if (getEntityWorld().getDifficulty() == EnumDifficulty.HARD) duration = 15; if (duration > 0) ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.POISON, duration * 20, 0)); } return true; } else return false; }
@Override public boolean attackEntityAsMob(Entity entity) { if (canEntityBeSeen(entity)) { if (super.attackEntityAsMob(entity)) { if (entity instanceof EntityLivingBase) { byte duration = 0; if (getEntityWorld().getDifficulty().ordinal() > EnumDifficulty.EASY.ordinal()) if (getEntityWorld().getDifficulty() == EnumDifficulty.NORMAL) duration = 3; else if (getEntityWorld().getDifficulty() == EnumDifficulty.HARD) duration = 5; if (duration > 0) ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.POISON, duration * 20, 0)); } } return true; } else return false; }
@Override public boolean attackEntityAsMob(Entity entity) { if (canEntityBeSeen(entity) && entity.isInWater()) { if (super.attackEntityAsMob(entity)) { if (entity instanceof EntityLivingBase) { byte duration = 0; if (getEntityWorld().getDifficulty() == EnumDifficulty.NORMAL) duration = 7; else if (getEntityWorld().getDifficulty() == EnumDifficulty.HARD) duration = 15; if (duration > 0) { ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.POISON, duration * 20, 0)); ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.NAUSEA, duration * 20, 0)); } } } return true; } else return false; }
@Override public boolean attackEntityAsMob(Entity entity) { if (canEntityBeSeen(entity)) { if (super.attackEntityAsMob(entity)) { if (entity instanceof EntityLivingBase) { byte duration = 0; if (getEntityWorld().getDifficulty().ordinal() > EnumDifficulty.EASY.ordinal()) if (getEntityWorld().getDifficulty() == EnumDifficulty.NORMAL) duration = 8; else if (getEntityWorld().getDifficulty() == EnumDifficulty.HARD) duration = 15; if (duration > 0) ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.HUNGER, duration * 20, 0)); } } return true; } else return false; }
@Override public boolean attackEntityAsMob(Entity entity) { if (canEntityBeSeen(entity)) { if (super.attackEntityAsMob(entity)) { if (entity instanceof EntityLivingBase) { byte duration = 0; if (getEntityWorld().getDifficulty().ordinal() > EnumDifficulty.EASY.ordinal()) if (getEntityWorld().getDifficulty() == EnumDifficulty.NORMAL) duration = 8; else if (getEntityWorld().getDifficulty() == EnumDifficulty.HARD) duration = 15; if (duration > 0) ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.WEAKNESS, duration * 20, 0)); } } return true; } else return false; }
@Override public boolean attackEntityAsMob(Entity entity) { if (canEntityBeSeen(entity)) { if (super.attackEntityAsMob(entity)) { if (entity instanceof EntityLivingBase) { byte duration = 0; if (getEntityWorld().getDifficulty().ordinal() > EnumDifficulty.EASY.ordinal()) if (getEntityWorld().getDifficulty() == EnumDifficulty.NORMAL) duration = 5; else if (getEntityWorld().getDifficulty() == EnumDifficulty.HARD) duration = 10; if (duration > 0) ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.POISON, duration * 20, 0)); } } return true; } else return false; }
@Override public boolean attackEntityAsMob(Entity entity) { if (canEntityBeSeen(entity)) { if (super.attackEntityAsMob(entity)) { if (entity instanceof EntityLivingBase) { byte duration = 0; if (getEntityWorld().getDifficulty().ordinal() > EnumDifficulty.EASY.ordinal()) if (getEntityWorld().getDifficulty() == EnumDifficulty.NORMAL) duration = 8; else if (getEntityWorld().getDifficulty() == EnumDifficulty.HARD) duration = 15; if (duration > 0) ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.WEAKNESS, duration * 20, 0)); } } return true; } else return false; } }
@Override public boolean attackEntityAsMob(Entity entity) { if (canEntityBeSeen(entity)) { if (super.attackEntityAsMob(entity)) { if (entity instanceof EntityLivingBase) { byte duration = 0; if (getEntityWorld().getDifficulty().ordinal() > EnumDifficulty.EASY.ordinal()) if (getEntityWorld().getDifficulty() == EnumDifficulty.NORMAL) duration = 5; else if (getEntityWorld().getDifficulty() == EnumDifficulty.HARD) duration = 10; if (duration > 0) ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.getPotionById(POTION_IDS[getPotionEffect()]), duration * 20, 0)); } } return true; } else return false; }