mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +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();
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user