mirror of
https://github.com/Auxilor/EcoMobs.git
synced 2025-12-21 16:09:24 +00:00
Added follow range
This commit is contained in:
@@ -97,6 +97,13 @@ public class EcoBoss extends PluginDependent {
|
||||
@Getter
|
||||
private final int attackDamage;
|
||||
|
||||
|
||||
/**
|
||||
* The follow range.
|
||||
*/
|
||||
@Getter
|
||||
private final double followRange;
|
||||
|
||||
/**
|
||||
* The movement speed multiplier.
|
||||
*/
|
||||
@@ -269,6 +276,7 @@ public class EcoBoss extends PluginDependent {
|
||||
// Attributes
|
||||
this.attackDamage = this.getConfig().getInt("attack-damage");
|
||||
this.maxHealth = this.getConfig().getInt("max-health");
|
||||
this.followRange = this.getConfig().getInt("follow-range");
|
||||
this.movementSpeedMultiplier = this.getConfig().getInt("movement-speed");
|
||||
|
||||
// Spawn Totem
|
||||
|
||||
@@ -111,6 +111,10 @@ public class LivingEcoBoss extends PluginDependent {
|
||||
|
||||
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);
|
||||
assert attackDamage != null;
|
||||
attackDamage.setBaseValue(boss.getAttackDamage());
|
||||
|
||||
@@ -11,6 +11,7 @@ bossbar:
|
||||
max-health: 900
|
||||
attack-damage: 60
|
||||
movement-speed: 2
|
||||
follow-range: 15
|
||||
|
||||
spawn-totem:
|
||||
enabled: true
|
||||
|
||||
@@ -11,6 +11,7 @@ bossbar:
|
||||
max-health: 600
|
||||
attack-damage: 50
|
||||
movement-speed: 1.2
|
||||
follow-range: 20
|
||||
|
||||
spawn-totem:
|
||||
enabled: true
|
||||
|
||||
@@ -11,6 +11,7 @@ bossbar:
|
||||
max-health: 2400
|
||||
attack-damage: 120
|
||||
movement-speed: 1.5
|
||||
follow-range: 16
|
||||
|
||||
spawn-totem:
|
||||
enabled: true
|
||||
|
||||
@@ -11,6 +11,7 @@ bossbar:
|
||||
max-health: 1200
|
||||
attack-damage: 80
|
||||
movement-speed: 1.3
|
||||
follow-range: 15
|
||||
|
||||
spawn-totem:
|
||||
enabled: true
|
||||
|
||||
Reference in New Issue
Block a user