mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-01-08 22:37:38 +01:00
Moved more artifact math to separate thread
This commit is contained in:
parent
9cda787d0c
commit
172157c3fc
@ -108,6 +108,7 @@ public abstract class Artifact extends EcoEnchant {
|
||||
return;
|
||||
}
|
||||
|
||||
this.getPlugin().getScheduler().runAsync(() -> {
|
||||
Vector point1 = player.getLocation().getDirection().clone();
|
||||
point1.rotateAroundY(Math.toRadians(90));
|
||||
point1.multiply(1.2);
|
||||
@ -120,6 +121,7 @@ public abstract class Artifact extends EcoEnchant {
|
||||
|
||||
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