mirror of
https://github.com/Auxilor/EcoMobs.git
synced 2025-12-20 23:49:22 +00:00
Changed movement speed to multiplier
This commit is contained in:
@@ -98,10 +98,10 @@ public class EcoBoss extends PluginDependent {
|
||||
private final int attackDamage;
|
||||
|
||||
/**
|
||||
* The movement speed.
|
||||
* The movement speed multiplier.
|
||||
*/
|
||||
@Getter
|
||||
private final int movementSpeed;
|
||||
private final double movementSpeedMultiplier;
|
||||
|
||||
/**
|
||||
* The immunity options.
|
||||
@@ -257,7 +257,7 @@ public class EcoBoss extends PluginDependent {
|
||||
// Attributes
|
||||
this.attackDamage = this.getConfig().getInt("attack-damage");
|
||||
this.maxHealth = this.getConfig().getInt("max-health");
|
||||
this.movementSpeed = this.getConfig().getInt("movement-speed");
|
||||
this.movementSpeedMultiplier = this.getConfig().getInt("movement-speed");
|
||||
|
||||
// Spawn Totem
|
||||
this.spawnTotemEnabled = this.getConfig().getBool("spawn-totem.enabled");
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.bukkit.attribute.AttributeInstance;
|
||||
import org.bukkit.attribute.AttributeModifier;
|
||||
import org.bukkit.boss.BarFlag;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
@@ -102,7 +103,7 @@ public class LivingEcoBoss extends PluginDependent {
|
||||
|
||||
AttributeInstance movementSpeed = entity.getAttribute(Attribute.GENERIC_MOVEMENT_SPEED);
|
||||
assert movementSpeed != null;
|
||||
movementSpeed.setBaseValue(boss.getMovementSpeed());
|
||||
movementSpeed.addModifier(new AttributeModifier(entity.getUniqueId(), "ecobosses-movement-multiplier", boss.getMovementSpeedMultiplier() - 1, AttributeModifier.Operation.MULTIPLY_SCALAR_1));
|
||||
|
||||
AttributeInstance maxHealth = entity.getAttribute(Attribute.GENERIC_MAX_HEALTH);
|
||||
assert maxHealth != null;
|
||||
|
||||
@@ -10,7 +10,7 @@ bossbar:
|
||||
|
||||
max-health: 900
|
||||
attack-damage: 60
|
||||
movement-speed: 1.1
|
||||
movement-speed: 2
|
||||
|
||||
spawn-totem:
|
||||
enabled: true
|
||||
|
||||
@@ -10,7 +10,7 @@ bossbar:
|
||||
|
||||
max-health: 600
|
||||
attack-damage: 50
|
||||
movement-speed: 0.6
|
||||
movement-speed: 1.2
|
||||
|
||||
spawn-totem:
|
||||
enabled: true
|
||||
|
||||
@@ -10,7 +10,7 @@ bossbar:
|
||||
|
||||
max-health: 2400
|
||||
attack-damage: 120
|
||||
movement-speed: 0.2
|
||||
movement-speed: 1.5
|
||||
|
||||
spawn-totem:
|
||||
enabled: true
|
||||
|
||||
@@ -10,7 +10,7 @@ bossbar:
|
||||
|
||||
max-health: 1200
|
||||
attack-damage: 80
|
||||
movement-speed: 0.9
|
||||
movement-speed: 1.3
|
||||
|
||||
spawn-totem:
|
||||
enabled: true
|
||||
|
||||
Reference in New Issue
Block a user