File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
src/main/java/net/raphimc/noteblocklib/util Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change 1818package net .raphimc .noteblocklib .util ;
1919
2020import net .raphimc .noteblocklib .format .nbs .NbsSong ;
21- import net .raphimc .noteblocklib .format .nbs .model .NbsCustomInstrument ;
2221import net .raphimc .noteblocklib .format .nbs .model .NbsNote ;
2322import net .raphimc .noteblocklib .model .Note ;
2423import net .raphimc .noteblocklib .model .SongView ;
@@ -68,14 +67,7 @@ public static void applyNbsTempoChangers(final NbsSong song) {
6867 public static void applyNbsTempoChangers (final NbsSong song , final SongView <NbsNote > view ) {
6968 if (song .getHeader ().getVersion () < 4 ) return ;
7069
71- boolean hasTempoChanger = false ;
72- for (NbsCustomInstrument customInstrument : song .getData ().getCustomInstruments ()) {
73- if (customInstrument .getName ().equals ("Tempo Changer" )) {
74- song .getData ().getCustomInstruments ().remove (customInstrument );
75- hasTempoChanger = true ;
76- break ;
77- }
78- }
70+ final boolean hasTempoChanger = song .getData ().getCustomInstruments ().stream ().anyMatch (ci -> ci .getName ().equals ("Tempo Changer" ));
7971 if (!hasTempoChanger ) return ;
8072
8173 final List <TempoEvent > tempoEvents = new ArrayList <>();
You can’t perform that action at this time.
0 commit comments