Fixed ray traces drawing

This commit is contained in:
Indyuce 2022-02-26 13:42:37 +01:00
parent b93f90f205
commit afc50db7b0
5 changed files with 5 additions and 5 deletions

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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));
}
}

View File

@ -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);
}
}