@Override protected void applyEntityAttributes() { super.applyEntityAttributes(); getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.4); getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(MAX_HP); getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).setBaseValue(1.0); }
@Override protected void applyEntityAttributes() { super.applyEntityAttributes(); getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(2.0); }
@Override protected void applyEntityAttributes() { super.applyEntityAttributes(); getEntityAttribute(SPAWN_REINFORCEMENTS_CHANCE).setBaseValue(0); getEntityAttribute(SharedMonsterAttributes.ARMOR).setBaseValue(0); getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.28); getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).setBaseValue(1); getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(40); }
movementSpeed.setBaseValue(oldAttributes.getAttributeInstance(SharedMonsterAttributes.MOVEMENT_SPEED).getBaseValue()); movementSpeed.applyModifier(new AttributeModifier("Ermergerd Virus D:", movementSpeed.getBaseValue(), 0)); health.setBaseValue(oldAttributes.getAttributeInstance(SharedMonsterAttributes.MAX_HEALTH).getBaseValue()); health.applyModifier(new AttributeModifier("Ermergerd Virus D:", health.getBaseValue(), 0)); jumpHeight.setBaseValue(oldAttributes.getAttributeInstance(AbstractHorse.JUMP_STRENGTH).getBaseValue()); jumpHeight.applyModifier(new AttributeModifier("Ermergerd Virus D:", jumpHeight.getBaseValue() * 0.5, 0));
@Override protected void applyEntityAttributes() { super.applyEntityAttributes(); getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(40.0D); getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(6.0D); getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.27D); }
/** * Applies attributes like health, charisma etc to the citizens. */ @Override protected void applyEntityAttributes() { super.applyEntityAttributes(); getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(BASE_MAX_HEALTH); getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(BASE_MOVEMENT_SPEED); //path finding search range getEntityAttribute(SharedMonsterAttributes.FOLLOW_RANGE).setBaseValue(BASE_PATHFINDING_RANGE); }
e.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(MAX_HP * playerCount); if (hard) e.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.ARMOR).setBaseValue(15);
@Override protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(16.0D); this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.3D); }
@Override protected void applyEntityAttributes() { super.applyEntityAttributes(); getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(4.0D); getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.25D); applyAttributes(this, ZooConfig.owlHealth, ZooConfig.OwlDamage); }
@Override protected void applyEntityAttributes() { super.applyEntityAttributes(); getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.5D); getEntityAttribute(SharedMonsterAttributes.FOLLOW_RANGE).setBaseValue(40.0D); applyAttributes(this, ZooConfig.wolfHealth, ZooConfig.wolfAttackDamage); }
@Override protected void applyEntityAttributes() { super.applyEntityAttributes(); if(captain) getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(60); }
@Override protected void applyEntityAttributes() { super.applyEntityAttributes(); getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(ZooConfig.loveChildSpeed.get()); getEntityAttribute(SharedMonsterAttributes.ARMOR).setBaseValue(ZooConfig.loveChildArmor.get()); getEntityAttribute(SPAWN_REINFORCEMENTS_CHANCE).setBaseValue(0); applyAttributes(this, ZooConfig.loveChildHealth, ZooConfig.loveChildAttackDamage); }
private static void handleAttributes(@Nonnull EntityEvent event) { if (event.getEntity() instanceof EntityPlayer) { final AbstractAttributeMap map = ((EntityLivingBase) event.getEntity()).getAttributeMap(); if (NullHelper.untrust(map.getAttributeInstance(AOE_XZ)) == null) { map.registerAttribute(AOE_XZ).setBaseValue(0); map.registerAttribute(AOE_Y).setBaseValue(0); map.registerAttribute(AOE_XYZ).setBaseValue(0); } } }
@Override protected void applyEntityAttributes() { super.applyEntityAttributes(); getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.25D); applyAttributes(this, ZooConfig.witherCatHealth, ZooConfig.witherCatAttackDamage); }
@Override protected void applyEntityAttributes() { super.applyEntityAttributes(); getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.3); applyAttributes(this, ZooConfig.miniHealth, ZooConfig.miniAttackDamage); }
@Override protected void applyEntityAttributes() { super.applyEntityAttributes(); getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.25D); applyAttributes(this, ZooConfig.witherWitchHealth, NO_ATTACK); }
default void applyAttributes(@Nonnull EntityLivingBase entity, @Nonnull IValue<Double> baseHealth, @Nonnull IValue<Double> baseAttack) { entity.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(baseHealth.get()); IAttributeInstance ai = entity.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.ATTACK_DAMAGE); if (NullHelper.untrust(ai) == null) { entity.getAttributeMap().registerAttribute(SharedMonsterAttributes.ATTACK_DAMAGE); ai = entity.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.ATTACK_DAMAGE); } ai.setBaseValue(baseAttack.get()); }
@Override protected void applyEntityAttributes() { super.applyEntityAttributes(); getEntityAttribute(SharedMonsterAttributes.FOLLOW_RANGE).setBaseValue(ZooConfig.fallenKnightFollowRange.get()); applyAttributes(this, ZooConfig.fallenKnightHealth, ZooConfig.fallenKnightAttackDamage); }
@Override public void setSlimeSize(int size, boolean doFullHeal) { super.setSlimeSize(size, doFullHeal); SlimeConf conf = SlimeConf.getConfForSize(size); getAttributeMap().getAttributeInstance(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(conf.getAttackDamage()); getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(conf.getHealth()); setHealth(getMaxHealth()); }
@Override public void setRevengeTarget(@Nullable EntityLivingBase target) { EntityLivingBase curTarget = getRevengeTarget(); super.setRevengeTarget(target); if (curTarget == target || world.isRemote || target == null) { return; } float distToSrc = getDistance(target); if (distToSrc > getNavigator().getPathSearchRange() && distToSrc < 50) { getAttributeMap().getAttributeInstance(SharedMonsterAttributes.FOLLOW_RANGE).setBaseValue(distToSrc + 2); } }