diff --git a/src/main/java/com/gmail/nossr50/util/skills/ParticleEffectUtils.java b/src/main/java/com/gmail/nossr50/util/skills/ParticleEffectUtils.java index b07d03880..d51c6493d 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/ParticleEffectUtils.java +++ b/src/main/java/com/gmail/nossr50/util/skills/ParticleEffectUtils.java @@ -38,15 +38,9 @@ public final class ParticleEffectUtils { Location location = player.getEyeLocation(); World world = player.getWorld(); - world.playEffect(location, Effect.SMOKE, BlockFace.SOUTH_EAST); - world.playEffect(location, Effect.SMOKE, BlockFace.SOUTH); - world.playEffect(location, Effect.SMOKE, BlockFace.SOUTH_WEST); - world.playEffect(location, Effect.SMOKE, BlockFace.EAST); - world.playEffect(location, Effect.SMOKE, BlockFace.SELF); - world.playEffect(location, Effect.SMOKE, BlockFace.WEST); - world.playEffect(location, Effect.SMOKE, BlockFace.NORTH_EAST); - world.playEffect(location, Effect.SMOKE, BlockFace.NORTH); - world.playEffect(location, Effect.SMOKE, BlockFace.NORTH_WEST); + for (BlockFace face : BlockFace.values()) { + world.playEffect(location, Effect.SMOKE, face); + } } public static void playGreaterImpactEffect(LivingEntity livingEntity) { @@ -85,14 +79,7 @@ public final class ParticleEffectUtils { private static void fireworkParticleShower(Player player, Color color) { Location location = player.getLocation(); - - if (player.isInsideVehicle()) { - location.setY(location.getY() + 1.0); - } - else { - location.setY(location.getY() - 1.0); - } - + location.setX(location.getY() + (player.isInsideVehicle() ? 1.0 : -1.0)); location.setPitch(-90); Firework firework = (Firework) player.getWorld().spawnEntity(location, EntityType.FIREWORK);