Update NoteBlockEvent with new instruments. Resolves #4018. (#4019)

This commit is contained in:
Ben Staddon authored and LexManos committed 2017-06-20 23:50:32 -07:00
1 parent 98f464ad43
commit a30316e6a1
1 file changed
+7 -2
@@ -143,14 +143,19 @@ public class NoteBlockEvent extends BlockEvent
BASSDRUM,
SNARE,
CLICKS,
BASSGUITAR;
BASSGUITAR,
FLUTE,
BELL,
GUITAR,
CHIME,
XYLOPHONE;
// cache to avoid creating a new array every time
private static final Instrument[] values = values();
static Instrument fromId(int id)
{
return id < 0 || id > 4 ? PIANO : values[id];
return id < 0 || id >= values.length ? PIANO : values[id];
}
}