forked from Upstream/mmocore
Fixed Deep Wound
This commit is contained in:
parent
47efe9e1d5
commit
b19ee4dc2f
@ -5,7 +5,6 @@ import org.bukkit.Particle;
|
|||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.attribute.Attribute;
|
import org.bukkit.attribute.Attribute;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.inventory.ItemStack;
|
|
||||||
|
|
||||||
import net.Indyuce.mmocore.api.math.formula.LinearValue;
|
import net.Indyuce.mmocore.api.math.formula.LinearValue;
|
||||||
import net.Indyuce.mmocore.api.player.PlayerData;
|
import net.Indyuce.mmocore.api.player.PlayerData;
|
||||||
@ -37,7 +36,7 @@ public class Deep_Wound extends Skill {
|
|||||||
LivingEntity target = cast.getTarget();
|
LivingEntity target = cast.getTarget();
|
||||||
target.getWorld().playSound(target.getLocation(), Sound.ENTITY_ZOMBIE_ATTACK_IRON_DOOR, 2, 2);
|
target.getWorld().playSound(target.getLocation(), Sound.ENTITY_ZOMBIE_ATTACK_IRON_DOOR, 2, 2);
|
||||||
target.getWorld().spawnParticle(Particle.CRIT, target.getLocation().add(0, target.getHeight() / 2, 0), 32, 0, 0, 0, .7);
|
target.getWorld().spawnParticle(Particle.CRIT, target.getLocation().add(0, target.getHeight() / 2, 0), 32, 0, 0, 0, .7);
|
||||||
target.getWorld().spawnParticle(Particle.BLOCK_CRACK, target.getLocation().add(0, target.getHeight() / 2, 0), 32, 0, 0, 0, 2, new ItemStack(Material.REDSTONE_BLOCK));
|
target.getWorld().spawnParticle(Particle.BLOCK_CRACK, target.getLocation().add(0, target.getHeight() / 2, 0), 32, 0, 0, 0, 2, Material.REDSTONE_BLOCK.createBlockData());
|
||||||
|
|
||||||
double max = target.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue();
|
double max = target.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue();
|
||||||
double ratio = (max - target.getHealth()) / max;
|
double ratio = (max - target.getHealth()) / max;
|
||||||
|
Loading…
Reference in New Issue
Block a user