diff --git a/src/main/java/land/chipmunk/chipmunkmod/modules/SongPlayer.java b/src/main/java/land/chipmunk/chipmunkmod/modules/SongPlayer.java index dcb644f..efac249 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/modules/SongPlayer.java +++ b/src/main/java/land/chipmunk/chipmunkmod/modules/SongPlayer.java @@ -214,10 +214,10 @@ public class SongPlayer { while (currentSong.reachedNextNote()) { final Note note = currentSong.getNextNote(); - final float floatingPitch = MathUtilities.clamp((float) (0.5 * (Math.pow(2, ((note.pitch + (pitch / 10)) / 12)))), 0F, 2F); - try { if (!useCore && client.player != null) { + final float floatingPitch = (float) (0.5 * (Math.pow(2, ((note.pitch + (pitch / 10)) / 12)))); + final String[] thing = note.instrument.sound.split(":"); if (thing[1] == null) return; // idk if this can be null but ill just protect it for now i guess @@ -240,6 +240,8 @@ public class SongPlayer { clientConnectionAccessor.packetListener() ); } else { + final float floatingPitch = MathUtilities.clamp((float) (0.5 * (Math.pow(2, ((note.pitch + (pitch / 10)) / 12)))), 0F, 2F); + CommandCore.INSTANCE.run("execute as " + SELECTOR + " at @s run playsound " + note.instrument.sound + " record @s ~ ~ ~ " + note.volume + " " + floatingPitch); } } catch (Exception e) { diff --git a/src/main/java/land/chipmunk/chipmunkmod/song/NBSConverter.java b/src/main/java/land/chipmunk/chipmunkmod/song/NBSConverter.java index a45d174..c78d962 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/song/NBSConverter.java +++ b/src/main/java/land/chipmunk/chipmunkmod/song/NBSConverter.java @@ -167,10 +167,6 @@ public class NBSConverter { key += customInstrument.pitch; } - if (key < 33 || key > 57) { - continue; - } - byte layerVolume = 100; if (nbsLayers.size() > note.layer) { layerVolume = nbsLayers.get(note.layer).volume;