Kaboom

1.21.11 mod

📎 1 file 5,290 chars
📄
pasted-code-1795362556500.txt
txt 49 lines
▶
Create a complete client-side Minecraft mod for Fabric (Minecraft 1.21.11, Java 21, Fabric Loader + Fabric API) called "LyricsMod". It displays synced song lyrics as a gorgeous, smooth, Spotify/Apple-Music-style overlay inside the game.

Provide a full Gradle project: build.gradle, gradle.properties, settings.gradle, fabric.mod.json, mixins JSON (only if needed), and all source files.

=== CORE FEATURES ===

1. PREMIUM LYRICS HUD
- Show the current line large and glowing, the previous lines faded above and the next lines dimmed below (configurable 1-7 visible lines).
- Smooth easing animations: lines scroll up with ease-out, the active line scales up, inactive lines blur/fade out via decreasing alpha and scale.
- Word-by-word karaoke highlight: the active line fills with color from left to right in sync with the music. Support Enhanced LRC word timestamps (); if only line timestamps exist, interpolate the fill evenly across the line duration.
- Optional pop/bounce effect on each new word, subtle glow behind the active line, and drop shadow or semi-transparent rounded background panel for readability on any scene.
- Instrumental gaps: show an animated "• • •" countdown indicator when there is a pause longer than 5 seconds between lines.
- Slim progress bar with elapsed/total time and the song title + artist in a small header.
- Fade the whole overlay in/out smoothly when a song starts/stops.

2. THEMES & CUSTOMIZATION
- Built-in themes: Spotify Green, Apple Music Glass, Neon Purple, Minimal White, Rainbow (animated gradient), plus fully custom colors.
- Settings: position (top/center/bottom/free drag-and-drop in an edit mode), scale, line spacing, text alignment (left/center/right), font shadow, opacity, background panel on/off, animation speed, number of visible lines.
- A clean config screen (ModMenu + Cloth Config integration if available, otherwise a custom in-game screen), saved to config/lyricsmod.json with live preview.

3. LYRICS SOURCES
- Local .lrc files from config/lyricsmod/songs/ (standard LRC and Enhanced LRC, support [offset:] tag, [ar:], [ti:], [length:]).
- Online fetch from the free LRCLIB API (https://lrclib.net/api/get and /api/search) by artist + title (+ duration if known). Prefer syncedLyrics, fall back to plainLyrics (shown as static scrolling text). Cache results as .lrc files. All network calls must be async (CompletableFuture), never block the render or game thread, with timeouts and error handling.

4. AUTO-DETECT CURRENT SONG (optional module, must fail gracefully)
- On Windows, detect the currently playing track from Spotify (and ideally other players/browsers) by reading the player window title or the system media session, using JNA or a similar library included via Gradle (Jar-in-Jar). Parse "Artist - Title", automatically fetch lyrics, and sync the internal timer when the track changes. Detect pause/resume if possible.
- If auto-detect is unavailable (other OS, unsupported player), silently fall back to manual mode. Never crash.

5. MANUAL CONTROL
- Commands with tab-completion: /lyrics play , /lyrics pause, /lyrics resume, /lyrics stop, /lyrics seek , /lyrics offset , /lyrics fetch  , /lyrics list, /lyrics reload, /lyrics toggle, /lyrics auto <on|off>.
- Keybinds (rebindable in Controls): toggle overlay, pause/resume, offset -/+ 250 ms, open settings.
- Show small feedback toasts/action-bar messages for sync adjustments (e.g. "Offset: +250 ms").

6. OPTIONAL: BUILT-IN PLAYER
- Play .ogg files from config/lyricsmod/music/ with perfectly synced lyrics through the Minecraft sound engine or a lightweight audio library. Only include if it can be implemented cleanly.

=== TECHNICAL REQUIREMENTS ===
- Client-only mod (environment: "client"), no server component, no required dependencies beyond Fabric API (ModMenu/Cloth Config optional).
- Use the current HUD rendering API for 1.21.11 (HudElementRegistry / HUD layers or the correct equivalent) and DrawContext for text, rects and gradients. Use matrix transforms for scaling and animation. Double-check API names against 1.21.11 mappings (Yarn or Mojang) and state which mappings you use.
- Clean architecture and packages: LrcParser, LyricLine/LyricWord models, LyricsPlayer (timing/state), LyricsRenderer, AnimationController, LrclibClient, MediaDetector, ConfigManager, ConfigScreen, CommandRegistrar, Keybinds.
- Frame-rate-independent animations using delta time, no per-frame allocations in hot paths, caching of text widths.
- Robust error handling: broken or missing files, no internet, API errors or rate limits must never crash the game; show a friendly chat message instead.
- Do not hard-code any lyrics. Only load them from files or the API.
- Well-commented code with Javadoc on public classes.

=== OUTPUT FORMAT ===
- Output EVERY file completely, each under a heading with its full path. No placeholders, no "rest of the code here", no omitted files.
- Make sure the project compiles: consistent imports, valid fabric.mod.json, correct entrypoints.
- At the end, add a short guide: how to build (./gradlew build), where the .jar ends up, example .lrc file structure, and a list of all commands and default keybinds.</code></pre>
              </div>
            </details>
            </div>
          </div></div><!----></div></div></div><!----><div style="height:16px;width:100%;" data-v-84c5e9db></div></div><div class="message-block message-ai" data-v-17afe4ac data-v-84c5e9db><div class="ai-message" data-v-84c5e9db><div class="message-avatar ai-avatar" data-v-84c5e9db><img width="24" height="24" data-nuxt-img srcset="/_ipx/q_80&s_24x24/current_icon.png 1x, /_ipx/q_80&s_48x48/current_icon.png 2x" onerror="this.setAttribute('data-error', 1)" alt="Kodari AI" class="rounded-lg" src="/_ipx/q_80&s_24x24/current_icon.png" data-v-84c5e9db></div><div class="message-body" data-v-84c5e9db><div class="message-header" data-v-84c5e9db><span class="message-author" data-v-84c5e9db>Kodari</span><span class="message-time" data-v-84c5e9db>Today at 3:52 pm</span><span class="message-tokens" title="5 credits used" data-v-84c5e9db><span class="iconify i-mdi:chip" aria-hidden="true" style="font-size:10px;" data-v-84c5e9db></span> 5</span><!----></div><!----><div class="message-content" data-v-84c5e9db><!--[--><!--[--><div class="project-badge" data-v-84c5e9db><span class="iconify i-mdi:tag project-badge-icon" aria-hidden="true" style="font-size:14px;" data-v-84c5e9db></span><span data-v-84c5e9db>LyricsOverlay</span></div><!--]--><!--[--><div class="project-info-line" data-v-84c5e9db><span data-v-84c5e9db>Client-side Fabric mod for Minecraft 1.21.11 that displays synced song lyrics as a premium Spotify/Apple-Music-style HUD overlay. Features smooth easing animations with word-by-word karaoke highlighting, configurable themes (Spotify Green, Neon Purple, Rainbow), adjustable visible lines, and instrumental gap indicators. Loads lyrics from local LRC files or the LRCLIB API with caching, supports optional Windows media detection for auto-syncing to current track, and provides manual control via commands and keybinds. Includes full customization through a config screen with live preview.</span></div><!--]--><!--[--><div class="tools-summary" data-v-84c5e9db><button class="tools-toggle-btn" data-v-84c5e9db><span class="iconify i-mdi:tools tools-icon" aria-hidden="true" style="font-size:14px;" data-v-84c5e9db></span><span class="tools-text" data-v-84c5e9db>Used 2 tools</span><span class="iconify i-mdi:chevron-down tools-chevron" aria-hidden="true" style="font-size:16px;" data-v-84c5e9db></span></button><!----></div><!--]--><!--[--><div class="text-segment markdown-content" data-v-84c5e9db><div class="markstream-vue markdown-renderer dark" data-custom-id="kodari-chat" data-v-19a15cf8 data-v-84c5e9db><!----><!--[--><div class="node-slot" data-node-index="0" data-node-type="list" data-v-19a15cf8><div class="node-content" data-v-19a15cf8><ul class="list-node list-disc" is-dark="true" data-v-8f37f7cc data-v-19a15cf8><!--[--><li class="list-item" dir="auto" data-v-9b3024e6 data-v-8f37f7cc><div class="markstream-vue markdown-renderer" data-custom-id="kodari-chat" data-v-19a15cf8 data-v-9b3024e6><!----><!--[--><div class="node-slot" data-node-index="0" data-node-type="paragraph" data-v-19a15cf8><div class="node-content" data-v-19a15cf8><p dir="auto" class="paragraph-node" typewriter="false" fade="false" is-dark="false" data-v-a07f942f data-v-19a15cf8><!--[--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="list-item-markdown-renderer-0-0-0-0" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>Build the LRC parser, playback clock, asynchronous LRCLIB lookup and local cache.</span><!----></span><!--]--><!--]--></p></div></div><!--]--><!----><!----></div></li><li class="list-item" dir="auto" data-v-9b3024e6 data-v-8f37f7cc><div class="markstream-vue markdown-renderer" data-custom-id="kodari-chat" data-v-19a15cf8 data-v-9b3024e6><!----><!--[--><div class="node-slot" data-node-index="0" data-node-type="paragraph" data-v-19a15cf8><div class="node-content" data-v-19a15cf8><p dir="auto" class="paragraph-node" typewriter="false" fade="false" is-dark="false" data-v-a07f942f data-v-19a15cf8><!--[--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="list-item-markdown-renderer-0-1-0-0" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>Add the animated client HUD, commands, keybinds and persistent settings.</span><!----></span><!--]--><!--]--></p></div></div><!--]--><!----><!----></div></li><li class="list-item" dir="auto" data-v-9b3024e6 data-v-8f37f7cc><div class="markstream-vue markdown-renderer" data-custom-id="kodari-chat" data-v-19a15cf8 data-v-9b3024e6><!----><!--[--><div class="node-slot" data-node-index="0" data-node-type="paragraph" data-v-19a15cf8><div class="node-content" data-v-19a15cf8><p dir="auto" class="paragraph-node" typewriter="false" fade="false" is-dark="false" data-v-a07f942f data-v-19a15cf8><!--[--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="list-item-markdown-renderer-0-2-0-0" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>Keep media detection optional and fail-safe; use Yarn mappings.</span><!----></span><!--]--><!--]--></p></div></div><!--]--><!----><!----></div></li><!--]--></ul></div></div><!--]--><!----><!----></div></div><!--]--><!--[--><div class="tools-summary" data-v-84c5e9db><button class="tools-toggle-btn" data-v-84c5e9db><span class="iconify i-mdi:tools tools-icon" aria-hidden="true" style="font-size:14px;" data-v-84c5e9db></span><span class="tools-text" data-v-84c5e9db>Used 21 tools</span><span class="iconify i-mdi:chevron-down tools-chevron" aria-hidden="true" style="font-size:16px;" data-v-84c5e9db></span></button><!----></div><!--]--><!--[--><div class="text-segment markdown-content" data-v-84c5e9db><div class="markstream-vue markdown-renderer dark" data-custom-id="kodari-chat" data-v-19a15cf8 data-v-84c5e9db><!----><!--[--><div class="node-slot" data-node-index="0" data-node-type="paragraph" data-v-19a15cf8><div class="node-content" data-v-19a15cf8><p dir="auto" class="paragraph-node" typewriter="false" fade="false" is-dark="true" data-v-a07f942f data-v-19a15cf8><!--[--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-0-0" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>Created LyricsMod using </span><!----></span><!--]--><!--[--><strong class="strong-node" data-v-af3ce037 data-v-a07f942f><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-0-1-0" custom-id="kodari-chat" data-v-43f5105c data-v-af3ce037><span data-v-43f5105c>Yarn mappings</span><!----></span><!--]--></strong><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-0-2" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>. It loads local LRC files, searches LRCLIB asynchronously, caches results, and provides a lyrics HUD, playback controls, themes and settings.</span><!----></span><!--]--><!--]--></p></div></div><div class="node-slot" data-node-index="1" data-node-type="paragraph" data-v-19a15cf8><div class="node-content" data-v-19a15cf8><p dir="auto" class="paragraph-node" typewriter="false" fade="false" is-dark="true" data-v-a07f942f data-v-19a15cf8><!--[--><!--[--><strong class="strong-node" data-v-af3ce037 data-v-a07f942f><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-1-0-0" custom-id="kodari-chat" data-v-43f5105c data-v-af3ce037><span data-v-43f5105c>Current limitations:</span><!----></span><!--]--></strong><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-1-1" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c> Windows auto-detection reads Spotify window titles but cannot synchronize to the player’s actual position or detect pauses. The built-in audio player, drag-and-drop positioning, live preview, blur, glow, bounce and full overlay fade-out are not implemented. Settings use YACL; the download bundles YACL and ModMenu alongside the mod.</span><!----></span><!--]--><!--]--></p></div></div><div class="node-slot" data-node-index="2" data-node-type="heading" data-v-19a15cf8><div class="node-content" data-v-19a15cf8><h3 class="heading-node heading-3" dir="auto" typewriter="false" fade="false" is-dark="true" data-v-bf120de0 data-v-19a15cf8><!--[--><span class="whitespace-pre-wrap break-words text-node" custom-id="kodari-chat" index-key="markdown-renderer-2-0" data-v-43f5105c data-v-bf120de0><span data-v-43f5105c>Use</span><!----></span><!--]--></h3></div></div><div class="node-slot" data-node-index="3" data-node-type="paragraph" data-v-19a15cf8><div class="node-content" data-v-19a15cf8><p dir="auto" class="paragraph-node" typewriter="false" fade="false" is-dark="true" data-v-a07f942f data-v-19a15cf8><!--[--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-3-0" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>Place </span><!----></span><!--]--><!--[--><code class="inline-code" index-key="markdown-renderer-3-1" custom-id="kodari-chat" data-v-1348822e data-v-a07f942f><span data-v-1348822e>.lrc</span><!----></code><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-3-2" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c> files in </span><!----></span><!--]--><!--[--><code class="inline-code" index-key="markdown-renderer-3-3" custom-id="kodari-chat" data-v-1348822e data-v-a07f942f><span data-v-1348822e>config/lyricsmod/songs/</span><!----></code><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-3-4" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>, for example:</span><!----></span><!--]--><!--]--></p></div></div><div class="node-slot" data-node-index="4" data-node-type="code_block" data-v-19a15cf8><div class="node-content" data-v-19a15cf8><div style="color:var(--vscode-editor-foreground, var(--markstream-code-fallback-fg));background-color:var(--vscode-editor-background, var(--markstream-code-fallback-bg));border-color:var(--markstream-code-border-color);" class="code-block-container rounded-lg border dark is-dark" data-markstream-code-block="1" data-markstream-enhanced="false" index-key="markdown-renderer-4" data-v-b7ce948c data-v-19a15cf8><!--[--><div class="code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"><!--[--><!--[--><div class="code-header-main" data-v-b7ce948c><span class="icon-slot h-4 w-4 flex-shrink-0" data-v-b7ce948c><svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ff7043" d="M2 2a1 1 0 0 0-1 1v10c0 .554.446 1 1 1h12c.554 0 1-.446 1-1V3a1 1 0 0 0-1-1zm0 3h12v8H2zm1 2 2 2-2 2 1 1 3-3-3-3zm5 3.5V12h5v-1.5z"/></svg></span><div class="code-header-copy" data-v-b7ce948c><div class="code-header-title" data-v-b7ce948c>Lrc</div><!----></div></div><!--]--><!--]--><!--[--><div class="flex items-center gap-0.5"><!----><button type="button" class="code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors" aria-label="Copy"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="1em" height="1em" viewBox="0 0 24 24" class="action-icon"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></g></svg></button><button type="button" class="code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors" aria-pressed="false"><svg style="rotate:90deg;" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="1em" height="1em" viewBox="0 0 24 24" class="action-icon"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 18l6-6l-6-6"></path></svg></button><div class="relative"><button type="button" class="code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors" aria-expanded="false" aria-haspopup="true"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="1em" height="1em" viewBox="0 0 24 24" class="action-icon"><g fill="currentColor"><circle cx="12" cy="5" r="1.5"></circle><circle cx="12" cy="12" r="1.5"></circle><circle cx="12" cy="19" r="1.5"></circle></g></svg></button><!----></div></div><!--]--></div><div class="code-block-shell-content"><!--[--><div class="code-editor-layer" data-v-b7ce948c><div class="code-editor-container is-hidden" style="" data-v-b7ce948c></div><pre class="language-lrc code-pre-fallback is-wrap" aria-busy="false" aria-label="Code block: lrc" data-language="lrc" data-markstream-pre="1" tabindex="0" style="font-size:14px;line-height:19px;tab-size:4;box-sizing:border-box;max-height:500px;overflow:auto;padding-top:0px;padding-bottom:0px;" data-v-b7ce948c><code translate="no">[ar:Artist]
[ti:Song]
[length:3:30]
[00:05.00]First line
[00:10.00]<00:10.00>Timed <00:10.60>words
</code></pre></div><!----><!--]--></div><div class="code-loading-placeholder" style="display:none;"><!--[--><!--[--><div class="loading-skeleton" data-v-b7ce948c><div class="skeleton-line" data-v-b7ce948c></div><div class="skeleton-line" data-v-b7ce948c></div><div class="skeleton-line short" data-v-b7ce948c></div></div><!--]--><!--]--></div><span class="sr-only" aria-live="polite" role="status"></span><!--]--></div></div></div><div class="node-slot" data-node-index="5" data-node-type="paragraph" data-v-19a15cf8><div class="node-content" data-v-19a15cf8><p dir="auto" class="paragraph-node" typewriter="false" fade="false" is-dark="true" data-v-a07f942f data-v-19a15cf8><!--[--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-5-0" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>Commands: </span><!----></span><!--]--><!--[--><code class="inline-code" index-key="markdown-renderer-5-1" custom-id="kodari-chat" data-v-1348822e data-v-a07f942f><span data-v-1348822e>/lyrics play <file or Artist - Title></span><!----></code><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-5-2" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>, </span><!----></span><!--]--><!--[--><code class="inline-code" index-key="markdown-renderer-5-3" custom-id="kodari-chat" data-v-1348822e data-v-a07f942f><span data-v-1348822e>pause</span><!----></code><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-5-4" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>, </span><!----></span><!--]--><!--[--><code class="inline-code" index-key="markdown-renderer-5-5" custom-id="kodari-chat" data-v-1348822e data-v-a07f942f><span data-v-1348822e>resume</span><!----></code><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-5-6" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>, </span><!----></span><!--]--><!--[--><code class="inline-code" index-key="markdown-renderer-5-7" custom-id="kodari-chat" data-v-1348822e data-v-a07f942f><span data-v-1348822e>stop</span><!----></code><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-5-8" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>, </span><!----></span><!--]--><!--[--><code class="inline-code" index-key="markdown-renderer-5-9" custom-id="kodari-chat" data-v-1348822e data-v-a07f942f><span data-v-1348822e>seek <seconds></span><!----></code><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-5-10" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>, </span><!----></span><!--]--><!--[--><code class="inline-code" index-key="markdown-renderer-5-11" custom-id="kodari-chat" data-v-1348822e data-v-a07f942f><span data-v-1348822e>offset <ms></span><!----></code><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-5-12" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>, </span><!----></span><!--]--><!--[--><code class="inline-code" index-key="markdown-renderer-5-13" custom-id="kodari-chat" data-v-1348822e data-v-a07f942f><span data-v-1348822e>fetch <artist> <title></span><!----></code><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-5-14" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>, </span><!----></span><!--]--><!--[--><code class="inline-code" index-key="markdown-renderer-5-15" custom-id="kodari-chat" data-v-1348822e data-v-a07f942f><span data-v-1348822e>list</span><!----></code><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-5-16" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>, </span><!----></span><!--]--><!--[--><code class="inline-code" index-key="markdown-renderer-5-17" custom-id="kodari-chat" data-v-1348822e data-v-a07f942f><span data-v-1348822e>reload</span><!----></code><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-5-18" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>, </span><!----></span><!--]--><!--[--><code class="inline-code" index-key="markdown-renderer-5-19" custom-id="kodari-chat" data-v-1348822e data-v-a07f942f><span data-v-1348822e>toggle</span><!----></code><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-5-20" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>, and </span><!----></span><!--]--><!--[--><code class="inline-code" index-key="markdown-renderer-5-21" custom-id="kodari-chat" data-v-1348822e data-v-a07f942f><span data-v-1348822e>auto <on|off></span><!----></code><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-5-22" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>. Quote an artist containing spaces in </span><!----></span><!--]--><!--[--><code class="inline-code" index-key="markdown-renderer-5-23" custom-id="kodari-chat" data-v-1348822e data-v-a07f942f><span data-v-1348822e>/lyrics fetch</span><!----></code><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-5-24" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>.</span><!----></span><!--]--><!--]--></p></div></div><div class="node-slot" data-node-index="6" data-node-type="paragraph" data-v-19a15cf8><div class="node-content" data-v-19a15cf8><p dir="auto" class="paragraph-node" typewriter="false" fade="false" is-dark="true" data-v-a07f942f data-v-19a15cf8><!--[--><!--[--><strong class="strong-node" data-v-af3ce037 data-v-a07f942f><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-6-0-0" custom-id="kodari-chat" data-v-43f5105c data-v-af3ce037><span data-v-43f5105c>L</span><!----></span><!--]--></strong><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-6-1" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c> toggles the overlay. Pause, offset adjustment and settings keys are unbound by default; assign them in Controls.</span><!----></span><!--]--><!--]--></p></div></div><div class="node-slot" data-node-index="7" data-node-type="heading" data-v-19a15cf8><div class="node-content" data-v-19a15cf8><h3 class="heading-node heading-3" dir="auto" typewriter="false" fade="false" is-dark="true" data-v-bf120de0 data-v-19a15cf8><!--[--><span class="whitespace-pre-wrap break-words text-node" custom-id="kodari-chat" index-key="markdown-renderer-7-0" data-v-43f5105c data-v-bf120de0><span data-v-43f5105c>Build</span><!----></span><!--]--></h3></div></div><div class="node-slot" data-node-index="8" data-node-type="paragraph" data-v-19a15cf8><div class="node-content" data-v-19a15cf8><p dir="auto" class="paragraph-node" typewriter="false" fade="false" is-dark="true" data-v-a07f942f data-v-19a15cf8><!--[--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-8-0" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>Click </span><!----></span><!--]--><!--[--><strong class="strong-node" data-v-af3ce037 data-v-a07f942f><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-8-1-0" custom-id="kodari-chat" data-v-43f5105c data-v-af3ce037><span data-v-43f5105c>Compile</span><!----></span><!--]--></strong><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-8-2" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c> in the top bar, then </span><!----></span><!--]--><!--[--><strong class="strong-node" data-v-af3ce037 data-v-a07f942f><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-8-3-0" custom-id="kodari-chat" data-v-43f5105c data-v-af3ce037><span data-v-43f5105c>Compile</span><!----></span><!--]--></strong><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-8-4" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c> in the window. Once it succeeds, click </span><!----></span><!--]--><!--[--><strong class="strong-node" data-v-af3ce037 data-v-a07f942f><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-8-5-0" custom-id="kodari-chat" data-v-43f5105c data-v-af3ce037><span data-v-43f5105c>Download</span><!----></span><!--]--></strong><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-8-6" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>. On mobile, use </span><!----></span><!--]--><!--[--><strong class="strong-node" data-v-af3ce037 data-v-a07f942f><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-8-7-0" custom-id="kodari-chat" data-v-43f5105c data-v-af3ce037><span data-v-43f5105c>⋮ → Compile Project</span><!----></span><!--]--></strong><!--]--><!--[--><span class="whitespace-pre-wrap break-words text-node" index-key="markdown-renderer-8-8" custom-id="kodari-chat" data-v-43f5105c data-v-a07f942f><span data-v-43f5105c>.</span><!----></span><!--]--><!--]--></p></div></div><!--]--><!----><!----></div></div><!--]--><!--]--></div><!----><!----><!----><!----></div></div><!----><!----></div><!--]--></div><!----><!----><div class="chat-disclaimer" data-v-17afe4ac><span class="iconify i-mdi:information-outline" aria-hidden="true" style="font-size:14px;" data-v-17afe4ac></span><span data-v-17afe4ac>Kodari can make mistakes. Review important code before using.</span></div></div></div><!----><div class="composer-dock" data-v-17afe4ac><!----><!----><div class="input-container-wrapper" data-v-17afe4ac><!----><!----><!----><!----><div name="queued" class="queued-list" data-v-17afe4ac></div><div class="input-container" data-v-17afe4ac><!----><input type="file" multiple class="hidden" data-v-17afe4ac><textarea placeholder="View-only session. To work on a session of your own, open it from /history." disabled class="chat-textarea" data-v-17afe4ac></textarea><!--[--><!----><!--teleport start--><!--teleport end--><!--]--><div class="input-actions-bar" data-v-17afe4ac><div class="input-actions-left" data-v-17afe4ac><button disabled class="input-action-btn" title="Add pictures, files or archives" data-v-17afe4ac><span class="iconify i-mdi:plus" aria-hidden="true" style="font-size:18px;" data-v-17afe4ac></span></button><!----></div><div class="input-actions-right" data-v-17afe4ac><button disabled class="voice-mode-btn" title="Voice is available in your own sessions" data-v-17afe4ac><span class="iconify i-mdi:pulse" aria-hidden="true" style="font-size:18px;" data-v-17afe4ac></span></button><!----><button disabled class="input-send-btn" title="Send" data-v-17afe4ac><span class="iconify i-mdi:arrow-up" aria-hidden="true" style="font-size:18px;" data-v-17afe4ac></span></button></div></div></div></div></div><!--teleport start--><!--teleport end--></div></div><!----><div class="workspace-card" style="order:1;" data-v-0bc084c4><div class="files-section" style="width:280px;" data-v-0bc084c4><div class="resize-handle-left" data-v-0bc084c4><div class="resize-grip" data-v-0bc084c4></div></div><div class="section-header" data-v-0bc084c4><div class="section-title" data-v-0bc084c4><span class="iconify i-mdi:folder-outline" aria-hidden="true" style="font-size:16px;" data-v-0bc084c4></span><span data-v-0bc084c4>Files</span></div><div class="section-actions" data-v-0bc084c4><button class="action-btn" title="Export" data-v-0bc084c4><span class="iconify i-mdi:download" aria-hidden="true" style="font-size:16px;" data-v-0bc084c4></span></button><button class="action-btn action-btn-clone" title="Clone" data-v-0bc084c4><span class="iconify i-mdi:source-branch" aria-hidden="true" style="font-size:16px;" data-v-0bc084c4></span></button><button class="action-btn" data-v-0bc084c4><span class="iconify i-mdi:chevron-left" aria-hidden="true" style="font-size:16px;" data-v-0bc084c4></span></button><!----></div></div><div class="section-body" data-v-0bc084c4><div class="file-tree" read-only="true" data-v-0bc084c4 data-v-1d46cba4><input type="file" multiple class="hidden" data-v-1d46cba4><!----><div class="file-tree-content" data-v-1d46cba4><!--[--><!--[--><div class="is-folder tree-node" style="padding-left:8px;" draggable="true" data-v-1d46cba4><span class="iconify i-mdi:chevron-right folder-chevron" aria-hidden="true" style="font-size:16px;" data-v-1d46cba4></span><span class="iconify i-mdi:folder-open node-icon folder-icon-color" aria-hidden="true" style="font-size:16px;" title data-v-1d46cba4></span><span class="node-name-container" data-v-1d46cba4><span class="node-name" data-v-1d46cba4>src</span><!----></span><!----><!----></div><!--]--><!--[--><div class="tree-node" style="padding-left:8px;" draggable="true" data-v-1d46cba4><!----><span class="iconify i-mdi:elephant node-icon" aria-hidden="true" style="font-size:16px;" title data-v-1d46cba4></span><span class="node-name-container" data-v-1d46cba4><span class="node-name" data-v-1d46cba4>build.gradle</span><!----></span><!----><!----></div><!--]--><!--[--><div class="tree-node" style="padding-left:8px;" draggable="true" data-v-1d46cba4><!----><span class="iconify i-mdi:file-settings-outline node-icon" aria-hidden="true" style="font-size:16px;" title data-v-1d46cba4></span><span class="node-name-container" data-v-1d46cba4><span class="node-name" data-v-1d46cba4>gradle.properties</span><!----></span><!----><!----></div><!--]--><!--[--><div class="tree-node" style="padding-left:8px;" draggable="true" data-v-1d46cba4><!----><span class="iconify i-mdi:file-outline node-icon" aria-hidden="true" style="font-size:16px;" title data-v-1d46cba4></span><span class="node-name-container" data-v-1d46cba4><span class="node-name" data-v-1d46cba4>manifest.kod</span><!----></span><!----><!----></div><!--]--><!--[--><div class="tree-node" style="padding-left:8px;" draggable="true" data-v-1d46cba4><!----><span class="iconify i-mdi:elephant node-icon" aria-hidden="true" style="font-size:16px;" title data-v-1d46cba4></span><span class="node-name-container" data-v-1d46cba4><span class="node-name" data-v-1d46cba4>settings.gradle</span><!----></span><!----><!----></div><!--]--><!--]--><!--[--><!--]--></div><!--teleport start--><!--teleport end--><!--teleport start--><!--teleport end--><!--teleport start--><!--teleport end--></div></div></div><div class="editor-section" data-v-0bc084c4><!----><div class="section-header" data-v-0bc084c4><div class="section-title" data-v-0bc084c4><span class="iconify i-mdi:code-braces" aria-hidden="true" style="font-size:16px;" data-v-0bc084c4></span><span data-v-0bc084c4>Code</span></div><div class="section-stats" data-v-0bc084c4><span class="stat-chip" data-v-0bc084c4><span class="iconify i-mdi:file-multiple" aria-hidden="true" style="font-size:12px;" data-v-0bc084c4></span> 21</span><span class="stat-chip" data-v-0bc084c4><span class="iconify i-mdi:code-braces" aria-hidden="true" style="font-size:12px;" data-v-0bc084c4></span> 579</span></div><!----></div><div class="section-body" data-v-0bc084c4><!--[--><div class="ssr-code" data-v-0bc084c4><div class="ssr-code-file" data-v-0bc084c4>src/client/java/com/lyricsmod/LyricsMod.java</div><pre class="ssr-code-body" data-v-0bc084c4><code data-v-0bc084c4>package com.lyricsmod;

import java.nio.file.Files;
import java.nio.file.Path;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicLong;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.rendering.v1.hud.HudElementRegistry;
import net.minecraft.client.MinecraftClient;
import net.minecraft.text.Text;
import net.minecraft.util.Identifier;

/** Client entrypoint and asynchronous song loading. */
public final class LyricsMod implements ClientModInitializer {
    public static final LyricsPlayer PLAYER = new LyricsPlayer();
    private static final AtomicLong REQUEST = new AtomicLong();
    @Override public void onInitializeClient() {
        ConfigManager.load();
        LyricsRenderer renderer = new LyricsRenderer();
        HudElementRegistry.addLast(Identifier.of("lyricsmod", "lyrics"), (context, tickCounter) -> renderer.render(context));
        CommandRegistrar.register();
        Keybinds.register();
    }
    public static void message(String text) {
        MinecraftClient client = MinecraftClient.getInstance();
        client.execute(() -> { if (client.player != null) client.player.sendMessage(Text.literal("[Lyrics] " + text), false); });
    }
    public static void action(String text) {
        MinecraftClient client = MinecraftClient.getInstance();
        if (client.player != null) client.player.sendMessage(Text.literal("[Lyrics] " + text), true);
    }
    public static void stop() { REQUEST.incrementAndGet(); PLAYER.stop(); }
    private static void load(CompletableFuture<LyricSong> future) {
        long request = REQUEST.incrementAndGet();
        future.whenComplete((song, failure) -> MinecraftClient.getInstance().execute(() -> {
            if (request != REQUEST.get()) return;
            if (failure != null) {
                Throwable cause = failure.getCause() == null ? failure : failure.getCause();
                message("Could not load lyrics: " + cause.getMessage());
            } else if (song.lines().isEmpty()) message("No lyrics found in this file.");
            else { PLAYER.play(song); message("Loaded " + song.title() + (song.synced() ? "" : " (unsynced)")); }
        }));
    }
    public static void fetch(String artist, String title) { message("Searching LRCLIB..."); load(LrclibClient.fetch(artist, title)); }
    public static void play(String name) {
        load(CompletableFuture.supplyAsync(() -> {
            try {
                Path root = ConfigManager.ROOT.resolve("songs").toAbsolutePath().normalize();
                Path file = root.resolve(name.endsWith(".lrc") ? name : name + ".lrc").normalize();
                if (!file.startsWith(root)) throw new IllegalArgumentException("Invalid file name");
                if (Files.isRegularFile(file)) return LrcParser.parse(Files.readString(file), name);
                int split = name.indexOf(" - ");
                if (split < 1 || split + 3 >= name.length()) throw new IllegalArgumentException("File not found; use a filename or Artist - Title");
                return LrclibClient.fetch(name.substring(0, split), name.substring(split + 3)).join();
            } catch (Exception e) { throw new IllegalStateException(e.getMessage(), e); }
        }));
    }
}</code></pre></div><!--]--></div></div></div></div></div><span data-v-0bc084c4></span></div><!--]--></main><footer class="relative z-10 px-6 pt-4 mt-auto" style="display:none;" data-v-e8a5f52a><div class="max-w-6xl mx-auto" data-v-e8a5f52a><div class="ft-top" data-v-e8a5f52a><div class="ft-brand" data-v-e8a5f52a><a href="/prompt" class="ft-brand-mark" data-v-e8a5f52a><img src="/current_icon_no_bg.webp" alt class="ft-brand-icon" width="18" height="18" data-v-e8a5f52a><span class="ft-brand-name" data-v-e8a5f52a>Kodari</span></a><p class="ft-tagline" data-v-e8a5f52a>Build Minecraft plugins,<br data-v-e8a5f52a>mods and Discord bots with AI.</p></div><div class="ft-cols" data-v-e8a5f52a><div class="ft-col" data-v-e8a5f52a><span class="ft-heading" data-v-e8a5f52a>Build</span><a href="/minecraft-plugin-generator" class="ft-link" data-v-e8a5f52a>Plugin Maker</a><a href="/minecraft-mod-generator" class="ft-link" data-v-e8a5f52a>Mod Generator</a><a href="/minecraft-skript-generator" class="ft-link" data-v-e8a5f52a>Skript Generator</a><a href="/minecraft-datapack-generator" class="ft-link" data-v-e8a5f52a>Data Pack Generator</a><a href="/chrome-extension-generator" class="ft-link" data-v-e8a5f52a>Chrome Extensions</a></div><div class="ft-col" data-v-e8a5f52a><span class="ft-heading" data-v-e8a5f52a>Discord</span><a href="/discord-bot-generator" class="ft-link" data-v-e8a5f52a>Discord Bot Maker</a><a href="/discord-bot-hosting" class="ft-link" data-v-e8a5f52a>Discord Bot Hosting</a><a href="/discord-py-bot-generator" class="ft-link" data-v-e8a5f52a>discord.py Bot Maker</a><a href="/discord-js-bot-generator" class="ft-link" data-v-e8a5f52a>discord.js Bot Maker</a><a href="/discord-ts-bot-generator" class="ft-link" data-v-e8a5f52a>TypeScript Bot Maker</a></div><div class="ft-col" data-v-e8a5f52a><span class="ft-heading" data-v-e8a5f52a>Learn</span><a href="/blogs" class="ft-link" data-v-e8a5f52a>Guides</a><a href="/documentation" class="ft-link" data-v-e8a5f52a>Docs</a><a href="/browse" class="ft-link" data-v-e8a5f52a>Community</a><a href="/credits" class="ft-link" data-v-e8a5f52a>Pricing</a></div><div class="ft-col" data-v-e8a5f52a><span class="ft-heading" data-v-e8a5f52a>Company</span><a href="https://discord.gg/KNeg4D3ze5" target="_blank" rel="noopener" class="ft-link" data-v-e8a5f52a>Discord</a><a href="/terms" class="ft-link" data-v-e8a5f52a>Terms</a><a href="/privacy" class="ft-link" data-v-e8a5f52a>Privacy</a><button class="ft-link ft-link-btn" data-v-e8a5f52a>Cookies</button></div></div></div><nav class="ft-platforms" aria-label="Plugin platforms" data-v-e8a5f52a><span class="ft-platforms-label" data-v-e8a5f52a>Plugins for</span><!--[--><a href="/paper-plugin-generator" class="ft-link ft-platform" data-v-e8a5f52a>Paper</a><a href="/spigot-plugin-generator" class="ft-link ft-platform" data-v-e8a5f52a>Spigot</a><a href="/folia-plugin-generator" class="ft-link ft-platform" data-v-e8a5f52a>Folia</a><a href="/velocity-plugin-generator" class="ft-link ft-platform" data-v-e8a5f52a>Velocity</a><a href="/kotlin-plugin-generator" class="ft-link ft-platform" data-v-e8a5f52a>Kotlin</a><a href="/nms-plugin-generator" class="ft-link ft-platform" data-v-e8a5f52a>NMS</a><!--]--></nav><div class="ft-bottom" data-v-e8a5f52a><p class="text-white/20 text-[12px]" data-v-e8a5f52a>© 2026 Kodari AI • Not affiliated with Mojang, Microsoft, or Discord</p></div></div></footer><div class="fixed top-20 right-6 z-50 space-y-3 toast-container-override" data-v-e8a5f52a><!--[--><!--]--></div></div><span></span><!--]--></div><div id="teleports"></div><script nonce="y+zJeYhV9Uj/Vnf2lsIlVjQz">window.__NUXT__={};window.__NUXT__.config={public:{isDevelopment:false,isMaintenance:false,apiBaseUrlDev:"http://localhost:8080",apiBaseUrlProd:"https://api.kodari.ai",oauthRedirectDev:"https://kodari.ai/oauth2/redirect",oauthRedirectProd:"https://kodari.ai/oauth2/redirect",discordInviteUrl:"https://discord.gg/KNeg4D3ze5",baseUrl:"https://api.kodari.ai",oauthRedirect:"https://kodari.ai/oauth2/redirect",googleAuthUrl:"https://api.kodari.ai/oauth2/authorization/google",facebookAuthUrl:"https://api.kodari.ai/oauth2/authorization/facebook",discordAuthUrl:"https://api.kodari.ai/oauth2/authorization/discord",githubAuthUrl:"https://api.kodari.ai/oauth2/authorization/github",csurf:{headerName:"csrf-token"},"nuxt-seo-utils-version":"8.3.1","seo-utils":{canonicalQueryWhitelist:["page","sort","filter","search","q","category","tag"],canonicalLowercase:true,tagPriority:"low",separator:"",titleSeparator:""},"nuxt-robots":{version:"6.1.2",isNuxtContentV2:false,debug:false,credits:true,groups:[{comment:[],disallow:["/admin","/chat/","/history","/settings","/api-keys","/tokens","/rewards"],allow:["/"],userAgent:["*"],contentUsage:[],contentSignal:[],_indexable:true,_rules:[{pattern:"/admin",allow:false},{pattern:"/chat/",allow:false},{pattern:"/history",allow:false},{pattern:"/settings",allow:false},{pattern:"/api-keys",allow:false},{pattern:"/tokens",allow:false},{pattern:"/rewards",allow:false},{pattern:"/",allow:true}],_normalized:true}],sitemap:["https://kodari.ai/sitemap.xml","/sitemap_index.xml"],header:true,robotsEnabledValue:"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",robotsDisabledValue:"noindex, nofollow",cacheControl:"max-age=14400, must-revalidate",botDetection:true,pageMetaRobots:{}},"nuxt-og-image":{defaults:{emojis:"noto",extension:"png",width:1200,height:600,cacheMaxAgeSeconds:604800},hasServerRuntime:true}},app:{baseURL:"/",buildId:"d7be0fb5-990a-42b3-a88d-8253dfd17b3a",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script nonce="y+zJeYhV9Uj/Vnf2lsIlVjQz" data-hid="kdr-chat-bottom">document.querySelectorAll(".chat-messages").forEach(function(l){l.scrollTop=l.scrollHeight})</script><script nonce="y+zJeYhV9Uj/Vnf2lsIlVjQz" type="application/ld+json" data-nuxt-schema-org="true" data-hid="schema-org-graph">{"@context":"https://schema.org","@graph":[{"@id":"https://kodari.ai/#website","@type":"WebSite","description":"Create Minecraft plugins, Fabric mods, and Discord bots in minutes using AI. No coding required. Automatic compilation, error fixing, and deployment.","inLanguage":"en","name":"Kodari AI","url":"https://kodari.ai/","publisher":{"@id":"https://kodari.ai/#identity"}},{"@id":"https://kodari.ai/public/9627669d-7c04-4788-994b-fde3e3440788#webpage","@type":"WebPage","description":"Create Minecraft plugins, Fabric mods, and Discord bots in minutes using AI. No coding required. Automatic compilation, error fixing, and deployment.","name":"Lyrics Overlay: Fabric Mod (1.21.11) Source Code","url":"https://kodari.ai/public/9627669d-7c04-4788-994b-fde3e3440788","about":{"@id":"https://kodari.ai/#identity"},"isPartOf":{"@id":"https://kodari.ai/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://kodari.ai/public/9627669d-7c04-4788-994b-fde3e3440788"]}]},{"@id":"https://kodari.ai/#identity","@type":"Organization","name":"Kodari AI","url":"https://kodari.ai"}]}</script><script nonce="y+zJeYhV9Uj/Vnf2lsIlVjQz" type="application/json" data-nuxt-data="nuxt-app" data-ssr="true" id="__NUXT_DATA__">[["ShallowReactive",1],{"data":2,"state":197,"once":213,"_errors":214,"serverRendered":156,"path":216},["ShallowReactive",3],{"auth-user":4,"public-session-ssr-9627669d-7c04-4788-994b-fde3e3440788":5,"public-client-9627669d-7c04-4788-994b-fde3e3440788":174},null,{"files":6,"session":140},{"src/client/java/com/lyricsmod/LyricsRenderer.java":7,"settings.gradle":16,"src/main/resources/assets/lyricsmod/lang/en_us.json":23,"src/client/java/com/lyricsmod/LyricsPlayer.java":30,"src/client/java/com/lyricsmod/ConfigScreen.java":36,"src/client/java/com/lyricsmod/ConfigManager.java":42,"manifest.kod":48,"src/client/java/com/lyricsmod/Keybinds.java":55,"gradle.properties":61,"src/client/java/com/lyricsmod/LyricWord.java":68,"src/client/java/com/lyricsmod/LyricSong.java":74,"src/client/java/com/lyricsmod/LrclibClient.java":80,"src/client/java/com/lyricsmod/LrcParser.java":86,"src/client/java/com/lyricsmod/AnimationController.java":92,"src/client/java/com/lyricsmod/MediaDetector.java":98,"build.gradle":104,"src/client/java/com/lyricsmod/CommandRegistrar.java":110,"src/main/resources/fabric.mod.json":116,"src/client/java/com/lyricsmod/ModMenuIntegration.java":122,"src/client/java/com/lyricsmod/LyricsMod.java":128,"src/client/java/com/lyricsmod/LyricLine.java":134},{"id":8,"sessionId":9,"filePath":10,"content":11,"fileType":12,"fileSize":13,"version":14,"createdAt":15,"updatedAt":15},6289380,"KDR-202611-64JFANMS","src/client/java/com/lyricsmod/LyricsRenderer.java","package com.lyricsmod;\n\nimport java.util.HashMap;\nimport java.util.Map;\nimport net.minecraft.client.MinecraftClient;\nimport net.minecraft.client.font.TextRenderer;\nimport net.minecraft.client.gui.DrawContext;\n\n/** Draws the lyric HUD using Fabric's HUD element API. */\npublic final class LyricsRenderer {\n    private final AnimationController animation = new AnimationController();\n    private final Map<String, Integer> widths = new HashMap<>();\n    private LyricSong cached;\n    private int width(TextRenderer renderer, String text) { return widths.computeIfAbsent(text, renderer::getWidth); }\n    private static int color(int rgb, float alpha) { return (Math.clamp((int)(alpha * 255), 0, 255) << 24) | (rgb & 0xffffff); }\n    public void render(DrawContext ctx) {\n        MinecraftClient client = MinecraftClient.getInstance();\n        ConfigManager c = ConfigManager.instance;\n        LyricsPlayer p = LyricsMod.PLAYER;\n        LyricSong song = p.song();\n        int index = p.activeIndex();\n        animation.update(c.enabled && song != null, Math.max(0, index), c.animationSpeed);\n        if (song == null || animation.alpha < .01f) return;\n        if (song != cached) { widths.clear(); cached = song; animation.line = Math.max(0, index); }\n        TextRenderer font = client.textRenderer;\n        int sw = client.getWindow().getScaledWidth(), sh = client.getWindow().getScaledHeight();\n        float scale = c.scale;\n        int cx = (int)(sw / (2 * scale));\n        int cy = (int)((c.position == ConfigManager.Position.TOP ? sh * .22f : c.position == ConfigManager.Position.BOTTOM ? sh * .72f : sh * .5f) / scale);\n        int half = c.visibleLines / 2;\n        int panelWidth = Math.min((int)(sw / scale) - 20, 300);\n        float opacity = c.opacity * animation.alpha;\n        int rgb = switch (c.theme) {\n            case SPOTIFY_GREEN -> 0x1ed760;\n            case APPLE_GLASS -> 0xff527d;\n            case NEON_PURPLE -> 0xbe69ff;\n            case MINIMAL_WHITE -> 0xffffff;\n            case CUSTOM -> c.customColor;\n            case RAINBOW -> java.awt.Color.HSBtoRGB((System.nanoTime() / 8_000_000_000f) % 1f, .7f, 1f);\n        };\n        ctx.getMatrices().pushMatrix();\n        ctx.getMatrices().scale(scale, scale);\n        int top = cy - half * c.spacing - 25;\n        int bottom = cy + (c.visibleLines - half - 1) * c.spacing + 27;\n        if (c.panel) ctx.fill(cx-panelWidth/2-10, top-6, cx+panelWidth/2+10, bottom+7, color(0x101218, opacity*.65f));\n        String header = song.artist().isBlank() ? song.title() : song.artist() + \"  •  \" + song.title();\n        ctx.drawText(font, header, cx - width(font, header)/2, top, color(0xffffff, opacity*.75f), c.shadow);\n        ctx.enableScissor(cx-panelWidth/2, top+12, cx+panelWidth/2, bottom-13);\n        int start = Math.max(0, (int)Math.floor(animation.line) - half - 1);\n        int end = Math.min(song.lines().size(), (int)Math.ceil(animation.line) + half + 2);\n        for (int i = start; i < end; i++) {\n            LyricLine line = song.lines().get(i);\n            int y = cy + Math.round((i-animation.line)*c.spacing);\n            int textWidth = width(font, line.text());\n            int x = switch (c.alignment) { case LEFT -> cx-panelWidth/2; case RIGHT -> cx+panelWidth/2-textWidth; case CENTER -> cx-textWidth/2; };\n            float fade = i == index ? 1 : Math.max(.18f, .55f - .12f * Math.abs(i-index));\n            ctx.drawText(font, line.text(), x, y, color(0xffffff, opacity*fade), c.shadow);\n            if (i == index && song.synced()) {\n                long now = p.lyricTime();\n                long next = i+1 < song.lines().size() ? song.lines().get(i+1).timeMs() : song.durationMs() > line.timeMs() ? song.durationMs() : line.timeMs()+5000;\n                float progress = Math.clamp((now-line.timeMs())/(float)Math.max(1,next-line.timeMs()), 0f, 1f);\n                int filled = Math.round(textWidth * progress);\n                if (!line.words().isEmpty()) {\n                    int pixels = 0;\n                    for (int j=0; j<line.words().size(); j++) {\n                        LyricWord word = line.words().get(j);\n                        long wordEnd = j+1 < line.words().size() ? line.words().get(j+1).timeMs() : next;\n                        float part = Math.clamp((now-word.timeMs())/(float)Math.max(1,wordEnd-word.timeMs()), 0f, 1f);\n                        pixels += Math.round(width(font, word.text())*part);\n                    }\n                    filled = Math.min(textWidth, pixels);\n                }\n                if (filled > 0) { ctx.enableScissor(x, y, x+filled, y+font.fontHeight); ctx.drawText(font, line.text(), x, y, color(rgb, opacity), c.shadow); ctx.disableScissor(); }\n            }\n        }\n        ctx.disableScissor();\n        if (index >= 0 && index+1 < song.lines().size() && song.synced()) {\n            long gap = song.lines().get(index+1).timeMs() - song.lines().get(index).timeMs();\n            if (gap > 5000 && p.lyricTime() > song.lines().get(index).timeMs()+2500) {\n                String dots = switch ((int)(p.position()/500%3)) { case 0 -> \"•\"; case 1 -> \"• •\"; default -> \"• • •\"; };\n                ctx.drawText(font, dots, cx-width(font,dots)/2, cy+c.spacing, color(rgb, opacity), c.shadow);\n            }\n        }\n        int barY = bottom-5;\n        ctx.fill(cx-panelWidth/2, barY, cx+panelWidth/2, barY+2, color(0xffffff, opacity*.2f));\n        if (song.durationMs() > 0) ctx.fill(cx-panelWidth/2, barY, cx-panelWidth/2+(int)(panelWidth*Math.clamp(p.position()/(float)song.durationMs(),0f,1f)), barY+2, color(rgb, opacity));\n        String time = format(p.position()) + \" / \" + (song.durationMs() > 0 ? format(song.durationMs()) : \"--:--\");\n        ctx.drawText(font, time, cx-width(font,time)/2, barY+5, color(0xffffff, opacity*.65f), c.shadow);\n        ctx.getMatrices().popMatrix();\n    }\n    private static String format(long ms) { long s = ms/1000; return (s/60) + \":\" + (s%60 < 10 ? \"0\" : \"\") + s%60; }\n}","java",5979,1,"2026-11-22T15:52:12.586537",{"id":17,"sessionId":9,"filePath":18,"content":19,"fileType":20,"fileSize":21,"version":14,"createdAt":22,"updatedAt":22},6289368,"settings.gradle","pluginManagement {\n    repositories {\n        maven { url = 'https://maven.fabricmc.net/' }\n        gradlePluginPortal()\n        mavenCentral()\n    }\n}\nrootProject.name = 'LyricsMod'","gradle",182,"2026-11-22T15:52:12.585174",{"id":24,"sessionId":9,"filePath":25,"content":26,"fileType":27,"fileSize":28,"version":14,"createdAt":29,"updatedAt":29},6289369,"src/main/resources/assets/lyricsmod/lang/en_us.json","{\n  \"key.categories.lyricsmod.controls\": \"LyricsMod\",\n  \"key.lyricsmod.toggle\": \"Toggle lyrics\",\n  \"key.lyricsmod.pause\": \"Pause or resume lyrics\",\n  \"key.lyricsmod.offset_down\": \"Lyrics offset -250 ms\",\n  \"key.lyricsmod.offset_up\": \"Lyrics offset +250 ms\",\n  \"key.lyricsmod.settings\": \"Lyrics settings\"\n}","json",305,"2026-11-22T15:52:12.585064",{"id":31,"sessionId":9,"filePath":32,"content":33,"fileType":12,"fileSize":34,"version":14,"createdAt":35,"updatedAt":35},6289370,"src/client/java/com/lyricsmod/LyricsPlayer.java","package com.lyricsmod;\n\n/** Monotonic playback clock; it does not play or control audio. */\npublic final class LyricsPlayer {\n    private LyricSong song;\n    private long positionMs, startedNanos;\n    private boolean paused = true;\n    public long adjustmentMs;\n    public LyricSong song() { return song; }\n    public boolean paused() { return paused; }\n    public void play(LyricSong value) { song = value; positionMs = 0; startedNanos = System.nanoTime(); paused = false; }\n    public void stop() { song = null; positionMs = 0; paused = true; }\n    public long position() { return Math.max(0, positionMs + (paused ? 0 : (System.nanoTime() - startedNanos) / 1_000_000)); }\n    public long lyricTime() { return position() - (song == null ? 0 : song.offsetMs()) + adjustmentMs; }\n    public void pause() { if (!paused) { positionMs = position(); paused = true; } }\n    public void resume() { if (song != null && paused) { startedNanos = System.nanoTime(); paused = false; } }\n    public void seek(long ms) { positionMs = Math.max(0, ms); startedNanos = System.nanoTime(); }\n    public int activeIndex() {\n        if (song == null || song.lines().isEmpty()) return -1;\n        if (!song.synced()) return Math.min(song.lines().size()-1, (int)(position()/5000));\n        int lo = 0, hi = song.lines().size(); long now = lyricTime();\n        while (lo < hi) { int mid = (lo + hi) >>> 1; if (song.lines().get(mid).timeMs() <= now) lo = mid + 1; else hi = mid; }\n        return lo - 1;\n    }\n}",1486,"2026-11-22T15:52:12.585441",{"id":37,"sessionId":9,"filePath":38,"content":39,"fileType":12,"fileSize":40,"version":14,"createdAt":41,"updatedAt":41},6289374,"src/client/java/com/lyricsmod/ConfigScreen.java","package com.lyricsmod;\n\nimport dev.isxander.yacl3.api.ConfigCategory;\nimport dev.isxander.yacl3.api.Option;\nimport dev.isxander.yacl3.api.YetAnotherConfigLib;\nimport dev.isxander.yacl3.api.controller.*;\nimport java.awt.Color;\nimport net.minecraft.client.gui.screen.Screen;\nimport net.minecraft.text.Text;\n\n/** YACL settings page. */\npublic final class ConfigScreen {\n    public static Screen create(Screen parent) {\n        ConfigManager c = ConfigManager.instance;\n        return YetAnotherConfigLib.createBuilder().title(Text.literal(\"LyricsMod Settings\")).save(ConfigManager::save)\n            .category(ConfigCategory.createBuilder().name(Text.literal(\"Overlay\"))\n                .option(Option.<Boolean>createBuilder().name(Text.literal(\"Enabled\")).binding(true, () -> c.enabled, v -> c.enabled=v).controller(TickBoxControllerBuilder::create).build())\n                .option(Option.<ConfigManager.Theme>createBuilder().name(Text.literal(\"Theme\")).binding(ConfigManager.Theme.SPOTIFY_GREEN, () -> c.theme, v -> c.theme=v).controller(o -> EnumControllerBuilder.create(o).enumClass(ConfigManager.Theme.class)).build())\n                .option(Option.<Color>createBuilder().name(Text.literal(\"Custom color\")).binding(new Color(0x1ed760), () -> new Color(c.customColor), v -> c.customColor=v.getRGB()).controller(ColorControllerBuilder::create).build())\n                .option(Option.<ConfigManager.Position>createBuilder().name(Text.literal(\"Position\")).binding(ConfigManager.Position.CENTER, () -> c.position, v -> c.position=v).controller(o -> EnumControllerBuilder.create(o).enumClass(ConfigManager.Position.class)).build())\n                .option(Option.<ConfigManager.Alignment>createBuilder().name(Text.literal(\"Alignment\")).binding(ConfigManager.Alignment.CENTER, () -> c.alignment, v -> c.alignment=v).controller(o -> EnumControllerBuilder.create(o).enumClass(ConfigManager.Alignment.class)).build())\n                .option(Option.<Integer>createBuilder().name(Text.literal(\"Visible lines\")).binding(5, () -> c.visibleLines, v -> c.visibleLines=v).controller(o -> IntegerSliderControllerBuilder.create(o).range(1,7).step(1)).build())\n                .option(Option.<Integer>createBuilder().name(Text.literal(\"Line spacing\")).binding(16, () -> c.spacing, v -> c.spacing=v).controller(o -> IntegerSliderControllerBuilder.create(o).range(10,40).step(1)).build())\n                .option(Option.<Float>createBuilder().name(Text.literal(\"Scale\")).binding(1f, () -> c.scale, v -> c.scale=v).controller(o -> FloatSliderControllerBuilder.create(o).range(.5f,2f).step(.1f)).build())\n                .option(Option.<Float>createBuilder().name(Text.literal(\"Opacity\")).binding(1f, () -> c.opacity, v -> c.opacity=v).controller(o -> FloatSliderControllerBuilder.create(o).range(.1f,1f).step(.1f)).build())\n                .option(Option.<Float>createBuilder().name(Text.literal(\"Animation speed\")).binding(8f, () -> c.animationSpeed, v -> c.animationSpeed=v).controller(o -> FloatSliderControllerBuilder.create(o).range(1f,20f).step(1f)).build())\n                .option(Option.<Boolean>createBuilder().name(Text.literal(\"Text shadow\")).binding(true, () -> c.shadow, v -> c.shadow=v).controller(TickBoxControllerBuilder::create).build())\n                .option(Option.<Boolean>createBuilder().name(Text.literal(\"Background panel\")).binding(true, () -> c.panel, v -> c.panel=v).controller(TickBoxControllerBuilder::create).build())\n                .build()).build().generateScreen(parent);\n    }\n}",3498,"2026-11-22T15:52:12.585772",{"id":43,"sessionId":9,"filePath":44,"content":45,"fileType":12,"fileSize":46,"version":14,"createdAt":47,"updatedAt":47},6289373,"src/client/java/com/lyricsmod/ConfigManager.java","package com.lyricsmod;\n\nimport com.google.gson.Gson;\nimport com.google.gson.GsonBuilder;\nimport java.io.Reader;\nimport java.io.Writer;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\n/** JSON-backed client settings. */\npublic final class ConfigManager {\n    public enum Theme { SPOTIFY_GREEN, APPLE_GLASS, NEON_PURPLE, MINIMAL_WHITE, RAINBOW, CUSTOM }\n    public enum Position { TOP, CENTER, BOTTOM }\n    public enum Alignment { LEFT, CENTER, RIGHT }\n    public static final Path ROOT = Path.of(\"config\", \"lyricsmod\");\n    private static final Path FILE = Path.of(\"config\", \"lyricsmod.json\");\n    private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create();\n    public static ConfigManager instance = new ConfigManager();\n    public boolean enabled = true, shadow = true, panel = true, auto = false;\n    public int visibleLines = 5, spacing = 16, customColor = 0x1ed760;\n    public float opacity = 1f, scale = 1f, animationSpeed = 8f;\n    public Theme theme = Theme.SPOTIFY_GREEN;\n    public Position position = Position.CENTER;\n    public Alignment alignment = Alignment.CENTER;\n    public static void load() {\n        try {\n            Files.createDirectories(ROOT.resolve(\"songs\"));\n            Files.createDirectories(ROOT.resolve(\"music\"));\n            if (Files.exists(FILE)) try (Reader r = Files.newBufferedReader(FILE)) { ConfigManager c = GSON.fromJson(r, ConfigManager.class); if (c != null) instance = c; }\n            ConfigManager c = instance;\n            if (c.theme == null) c.theme = Theme.SPOTIFY_GREEN;\n            if (c.position == null) c.position = Position.CENTER;\n            if (c.alignment == null) c.alignment = Alignment.CENTER;\n            c.visibleLines = Math.clamp(c.visibleLines, 1, 7); c.spacing = Math.clamp(c.spacing, 10, 40);\n            c.scale = Float.isFinite(c.scale) ? Math.clamp(c.scale, .5f, 2f) : 1f;\n            c.opacity = Float.isFinite(c.opacity) ? Math.clamp(c.opacity, .1f, 1f) : 1f;\n            c.animationSpeed = Float.isFinite(c.animationSpeed) ? Math.clamp(c.animationSpeed, 1f, 20f) : 8f;\n        } catch (Exception e) { LyricsMod.message(\"Could not load settings: \" + e.getMessage()); }\n    }\n    public static void save() {\n        try { Files.createDirectories(FILE.getParent()); try (Writer w = Files.newBufferedWriter(FILE)) { GSON.toJson(instance, w); } }\n        catch (Exception e) { LyricsMod.message(\"Could not save settings: \" + e.getMessage()); }\n    }\n}",2451,"2026-11-22T15:52:12.585642",{"id":49,"sessionId":9,"filePath":50,"content":51,"fileType":52,"fileSize":53,"version":14,"createdAt":54,"updatedAt":54},6289367,"manifest.kod","include:\n  - yacl\n  - modmenu","kod",29,"2026-11-22T15:52:12.585031",{"id":56,"sessionId":9,"filePath":57,"content":58,"fileType":12,"fileSize":59,"version":14,"createdAt":60,"updatedAt":60},6289371,"src/client/java/com/lyricsmod/Keybinds.java","package com.lyricsmod;\n\nimport net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;\nimport net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;\nimport net.minecraft.client.option.KeyBinding;\nimport net.minecraft.util.Identifier;\nimport org.lwjgl.glfw.GLFW;\n\n/** Configurable client keybinds. */\npublic final class Keybinds {\n    public static void register() {\n        KeyBinding.Category category = KeyBinding.Category.create(Identifier.of(\"lyricsmod\", \"controls\"));\n        KeyBinding toggle = KeyBindingHelper.registerKeyBinding(new KeyBinding(\"key.lyricsmod.toggle\", GLFW.GLFW_KEY_L, category));\n        KeyBinding pause = KeyBindingHelper.registerKeyBinding(new KeyBinding(\"key.lyricsmod.pause\", GLFW.GLFW_KEY_UNKNOWN, category));\n        KeyBinding down = KeyBindingHelper.registerKeyBinding(new KeyBinding(\"key.lyricsmod.offset_down\", GLFW.GLFW_KEY_UNKNOWN, category));\n        KeyBinding up = KeyBindingHelper.registerKeyBinding(new KeyBinding(\"key.lyricsmod.offset_up\", GLFW.GLFW_KEY_UNKNOWN, category));\n        KeyBinding settings = KeyBindingHelper.registerKeyBinding(new KeyBinding(\"key.lyricsmod.settings\", GLFW.GLFW_KEY_UNKNOWN, category));\n        ClientTickEvents.END_CLIENT_TICK.register(client -> {\n            while (toggle.wasPressed()) { ConfigManager.instance.enabled = !ConfigManager.instance.enabled; ConfigManager.save(); LyricsMod.action(\"Overlay \" + (ConfigManager.instance.enabled ? \"on\" : \"off\")); }\n            while (pause.wasPressed()) { if (LyricsMod.PLAYER.paused()) LyricsMod.PLAYER.resume(); else LyricsMod.PLAYER.pause(); LyricsMod.action(LyricsMod.PLAYER.paused() ? \"Paused\" : \"Resumed\"); }\n            while (down.wasPressed()) { LyricsMod.PLAYER.adjustmentMs -= 250; LyricsMod.action(\"Offset: \" + LyricsMod.PLAYER.adjustmentMs + \" ms\"); }\n            while (up.wasPressed()) { LyricsMod.PLAYER.adjustmentMs += 250; LyricsMod.action(\"Offset: \" + LyricsMod.PLAYER.adjustmentMs + \" ms\"); }\n            while (settings.wasPressed()) client.setScreen(ConfigScreen.create(client.currentScreen));\n            MediaDetector.tick();\n        });\n    }\n}",2109,"2026-11-22T15:52:12.585563",{"id":62,"sessionId":9,"filePath":63,"content":64,"fileType":65,"fileSize":66,"version":14,"createdAt":67,"updatedAt":67},6289372,"gradle.properties","org.gradle.jvmargs=-Xmx2G\norg.gradle.parallel=true\nminecraft_version=1.21.11\nyarn_mappings=1.21.11+build.5\nloader_version=0.19.2\nfabric_version=0.141.4+1.21.11\nmod_version=1.0.0\nmaven_group=com.lyricsmod\narchives_base_name=lyricsmod","properties",232,"2026-11-22T15:52:12.585654",{"id":69,"sessionId":9,"filePath":70,"content":71,"fileType":12,"fileSize":72,"version":14,"createdAt":73,"updatedAt":73},6289375,"src/client/java/com/lyricsmod/LyricWord.java","package com.lyricsmod;\n\n/** A timed fragment of a lyric line. */\npublic record LyricWord(long timeMs, String text) { }",118,"2026-11-22T15:52:12.585788",{"id":75,"sessionId":9,"filePath":76,"content":77,"fileType":12,"fileSize":78,"version":14,"createdAt":79,"updatedAt":79},6289376,"src/client/java/com/lyricsmod/LyricSong.java","package com.lyricsmod;\n\nimport java.util.List;\n\n/** Parsed song metadata and lyrics. */\npublic record LyricSong(String title, String artist, long durationMs, long offsetMs,\n                        List<LyricLine> lines, boolean synced) { }",239,"2026-11-22T15:52:12.585925",{"id":81,"sessionId":9,"filePath":82,"content":83,"fileType":12,"fileSize":84,"version":14,"createdAt":85,"updatedAt":85},6289382,"src/client/java/com/lyricsmod/LrclibClient.java","package com.lyricsmod;\n\nimport com.google.gson.JsonArray;\nimport com.google.gson.JsonObject;\nimport com.google.gson.JsonParser;\nimport java.net.URI;\nimport java.net.URLEncoder;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\nimport java.nio.charset.StandardCharsets;\nimport java.nio.file.Files;\nimport java.time.Duration;\nimport java.util.concurrent.CompletableFuture;\n\n/** Non-blocking LRCLIB search and disk cache. */\npublic final class LrclibClient {\n    private static final HttpClient HTTP = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(8)).build();\n    public static CompletableFuture<LyricSong> fetch(String artist, String title) {\n        String query = \"https://lrclib.net/api/search?artist_name=\" + enc(artist) + \"&track_name=\" + enc(title);\n        HttpRequest request = HttpRequest.newBuilder(URI.create(query)).timeout(Duration.ofSeconds(12)).header(\"User-Agent\", \"LyricsMod/1.0 (Minecraft client)\").GET().build();\n        return HTTP.sendAsync(request, HttpResponse.BodyHandlers.ofString()).thenApplyAsync(response -> {\n            if (response.statusCode() != 200) throw new IllegalStateException(\"LRCLIB returned HTTP \" + response.statusCode());\n            JsonArray results = JsonParser.parseString(response.body()).getAsJsonArray();\n            JsonObject chosen = null;\n            for (var element : results) {\n                JsonObject obj = element.getAsJsonObject();\n                if (chosen == null) chosen = obj;\n                if (has(obj, \"syncedLyrics\")) { chosen = obj; break; }\n            }\n            if (chosen == null) throw new IllegalStateException(\"No matching lyrics found\");\n            String text = has(chosen, \"syncedLyrics\") ? chosen.get(\"syncedLyrics\").getAsString() : has(chosen, \"plainLyrics\") ? chosen.get(\"plainLyrics\").getAsString() : \"\";\n            if (text.isBlank()) throw new IllegalStateException(\"This result has no lyrics\");\n            String metadata = \"[ar:\" + artist.replace('\\n', ' ') + \"]\\n[ti:\" + title.replace('\\n', ' ') + \"]\\n\";\n            if (has(chosen, \"duration\")) { int seconds = chosen.get(\"duration\").getAsInt(); metadata += String.format(\"[length:%d:%02d]\\n\", seconds / 60, seconds % 60); }\n            String contents = metadata + text;\n            try {\n                Files.createDirectories(ConfigManager.ROOT.resolve(\"songs\"));\n                String safe = (artist + \" - \" + title).replaceAll(\"[\\\\\\\\/:*?\\\"<>|\\\\p{Cntrl}]\", \"_\");\n                if (safe.length() > 150) safe = safe.substring(0, 150);\n                Files.writeString(ConfigManager.ROOT.resolve(\"songs\").resolve(safe + \".lrc\"), contents);\n            } catch (Exception ignored) { }\n            return LrcParser.parse(contents, title);\n        });\n    }\n    private static boolean has(JsonObject o, String key) { return o.has(key) && !o.get(key).isJsonNull(); }\n    private static String enc(String s) { return URLEncoder.encode(s, StandardCharsets.UTF_8); }\n}",2981,"2026-11-22T15:52:12.586599",{"id":87,"sessionId":9,"filePath":88,"content":89,"fileType":12,"fileSize":90,"version":14,"createdAt":91,"updatedAt":91},6289384,"src/client/java/com/lyricsmod/LrcParser.java","package com.lyricsmod;\n\nimport java.util.ArrayList;\nimport java.util.Comparator;\nimport java.util.List;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\n/** Parses ordinary and enhanced LRC, including repeated line timestamps. */\npublic final class LrcParser {\n    private static final Pattern TIME = Pattern.compile(\"\\\\[(\\\\d+):(\\\\d{1,2})(?:[.:](\\\\d{1,3}))?\\\\]\");\n    private static final Pattern WORD = Pattern.compile(\"<(\\\\d+):(\\\\d{1,2})(?:[.:](\\\\d{1,3}))?>\");\n\n    private static long millis(String m, String s, String f) {\n        long fraction = f == null ? 0 : Long.parseLong((f + \"00\").substring(0, 3));\n        return Long.parseLong(m) * 60000 + Long.parseLong(s) * 1000 + fraction;\n    }\n\n    public static LyricSong parse(String input, String fallbackTitle) {\n        String title = fallbackTitle, artist = \"\";\n        long duration = 0, offset = 0;\n        List<LyricLine> lines = new ArrayList<>();\n        List<String> plain = new ArrayList<>();\n        for (String raw : input.replace(\"\\uFEFF\", \"\").split(\"\\\\R\")) {\n            String row = raw.trim();\n            try {\n                if (row.regionMatches(true, 0, \"[ti:\", 0, 4) && row.endsWith(\"]\")) { title = row.substring(4, row.length()-1); continue; }\n                if (row.regionMatches(true, 0, \"[ar:\", 0, 4) && row.endsWith(\"]\")) { artist = row.substring(4, row.length()-1); continue; }\n                if (row.regionMatches(true, 0, \"[offset:\", 0, 8) && row.endsWith(\"]\")) { offset = Long.parseLong(row.substring(8, row.length()-1).trim()); continue; }\n                if (row.regionMatches(true, 0, \"[length:\", 0, 8) && row.endsWith(\"]\")) {\n                    Matcher length = TIME.matcher(\"[\" + row.substring(8));\n                    if (length.matches()) duration = millis(length.group(1), length.group(2), length.group(3));\n                    continue;\n                }\n                Matcher tags = TIME.matcher(row);\n                List<Long> times = new ArrayList<>();\n                int end = 0;\n                while (tags.find() && tags.start() == end) { times.add(millis(tags.group(1), tags.group(2), tags.group(3))); end = tags.end(); }\n                if (times.isEmpty()) { if (!row.isEmpty() && !row.startsWith(\"[\")) plain.add(row); continue; }\n                String body = row.substring(end);\n                Matcher words = WORD.matcher(body);\n                List<LyricWord> fragments = new ArrayList<>();\n                StringBuilder text = new StringBuilder();\n                long wordTime = times.getFirst();\n                int last = 0;\n                while (words.find()) {\n                    String part = body.substring(last, words.start());\n                    if (!part.isEmpty()) { fragments.add(new LyricWord(wordTime, part)); text.append(part); }\n                    wordTime = millis(words.group(1), words.group(2), words.group(3));\n                    last = words.end();\n                }\n                String tail = body.substring(last);\n                if (!tail.isEmpty()) { fragments.add(new LyricWord(wordTime, tail)); text.append(tail); }\n                for (long time : times) {\n                    long shift = time - times.getFirst();\n                    List<LyricWord> shifted = fragments.stream().map(w -> new LyricWord(w.timeMs() + shift, w.text())).toList();\n                    lines.add(new LyricLine(time, text.toString(), words.reset().find() ? shifted : List.of()));\n                }\n            } catch (RuntimeException ignored) { }\n        }\n        boolean synced = !lines.isEmpty();\n        if (!synced) for (String row : plain) lines.add(new LyricLine(0, row, List.of()));\n        lines.sort(Comparator.comparingLong(LyricLine::timeMs));\n        return new LyricSong(title, artist, duration, offset, List.copyOf(lines), synced);\n    }\n}",3803,"2026-11-22T15:52:12.586801",{"id":93,"sessionId":9,"filePath":94,"content":95,"fileType":12,"fileSize":96,"version":14,"createdAt":97,"updatedAt":97},6289377,"src/client/java/com/lyricsmod/AnimationController.java","package com.lyricsmod;\n\n/** Frame-rate-independent exponential easing for the overlay. */\npublic final class AnimationController {\n    private long last = System.nanoTime();\n    public float alpha, line;\n    public void update(boolean visible, int target, float speed) {\n        long now = System.nanoTime();\n        float dt = Math.min(.1f, (now - last) / 1_000_000_000f);\n        last = now;\n        float t = 1f - (float)Math.exp(-speed * dt);\n        alpha += ((visible ? 1f : 0f) - alpha) * t;\n        line += (target - line) * t;\n    }\n}",543,"2026-11-22T15:52:12.586166",{"id":99,"sessionId":9,"filePath":100,"content":101,"fileType":12,"fileSize":102,"version":14,"createdAt":103,"updatedAt":103},6289381,"src/client/java/com/lyricsmod/MediaDetector.java","package com.lyricsmod;\n\nimport java.nio.charset.StandardCharsets;\nimport java.util.Locale;\nimport java.util.concurrent.CompletableFuture;\nimport java.util.concurrent.TimeUnit;\nimport net.minecraft.client.MinecraftClient;\n\n/** Best-effort Windows window-title detection; it cannot read playback position. */\npublic final class MediaDetector {\n    private static long nextCheck;\n    private static boolean running;\n    private static String last = \"\";\n    public static void tick() {\n        if (!ConfigManager.instance.auto || !System.getProperty(\"os.name\", \"\").toLowerCase(Locale.ROOT).contains(\"windows\")) return;\n        long now = System.nanoTime();\n        if (running || now < nextCheck) return;\n        running = true; nextCheck = now + 5_000_000_000L;\n        CompletableFuture.supplyAsync(() -> {\n            Process process = null;\n            try {\n                process = new ProcessBuilder(\"powershell.exe\", \"-NoProfile\", \"-NonInteractive\", \"-Command\", \"[Console]::OutputEncoding=[System.Text.Encoding]::UTF8; Get-Process -Name Spotify -ErrorAction SilentlyContinue | Where-Object { $_.MainWindowTitle -match ' - ' } | Select-Object -First 1 -ExpandProperty MainWindowTitle\").redirectErrorStream(true).start();\n                if (!process.waitFor(3, TimeUnit.SECONDS)) { process.destroyForcibly(); return \"\"; }\n                return new String(process.getInputStream().readAllBytes(), StandardCharsets.UTF_8).trim();\n            } catch (Exception ignored) { return \"\"; }\n        }).thenAccept(title -> MinecraftClient.getInstance().execute(() -> {\n            running = false;\n            if (!ConfigManager.instance.auto || title.isBlank() || title.equals(last)) return;\n            int split = title.indexOf(\" - \");\n            if (split > 0 && split+3 < title.length()) { last = title; LyricsMod.fetch(title.substring(0,split), title.substring(split+3)); }\n        }));\n    }\n}",1897,"2026-11-22T15:52:12.586581",{"id":105,"sessionId":9,"filePath":106,"content":107,"fileType":20,"fileSize":108,"version":14,"createdAt":109,"updatedAt":109},6289378,"build.gradle","plugins {\n    id 'fabric-loom' version '1.14-SNAPSHOT'\n    id 'maven-publish'\n}\nversion = project.mod_version\ngroup = project.maven_group\nbase { archivesName = project.archives_base_name }\nrepositories { mavenCentral() }\nloom {\n    splitEnvironmentSourceSets()\n    mods { lyricsmod { sourceSet sourceSets.main; sourceSet sourceSets.client } }\n}\ndependencies {\n    minecraft \"com.mojang:minecraft:${project.minecraft_version}\"\n    mappings \"net.fabricmc:yarn:${project.yarn_mappings}:v2\"\n    modImplementation \"net.fabricmc:fabric-loader:${project.loader_version}\"\n    modImplementation \"net.fabricmc.fabric-api:fabric-api:${project.fabric_version}\"\n}\nprocessResources {\n    inputs.property 'version', project.version\n    filesMatching('fabric.mod.json') { expand 'version': project.version }\n}\ntasks.withType(JavaCompile).configureEach { it.options.release = 21 }\njava { withSourcesJar(); sourceCompatibility = JavaVersion.VERSION_21; targetCompatibility = JavaVersion.VERSION_21 }",981,"2026-11-22T15:52:12.586465",{"id":111,"sessionId":9,"filePath":112,"content":113,"fileType":12,"fileSize":114,"version":14,"createdAt":115,"updatedAt":115},6289386,"src/client/java/com/lyricsmod/CommandRegistrar.java","package com.lyricsmod;\n\nimport com.mojang.brigadier.arguments.DoubleArgumentType;\nimport com.mojang.brigadier.arguments.IntegerArgumentType;\nimport com.mojang.brigadier.arguments.StringArgumentType;\nimport java.nio.file.Files;\nimport java.util.List;\nimport java.util.concurrent.CompletableFuture;\nimport net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback;\nimport static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.argument;\nimport static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.literal;\nimport net.minecraft.text.Text;\n\n/** Registers the local-only /lyrics command tree. */\npublic final class CommandRegistrar {\n    public static void register() {\n        ClientCommandRegistrationCallback.EVENT.register((dispatcher, access) -> dispatcher.register(literal(\"lyrics\")\n            .then(literal(\"play\").then(argument(\"name\", StringArgumentType.greedyString())\n                .suggests((ctx, builder) -> CompletableFuture.supplyAsync(() -> {\n                    try (var files = Files.list(ConfigManager.ROOT.resolve(\"songs\"))) {\n                        files.filter(p -> p.getFileName().toString().endsWith(\".lrc\")).forEach(p -> {\n                            String s = p.getFileName().toString();\n                            if (s.toLowerCase().startsWith(builder.getRemainingLowerCase())) builder.suggest(s);\n                        });\n                    } catch (Exception ignored) { }\n                    return builder.build();\n                }))\n                .executes(ctx -> { String name = StringArgumentType.getString(ctx, \"name\").trim(); if (name.length() >= 2 && name.startsWith(\"\\\"\") && name.endsWith(\"\\\"\")) name = name.substring(1,name.length()-1); LyricsMod.play(name); return 1; })))\n            .then(literal(\"pause\").executes(ctx -> { LyricsMod.PLAYER.pause(); LyricsMod.action(\"Paused\"); return 1; }))\n            .then(literal(\"resume\").executes(ctx -> { LyricsMod.PLAYER.resume(); LyricsMod.action(\"Resumed\"); return 1; }))\n            .then(literal(\"stop\").executes(ctx -> { LyricsMod.stop(); LyricsMod.action(\"Stopped\"); return 1; }))\n            .then(literal(\"seek\").then(argument(\"seconds\", DoubleArgumentType.doubleArg(0, 86400)).executes(ctx -> { LyricsMod.PLAYER.seek((long)(DoubleArgumentType.getDouble(ctx,\"seconds\")*1000)); LyricsMod.action(\"Seeked\"); return 1; })))\n            .then(literal(\"offset\").then(argument(\"ms\", IntegerArgumentType.integer(-600000,600000)).executes(ctx -> { LyricsMod.PLAYER.adjustmentMs = IntegerArgumentType.getInteger(ctx,\"ms\"); LyricsMod.action(\"Offset: \" + LyricsMod.PLAYER.adjustmentMs + \" ms\"); return 1; })))\n            .then(literal(\"fetch\").then(argument(\"artist\", StringArgumentType.string()).then(argument(\"title\", StringArgumentType.greedyString()).executes(ctx -> { String title = StringArgumentType.getString(ctx,\"title\"); if (title.length() >= 2 && title.startsWith(\"\\\"\") && title.endsWith(\"\\\"\")) title = title.substring(1,title.length()-1); LyricsMod.fetch(StringArgumentType.getString(ctx,\"artist\"),title); return 1; }))))\n            .then(literal(\"list\").executes(ctx -> { CompletableFuture.supplyAsync(() -> { try (var files = Files.list(ConfigManager.ROOT.resolve(\"songs\"))) { return files.filter(p -> p.getFileName().toString().endsWith(\".lrc\")).map(p -> p.getFileName().toString()).sorted().toList(); } catch (Exception e) { return List.<String>of(); } }).thenAccept(list -> LyricsMod.message(list.isEmpty() ? \"No local .lrc files found.\" : String.join(\", \", list))); return 1; }))\n            .then(literal(\"reload\").executes(ctx -> { ConfigManager.load(); LyricsMod.message(\"Settings reloaded.\"); return 1; }))\n            .then(literal(\"toggle\").executes(ctx -> { ConfigManager.instance.enabled = !ConfigManager.instance.enabled; ConfigManager.save(); LyricsMod.action(\"Overlay \" + (ConfigManager.instance.enabled ? \"on\" : \"off\")); return 1; }))\n            .then(literal(\"auto\").then(literal(\"on\").executes(ctx -> { ConfigManager.instance.auto=true; ConfigManager.save(); ctx.getSource().sendFeedback(Text.literal(\"Automatic detection enabled (Windows only).\")); return 1; }))\n                .then(literal(\"off\").executes(ctx -> { ConfigManager.instance.auto=false; ConfigManager.save(); ctx.getSource().sendFeedback(Text.literal(\"Automatic detection disabled.\")); return 1; })))\n        ));\n    }\n}",4360,"2026-11-22T15:52:12.587208",{"id":117,"sessionId":9,"filePath":118,"content":119,"fileType":27,"fileSize":120,"version":14,"createdAt":121,"updatedAt":121},6289379,"src/main/resources/fabric.mod.json","{\n  \"schemaVersion\": 1,\n  \"id\": \"lyricsmod\",\n  \"version\": \"${version}\",\n  \"name\": \"LyricsMod\",\n  \"description\": \"A client-side synchronized lyrics overlay.\",\n  \"environment\": \"client\",\n  \"entrypoints\": {\n    \"client\": [\"com.lyricsmod.LyricsMod\"],\n    \"modmenu\": [\"com.lyricsmod.ModMenuIntegration\"]\n  },\n  \"depends\": {\n    \"fabricloader\": \">=0.19.2\",\n    \"minecraft\": \"~1.21.11\",\n    \"java\": \">=21\",\n    \"fabric-api\": \"*\",\n    \"yet_another_config_lib_v3\": \">=3.8.0\"\n  },\n  \"suggests\": { \"modmenu\": \">=17.0.0\" }\n}",512,"2026-11-22T15:52:12.586479",{"id":123,"sessionId":9,"filePath":124,"content":125,"fileType":12,"fileSize":126,"version":14,"createdAt":127,"updatedAt":127},6289383,"src/client/java/com/lyricsmod/ModMenuIntegration.java","package com.lyricsmod;\n\nimport com.terraformersmc.modmenu.api.ConfigScreenFactory;\nimport com.terraformersmc.modmenu.api.ModMenuApi;\n\n/** Exposes settings to ModMenu. */\npublic final class ModMenuIntegration implements ModMenuApi {\n    @Override public ConfigScreenFactory<?> getModConfigScreenFactory() { return ConfigScreen::create; }\n}",338,"2026-11-22T15:52:12.586612",{"id":129,"sessionId":9,"filePath":130,"content":131,"fileType":12,"fileSize":132,"version":14,"createdAt":133,"updatedAt":133},6289387,"src/client/java/com/lyricsmod/LyricsMod.java","package com.lyricsmod;\n\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.concurrent.CompletableFuture;\nimport java.util.concurrent.atomic.AtomicLong;\nimport net.fabricmc.api.ClientModInitializer;\nimport net.fabricmc.fabric.api.client.rendering.v1.hud.HudElementRegistry;\nimport net.minecraft.client.MinecraftClient;\nimport net.minecraft.text.Text;\nimport net.minecraft.util.Identifier;\n\n/** Client entrypoint and asynchronous song loading. */\npublic final class LyricsMod implements ClientModInitializer {\n    public static final LyricsPlayer PLAYER = new LyricsPlayer();\n    private static final AtomicLong REQUEST = new AtomicLong();\n    @Override public void onInitializeClient() {\n        ConfigManager.load();\n        LyricsRenderer renderer = new LyricsRenderer();\n        HudElementRegistry.addLast(Identifier.of(\"lyricsmod\", \"lyrics\"), (context, tickCounter) -> renderer.render(context));\n        CommandRegistrar.register();\n        Keybinds.register();\n    }\n    public static void message(String text) {\n        MinecraftClient client = MinecraftClient.getInstance();\n        client.execute(() -> { if (client.player != null) client.player.sendMessage(Text.literal(\"[Lyrics] \" + text), false); });\n    }\n    public static void action(String text) {\n        MinecraftClient client = MinecraftClient.getInstance();\n        if (client.player != null) client.player.sendMessage(Text.literal(\"[Lyrics] \" + text), true);\n    }\n    public static void stop() { REQUEST.incrementAndGet(); PLAYER.stop(); }\n    private static void load(CompletableFuture<LyricSong> future) {\n        long request = REQUEST.incrementAndGet();\n        future.whenComplete((song, failure) -> MinecraftClient.getInstance().execute(() -> {\n            if (request != REQUEST.get()) return;\n            if (failure != null) {\n                Throwable cause = failure.getCause() == null ? failure : failure.getCause();\n                message(\"Could not load lyrics: \" + cause.getMessage());\n            } else if (song.lines().isEmpty()) message(\"No lyrics found in this file.\");\n            else { PLAYER.play(song); message(\"Loaded \" + song.title() + (song.synced() ? \"\" : \" (unsynced)\")); }\n        }));\n    }\n    public static void fetch(String artist, String title) { message(\"Searching LRCLIB...\"); load(LrclibClient.fetch(artist, title)); }\n    public static void play(String name) {\n        load(CompletableFuture.supplyAsync(() -> {\n            try {\n                Path root = ConfigManager.ROOT.resolve(\"songs\").toAbsolutePath().normalize();\n                Path file = root.resolve(name.endsWith(\".lrc\") ? name : name + \".lrc\").normalize();\n                if (!file.startsWith(root)) throw new IllegalArgumentException(\"Invalid file name\");\n                if (Files.isRegularFile(file)) return LrcParser.parse(Files.readString(file), name);\n                int split = name.indexOf(\" - \");\n                if (split < 1 || split + 3 >= name.length()) throw new IllegalArgumentException(\"File not found; use a filename or Artist - Title\");\n                return LrclibClient.fetch(name.substring(0, split), name.substring(split + 3)).join();\n            } catch (Exception e) { throw new IllegalStateException(e.getMessage(), e); }\n        }));\n    }\n}",3269,"2026-11-22T15:52:12.587484",{"id":135,"sessionId":9,"filePath":136,"content":137,"fileType":12,"fileSize":138,"version":14,"createdAt":139,"updatedAt":139},6289385,"src/client/java/com/lyricsmod/LyricLine.java","package com.lyricsmod;\n\nimport java.util.List;\n\n/** A lyric line and its optional enhanced-LRC word timings. */\npublic record LyricLine(long timeMs, String text, List<LyricWord> words) { }",188,"2026-11-22T15:52:12.586829",{"id":9,"userId":141,"name":142,"sessionName":143,"description":144,"knowledge":4,"thumbnailUrl":145,"status":146,"pickerId":147,"aiPersonality":148,"gameType":149,"gameVersion":4,"category":150,"totalTokensUsed":151,"totalCreditsUsed":152,"maxTokensPerRequest":153,"createdAt":154,"lastActivityAt":155,"completedAt":4,"isPublic":156,"publicViews":151,"publicDownloads":151,"shareToken":157,"privateToken":4,"wikiEnabled":158,"metadata":159,"settings":160,"deletedAt":4,"staffPickPriority":4,"creatorImageUrl":172,"latestJarId":173},48939,"Kaboom","LyricsOverlay","Client-side Fabric mod for Minecraft 1.21.11 that displays synced song lyrics as a premium Spotify/Apple-Music-style HUD overlay. Features smooth easing animations with word-by-word karaoke highlighting, configurable themes (Spotify Green, Neon Purple, Rainbow), adjustable visible lines, and instrumental gap indicators. Loads lyrics from local LRC files or the LRCLIB API with caching, supports optional Windows media detection for auto-syncing to current track, and provides manual control via commands and keybinds. Includes full customization through a config screen with live preview.","https://images.kodari.ai/sessions/KDR-202611-64JFANMS/thumbnail.png","active","kodari_lite","balanced","minecraft","fabric_1_21_11",0,5,8192,"2026-11-22T15:49:35.44842","2026-11-22T15:52:12.584967",true,"9627669d-7c04-4788-994b-fde3e3440788",false,{},{"generation":161,"compilation":163,"preferences":165,"premium":167,"history":168,"download":170},{"autoVerify":156,"studioTools":156,"modelTier":4,"reasoningEffort":162},"auto",{"autoCompile":158,"useBuildVersion":158,"javaVersion":164},"16",{"chatPosition":166},"left",{"hideMessagesOnPublicShare":158},{"enabled":158,"messageCount":169},10,{"filenamePattern":171},"{name}-{version}","https://lh3.googleusercontent.com/a/ACg8ocJQsUapsCed_e9QOGaTLVnNM9fHD_WVqe8eqxcVdp5S35dBLQ=s256-c",172311,{"compilations":175,"messages":182},[176],{"id":173,"sessionId":9,"pluginName":177,"success":156,"jarSize":178,"compilationTimeMs":14,"fileCount":179,"commitHash":180,"createdAt":181,"content":4},"LyricsMod",41127,15,"0c8369fbfe8a8a3d6ece77ebb4ca085114f2ae8a","2026-11-22T15:53:04.626094",[183,189],{"id":184,"sessionId":9,"messageType":185,"role":185,"content":186,"tokensUsed":4,"creditsCharged":151,"metadata":187,"createdAt":188,"sequenceNumber":14},632076,"user","1.21.11 mod\n\n---\n📎 Attached 1 file(s):\n\n### File: pasted-code-1795362556500.txt\n```txt\nCreate a complete client-side Minecraft mod for Fabric (Minecraft 1.21.11, Java 21, Fabric Loader + Fabric API) called \"LyricsMod\". It displays synced song lyrics as a gorgeous, smooth, Spotify/Apple-Music-style overlay inside the game.\r\n\r\nProvide a full Gradle project: build.gradle, gradle.properties, settings.gradle, fabric.mod.json, mixins JSON (only if needed), and all source files.\r\n\r\n=== CORE FEATURES ===\r\n\r\n1. PREMIUM LYRICS HUD\r\n- Show the current line large and glowing, the previous lines faded above and the next lines dimmed below (configurable 1-7 visible lines).\r\n- Smooth easing animations: lines scroll up with ease-out, the active line scales up, inactive lines blur/fade out via decreasing alpha and scale.\r\n- Word-by-word karaoke highlight: the active line fills with color from left to right in sync with the music. Support Enhanced LRC word timestamps (<mm:ss.xx>); if only line timestamps exist, interpolate the fill evenly across the line duration.\r\n- Optional pop/bounce effect on each new word, subtle glow behind the active line, and drop shadow or semi-transparent rounded background panel for readability on any scene.\r\n- Instrumental gaps: show an animated \"• • •\" countdown indicator when there is a pause longer than 5 seconds between lines.\r\n- Slim progress bar with elapsed/total time and the song title + artist in a small header.\r\n- Fade the whole overlay in/out smoothly when a song starts/stops.\r\n\r\n2. THEMES & CUSTOMIZATION\r\n- Built-in themes: Spotify Green, Apple Music Glass, Neon Purple, Minimal White, Rainbow (animated gradient), plus fully custom colors.\r\n- Settings: position (top/center/bottom/free drag-and-drop in an edit mode), scale, line spacing, text alignment (left/center/right), font shadow, opacity, background panel on/off, animation speed, number of visible lines.\r\n- A clean config screen (ModMenu + Cloth Config integration if available, otherwise a custom in-game screen), saved to config/lyricsmod.json with live preview.\r\n\r\n3. LYRICS SOURCES\r\n- Local .lrc files from config/lyricsmod/songs/ (standard LRC and Enhanced LRC, support [offset:] tag, [ar:], [ti:], [length:]).\r\n- Online fetch from the free LRCLIB API (https://lrclib.net/api/get and /api/search) by artist + title (+ duration if known). Prefer syncedLyrics, fall back to plainLyrics (shown as static scrolling text). Cache results as .lrc files. All network calls must be async (CompletableFuture), never block the render or game thread, with timeouts and error handling.\r\n\r\n4. AUTO-DETECT CURRENT SONG (optional module, must fail gracefully)\r\n- On Windows, detect the currently playing track from Spotify (and ideally other players/browsers) by reading the player window title or the system media session, using JNA or a similar library included via Gradle (Jar-in-Jar). Parse \"Artist - Title\", automatically fetch lyrics, and sync the internal timer when the track changes. Detect pause/resume if possible.\r\n- If auto-detect is unavailable (other OS, unsupported player), silently fall back to manual mode. Never crash.\r\n\r\n5. MANUAL CONTROL\r\n- Commands with tab-completion: /lyrics play <file | \"Artist - Title\">, /lyrics pause, /lyrics resume, /lyrics stop, /lyrics seek <seconds>, /lyrics offset <ms>, /lyrics fetch <artist> <title>, /lyrics list, /lyrics reload, /lyrics toggle, /lyrics auto <on|off>.\r\n- Keybinds (rebindable in Controls): toggle overlay, pause/resume, offset -/+ 250 ms, open settings.\r\n- Show small feedback toasts/action-bar messages for sync adjustments (e.g. \"Offset: +250 ms\").\r\n\r\n6. OPTIONAL: BUILT-IN PLAYER\r\n- Play .ogg files from config/lyricsmod/music/ with perfectly synced lyrics through the Minecraft sound engine or a lightweight audio library. Only include if it can be implemented cleanly.\r\n\r\n=== TECHNICAL REQUIREMENTS ===\r\n- Client-only mod (environment: \"client\"), no server component, no required dependencies beyond Fabric API (ModMenu/Cloth Config optional).\r\n- Use the current HUD rendering API for 1.21.11 (HudElementRegistry / HUD layers or the correct equivalent) and DrawContext for text, rects and gradients. Use matrix transforms for scaling and animation. Double-check API names against 1.21.11 mappings (Yarn or Mojang) and state which mappings you use.\r\n- Clean architecture and packages: LrcParser, LyricLine/LyricWord models, LyricsPlayer (timing/state), LyricsRenderer, AnimationController, LrclibClient, MediaDetector, ConfigManager, ConfigScreen, CommandRegistrar, Keybinds.\r\n- Frame-rate-independent animations using delta time, no per-frame allocations in hot paths, caching of text widths.\r\n- Robust error handling: broken or missing files, no internet, API errors or rate limits must never crash the game; show a friendly chat message instead.\r\n- Do not hard-code any lyrics. Only load them from files or the API.\r\n- Well-commented code with Javadoc on public classes.\r\n\r\n=== OUTPUT FORMAT ===\r\n- Output EVERY file completely, each under a heading with its full path. No placeholders, no \"rest of the code here\", no omitted files.\r\n- Make sure the project compiles: consistent imports, valid fabric.mod.json, correct entrypoints.\r\n- At the end, add a short guide: how to build (./gradlew build), where the .jar ends up, example .lrc file structure, and a list of all commands and default keybinds.\n```",{"userId":141,"imageUrl":172,"username":142},"2026-11-22T15:52:12.584319",{"id":190,"sessionId":9,"messageType":191,"role":191,"content":192,"tokensUsed":193,"creditsCharged":152,"metadata":194,"createdAt":195,"sequenceNumber":196},632077,"assistant","<kodariProjectNamed>LyricsOverlay</kodariProjectNamed>\n<kodariProjectDescription>Client-side Fabric mod for Minecraft 1.21.11 that displays synced song lyrics as a premium Spotify/Apple-Music-style HUD overlay. Features smooth easing animations with word-by-word karaoke highlighting, configurable themes (Spotify Green, Neon Purple, Rainbow), adjustable visible lines, and instrumental gap indicators. Loads lyrics from local LRC files or the LRCLIB API with caching, supports optional Windows media detection for auto-syncing to current track, and provides manual control via commands and keybinds. Includes full customization through a config screen with live preview.</kodariProjectDescription><kodariReadingFiles id=\"806ce48e-c187-4a13-af83-2797ab051b51\" status=\"succeeded\"/><kodariReadDoc id=\"806ce48e-c187-4a13-af83-2797ab051b51\" status=\"succeeded\">yacl</kodariReadDoc><kodariReadDoc id=\"806ce48e-c187-4a13-af83-2797ab051b51\" status=\"succeeded\">modmenu</kodariReadDoc>- Build the LRC parser, playback clock, asynchronous LRCLIB lookup and local cache.\n- Add the animated client HUD, commands, keybinds and persistent settings.\n- Keep media detection optional and fail-safe; use Yarn mappings.<kodariApplyingPatches id=\"7ba92195-2c75-4955-8c8b-ce1e87734888\" status=\"succeeded\"/><kodariPatchedFile id=\"7ba92195-2c75-4955-8c8b-ce1e87734888\" status=\"succeeded\">settings.gradle</kodariPatchedFile><kodariPatchedFile id=\"7ba92195-2c75-4955-8c8b-ce1e87734888\" status=\"succeeded\">gradle.properties</kodariPatchedFile><kodariPatchedFile id=\"7ba92195-2c75-4955-8c8b-ce1e87734888\" status=\"succeeded\">build.gradle</kodariPatchedFile><kodariPatchedFile id=\"7ba92195-2c75-4955-8c8b-ce1e87734888\" status=\"succeeded\">manifest.kod</kodariPatchedFile><kodariPatchedFile id=\"7ba92195-2c75-4955-8c8b-ce1e87734888\" status=\"succeeded\">src/main/resources/fabric.mod.json</kodariPatchedFile><kodariPatchedFile id=\"7ba92195-2c75-4955-8c8b-ce1e87734888\" status=\"succeeded\">src/main/resources/assets/lyricsmod/lang/en_us.json</kodariPatchedFile><kodariPatchedFile id=\"7ba92195-2c75-4955-8c8b-ce1e87734888\" status=\"succeeded\">src/client/java/com/lyricsmod/LyricWord.java</kodariPatchedFile><kodariPatchedFile id=\"7ba92195-2c75-4955-8c8b-ce1e87734888\" status=\"succeeded\">src/client/java/com/lyricsmod/LyricLine.java</kodariPatchedFile><kodariPatchedFile id=\"7ba92195-2c75-4955-8c8b-ce1e87734888\" status=\"succeeded\">src/client/java/com/lyricsmod/LyricSong.java</kodariPatchedFile><kodariPatchedFile id=\"7ba92195-2c75-4955-8c8b-ce1e87734888\" status=\"succeeded\">src/client/java/com/lyricsmod/LrcParser.java</kodariPatchedFile><kodariPatchedFile id=\"7ba92195-2c75-4955-8c8b-ce1e87734888\" status=\"succeeded\">src/client/java/com/lyricsmod/LyricsPlayer.java</kodariPatchedFile><kodariPatchedFile id=\"7ba92195-2c75-4955-8c8b-ce1e87734888\" status=\"succeeded\">src/client/java/com/lyricsmod/ConfigManager.java</kodariPatchedFile><kodariPatchedFile id=\"7ba92195-2c75-4955-8c8b-ce1e87734888\" status=\"succeeded\">src/client/java/com/lyricsmod/LrclibClient.java</kodariPatchedFile><kodariApplyingPatches id=\"613b7c16-7497-4897-af69-f7c44fadcd6f\" status=\"succeeded\"/><kodariPatchedFile id=\"613b7c16-7497-4897-af69-f7c44fadcd6f\" status=\"succeeded\">src/client/java/com/lyricsmod/AnimationController.java</kodariPatchedFile><kodariPatchedFile id=\"613b7c16-7497-4897-af69-f7c44fadcd6f\" status=\"succeeded\">src/client/java/com/lyricsmod/LyricsRenderer.java</kodariPatchedFile><kodariPatchedFile id=\"613b7c16-7497-4897-af69-f7c44fadcd6f\" status=\"succeeded\">src/client/java/com/lyricsmod/ConfigScreen.java</kodariPatchedFile><kodariPatchedFile id=\"613b7c16-7497-4897-af69-f7c44fadcd6f\" status=\"succeeded\">src/client/java/com/lyricsmod/ModMenuIntegration.java</kodariPatchedFile><kodariApplyingPatches id=\"a13db598-972c-416e-8bac-97478044d363\" status=\"succeeded\"/><kodariPatchedFile id=\"a13db598-972c-416e-8bac-97478044d363\" status=\"succeeded\">src/client/java/com/lyricsmod/LyricsMod.java</kodariPatchedFile><kodariPatchedFile id=\"a13db598-972c-416e-8bac-97478044d363\" status=\"succeeded\">src/client/java/com/lyricsmod/CommandRegistrar.java</kodariPatchedFile><kodariPatchedFile id=\"a13db598-972c-416e-8bac-97478044d363\" status=\"succeeded\">src/client/java/com/lyricsmod/MediaDetector.java</kodariPatchedFile><kodariPatchedFile id=\"a13db598-972c-416e-8bac-97478044d363\" status=\"succeeded\">src/client/java/com/lyricsmod/Keybinds.java</kodariPatchedFile>Created LyricsMod using **Yarn mappings**. It loads local LRC files, searches LRCLIB asynchronously, caches results, and provides a lyrics HUD, playback controls, themes and settings.\n\n**Current limitations:** Windows auto-detection reads Spotify window titles but cannot synchronize to the player’s actual position or detect pauses. The built-in audio player, drag-and-drop positioning, live preview, blur, glow, bounce and full overlay fade-out are not implemented. Settings use YACL; the download bundles YACL and ModMenu alongside the mod.\n\n### Use\n\nPlace `.lrc` files in `config/lyricsmod/songs/`, for example:\n\n```lrc\n[ar:Artist]\n[ti:Song]\n[length:3:30]\n[00:05.00]First line\n[00:10.00]<00:10.00>Timed <00:10.60>words\n```\n\nCommands: `/lyrics play <file or Artist - Title>`, `pause`, `resume`, `stop`, `seek <seconds>`, `offset <ms>`, `fetch <artist> <title>`, `list`, `reload`, `toggle`, and `auto <on|off>`. Quote an artist containing spaces in `/lyrics fetch`.\n\n**L** toggles the overlay. Pause, offset adjustment and settings keys are unbound by default; assign them in Controls.\n\n### Build\n\nClick **Compile** in the top bar, then **Compile** in the window. Once it succeeds, click **Download**. On mobile, use **⋮ → Compile Project**.",35204,{},"2026-11-22T15:52:12.584944",2,["Reactive",198],{"$snuxt-seo-utils:routeRules":199,"$sauth":200,"$suserCredits":151,"$suserLifetimeCredits":201,"$suserCreditsLoading":158,"$suserCreditsError":4,"$suserCreditsInitialized":158,"$suserCreditsFetchedSession":158,"$sreadonly-ide-crawler":156,"$sreadonly-ide-mobile":158,"$sconsent-banner-visible":158,"$sdiscord-claim-open":158,"$ssite-config":202},{"head":-1,"seoMeta":-1},{"user":4,"authenticated":158},-1,{"_priority":203,"defaultLocale":206,"description":207,"env":208,"identity":209,"indexable":156,"name":211,"trailingSlash":158,"url":212},{"env":204,"url":205,"name":205,"description":205,"defaultLocale":205,"identity":205,"trailingSlash":205,"indexable":205},-15,-3,"en","Create Minecraft plugins, Fabric mods, and Discord bots in minutes using AI. No coding required. Automatic compilation, error fixing, and deployment.","production",{"type":210},"Organization","Kodari AI","https://kodari.ai",["Set"],["ShallowReactive",215],{"auth-user":-1,"public-session-ssr-9627669d-7c04-4788-994b-fde3e3440788":-1,"public-client-9627669d-7c04-4788-994b-fde3e3440788":-1},"/public/9627669d-7c04-4788-994b-fde3e3440788"]</script></body></html>