From a30316e6a12a4197672dba875272caa685f46f3d Mon Sep 17 00:00:00 2001 From: Ben Staddon Date: Wed, 21 Jun 2017 07:50:32 +0100 Subject: [PATCH] Update NoteBlockEvent with new instruments. Resolves #4018. (#4019) --- .../net/minecraftforge/event/world/NoteBlockEvent.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minecraftforge/event/world/NoteBlockEvent.java b/src/main/java/net/minecraftforge/event/world/NoteBlockEvent.java index a677190f69..c4999d5134 100644 --- a/src/main/java/net/minecraftforge/event/world/NoteBlockEvent.java +++ b/src/main/java/net/minecraftforge/event/world/NoteBlockEvent.java @@ -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]; } }