diff --git a/src/main/java/net/Indyuce/mmoitems/ability/Item_Bomb.java b/src/main/java/net/Indyuce/mmoitems/ability/Item_Bomb.java index 857c90e0..b569efaf 100644 --- a/src/main/java/net/Indyuce/mmoitems/ability/Item_Bomb.java +++ b/src/main/java/net/Indyuce/mmoitems/ability/Item_Bomb.java @@ -58,7 +58,7 @@ public class Item_Bomb extends Ability implements Listener { for (Entity entity : item.getEntity().getNearbyEntities(radius, radius, radius)) if (MMOUtils.canDamage(stats.getPlayer(), entity)) { - new AttackResult(damage, DamageType.SKILL, DamageType.PHYSICAL, DamageType.PROJECTILE).applyEffectsAndDamage(stats, null, (LivingEntity) entity); + new AttackResult(damage, DamageType.SKILL, DamageType.PHYSICAL).applyEffectsAndDamage(stats, null, (LivingEntity) entity); ((LivingEntity) entity).removePotionEffect(PotionEffectType.SLOW); ((LivingEntity) entity).addPotionEffect(new PotionEffect(PotionEffectType.SLOW, (int) (slowDuration * 20), (int) slowAmplifier)); } diff --git a/src/main/java/net/Indyuce/mmoitems/ability/Throw_Up.java b/src/main/java/net/Indyuce/mmoitems/ability/Throw_Up.java index 7989ec15..f5033148 100644 --- a/src/main/java/net/Indyuce/mmoitems/ability/Throw_Up.java +++ b/src/main/java/net/Indyuce/mmoitems/ability/Throw_Up.java @@ -52,7 +52,7 @@ public class Throw_Up extends Ability implements Listener { if (j % 5 == 0) for (Entity entity : MMOUtils.getNearbyChunkEntities(loc)) if (entity.getLocation().distanceSquared(loc) < 40 && stats.getPlayer().getEyeLocation().getDirection().angle(entity.getLocation().toVector().subtract(stats.getPlayer().getLocation().toVector())) < Math.PI / 6 && MMOUtils.canDamage(stats.getPlayer(), entity)) - new AttackResult(dps, DamageType.SKILL, DamageType.MAGICAL, DamageType.PROJECTILE).applyEffectsAndDamage(stats, null, (LivingEntity) entity); + new AttackResult(dps, DamageType.SKILL, DamageType.PHYSICAL, DamageType.PROJECTILE).applyEffectsAndDamage(stats, null, (LivingEntity) entity); loc.getWorld().playSound(loc, Sound.ENTITY_ZOMBIE_HURT, 1, 1); diff --git a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/Lute.java b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/Lute.java index 65057fa1..f90bac36 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/Lute.java +++ b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/Lute.java @@ -69,7 +69,7 @@ public class Lute extends UntargetedWeapon { for (Entity target : entities) if (MMOUtils.canDamage(getPlayer(), loc, target)) { - new AttackResult(attackDamage, DamageType.WEAPON, DamageType.PROJECTILE, DamageType.PHYSICAL).applyEffectsAndDamage(stats, getNBTItem(), (LivingEntity) target); + new AttackResult(attackDamage, DamageType.WEAPON, DamageType.PROJECTILE, DamageType.MAGICAL).applyEffectsAndDamage(stats, getNBTItem(), (LivingEntity) target); cancel(); return; } diff --git a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/Staff.java b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/Staff.java index 8a07f463..b10cd60b 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/Staff.java +++ b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/Staff.java @@ -46,7 +46,7 @@ public class Staff extends UntargetedWeapon { MMORayTraceResult trace = MMOItems.plugin.getVersion().getVersionWrapper().rayTrace(stats.getPlayer(), range); if (trace.hasHit()) - new AttackResult(attackDamage, DamageType.WEAPON, DamageType.PROJECTILE, DamageType.PHYSICAL).applyEffectsAndDamage(stats, getNBTItem(), trace.getHit()); + new AttackResult(attackDamage, DamageType.WEAPON, DamageType.PROJECTILE, DamageType.MAGICAL).applyEffectsAndDamage(stats, getNBTItem(), trace.getHit()); trace.draw(loc, getPlayer().getEyeLocation().getDirection(), 2, (tick) -> tick.getWorld().spawnParticle(Particle.EXPLOSION_NORMAL, tick, 0, .1, .1, .1, 0)); getPlayer().getWorld().playSound(getPlayer().getLocation(), VersionSound.ENTITY_FIREWORK_ROCKET_TWINKLE.toSound(), 2, 2); } diff --git a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/LightningSpirit.java b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/LightningSpirit.java index 4b493131..5c0a52db 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/LightningSpirit.java +++ b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/LightningSpirit.java @@ -28,7 +28,7 @@ public class LightningSpirit implements StaffAttackHandler { loc.getWorld().spawnParticle(Particle.FIREWORKS_SPARK, loc, 0); for (Entity target : MMOUtils.getNearbyChunkEntities(loc)) if (MMOUtils.canDamage(stats.getPlayer(), loc, target)) { - new AttackResult(attackDamage, DamageType.WEAPON, DamageType.PROJECTILE, DamageType.PHYSICAL).applyEffectsAndDamage(stats, nbt, (LivingEntity) target); + new AttackResult(attackDamage, DamageType.WEAPON, DamageType.PROJECTILE, DamageType.MAGICAL).applyEffectsAndDamage(stats, nbt, (LivingEntity) target); loc.getWorld().spawnParticle(Particle.EXPLOSION_NORMAL, loc, 16, 0, 0, 0, .1); return; } diff --git a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/ManaSpirit.java b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/ManaSpirit.java index 592b2119..1618e3c0 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/ManaSpirit.java +++ b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/ManaSpirit.java @@ -50,7 +50,7 @@ public class ManaSpirit implements StaffAttackHandler { } for (Entity target : targets) if (MMOUtils.canDamage(stats.getPlayer(), loc, target)) { - new AttackResult(attackDamage, DamageType.WEAPON, DamageType.PROJECTILE, DamageType.PHYSICAL).applyEffectsAndDamage(stats, nbt, (LivingEntity) target); + new AttackResult(attackDamage, DamageType.WEAPON, DamageType.PROJECTILE, DamageType.MAGICAL).applyEffectsAndDamage(stats, nbt, (LivingEntity) target); loc.getWorld().spawnParticle(Particle.EXPLOSION_LARGE, loc, 0); cancel(); return; diff --git a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/NetherSpirit.java b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/NetherSpirit.java index d58936d9..7d83aa33 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/NetherSpirit.java +++ b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/NetherSpirit.java @@ -42,7 +42,7 @@ public class NetherSpirit implements StaffAttackHandler { loc.getWorld().spawnParticle(Particle.SMOKE_NORMAL, loc, 0); for (Entity target : targets) if (MMOUtils.canDamage(stats.getPlayer(), loc, target)) { - new AttackResult(attackDamage, DamageType.WEAPON, DamageType.PROJECTILE, DamageType.PHYSICAL).applyEffectsAndDamage(stats, nbt, (LivingEntity) target); + new AttackResult(attackDamage, DamageType.WEAPON, DamageType.PROJECTILE, DamageType.MAGICAL).applyEffectsAndDamage(stats, nbt, (LivingEntity) target); loc.getWorld().spawnParticle(Particle.EXPLOSION_LARGE, loc, 0); cancel(); return; diff --git a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/SunfireSpirit.java b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/SunfireSpirit.java index 7ad47f8c..86fc98c6 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/SunfireSpirit.java +++ b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/SunfireSpirit.java @@ -44,7 +44,7 @@ public class SunfireSpirit implements StaffAttackHandler { loc.getWorld().playSound(loc, VersionSound.ENTITY_FIREWORK_ROCKET_BLAST.toSound(), 2, 2); for (Entity target : MMOUtils.getNearbyChunkEntities(loc)) if (MMOUtils.canDamage(stats.getPlayer(), target) && target.getLocation().distanceSquared(loc) <= 9) - new AttackResult(attackDamage, DamageType.WEAPON, DamageType.PROJECTILE, DamageType.PHYSICAL).applyEffectsAndDamage(stats, nbt, (LivingEntity) target); + new AttackResult(attackDamage, DamageType.WEAPON, DamageType.PROJECTILE, DamageType.MAGICAL).applyEffectsAndDamage(stats, nbt, (LivingEntity) target); cancel(); break; } diff --git a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/ThunderSpirit.java b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/ThunderSpirit.java index 02ae6134..a4fb7667 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/ThunderSpirit.java +++ b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/ThunderSpirit.java @@ -42,7 +42,7 @@ public class ThunderSpirit implements StaffAttackHandler { loc.getWorld().playSound(loc, VersionSound.ENTITY_FIREWORK_ROCKET_BLAST.toSound(), 2, 2); for (Entity target : MMOUtils.getNearbyChunkEntities(loc)) if (MMOUtils.canDamage(stats.getPlayer(), target) && target.getLocation().distanceSquared(loc) <= 9) - new AttackResult(attackDamage, DamageType.WEAPON, DamageType.PROJECTILE, DamageType.PHYSICAL).applyEffectsAndDamage(stats, nbt, (LivingEntity) target); + new AttackResult(attackDamage, DamageType.WEAPON, DamageType.PROJECTILE, DamageType.MAGICAL).applyEffectsAndDamage(stats, nbt, (LivingEntity) target); cancel(); } } diff --git a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/VoidSpirit.java b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/VoidSpirit.java index 9befda44..e5269d29 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/VoidSpirit.java +++ b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/VoidSpirit.java @@ -32,6 +32,6 @@ public class VoidSpirit implements StaffAttackHandler { shulkerBullet.setVelocity(vec); } }.runTaskTimer(MMOItems.plugin, 0, 1); - MMOItems.plugin.getEntities().registerCustomEntity(shulkerBullet, new AttackResult(attackDamage, DamageType.WEAPON, DamageType.PHYSICAL, DamageType.PROJECTILE), 0., stats, nbt); + MMOItems.plugin.getEntities().registerCustomEntity(shulkerBullet, new AttackResult(attackDamage, DamageType.WEAPON, DamageType.MAGICAL, DamageType.PROJECTILE), 0., stats, nbt); } } diff --git a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/XRaySpirit.java b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/XRaySpirit.java index 801dc03c..6fd00c60 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/XRaySpirit.java +++ b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/staff/XRaySpirit.java @@ -23,7 +23,7 @@ public class XRaySpirit implements StaffAttackHandler { MMORayTraceResult trace = MMOItems.plugin.getVersion().getVersionWrapper().rayTrace(stats.getPlayer(), range); if (trace.hasHit()) - new AttackResult(attackDamage, DamageType.WEAPON, DamageType.PROJECTILE, DamageType.PHYSICAL).applyEffectsAndDamage(stats, nbt, trace.getHit()); + new AttackResult(attackDamage, DamageType.WEAPON, DamageType.PROJECTILE, DamageType.MAGICAL).applyEffectsAndDamage(stats, nbt, trace.getHit()); trace.draw(loc, stats.getPlayer().getEyeLocation().getDirection(), 2, Color.BLACK); stats.getPlayer().getWorld().playSound(stats.getPlayer().getLocation(), Sound.ENTITY_ZOMBIE_ATTACK_IRON_DOOR, 0.40f, 2); }