@@ -97,7 +97,7 @@ protected void init() {
9797 );
9898
9999 addTabEntry ("volume" , this ::buildVolumeList );
100- addTabEntry ("music" , ConfigurationScreen ::buildMusicOptionList );
100+ addTabEntry ("music" , this ::buildMusicOptionList );
101101 addTabEntry ("jukebox" , ConfigurationScreen ::buildJukeboxOptionList );
102102 addTabEntry ("demo" , ConfigurationScreen ::buildDemoList );
103103 addTabEntry ("meta" , ConfigurationScreen ::buildMetaList );
@@ -196,21 +196,35 @@ protected SpruceOptionListWidget buildVolumeList(int width, int height) {
196196 Component .translatable ("options.showNowPlayingToast.tooltip" )
197197 )
198198 );
199+ #else ;
200+ try {
201+ list .addSingleOptionEntry (checkbox ("alwaysPlayMusic" ));
202+ } catch (ReflectiveOperationException roe ) {
203+ throw new AssertionError ("Unexpected access violation" , roe );
204+ }
199205 #endif
200206
201207 return list ;
202208 }
203209
204- protected static SpruceOptionListWidget buildMusicOptionList (int width , int height ) {
210+ protected SpruceOptionListWidget buildMusicOptionList (int width , int height ) {
205211 final var list = new SpruceOptionListWidget (Position .origin (), width , height );
206212
207213 try {
208214 list .addSingleOptionEntry (separator ("situationalMusic" ));
209215 list .addSingleOptionEntry (cycling ("situationalMusicReplacing" ));
210- list .addSingleOptionEntry (checkbox ("immediatelyPlayOnReplace" ));
216+ #if MC_1_21_6_OR_NEWER
217+ list .addOptionEntry (checkbox ("immediatelyPlayOnReplace" ), musicFrequency );
218+ #else
219+ list .addOptionEntry (checkbox ("immediatelyPlayOnReplace" ), checkbox ("alwaysPlayMusic" ));
220+ #endif
211221 list .addSingleOptionEntry (separator ("transitions" ));
212222 list .addOptionEntry (intInput ("fadeInTicks" ), intInput ("fadeOutTicks" ));
223+ #if MC_1_21_6_OR_NEWER
213224 list .addSingleOptionEntry (checkbox ("seamlessTransitions" ));
225+ #else
226+ list .addOptionEntry (checkbox ("seamlessTransitions" ), checkbox ("allowPausingMusic" ));
227+ #endif
214228 } catch (ReflectiveOperationException roe ) {
215229 throw new AssertionError ("Unexpected access violation" , roe );
216230 }
0 commit comments