promotional bannermobile promotional banner
premium banner
Server-wide synchronized music with Cobblemon battle music support

Description

Cobblemon Diamond DJ

Server-wide synchronized music with Cobblemon battle music support!

Cobblemon Diamond DJ is a Fabric mod that broadcasts OGG music files to all connected players. Everyone hears the same song at the same time, creating a shared radio experience. When a Cobblemon battle starts, spatial battle music kicks in with smooth crossfade transitions.

Updating from a previous version? Delete your old config files (config/cobblemon-diamond-dj-server.json and config/cobblemon-diamond-dj-hud.json) and let the mod regenerate them with the latest defaults. New fields are added each update and stale configs can cause unexpected behavior.

First time? After installing, take a moment to read through config/cobblemon-diamond-dj-server.json -- every option is there and the defaults are sensible, but there's a lot you can customize (battle music, streaming, vote skip, auto-start, and more).

DJ Playlist System

  • Synchronized playback -- all players hear the exact same position in the song
  • Auto-download -- clients automatically download and cache songs from the server
  • Independent volume controls -- Cobblemon Diamond DJ uses the Jukebox / Records volume slider, so players can turn down server DJ music while still keeping vanilla Minecraft music at their preferred volume
  • Vote skip -- players can democratically skip songs
  • Vote toggle -- server can enable/disable player voting
  • Customizable HUD -- minimal, verbose, or custom widget layouts
  • No external services -- works entirely with local OGG files or resource packs
  • Streaming mode -- stream from YouTube, SoundCloud, Bandcamp, and Vimeo URLs
  • Secure -- protected against malicious servers (path traversal, file validation, domain whitelist)

Cobblemon Battle Music

  • Spatial audio -- battle music gets louder as you approach the battle
  • Automatic -- battle music triggers when any Cobblemon battle starts
  • Crossfade transitions -- smooth audio crossfade between DJ music and battle music
  • Range-based -- nearby non-combatants within the configured radius also hear battle music
  • Death-aware -- battle music stops immediately on player death and resumes global music on respawn

Resource Pack Support

  • Load music from server-side resource packs in the resourcepacks/ folder
  • Works with existing third-party music packs
  • Any .ogg file in a resource pack is added to the DJ playlist
  • Files inside a battle/ folder go to the battle music library
  • Three modes: "local" (config folders only), "resourcepack" (packs only), or "both"

Commands

All Players:

  • /dj skip - Vote to skip current song
  • /dj nowplaying - Show current song info

Operators:

  • /dj start - Start playback
  • /dj stop - Stop playback
  • /dj forceskip - Skip without voting
  • /dj reload - Reload song library and resource packs
  • /dj list - List all songs
  • /dj status - Server status
  • /dj clearcache - Clear client cache for all online players
  • /dj clearcacheplayer <player> - Clear client cache for one player

Streaming Mode (Operators):

  • /dj play <url> - Play a URL immediately
  • /dj queue <url> - Add a URL to the queue
  • /dj addplaylist <url> - Add a playlist URL (YouTube/SoundCloud)
  • /dj clearqueue - Clear the stream queue

Option 1: Local Files (default)

  1. Install the mod on server and all clients
  2. Add .ogg files to: config/cobblemon-diamond-dj/songs/
  3. Add battle music to: config/cobblemon-diamond-dj/battle/
  4. Run /dj start in-game

Option 2: Resource Packs

  1. Place music resource packs (.zip) in the server's resourcepacks/ folder
  2. Set "musicSource": "resourcepack" in config/cobblemon-diamond-dj-server.json
  3. Run /dj start in-game

Option 3: Both

  1. Add local files to the config folders AND place resource packs in resourcepacks/
  2. Set "musicSource": "both" in the config
  3. Local files take priority when song names conflict

Option 4: Streaming

  1. Set "playbackMode": "streaming" in config/cobblemon-diamond-dj-server.json
  2. Add URLs (one per line) to config/cobblemon-diamond-dj/streaming_playlist.txt
  3. Optionally configure YouTube auth (youtubePoToken, youtubeOAuthRefreshToken) for age-restricted content
  4. Run /dj start or use /dj play <url> for on-demand streaming

Configuration

Edit config/cobblemon-diamond-dj-server.json:

{
  "voteThresholdPercent": 50,
  "voteTimeoutSeconds": 30,
  "voteEnabled": true,
  "battleMusicEnabled": true,
  "battleMusicRadius": 48,
  "battleBleedEnabled": true,
  "clearCacheOnDisconnect": true,
  "musicSource": "local",
  "autoStartEnabled": true,
  "playbackMode": "local",
  "streamingPlaylistFile": "streaming_playlist.txt",
  "battleMusicDisabledInStreaming": false
}
  • voteThresholdPercent - Percentage of players needed to skip
  • voteTimeoutSeconds - How long before a vote expires
  • battleMusicEnabled - Enable/disable Cobblemon battle music
  • battleMusicRadius - How far battle music can be heard (blocks)
  • battleBleedEnabled - Allow battle music to bleed across dimensions
  • clearCacheOnDisconnect - Clear client cache on disconnect
  • musicSource - Where to load music from: "local", "resourcepack", or "both"
  • autoStartEnabled - Auto-start the DJ playlist when the server starts
  • playbackMode - Playback mode: "local" (OGG files) or "streaming" (URLs)
  • streamingPlaylistFile - Filename for URL playlist (one URL per line)
  • battleMusicDisabledInStreaming - Disable battle music when in streaming mode

Client HUD

Edit config/cobblemon-diamond-dj-hud.json:

{
  "enabled": true,
  "preset": "SUPER_MINIMAL",
  "anchor": "TOP_LEFT",
  "scale": 1.0
}

Presets: SUPER_MINIMAL (default -- progress bar only), MINIMAL, VERBOSE, NONE, CUSTOM

Supported Streaming Services

  • YouTube (including Music, playlists)
  • SoundCloud
  • Bandcamp
  • Vimeo

All URLs are validated against a built-in domain whitelist on both server and client for security. Note: don't download this other than from curseforge. i could change my mind but not for now.

Requirements

  • Minecraft 1.21.1
  • Fabric Loader 0.18.4+
  • Fabric API
  • Fabric Language Kotlin
  • Cobblemon (any version for 1.21.1)

Audio Format

  • Format: OGG Vorbis only
  • Stereo or Mono: Both work (stereo is auto-downmixed to mono for battle spatial audio)