Skip to content

Commit

Permalink
Implement optimizations for new launcher
Browse files Browse the repository at this point in the history
Fix to optimize for new launcher
  • Loading branch information
Ocean-OS authored Nov 11, 2023
1 parent b7cd51e commit cf2abb1
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions mc-assets/0.48/mods.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,7 @@ var musicFiles = [
var lastMusic;
var musicPlaying = new Audio();
var gettingMusic = true;
var musicUnverifiedFiles = [];
var musicVerifiedFiles = [];
var checkingMusic = true;
for(var musicCheck = 0; musicCheck < musicFiles.length; musicCheck++){
if(!fs.existsSync(path.join(__dirname, musicFiles[musicCheck]))){
musicUnverifiedFiles.push(musicFiles[musicCheck]);
}
}
for(var musicAdd = 0; musicAdd < musicFiles.length; musicAdd++){
if(!musicFiles.includes(musicUnverifiedFiles[musicAdd])){
musicVerifiedFiles.push(musicFiles[musicAdd]);
}
}
musicFiles = musicVerifiedFiles;
checkingMusic = false;
musicPlaying.src = musicFiles[Math.round(Math.random()*(musicFiles.length-1))];
lastMusic = musicPlaying.src;
Expand Down

0 comments on commit cf2abb1

Please sign in to comment.