feat: disable invuln for plugin damage + DamageUtil + DiamondTri/Barrage/Overhead nerf

This commit is contained in:
SashegDev
2026-08-28 14:17:21 +03:00
parent a8ce2375c0
commit e227ad63bd
8 changed files with 244 additions and 21 deletions
@@ -67,8 +67,7 @@ public class DiamondAttack {
n2.getWorld().spawnParticle(Particle.CRIT, n2, 1, 0.05, 0.05, 0.05, 0);
for (var ent : n2.getWorld().getNearbyEntities(n2, 0.7, 0.7, 0.7, e -> e instanceof LivingEntity && e != p)) {
LivingEntity le = (LivingEntity) ent;
le.getPersistentDataContainer().set(SwoonHandler.MAGIC_DAMAGE, PersistentDataType.BYTE, (byte) 1);
le.damage(2.0, p);
DamageUtil.apply(p, le, 2.0);
shard.remove();
cancel();
break;
@@ -93,8 +92,7 @@ public class DiamondAttack {
boolean hit = false;
for (var ent : nl.getWorld().getNearbyEntities(nl, 0.7, 0.7, 0.7, e -> e instanceof LivingEntity && e != p)) {
LivingEntity le = (LivingEntity) ent;
le.getPersistentDataContainer().set(SwoonHandler.MAGIC_DAMAGE, PersistentDataType.BYTE, (byte) 1);
le.damage(5.0, p);
DamageUtil.apply(p, le, 5.0);
hit = true;
break;
}
@@ -136,8 +134,7 @@ public class DiamondAttack {
shard.getWorld().spawnParticle(Particle.CRIT, n2, 1, 0.05, 0.05, 0.05, 0);
for (var ent : n2.getWorld().getNearbyEntities(n2, 0.7, 0.7, 0.7, e -> e instanceof LivingEntity && e != p)) {
LivingEntity le = (LivingEntity) ent;
le.getPersistentDataContainer().set(SwoonHandler.MAGIC_DAMAGE, PersistentDataType.BYTE, (byte) 1);
le.damage(2.0, p); shard.remove(); cancel(); break;
DamageUtil.apply(p, le, 2.0); shard.remove(); cancel(); break;
}
for (Player pl : n2.getWorld().getNearbyPlayers(n2, 0.9)) {
if (pl == p) continue;