mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Nicer handling of some particle effect code.
This commit is contained in:
parent
741f629ab8
commit
056f7cc93b
@ -38,15 +38,9 @@ public final class ParticleEffectUtils {
|
|||||||
Location location = player.getEyeLocation();
|
Location location = player.getEyeLocation();
|
||||||
World world = player.getWorld();
|
World world = player.getWorld();
|
||||||
|
|
||||||
world.playEffect(location, Effect.SMOKE, BlockFace.SOUTH_EAST);
|
for (BlockFace face : BlockFace.values()) {
|
||||||
world.playEffect(location, Effect.SMOKE, BlockFace.SOUTH);
|
world.playEffect(location, Effect.SMOKE, face);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void playGreaterImpactEffect(LivingEntity livingEntity) {
|
public static void playGreaterImpactEffect(LivingEntity livingEntity) {
|
||||||
@ -85,14 +79,7 @@ public final class ParticleEffectUtils {
|
|||||||
|
|
||||||
private static void fireworkParticleShower(Player player, Color color) {
|
private static void fireworkParticleShower(Player player, Color color) {
|
||||||
Location location = player.getLocation();
|
Location location = player.getLocation();
|
||||||
|
location.setX(location.getY() + (player.isInsideVehicle() ? 1.0 : -1.0));
|
||||||
if (player.isInsideVehicle()) {
|
|
||||||
location.setY(location.getY() + 1.0);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
location.setY(location.getY() - 1.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
location.setPitch(-90);
|
location.setPitch(-90);
|
||||||
|
|
||||||
Firework firework = (Firework) player.getWorld().spawnEntity(location, EntityType.FIREWORK);
|
Firework firework = (Firework) player.getWorld().spawnEntity(location, EntityType.FIREWORK);
|
||||||
|
Loading…
Reference in New Issue
Block a user