Install: pastebin get manTdeiG music
Run: music
- Install the CC: Tweaked mod to your world/server.
- Craft an Advanced Computer and connect it to a speaker, or craft an Advanced Noisy Pocket Computer.
- Open the computer and then drag and drop the
music.lua
script on top of the Minecraft window to transfer the file over. - Run the
music
command and enjoy your music!
Important
The YouTube downloading code in functions/index.js
no longer works. If you want to self-host this, you'll first need to find an unofficial API to download YouTube videos and update the code. It won't work as-is.
Self-hosting is not required to use this program. Simply use the pastebin command above which does work at the time of writing.
The ComputerCraft program connects to a web server to download the music files. This server is hosted with Firebase Cloud Functions.
- Download this repository to your computer into a folder.
- Sign up for Firebase and make a new project at https://firebase.google.com/. A billing account is required even for the free plan. The limits of the free plan should be plenty for most people.
- Install Node.js version 20 from https://nodejs.org/en/download/.
- In your terminal, run
npm install -g firebase-tools
to install Firebase. - In your terminal, navigate inside the project folder. Run
firebase login
and follow the steps. - Run
firebase init functions
and follow the steps. Choose JavaScript. Don't choose to overwrite thefunctions/index.js
orfunctions/package.json
files when it asks you. Install the dependencies when prompted. - Run
cd functions
to go inside thefunctions
directory and then runnpm install
to install more dependencies. - Run
cd ..
to go back and then runfirebase deploy
to deploy your new Cloud Function. - After the deployment is complete it will give you the Function URL. Copy that URL into the first line of
music.lua
.