Skip to content

Commit 37836df

Browse files
committed
Add splitscreen audio configuration to optimize instance sound settings
1 parent fcda616 commit 37836df

File tree

1 file changed

+161
-0
lines changed

1 file changed

+161
-0
lines changed

install-minecraft-splitscreen.sh

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,167 @@ EOF
10651065
fi
10661066
done
10671067

1068+
# =============================================================================
1069+
# MINECRAFT AUDIO CONFIGURATION
1070+
# =============================================================================
1071+
1072+
# SPLITSCREEN AUDIO SETUP: Configure music volume for each instance
1073+
# Instance 1 keeps music at default volume (0.3), instances 2-4 have music muted
1074+
# This prevents audio overlap when multiple instances are running simultaneously
1075+
print_progress "Configuring splitscreen audio settings for $instance_name..."
1076+
1077+
# Extract instance number from instance name (latestUpdate-X format)
1078+
local instance_number
1079+
instance_number=$(echo "$instance_name" | grep -oE '[0-9]+$')
1080+
1081+
# Determine music volume based on instance number
1082+
local music_volume="0.3" # Default music volume
1083+
if [[ "$instance_number" -gt 1 ]]; then
1084+
music_volume="0.0" # Mute music for instances 2, 3, and 4
1085+
print_info " → Music muted for $instance_name (prevents audio overlap)"
1086+
else
1087+
print_info " → Music enabled for $instance_name (primary audio instance)"
1088+
fi
1089+
1090+
# Create Minecraft options.txt file with splitscreen-optimized settings
1091+
# This file contains all Minecraft client settings including audio, graphics, and controls
1092+
cat > "$instance_dir/.minecraft/options.txt" <<EOF
1093+
version:3465
1094+
autoJump:false
1095+
operatorItemsTab:false
1096+
autoSuggestions:true
1097+
chatColors:true
1098+
chatLinks:true
1099+
chatLinksPrompt:true
1100+
enableVsync:true
1101+
entityShadows:true
1102+
forceUnicodeFont:false
1103+
discrete_mouse_scroll:false
1104+
invertYMouse:false
1105+
realmsNotifications:true
1106+
reducedDebugInfo:false
1107+
showSubtitles:false
1108+
directionalAudio:false
1109+
touchscreen:false
1110+
fullscreen:false
1111+
bobView:true
1112+
toggleCrouch:false
1113+
toggleSprint:false
1114+
darkMojangStudiosBackground:false
1115+
hideLightningFlashes:false
1116+
mouseSensitivity:0.5
1117+
fov:0.0
1118+
screenEffectScale:1.0
1119+
fovEffectScale:1.0
1120+
gamma:0.0
1121+
renderDistance:12
1122+
simulationDistance:12
1123+
entityDistanceScaling:1.0
1124+
guiScale:0
1125+
particles:0
1126+
maxFps:120
1127+
difficulty:2
1128+
graphicsMode:1
1129+
ao:true
1130+
prioritizeChunkUpdates:0
1131+
biomeBlendRadius:2
1132+
renderClouds:"true"
1133+
resourcePacks:[]
1134+
incompatibleResourcePacks:[]
1135+
lastServer:
1136+
lang:en_us
1137+
soundDevice:""
1138+
chatVisibility:0
1139+
chatOpacity:1.0
1140+
chatLineSpacing:0.0
1141+
textBackgroundOpacity:0.5
1142+
backgroundForChatOnly:true
1143+
hideServerAddress:false
1144+
advancedItemTooltips:false
1145+
pauseOnLostFocus:true
1146+
overrideWidth:0
1147+
overrideHeight:0
1148+
heldItemTooltips:true
1149+
chatHeightFocused:1.0
1150+
chatDelay:0.0
1151+
chatHeightUnfocused:0.44366195797920227
1152+
chatScale:1.0
1153+
chatWidth:1.0
1154+
mipmapLevels:4
1155+
useNativeTransport:true
1156+
mainHand:"right"
1157+
attackIndicator:1
1158+
narrator:0
1159+
tutorialStep:none
1160+
mouseWheelSensitivity:1.0
1161+
rawMouseInput:true
1162+
glDebugVerbosity:1
1163+
skipMultiplayerWarning:false
1164+
skipRealms32bitWarning:false
1165+
hideMatchedNames:true
1166+
joinedFirstServer:false
1167+
hideBundleTutorial:false
1168+
syncChunkWrites:true
1169+
showAutosaveIndicator:true
1170+
allowServerListing:true
1171+
onlyShowSecureChat:false
1172+
panoramaScrollSpeed:1.0
1173+
telemetryOptInExtra:false
1174+
soundCategory_master:1.0
1175+
soundCategory_music:${music_volume}
1176+
soundCategory_record:1.0
1177+
soundCategory_weather:1.0
1178+
soundCategory_block:1.0
1179+
soundCategory_hostile:1.0
1180+
soundCategory_neutral:1.0
1181+
soundCategory_player:1.0
1182+
soundCategory_ambient:1.0
1183+
soundCategory_voice:1.0
1184+
modelPart_cape:true
1185+
modelPart_jacket:true
1186+
modelPart_left_sleeve:true
1187+
modelPart_right_sleeve:true
1188+
modelPart_left_pants_leg:true
1189+
modelPart_right_pants_leg:true
1190+
modelPart_hat:true
1191+
key_key.attack:key.mouse.left
1192+
key_key.use:key.mouse.right
1193+
key_key.forward:key.keyboard.w
1194+
key_key.left:key.keyboard.a
1195+
key_key.back:key.keyboard.s
1196+
key_key.right:key.keyboard.d
1197+
key_key.jump:key.keyboard.space
1198+
key_key.sneak:key.keyboard.left.shift
1199+
key_key.sprint:key.keyboard.left.control
1200+
key_key.drop:key.keyboard.q
1201+
key_key.inventory:key.keyboard.e
1202+
key_key.chat:key.keyboard.t
1203+
key_key.playerlist:key.keyboard.tab
1204+
key_key.pickItem:key.mouse.middle
1205+
key_key.command:key.keyboard.slash
1206+
key_key.socialInteractions:key.keyboard.p
1207+
key_key.screenshot:key.keyboard.f2
1208+
key_key.togglePerspective:key.keyboard.f5
1209+
key_key.smoothCamera:key.keyboard.unknown
1210+
key_key.fullscreen:key.keyboard.f11
1211+
key_key.spectatorOutlines:key.keyboard.unknown
1212+
key_key.swapOffhand:key.keyboard.f
1213+
key_key.saveToolbarActivator:key.keyboard.c
1214+
key_key.loadToolbarActivator:key.keyboard.x
1215+
key_key.advancements:key.keyboard.l
1216+
key_key.hotbar.1:key.keyboard.1
1217+
key_key.hotbar.2:key.keyboard.2
1218+
key_key.hotbar.3:key.keyboard.3
1219+
key_key.hotbar.4:key.keyboard.4
1220+
key_key.hotbar.5:key.keyboard.5
1221+
key_key.hotbar.6:key.keyboard.6
1222+
key_key.hotbar.7:key.keyboard.7
1223+
key_key.hotbar.8:key.keyboard.8
1224+
key_key.hotbar.9:key.keyboard.9
1225+
EOF
1226+
1227+
print_success "Audio configuration complete for $instance_name"
1228+
10681229
print_success "Fabric and mods installation complete for $instance_name"
10691230
}
10701231

0 commit comments

Comments
 (0)