mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-22 04:37:42 +01:00
Fixed ray traces drawing
This commit is contained in:
parent
b93f90f205
commit
afc50db7b0
@ -63,7 +63,7 @@ public class Musket extends UntargetedWeapon {
|
||||
attackMeta.applyEffectsAndDamage(getNBTItem(), trace.getHit());
|
||||
}
|
||||
|
||||
trace.draw(2, Color.BLACK);
|
||||
trace.draw(.5, Color.BLACK);
|
||||
getPlayer().getWorld().playSound(getPlayer().getLocation(), Sound.ENTITY_ZOMBIE_ATTACK_IRON_DOOR, 2, 2);
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ public class Staff extends UntargetedWeapon {
|
||||
RayTrace trace = new RayTrace(stats.getPlayer(), slot, range, entity -> MMOUtils.canTarget(stats.getPlayer(), entity, InteractionType.OFFENSE_ACTION));
|
||||
if (trace.hasHit())
|
||||
attackMeta.applyEffectsAndDamage(getNBTItem(), trace.getHit());
|
||||
trace.draw(2, tick -> tick.getWorld().spawnParticle(Particle.EXPLOSION_NORMAL, tick, 0, .1, .1, .1, 0));
|
||||
trace.draw(.5, 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);
|
||||
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public class Whip extends UntargetedWeapon {
|
||||
RayTrace trace = new RayTrace(getPlayer(), slot, range, entity -> MMOUtils.canTarget(stats.getPlayer(), entity, InteractionType.OFFENSE_ACTION));
|
||||
if (trace.hasHit())
|
||||
new ItemAttackMetadata(new DamageMetadata(attackDamage, DamageType.WEAPON, DamageType.PROJECTILE, DamageType.PHYSICAL), stats).applyEffectsAndDamage(getNBTItem(), trace.getHit());
|
||||
trace.draw(2, tick -> tick.getWorld().spawnParticle(Particle.CRIT, tick, 0, .1, .1, .1, 0));
|
||||
trace.draw(.5, tick -> tick.getWorld().spawnParticle(Particle.CRIT, tick, 0, .1, .1, .1, 0));
|
||||
getPlayer().getWorld().playSound(getPlayer().getLocation(), VersionSound.ENTITY_FIREWORK_ROCKET_BLAST.toSound(), 1, 2);
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,6 @@ public class LightningSpirit implements StaffAttackHandler {
|
||||
|
||||
if (trace.hasHit())
|
||||
attackMeta.applyEffectsAndDamage(nbt, trace.getHit());
|
||||
trace.draw(2, loc1 -> loc1.getWorld().spawnParticle(Particle.FIREWORKS_SPARK, loc1, 0));
|
||||
trace.draw(.5, loc1 -> loc1.getWorld().spawnParticle(Particle.FIREWORKS_SPARK, loc1, 0));
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ public class XRaySpirit implements StaffAttackHandler {
|
||||
RayTrace trace = new RayTrace(attackMeta.getPlayer(), slot, range, entity -> MMOUtils.canTarget(attackMeta.getPlayer(), entity, InteractionType.OFFENSE_ACTION));
|
||||
if (trace.hasHit())
|
||||
attackMeta.applyEffectsAndDamage(nbt, trace.getHit());
|
||||
trace.draw(2, Color.BLACK);
|
||||
trace.draw(.5, Color.BLACK);
|
||||
attackMeta.getPlayer().getWorld().playSound(attackMeta.getPlayer().getLocation(), Sound.ENTITY_ZOMBIE_ATTACK_IRON_DOOR, 0.40f, 2);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user