Changed rhythm to something more complex
This commit is contained in:
parent
84d77f2f25
commit
5c8f2e3133
@ -24,6 +24,7 @@ public class DiscoParty {
|
|||||||
private final int defaultFrequency = 10; // ticks per state change
|
private final int defaultFrequency = 10; // ticks per state change
|
||||||
private final int sheepSpawnRadius = 5;
|
private final int sheepSpawnRadius = 5;
|
||||||
private final int defaultSheepAmount = 10;
|
private final int defaultSheepAmount = 10;
|
||||||
|
private int state = 0;
|
||||||
private DiscoUpdater updater;
|
private DiscoUpdater updater;
|
||||||
private static final DyeColor[] discoColours = {
|
private static final DyeColor[] discoColours = {
|
||||||
DyeColor.RED,
|
DyeColor.RED,
|
||||||
@ -92,6 +93,12 @@ public class DiscoParty {
|
|||||||
|
|
||||||
void playSounds() {
|
void playSounds() {
|
||||||
player.playSound(player.getLocation(), Sound.NOTE_BASS_DRUM, 1.0f, 1.0f);
|
player.playSound(player.getLocation(), Sound.NOTE_BASS_DRUM, 1.0f, 1.0f);
|
||||||
|
if(this.state%2 == 0){
|
||||||
|
player.playSound(player.getLocation(), Sound.NOTE_SNARE_DRUM, 1.0f, 1.0f);
|
||||||
|
}
|
||||||
|
if(this.state%3 == 0){
|
||||||
|
player.playSound(player.getLocation(), Sound.NOTE_STICKS, 1.0f, 1.0f);
|
||||||
|
}
|
||||||
player.playSound(player.getLocation(), Sound.BURP, frequency, (float) Math.random() + 1);
|
player.playSound(player.getLocation(), Sound.BURP, frequency, (float) Math.random() + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,6 +108,7 @@ public class DiscoParty {
|
|||||||
playSounds();
|
playSounds();
|
||||||
duration -= frequency;
|
duration -= frequency;
|
||||||
this.scheduleUpdate();
|
this.scheduleUpdate();
|
||||||
|
this.state++;
|
||||||
} else {
|
} else {
|
||||||
this.stopDisco();
|
this.stopDisco();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user