How xien-ica/spotymc works
SpotyMC is a Fabric mod that brings Spotify playback and browsing into Minecraft. The user configures Spotify and the optional librespot backend, authenticates, then uses the in-game player to control playback, search or browse library and queue content, and view track information and synced lyrics. PlaybackPoller coordinates Spotify state updates and the local audio process; the player UI and HUD present that state. The graph follows README capabilities and indexed source references; some feature wiring is documented or indexed but its implementation was not excerpted, so uncertain links are omitted.
Main entry points: PlaybackPoller.java Playback coordinator · PlayerControlScreen.java Player screen · Spotymc.java Mod entry · LyricsHud.java Lyrics HUD
Components 18
Setup and authentication
- Mod entry
src/client/java/xien/jxsh/spotymc/Spotymc.java - Backend setup
src/client/java/xien/jxsh/spotymc/gui/LibrespotSettingsController.java - Mod configuration
src/client/java/xien/jxsh/spotymc/config/ModConfig.java - Spotify login
src/client/java/xien/jxsh/spotymc/auth/SpotifyAuth.java
Playback services
- Librespot installer
src/client/java/xien/jxsh/spotymc/audio/LibrespotInstaller.java - Playback coordinator
src/client/java/xien/jxsh/spotymc/PlaybackPoller.java - Spotify API client
src/client/java/xien/jxsh/spotymc/api/SpotifyApiClient.java - Playback snapshot
src/client/java/xien/jxsh/spotymc/api/PlaybackState.java - Librespot process
src/client/java/xien/jxsh/spotymc/audio/LibrespotProcess.java - Audio output
src/client/java/xien/jxsh/spotymc/audio/AudioPlayer.java
Player interface
- Player screen
src/client/java/xien/jxsh/spotymc/gui/PlayerControlScreen.java - Search and library
src/client/java/xien/jxsh/spotymc/gui/browse/BrowseController.java - Player input
src/client/java/xien/jxsh/spotymc/gui/input/PlayerControlInput.java - Player rendering
src/client/java/xien/jxsh/spotymc/gui/render/LeftPanelRenderer.java
Lyrics and HUD
- Lyrics service
src/client/java/xien/jxsh/spotymc/lyrics/LyricsService.java - Lyrics HUD
src/client/java/xien/jxsh/spotymc/hud/LyricsHud.java
Other components
- Minecraft user
- Spotify services
Connections 27
- Minecraft user → Mod entry: opens mod
src/client/java/xien/jxsh/spotymc/Spotymc.java - Mod entry → Playback coordinator: starts polling
src/client/java/xien/jxsh/spotymc/Spotymc.java - Mod entry → Player screen: opens screen
src/client/java/xien/jxsh/spotymc/Spotymc.java - Mod entry → Lyrics HUD: registers HUD
src/client/java/xien/jxsh/spotymc/Spotymc.java - Minecraft user → Backend setup: configures setup
README.md - Backend setup → Librespot installer: installs backend
src/client/java/xien/jxsh/spotymc/gui/LibrespotSettingsController.java - Backend setup → Mod configuration: saves settings
src/client/java/xien/jxsh/spotymc/gui/LibrespotSettingsController.java - Minecraft user → Spotify login: logs in
README.md - Spotify login → Spotify services: exchanges tokens
src/client/java/xien/jxsh/spotymc/auth/SpotifyAuth.java - Spotify login → Mod configuration: stores tokens
src/client/java/xien/jxsh/spotymc/auth/SpotifyAuth.java - Playback coordinator → Spotify API client: requests playback
src/client/java/xien/jxsh/spotymc/PlaybackPoller.java - Spotify API client → Spotify services: calls Web API
src/client/java/xien/jxsh/spotymc/api/SpotifyApiClient.java - Spotify API client → Spotify login: uses credentials
src/client/java/xien/jxsh/spotymc/api/SpotifyApiClient.java - Playback coordinator → Playback snapshot: updates snapshot
src/client/java/xien/jxsh/spotymc/PlaybackPoller.java - Playback coordinator → Librespot process: starts backend
src/client/java/xien/jxsh/spotymc/PlaybackPoller.java - Playback coordinator → Audio output: streams audio
src/client/java/xien/jxsh/spotymc/PlaybackPoller.java - Player screen → Playback coordinator: reads playback
src/client/java/xien/jxsh/spotymc/gui/PlayerControlScreen.java - Player screen → Search and library: manages browsing
src/client/java/xien/jxsh/spotymc/gui/PlayerControlScreen.java - Player screen → Player input: delegates input
src/client/java/xien/jxsh/spotymc/gui/PlayerControlScreen.java - Player screen → Player rendering: renders panels
src/client/java/xien/jxsh/spotymc/gui/PlayerControlScreen.java - Search and library → Playback coordinator: loads library
src/client/java/xien/jxsh/spotymc/gui/browse/BrowseController.java - Player input → Playback coordinator: sends controls
src/client/java/xien/jxsh/spotymc/gui/input/PlayerControlInput.java - Player input → Search and library: selects entries
src/client/java/xien/jxsh/spotymc/gui/input/PlayerControlInput.java - Playback coordinator → Lyrics service: fetches lyrics
src/client/java/xien/jxsh/spotymc/PlaybackPoller.java - Lyrics HUD → Playback coordinator: reads playback
src/client/java/xien/jxsh/spotymc/hud/LyricsHud.java - Lyrics HUD → Playback snapshot: displays track
src/client/java/xien/jxsh/spotymc/hud/LyricsHud.java - Lyrics HUD → Mod configuration: reads preferences
src/client/java/xien/jxsh/spotymc/hud/LyricsHud.java