9
0
mirror of https://github.com/Auxilor/EcoMobs.git synced 2025-12-21 07:59:28 +00:00

Added follow range

This commit is contained in:
Auxilor
2021-04-02 11:12:54 +01:00
parent afdcc10cff
commit cfc0fd075d
6 changed files with 16 additions and 0 deletions

View File

@@ -97,6 +97,13 @@ public class EcoBoss extends PluginDependent {
@Getter @Getter
private final int attackDamage; private final int attackDamage;
/**
* The follow range.
*/
@Getter
private final double followRange;
/** /**
* The movement speed multiplier. * The movement speed multiplier.
*/ */
@@ -269,6 +276,7 @@ public class EcoBoss extends PluginDependent {
// Attributes // Attributes
this.attackDamage = this.getConfig().getInt("attack-damage"); this.attackDamage = this.getConfig().getInt("attack-damage");
this.maxHealth = this.getConfig().getInt("max-health"); this.maxHealth = this.getConfig().getInt("max-health");
this.followRange = this.getConfig().getInt("follow-range");
this.movementSpeedMultiplier = this.getConfig().getInt("movement-speed"); this.movementSpeedMultiplier = this.getConfig().getInt("movement-speed");
// Spawn Totem // Spawn Totem

View File

@@ -111,6 +111,10 @@ public class LivingEcoBoss extends PluginDependent {
entity.setHealth(maxHealth.getValue()); entity.setHealth(maxHealth.getValue());
AttributeInstance followRange = entity.getAttribute(Attribute.GENERIC_FOLLOW_RANGE);
assert followRange != null;
followRange.setBaseValue(boss.getFollowRange());
AttributeInstance attackDamage = entity.getAttribute(Attribute.GENERIC_ATTACK_DAMAGE); AttributeInstance attackDamage = entity.getAttribute(Attribute.GENERIC_ATTACK_DAMAGE);
assert attackDamage != null; assert attackDamage != null;
attackDamage.setBaseValue(boss.getAttackDamage()); attackDamage.setBaseValue(boss.getAttackDamage());

View File

@@ -11,6 +11,7 @@ bossbar:
max-health: 900 max-health: 900
attack-damage: 60 attack-damage: 60
movement-speed: 2 movement-speed: 2
follow-range: 15
spawn-totem: spawn-totem:
enabled: true enabled: true

View File

@@ -11,6 +11,7 @@ bossbar:
max-health: 600 max-health: 600
attack-damage: 50 attack-damage: 50
movement-speed: 1.2 movement-speed: 1.2
follow-range: 20
spawn-totem: spawn-totem:
enabled: true enabled: true

View File

@@ -11,6 +11,7 @@ bossbar:
max-health: 2400 max-health: 2400
attack-damage: 120 attack-damage: 120
movement-speed: 1.5 movement-speed: 1.5
follow-range: 16
spawn-totem: spawn-totem:
enabled: true enabled: true

View File

@@ -11,6 +11,7 @@ bossbar:
max-health: 1200 max-health: 1200
attack-damage: 80 attack-damage: 80
movement-speed: 1.3 movement-speed: 1.3
follow-range: 15
spawn-totem: spawn-totem:
enabled: true enabled: true