mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-01-07 22:27:34 +01:00
Moved more artifact math to separate thread
This commit is contained in:
parent
9cda787d0c
commit
172157c3fc
@ -108,18 +108,20 @@ public abstract class Artifact extends EcoEnchant {
|
||||
return;
|
||||
}
|
||||
|
||||
Vector point1 = player.getLocation().getDirection().clone();
|
||||
point1.rotateAroundY(Math.toRadians(90));
|
||||
point1.multiply(1.2);
|
||||
Location location1 = player.getLocation().clone().add(point1);
|
||||
this.getPlugin().getScheduler().runAsync(() -> {
|
||||
Vector point1 = player.getLocation().getDirection().clone();
|
||||
point1.rotateAroundY(Math.toRadians(90));
|
||||
point1.multiply(1.2);
|
||||
Location location1 = player.getLocation().clone().add(point1);
|
||||
|
||||
Vector point2 = player.getLocation().getDirection().clone();
|
||||
point2.rotateAroundY(Math.toRadians(-90));
|
||||
point2.multiply(1.2);
|
||||
Location location2 = player.getLocation().clone().add(point2);
|
||||
Vector point2 = player.getLocation().getDirection().clone();
|
||||
point2.rotateAroundY(Math.toRadians(-90));
|
||||
point2.multiply(1.2);
|
||||
Location location2 = player.getLocation().clone().add(point2);
|
||||
|
||||
player.getWorld().spawnParticle(particle, location1, 1, 0, 0, 0, 0, extra, true);
|
||||
player.getWorld().spawnParticle(particle, location2, 1, 0, 0, 0, 0, extra, true);
|
||||
player.getWorld().spawnParticle(particle, location1, 1, 0, 0, 0, 0, extra, true);
|
||||
player.getWorld().spawnParticle(particle, location2, 1, 0, 0, 0, 0, extra, true);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -178,6 +180,6 @@ public abstract class Artifact extends EcoEnchant {
|
||||
bukkitRunnable.cancel();
|
||||
}
|
||||
projectile.getLocation().getWorld().spawnParticle(particle, projectile.getLocation(), 1, 0, 0, 0, finalColor, extra, true);
|
||||
}).runTaskTimer(4, ticks);
|
||||
}).runTaskTimerAsynchronously(4, ticks);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user