Credit Huetete#3721
Thanks to Arizaniac for the Music Disc & Recorder textures!
Currently supported versions (as of 5.3)
- 1.12.2 (Needs MixinBooter)
- 1.16.5 (forge)
- 1.18.1 (forge) - bugfixes only
- 1.18.1 (fabric) - bugfixes only
- 1.18.2 (forge)
- 1.18.2 (fabric)
This mod will let you play music based on in game triggers.
How do I use it?
- Run the game once to generate all the necessary config files & folders
- Make sure all your music files are either ogg, wav, or mp3. Wav and mp3 files will get converted to ogg automatically (this may take a few minutes depending on how many files you choose to convert)
- Your songs may not get read in properly if there are capital letters in the file name
- All music files go in config/MusicTriggers/songs/assets/musictriggers/sounds/music (Note that the way this is set up does allow you to alternatively register music via a resource pack in the same namespace)
- Check out the wiki for more in depth information
Current list of triggers (also listed on the wiki)
- menu (title screen)
- generic (fallback trigger)
- difficulty (best works in conjunction with other triggers)
- time (for all your day/night/sunset/sunrise/hourly needs)
- light (light level - The level and a few other things about it are configurable)
- height (for all your height related needs)
- raining
- storming
- snowing
- lowhp (Configurable, default is 30% of your total health)
- dead
- creative
- spectator
- riding
- pet (Current implementation is if there is any pet within a 16 block radius. This is subject to change)
- underwater
- elytra
- fishing
- drowning
- home (when you are close to your respawn position)
- pvp
- dimension (supports filtering by regexed names and lists of dimensions)
- biome (supports filtering by regexed names, lists of biomes, categories, rain type, temperature, and downfall)
- structure (supports filtering by regexed names and lists of structures)
- mob (This covers basically anything and everything to do with mobs & bosses now. See the wiki for more information)
- zones (You can mark them out in game with the gui as of 5.0)
- effect (supports filtering by regexed names and lists of effects)
- victory (only after the mob or pvp trigger)
- gui (supports filtering by regexed names and lists of guis)
- advancement
- statistic
- raid (1.16+) (The wave number can be specified)
Mod compatibility triggers (1.12.2)
- gamestages (This can be specified to either a whitelist or a blacklist)
- bloodmoon (bloodmoon or nyx)
- harvestmoon (nyx)
- fallingstars (nyx)
- rain intensity (dynamic surroundings)
- tornado (weather2)
- hurricane (weather2)
- sandstorm (weather2)
- seasons (serene seasons)
- infernal mobs (with the mob trigger)
Mod compatibility triggers (1.16.5)
- gamestages (This can be specified to either a whitelist or a blacklist)
- bloodmoon (enhanced celestials)
- harvestmoon (enhanced celestials)
- bluemoon (enhanced celestials)
- rain intensity (dynamic surroundings)
- acid rain (better weather)
- light rain (better weather)
- blizzard (better weather)
- cloudy (better weather)
- seasons (serene seasons)
- infernal mobs (with the mob trigger)
Mod compatibility triggers (1.18.1 - Forge)
- bloodmoon (enhanced celestials)
- harvestmoon (enhanced celestials)
- bluemoon (enhanced celestials)
- seasons (serene seasons)
- infernal mobs (with the mob trigger)
Known Issues (as of V5.4)
- There may be some attenuation issues with the music discs in 1.16+
- There may be issues with the automatic audio conversion to ogg
- The playback screen of the in game gui can only seek in the 1.12.2 version, and the total song time is not correct
- Check out the issues page for other potential issues
Upcoming Features
- A new toggle system
- A custom sound engine instead of relying on the vanilla one
- Various other cool stuff
My music isn't playing: Here are some possible fixes for some of the issues relating to this
- Make sure your song file ends in either .ogg, wav, or mp3 and that if you converted to ogg yourself, you did so through audacity or some other implementation of ffmpeg
- Make sure the name of the song in the config as well as the file name itself is all lowercase.
- Your sound file could be corrupted. Check your log for a line that says "Ogg header not recognized in method 'readHeader'.". If you converted the file from some other type, it could have also been a bad conversion and you can just reconvert it properly.
Want to host a server? You can use code 'DimHop' For 25% off your first month!
You are free to use this mod in a modpack, server video, or anything that links back here with proper credit. You do not have to ask first
Just a question: Is it a client or server side mod?
In reply to eclight_:
Depends, but usually you need it on both. You can read more about that here
In reply to The_Computerizer:
thx
I have a lot of questions so I'll just put them all here.
Can I make it fade between songs and overlap some songs? It might be cool to have something like Super Mario World or Legend of Zelda: Breath of the Wild for riding, where it plays something over what's already playing.
I have several hundred songs I'd like to use, many of which have capital letters in their names. Is there an easy way to rename all of them so they're definitely read properly?
the client need to have the mp3 file in his minecraft?
Is it better to convert mp3 to ogg when using this mod for only one sound for each biome in the game?
In reply to evokenmachinima:
Only ogg files will be read in, but the mod will convert any mp3 files you put in automatically as well
In reply to The_Computerizer:
Thanks for so fast reply :) I mean, is converting a laggy thing or does the mod convert files only once?
In reply to evokenmachinima:
Converting is only done once, but it can take a few minutes, especially if there are multiple files
I saw someone who had the similar issue as me I believe but it didn't really answer any questions?? So, when I edit the musictriggers.toml in game, they work perfectly fine and the game reopens just fine too and all that but as soon as I edit ANYTHING and save the toml file in my coding program, I get the error "java.lang.NullPointerException: null" whenever I boot up the game. I'm really confused on why I can edit the file in-game just fine without any problems but I can't do it outside the game without getting the null error, even if I format it correctly! Idk if I'm also supposed to be using the commands.toml but anything to help would be appreciated.
Version: 1.16.5
Mod Version: 5.1
In reply to YeetACookie:
Can you provide a log file for one of the crashes?
In reply to The_Computerizer:
Yeah of course!
Here's the crash log from yesterday after trying to do it manually. I uploaded it to my drive
In reply to YeetACookie:
Check if it still crashes without music duration reducer and also double check the name of the song in your config is the same as the file. If it still crashes, send an example of a config that crashes
In reply to The_Computerizer:
MUSIC DURATION REDUCER WAS EXACTLY THE PROBLEM, thank you so much!!
anyone know what i'm doing wrong?
it all looks correct.
In reply to Vanima_:
It looks like you did not specify a time frame for your time trigger or an identifier for your riding and biome triggers
In reply to The_Computerizer:
hay thanks man
is there an upsise to edit the files in an editor instead of doing it in the ingame GUI?
In reply to Der_Finder_:
Its faster since you can copy & paste stuff and you add comments to the file. The GUI is more meant to help people get familiar with the format and provide an easy way to edit the file, whereas once you get more familiar you can edit it in a text based manner to speed things along for large config files
In reply to The_Computerizer:
Ah okay I see :)