A Survival-, Multiplayer- and Copyright-friendly mod for adding custom music to Minecraft
- What is This?
- Setup and Customization
- Resource Pack Generator
- What About Multiplayer?
- Obtaining Records and More!
- Fox Nap Vanilla
- Contributing
- License and Acknowledgements
FoxNap is a simple "Vanilla Plus" mod for adding custom music discs to Minecraft.
- Unlike what you can achieve with resource packs alone music discs added via FoxNap do not overwrite the vanilla music discs.
- Unlike similar mods, FoxNap allows you to:
- add as many or as few music discs as you want
- add whatever music you want
- use different music than other players on the same server
- obtain all music discs in survival, via a new villager profession (utilities for modifying creeper / treasure chest loot tables are planned)
FoxNap also adds custom musical instruments that you can play like goat horns, giving you the creative freedom to stage "live music" performances.
This mod comes pre-bundled with seven new music discs:
-
Four tracks performed by PM Music from Lud and Schlatts Musical Emporium
all of which are permissively licensed under the terms specified here (I am redistributing them via this repo and mod under the compatible Creative Commons Attribution-ShareAlike 4.0 License).
If this built-in playlist sounds like your jam, and you have no desire to add anything else, then congrats! This is easy! This is a Fabric mod with builds for 1.19+ and depends only on the Fabric API, so just download the appropriate build to your instance's mods folder, start the game, and go find a village.
But if you're interested in some customization, read on:
While you can always manually convert mp3s and hand-edit JSON files to create a set of Fox Nap packs, this project provides an alternative in the form of a stand-alone and portable (read: no installation or setup required) resource pack generator.
You can read more about that here.
When playing on a server, it's the server's datapacks and config file that will dictate:
- how long each song will play
- the redstone signal strength coming out of jukeboxes playing each disc
- the number of tracks available from the Maestro
but it's each player's resource pack and config file that will control:
- the songs that each disc will play
- the appearance (and description) of each disc
- which discs show up as "placeholder" records
Explicitly:
- if the server has a greater number of discs specified than both what you've specified in your config, some discs will show up for you with placeholder textures and sound files
- if you have more discs in your resource pack than are set on the server, then not all tracks will be available in your shared game
- some music discs may continue silently after a song ends, and some might cut off
Beyond the number of discs, though, there's no reason why every player can't come online with a completely custom playlist of songs with similar lengths!
So now that you've registered these custom records to the game, how do you actually get them?
Outside of commands (e.g. /give @s foxnap:track_1
) and Creative Mode, the sole way to obtain
FoxNap records is by trading with The Maestro, a new villager who has a Jukebox as a job site
(note
that The Maestro does not currently spawn naturally, but this feature is planned).
The Maestro will pay top dollar for tonewood--stripped blocks of rare wood types--goat horns and non-FoxNap records and sells, alongside your custom music discs, a wide variety of playable musical instruments (with textures adopted from the classic mxTune mod).
If you'd prefer not to add The Maestro to your game (and would like to obtain your music discs
in some other way, such as a datapack), you can disable this part of the mod by editing your
foxnap.yaml
config file and adding the following line:
enable_maestro: false
With the release of Minecraft 1.21, music discs are now entirely data-driven! As such, the resource and datapacks generated by the Fox Nap Resource Pack Generator are entirely compatible with the vanilla game. Details can be found on the wiki.
Find a bug? Have a suggestion or a question? Want to contribute a new feature or enhancement? Open an issue!
- Clone this repo
- Download and install a Java 21 OpenJDK such as Temurin
- From the root of this repo, run
./gradlew build
or load this project into your favorite Java IDE and run the "build" gradle task
The compiled jar will be found under build/libs
.
Instructions for building the resource pack generator can be found on the wiki
All code in this repository is licensed under GPLv3.
Builds of the FoxNap Resource Pack Generator (FoxNapRPG
) include binaries of
ffmpeg which is licensed under
the GNU Lesser General Public License (LGPL) version 2.1
or later and incorporates components licensed under
the GNU General Public License (GPL) version 2
or later.
All assets in this repository are distributed under the Creative Commons Attribution-ShareAlike 4.0 License unless otherwise stated.
Instrument icons are taken from the mod mxTune by @AeronicaMC.
Instrument sounds are courtesy of Philharmonia's sound sample library.
Many thanks to @FoundationGames for making the code of his awesome Sandwichable mod so easy to understand and learn from, and similarly to Modding by Kaupenjoe for his awesome and detailed tutorials on Minecraft modding, in this case his tutorial for adding a custom villager profession.
Also shouting out @Siphalor and Reddit's jSdCool for this conversation on adding non-mod external libraries to a Fabric mod. It should not have been this hard to add the SnakeYAML library to a mod.