All Mods Resource Packs Data Packs Shaders Modpacks Plugins
Get Current Song

Get Current Song

by TakiSpl • Downloads: 0 • Followers: 0
Description
Gallery
Changelog
Versions

Get Current Song

This is a simple FabricMC mod that allows you to get the currently playing song in Minecraft via a command. You can download the latest version on Modrinth.

Commands

This mod adds two commands to the game:

  • /getsong — Gets information about the currently playing song, such as the name and composer.
  • /getsongid — Gets the namespaced ID of the currently playing song.

However, instead of using these commands, you can see the same information on the F3 screen.

API

This mod provides a resource-based method of getting information about the songs in Minecraft, such as name, composer, album, and track number.

Resource pack developers

If your resource pack adds custom music to the game, consider adding your song(s) to the getcurrentsong/song_names.json file in your resource pack. This JSON file has one root object, with keys being the song IDs and values being an object whose form is described below:

{
    "name": "song name (string, required)",
    "composer": "composer's name (string, required)",
    "soundtrack": "album name (string, optional)",
    "trackNumber": "track number in album (integer, optional)"
}

If the soundtrack is specified, the track number must also be specified, and vice-versa.

Mod develepers

To include this mod's API with Gradle, add the following to your build.gradle (code adapted from the Modrinth Maven docs):

repositories {
    // Other Maven repositories can go above (or below) Modrinth's. We don't need priority :)
    // Do remember, though, this is the `repositories` block below where plugins are declared, not in `pluginManagement`!
    maven {
        name = "Modrinth"
        url = "https://api.modrinth.com/maven"
        content {
            includeGroup "maven.modrinth"
        }
    }
}

dependencies {
    modApi "maven.modrinth:getcurrentsong:1.0.1"
}

Once you have added the API to your build.gradle, you can load song information from resource packs using the following API (the SongNameDatabase class is in the io.github.gaming32.getcurrentsong package):

  • SongNameDatabase#isInitialized — Return true if the song info is currently in a loaded state. Attempting to read from the database when this returns false may not return correct data. You have been warned!
  • SongNameDatabase#getSong — Gets the current song by name or net.minecraft.util.Identifier and returns a SongNameDatabase.SongInfo object or null if the song wasn't found in the database.

How to Install Get Current Song (Mod)

Get Current Song by TakiSpl is verified for Fabric across Minecraft versions 1.18, 1.18.1, 1.18.2 (latest release: 1.0.1, file size: 1.6 MB). Follow the steps below to install it safely from ModCraft.tv:

  1. Click the Download button above and select your Minecraft version (1.18, 1.18.1, 1.18.2) and platform (Fabric).
  2. Make sure you have the compatible loader or environment installed for Fabric.
  3. Move the downloaded Get Current Song file into your Minecraft .minecraft/mods folder and launch the game.

All Versions

+ Add Version
Name Game version Platforms Published Downloads Actions
1.18.x
Fabric
last yr. 1
[1.0.1] 1.0.1 by TakiSpl on Jan 30, 2022
Download
Added a song display to the F3 screen
Get Current Song Icon
Download Get Current Song
Select game version
Select platform