mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-30 00:56:47 +01:00
Make holiday fireworks have more randomness fidelity
This moves the multiplication to before the cast to integer. Without this, there would only be 3 clumps of fireworks each 1 second apart. With this change, the 10 fireworks won't bunch together.
This commit is contained in:
parent
0ba4bc25c7
commit
7d963508ee
@ -96,13 +96,13 @@ public final class HolidayManager {
|
||||
sender.sendMessage(ChatColor.BLUE + "nossr50's work and all the devs, here's a firework show!");
|
||||
final int firework_amount = 10;
|
||||
for (int i = 0; i < firework_amount; i++) {
|
||||
int delay = (int) (Math.random() * 3) + 4;
|
||||
int delay = (int) (Math.random() * 3 * 20) + 4;
|
||||
mcMMO.p.getServer().getScheduler().runTaskLater(mcMMO.p, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
spawnFireworks((Player) sender);
|
||||
}
|
||||
}, 20 * delay);
|
||||
}, delay);
|
||||
}
|
||||
hasCelebrated.add(sender.getName());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user