Stefan

Create a complete Minecraft Java 1.21.4 Fabric client-side mod named Lyrica.

Features:

  • Beautiful dark purple and pink neon music-player GUI inspired by Spotify.
  • Open GUI with RIGHT SHIFT.
  • Search music online through YouTube.
  • Music playback using legally accessible audio sources.
  • Display genuine song lyrics synchronized with playback using LRC files or a legitimate lyrics provider.
  • Never invent or hallucinate lyrics. If lyrics are unavailable, show a clear message.
  • Animated lyrics: display individual words, randomly positioned, maximum 5 visible words simultaneously.
  • Smooth fade-in and fade-out animations.
  • Subtle configurable particle effects.
  • Settings GUI for colors, text style, animation speed, particle intensity and effects.
  • Music search results, album artwork, play/pause, next and previous controls.
  • Save favorite songs and playlists.
  • Proper error handling and configuration saving.
  • Fully functional Minecraft 1.21.4 Fabric client mod, not a mockup or demonstration.

Build and validate the complete project. Provide a compiled JAR, full source code and installation instructions.

Kodari AI
KodariNov 1 at 7:40 pm 4
LyricaMusicPlayer
Lyrica is a Fabric client-side mod for Minecraft 1.21.4 that adds a Spotify-inspired dark purple and pink neon music player GUI, opened with Right Shift. It searches YouTube for music, plays audio via legal sources, displays synchronized LRC lyrics with animated floating words (max 5 visible), smooth fades, configurable particles, play/pause/next/previous controls, favorites, playlists, and a settings GUI for colors, text style, animation speed, and particle intensity. Includes full error handling, config saving, and a compiled JAR.
  1. Set up the Fabric 1.21.4 client project and metadata.

  2. Build the neon player screen, controls, and RIGHT SHIFT keybind.

  3. Add official YouTube search, licensed-audio playback, synchronized lyrics, settings, favorites, and playlists.

  4. Validate the finished project through the project build.

Implemented Lyrica as a Fabric 1.21.4 client mod. It includes a neon player GUI, RIGHT SHIFT keybind, favorites and playlists, saved settings, album artwork, and playback controls.

YouTube search uses the official Data API and requires your API key in Settings. Playback is limited to CC-licensed or public-domain MP3s from the Internet Archive; it does not extract audio from YouTube. Lyrics come only from timestamped local .lrc files—missing lyrics are reported rather than invented. The settings screen shows the lyrics folder and the filename for the current track.

To build and download the JAR:

  1. Click Compile in the top bar, or on a phone tap ⋮ → Compile Project.

  2. Click Compile in the window that opens.

  3. When it succeeds, click Download on that build or the Download lyrica.jar button in chat.

Install the JAR in your Fabric 1.21.4 mods folder alongside Fabric API. The complete source and build configuration are in the project workspace.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
13 1,755
src/main/java/dev/lyrica/LyricaClient.java
package dev.lyrica;

import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.util.InputUtil;

import java.nio.file.Path;

public final class LyricaClient implements ModInitializer {
    public static final String MOD_ID = "lyrica";
    public static final Path CONFIG_PATH = Path.of("config", "lyrica.json");
    public static final Path LYRICS_DIRECTORY = Path.of("config", "lyrica", "lyrics");
    public static final LyricaConfig CONFIG = LyricaConfig.load(CONFIG_PATH);
    public static final MusicService MUSIC = new MusicService();
    public static final LyricsService LYRICS = new LyricsService(LYRICS_DIRECTORY);
    public static final AudioPlayer PLAYER = new AudioPlayer();

    private static KeyBinding openKey;

    @Override
    public void onInitialize() {
        openKey = KeyBindingHelper.registerKeyBinding(new KeyBinding(
                "key.lyrica.open",
                InputUtil.Type.KEYSYM,
                InputUtil.fromTranslationKey("key.keyboard.right.shift").getCode(),
                "category.lyrica"
        ));
        ClientTickEvents.END_CLIENT_TICK.register(client -> {
            while (openKey.wasPressed()) {
                client.setScreen(new LyricaScreen());
            }
        });
    }

    public static void openScreen() {
        MinecraftClient.getInstance().setScreen(new LyricaScreen());
    }
}