sh4rps

PROJECT: Storm Mod Browser

Minecraft Java Edition 1.21.4 | Fabric Mod Loader

Act as a senior Minecraft Fabric mod developer. Build a complete, functional, production-quality Minecraft mod named Storm Mod Browser for Minecraft Java Edition 1.21.4 using Fabric.

The mod must allow players to search, preview, download, install, and manage Minecraft mods, resource packs, shaders, and other supported content directly inside Minecraft without leaving the game.

This must be a real, working mod, not just a UI prototype.

  1. Core Concept

Create an in-game content browser inspired by Modrinth's clean interface.

Players should be able to download:

  • Fabric mods
  • Resource packs
  • Shader packs
  • Modpacks, where supported
  • Data packs, where applicable
  • Other compatible Minecraft content available from supported providers

Use the Modrinth API as the primary content source.

Official API documentation: https://docs.modrinth.com/

Design the architecture so that other legitimate content providers can be added in the future.

  1. Minecraft Compatibility

Target specifications:

  • Minecraft Java Edition: 1.21.4
  • Mod Loader: Fabric
  • Language: Java
  • Java version: Java 21
  • Fabric Loader: Compatible with Minecraft 1.21.4
  • Fabric API: Compatible release for Minecraft 1.21.4
  • Build system: Gradle
  • Mod ID: stormmodbrowser
  • Display name: Storm Mod Browser

Use the correct Fabric API and Minecraft 1.21.4 mappings.

Do not use Forge or NeoForge APIs.

Avoid unnecessary dependencies and ensure that the project builds successfully.

  1. Main GUI

Create a modern, polished GUI with a dark theme and subtle blue-purple accents.

The interface should feel like a professional Minecraft launcher or mod manager.

Main screen layout

Top section:

  • Storm Mod Browser logo and title
  • Search bar
  • Search button
  • Content category selector
  • Current Minecraft version indicator
  • Settings button

Left sidebar:

  • Discover
  • Mods
  • Resource Packs
  • Shaders
  • Modpacks
  • Installed
  • Downloads
  • Settings

Main content area:

  • Featured content
  • Popular projects
  • Recently updated projects
  • Search results
  • Content cards with preview images

Each content card should show:

  • Project icon or thumbnail
  • Project name
  • Short description
  • Author name
  • Download count
  • Supported Minecraft version
  • Loader compatibility
  • Content type
  • Install button

The interface must support scrolling and different screen resolutions.

Make the GUI usable on smaller screens as well as standard desktop displays.

  1. Open GUI Using H Key

Implement a configurable keyboard shortcut.

Default key:

H

When the player presses H, open the Storm Mod Browser GUI.

Requirements:

  • Do not open the GUI repeatedly while the key is held down.
  • Do not open it while the player is typing in a text field.
  • Allow the keybind to be changed in Minecraft's Controls settings.
  • Use Fabric's appropriate keybinding API for Minecraft 1.21.4.

The mod must also integrate with Mod Menu.

  1. Mod Menu Integration

Add compatibility with the Mod Menu mod.

When a player opens Minecraft's Mod Menu and selects Storm Mod Browser, provide a button that opens the browser.

Requirements:

  • Correct Mod Menu integration for Minecraft 1.21.4.
  • Use the supported Mod Menu API.
  • Do not crash if optional integrations are unavailable.
  • Keep Mod Menu integration optional rather than making it a mandatory dependency.

Both H and the Mod Menu entry must open the same main GUI.

  1. Search System

Implement a functional search engine using the Modrinth API.

Users should be able to search for:

  • Mods
  • Resource packs
  • Shaders
  • Modpacks
  • Other supported content

Search filters:

  • Project name
  • Description
  • Author
  • Minecraft version
  • Loader
  • Category
  • Downloads
  • Recently updated
  • Relevance

Provide:

  • Search suggestions where practical
  • Pagination or infinite scrolling
  • Loading indicators
  • Empty search results screen
  • API error messages
  • Retry button
  • Search history

Do not download every project at once.

Load results efficiently and cache appropriate metadata.

Use asynchronous network requests so searching never freezes the Minecraft game thread.

  1. Automatic Minecraft Version Detection

This is one of the most important features.

The mod must automatically detect the Minecraft version of the instance currently running.

For example, if the player launches Minecraft 1.21.4, the browser must automatically use 1.21.4 as the selected Minecraft version.

Requirements:

  • Never assume that the player is running the latest Minecraft version.
  • Detect the actual running Minecraft version at runtime.
  • Automatically apply the detected version to searches and compatibility filters.
  • Display the detected version in the GUI.
  • Allow the user to change the version filter manually if desired.
  • Include a "Current Instance" option to restore automatic detection.

For mod searches, prioritize projects with compatible versions and the Fabric loader.

For resource packs and shaders, use their available compatibility metadata when possible.

Do not claim that a resource pack or shader is incompatible solely because its Minecraft version metadata is missing.

  1. Correct Instance Installation

The mod must install downloaded files into the Minecraft instance that is currently running.

This is critical.

Examples:

  • Mods → current instance's mods directory
  • Resource packs → current instance's resourcepacks directory
  • Shaders → current instance's shaderpacks directory
  • Data packs → the appropriate selected world's datapacks directory, with clear user confirmation

Do not hardcode a launcher directory.

Do not assume every player uses the default ".minecraft" folder.

Do not install files into a different instance or create a separate instance automatically.

Use the current runtime's game directory wherever possible, including Fabric Loader's game-directory information.

For Minecraft 1.21.4, use the correct Minecraft runtime APIs to locate the active game directory.

Create a destination directory if it does not exist.

Before installing a file:

  1. Validate the selected project and file.
  2. Check compatibility.
  3. Check whether the file already exists.
  4. Warn about conflicting filenames.
  5. Download to a temporary file.
  6. Verify the download completed successfully.
  7. Move the completed file into the correct destination.
  8. Update the installed-content list.

Never overwrite an existing file silently.

Provide options to:

  • Replace an existing file
  • Keep the existing file
  • Cancel the installation

Use safe file operations and handle installation errors properly.

  1. Project Details and Preview Screen

When the player clicks a project card, open a detailed project screen.

Show:

  • Project name
  • Project icon
  • Author or team
  • Full description
  • Screenshots or gallery images when available
  • Supported Minecraft versions
  • Fabric compatibility
  • Available versions
  • Release dates
  • Download counts
  • Changelog
  • License information when available
  • External project page button
  • Install button

Use the project's official metadata and API responses.

If images are missing, show a default placeholder.

Do not crash when a project has no screenshots or description.

Provide a back button to return to the previous screen.

  1. Version Selection

Implement a functional version selector.

The mod should retrieve available project versions from the content provider.

Each version entry should display:

  • Version name
  • Minecraft version
  • Release type
  • Release date
  • Loader compatibility
  • File size when available
  • Download button

Automatically prioritize the version compatible with the current Minecraft instance.

For example, when playing Minecraft 1.21.4 with Fabric, prioritize compatible Fabric builds for 1.21.4.

If no compatible version exists:

  • Display a clear warning.
  • Explain that no matching version was found.
  • Allow the user to inspect other versions manually.
  • Never silently install an incompatible mod.

For resource packs and shaders, apply content-specific compatibility checks instead of using mod loader rules.

  1. Download Manager

Build a complete download manager.

Each download entry should display:

  • Project name
  • Project icon
  • File name
  • Download percentage
  • Downloaded size
  • Total size, when known
  • Download speed
  • Estimated remaining time, when available
  • Current status

Supported states:

  • Waiting
  • Downloading
  • Verifying
  • Installing
  • Completed
  • Failed
  • Cancelled

Show a progress bar and live percentage.

Example:

Storm Mod Browser Downloading: Sodium Progress: 67% Downloaded: 8.4 MB / 12.5 MB Speed: 2.1 MB/s

Requirements:

  • Multiple downloads with a configurable concurrency limit.
  • Pause and resume only where the server supports reliable HTTP range requests.
  • Cancel downloads.
  • Retry failed downloads.
  • Handle interrupted connections.
  • Set reasonable connection and read timeouts.
  • Do not block the Minecraft render thread.
  • Prevent incomplete downloads from being installed.
  • Clean up temporary files after cancellation or failure.
  • Handle unknown content lengths without displaying false percentages.

Use a background executor or equivalent asynchronous architecture.

  1. Resource Pack Browser

Create a dedicated Resource Packs section.

Display:

  • Pack icon
  • Pack name
  • Description
  • Author
  • Preview images, if available
  • Compatible Minecraft versions
  • Available versions
  • Install button

Download resource packs to the current instance's "resourcepacks" directory.

After installation:

  • Show a success message.
  • Provide a button to open Minecraft's Resource Packs screen when appropriate.
  • Explain when the pack requires the player to activate it manually.

Never automatically activate an untrusted resource pack without user consent.

  1. Shader Browser

Create a dedicated Shaders section.

Display:

  • Shader name
  • Preview image
  • Description
  • Author
  • Supported Minecraft versions
  • Required shader loader or rendering mod
  • Available files
  • Install button

Install shader files into the current instance's "shaderpacks" directory.

Important:

  • Shader packs generally require compatible shader support, such as Iris.
  • Detect whether Iris appears to be installed.
  • Warn the user if required shader support is missing.
  • Do not automatically download unrelated dependencies without permission.
  • Explain that shader availability and performance depend on the user's device and rendering configuration.

After downloading, provide an option to open the relevant video settings or shader selection screen when supported.

  1. Mods Browser

Create a dedicated Mods section.

Display:

  • Project icon
  • Name
  • Description
  • Author
  • Download count
  • Minecraft compatibility
  • Fabric compatibility
  • Dependencies
  • Available versions

Before installation:

  • Check the Minecraft version.
  • Check Fabric loader compatibility.
  • Inspect dependency metadata.
  • Identify required dependencies.
  • Detect incompatible or conflicting versions when possible.

Provide two installation modes:

A. Install selected mod only.

B. Install mod with required dependencies.

For dependency installation:

  • Display the dependency list.
  • Show which dependencies are already installed.
  • Ask for confirmation before downloading missing dependencies.
  • Resolve dependency versions against the active instance's Minecraft version.
  • Detect circular dependencies and unresolved dependencies.
  • Never silently replace existing mods.

If a dependency cannot be resolved, explain the problem clearly.

  1. Installed Content Manager

Add an Installed section that scans the current instance.

Show installed:

  • Mods
  • Resource packs
  • Shaders

For mods, show:

  • File name
  • Detected mod ID, when available
  • Version, when available
  • File size
  • Installation location
  • Basic compatibility information

For resource packs and shaders, show:

  • File name
  • File size
  • Installation status

Provide actions:

  • Open file location where supported
  • Remove installed content
  • Refresh the list
  • View details

Ask for confirmation before deleting files.

Never delete files outside the relevant content directory.

Do not assume every JAR in the mods folder is a valid mod.

  1. Favorites and History

Add:

  • Favorite projects
  • Recently viewed projects
  • Search history
  • Download history
  • Installed-content history

Persist settings and user preferences locally.

Use a suitable configuration format or Minecraft's configuration directory.

Do not store passwords, access tokens, or unnecessary personal information.

  1. Settings

Create a Settings screen containing:

  • Theme selection
  • Default content category
  • Automatic Minecraft version filtering
  • Download concurrency
  • Download location information
  • Clear search history
  • Clear cached metadata
  • Reset settings
  • About Storm Mod Browser

The installation destination must remain the active instance's appropriate directory.

Do not allow arbitrary installation paths that could accidentally install files into unrelated directories.

  1. API and Network Architecture

Use the official Modrinth API.

Documentation: https://docs.modrinth.com/api/

Requirements:

  • Use supported API endpoints.
  • Send an appropriate User-Agent.
  • Respect API rate limits.
  • Handle HTTP errors and malformed JSON.
  • Use JSON parsing through a reliable library.
  • Cache project metadata where appropriate.
  • Use pagination.
  • Avoid unnecessary requests.
  • Never block the render thread with network operations.
  • Do not hardcode project IDs or search results.
  • Validate download URLs and metadata before downloading.
  • Use HTTPS wherever supported.
  • Never execute downloaded files directly.

If another content provider is added later, implement it through a provider interface instead of scattering provider-specific logic throughout the code.

  1. GUI Design and User Experience

Use a consistent dark UI with:

  • Rounded project cards
  • Clean typography
  • Smooth hover effects
  • Clear buttons
  • Scrollable content
  • Loading animations
  • Download progress bars
  • Error and success notifications
  • Keyboard navigation
  • Responsive layouts

Provide a polished visual design without excessive animations.

The interface must remain responsive during API requests and downloads.

Do not use placeholder buttons that do nothing.

Do not use fake download percentages or simulated search results.

  1. Error Handling

Handle these situations gracefully:

  • No internet connection
  • API rate limit exceeded
  • Server unavailable
  • Project not found
  • No compatible version
  • Download interrupted
  • Insufficient storage
  • Permission denied
  • Invalid file
  • Missing dependency
  • Duplicate file
  • Installation failure
  • Invalid JSON response
  • Missing project image
  • Unsupported content type

Show understandable error messages and useful recovery options.

Write diagnostic information to a dedicated log file without logging sensitive information.

  1. Security Requirements
  • Validate URLs before downloading.
  • Reject unsupported URL schemes.
  • Prevent path traversal attacks.
  • Restrict installation destinations to the appropriate active-instance directories.
  • Never execute downloaded JAR files.
  • Never run downloaded installers automatically.
  • Verify downloaded files are complete.
  • Verify hashes when trustworthy hashes are provided.
  • Warn about incompatible or potentially unsafe content.
  • Require confirmation before destructive operations.
  • Avoid downloading content from arbitrary URLs supplied by project descriptions.
  • Treat project metadata and descriptions as untrusted input.
  1. Recommended Project Architecture

Use a maintainable Java package structure similar to:

com.storm.modbrowser ├── StormModBrowser.java ├── config │ └── ModBrowserConfig.java ├── gui │ ├── MainBrowserScreen.java │ ├── ProjectDetailsScreen.java │ ├── SearchScreen.java │ ├── DownloadsScreen.java │ ├── InstalledScreen.java │ ├── SettingsScreen.java │ └── components ├── api │ ├── ContentProvider.java │ ├── ModrinthProvider.java │ ├── ProjectService.java │ └── ApiClient.java ├── models │ ├── Project.java │ ├── ProjectVersion.java │ ├── ProjectFile.java │ └── DownloadTask.java ├── download │ ├── DownloadManager.java │ └── DownloadTaskRunner.java ├── install │ ├── InstancePathResolver.java │ ├── ContentInstaller.java │ ├── DependencyResolver.java │ └── CompatibilityChecker.java ├── integration │ ├── KeybindHandler.java │ └── ModMenuIntegration.java └── util ├── JsonUtil.java ├── FileUtil.java └── LoggerUtil.java

You may improve this architecture where appropriate.

Use the actual package name consistently across Java files, Fabric metadata, Gradle configuration, and resource files.

  1. Fabric Metadata and Mod Menu

Provide a correct "fabric.mod.json".

Include:

  • Mod ID
  • Display name
  • Description
  • Version
  • Authors
  • Minecraft 1.21.4 compatibility
  • Java 21 requirement
  • Fabric Loader dependency
  • Appropriate Fabric API dependency
  • Optional Mod Menu integration

Register the H keybind through the appropriate client initialization entrypoint.

Implement Mod Menu integration using the correct API for the selected Mod Menu version.

  1. Required Deliverables

Generate the complete source project, including:

  1. Full Gradle project.
  2. "settings.gradle".
  3. "build.gradle".
  4. "gradle.properties".
  5. Correct "fabric.mod.json".
  6. All Java source files.
  7. All required resources.
  8. GUI implementation.
  9. Functional Modrinth API integration.
  10. Search and filtering system.
  11. Project details and preview screens.
  12. Version selection.
  13. Real download manager with live percentage.
  14. Correct active-instance installation.
  15. Mod, resource pack, and shader management.
  16. H keybind.
  17. Mod Menu integration.
  18. Error handling.
  19. README with build and installation instructions.

Provide the project as a ZIP archive containing the complete source code.

If the environment supports Gradle builds, compile the project and fix all compilation errors before delivering it.

Do not claim that the project builds successfully unless it has actually been built and tested.

If possible, provide the compiled Fabric mod JAR alongside the source ZIP.

  1. Final Acceptance Tests

The mod is considered complete only when the following tests pass:

TEST 1:

Launch Minecraft Java 1.21.4 with Fabric and open the browser using H.

TEST 2:

Open the browser from Mod Menu.

TEST 3:

Search for Sodium and display real results from the API.

TEST 4:

Open a project's details and display its description, versions, and available preview images.

TEST 5:

Automatically detect Minecraft 1.21.4 and prioritize compatible Fabric versions.

TEST 6:

Download a compatible mod and show real-time download progress.

TEST 7:

Verify that the downloaded mod is installed in the active instance's mods folder.

TEST 8:

Download a resource pack into the active instance's resourcepacks folder.

TEST 9:

Download a compatible shader pack into the active instance's shaderpacks folder.

TEST 10:

Display installed content after refreshing the installed-content list.

TEST 11:

Handle failed downloads without installing incomplete files.

TEST 12:

Verify that downloading or searching never freezes the Minecraft game thread.

TEST 13:

Verify that duplicate files are handled safely.

TEST 14:

Verify that incompatible mods and unresolved dependencies produce useful warnings.

TEST 15:

Verify that the mod works when Minecraft is launched from a non-default game directory.

FINAL INSTRUCTION

Build Storm Mod Browser as a complete, functional Minecraft Fabric 1.21.4 mod.

Prioritize correctness, compatibility, security, usability, and stable performance.

Do not return only a tutorial, conceptual explanation, UI mockup, or incomplete code snippets.

Generate all required source files with complete implementations, ensure that the APIs match Minecraft 1.21.4, and provide the source ZIP and compiled JAR when the build environment permits.

Kodari AI
KodariOct 22 at 4:14 am 7
StormModBrowser
An in-game mod, resource pack, and shader browser for Minecraft 1.21.4 Fabric. Features a dark-themed GUI with search, project details, version selection, and a real download manager. Automatically detects the running Minecraft version, installs content to the active instance's directories, and integrates with Mod Menu and an H keybind. Uses the Modrinth API for content discovery and metadata.
  1. Set up the Fabric 1.21.4 Gradle project and metadata.

  2. Add the Modrinth search/details client and safe asynchronous downloads/installation.

  3. Build the browser UI, H keybind, installed-content view, and optional Mod Menu entry.

  4. Add configuration, README, and package the source archive if supported.

Created the Storm Mod Browser source project with the Fabric 1.21.4 Gradle setup, Modrinth search and pagination, project details and thumbnails, the H keybind, optional Mod Menu entry, settings, and active-instance installation for mods, resource packs, shaders, and .mrpack archives. Downloads run asynchronously, show progress, check provider SHA-1 hashes when available, validate archive contents, and require confirmation before replacing files.

Not fully acceptance-complete: required mod dependencies are identified but not installed automatically; modpacks are saved as archives rather than merged into the running instance; shader-loader detection and data-pack browsing are not implemented.

I couldn’t run a build or produce a ZIP/JAR artifact here, so compilation and the acceptance tests remain unverified. The project files are in the workspace, but no source ZIP is attached. To build and download the JAR in Kodari, click Compile in the desktop top bar, or ⋮ → Compile Project on phone; click Compile in the window, then Download on the successful build.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
manifest.kod
README.md
settings.gradle
Code
17 2,251
src/client/java/com/storm/modbrowser/StormModBrowserClient.java
package com.storm.modbrowser;

import com.storm.modbrowser.api.ModrinthProvider;
import com.storm.modbrowser.config.BrowserConfig;
import com.storm.modbrowser.gui.BrowserScreen;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.util.InputUtil;

public final class StormModBrowserClient implements ClientModInitializer {
    private static KeyBinding openBrowser;

    @Override
    public void onInitializeClient() {
        BrowserConfig.load();
        ModrinthProvider.setConcurrency(BrowserConfig.downloadConcurrency());
        openBrowser = KeyBindingHelper.registerKeyBinding(new KeyBinding(
                "key.stormmodbrowser.open",
                InputUtil.Type.KEYSYM,
                InputUtil.GLFW_KEY_H,
                "key.category.stormmodbrowser"
        ));

        ClientTickEvents.END_CLIENT_TICK.register(client -> {
            while (openBrowser.wasPressed()) {
                if (client.currentScreen == null) {
                    client.setScreen(new BrowserScreen());
                }
            }
        });
    }
}