oof3559

You are an expert Minecraft Java mod developer. Build me a complete, functional Minecraft Java Edition mod using Fabric for Minecraft 1.21.11.

Project: World Folders

Mod ID: "worldfolders" Language: Java Loader: Fabric Target version: Minecraft 1.21.11

Main Goal

Create a mod that adds a folder management system to Minecraft's Singleplayer World Selection menu. Players should be able to organize their worlds into custom folders, just like organizing files on a computer, while keeping the interface looking like vanilla Minecraft.

Do not just give me a tutorial or example code. Create the actual project, implement the features, generate the assets, and build the mod if your environment supports it.

  1. World Selection Interface

Integrate the mod directly into the existing Minecraft Singleplayer world selection screen.

Add:

  • An Add Folder button.
  • An Edit Folders button.
  • An All Worlds view.
  • A list of custom folders.
  • A way to view the worlds inside each folder.
  • A way to access unorganized worlds.
  • A visible indicator for the currently selected folder.
  • World counts beside folder names.
  • Working scrolling and support for different window sizes and GUI scales.

Do not break or remove the normal Minecraft buttons for playing, creating, editing, or deleting worlds.

  1. Create and Manage Folders

When the player clicks Add Folder, open a Minecraft-style dialog asking for a folder name.

Implement:

  • Creating unlimited folders, within reasonable system limits.
  • Renaming folders.
  • Preventing duplicate folder names.
  • Handling empty or invalid names.
  • Cancelling dialogs safely.
  • Saving folder information between game sessions.
  • Showing useful error messages when an operation fails.
  1. Edit Mode

When the player clicks Edit Folders, enter a dedicated Edit Mode.

The player must be able to:

  • Select a world and move it into a folder.
  • Move worlds from one folder to another.
  • Move worlds out of folders into the unorganized worlds section.
  • Click and hold a world entry to select it for movement.
  • Drag and drop worlds into folders if technically supported.
  • Use a functional Move to Folder menu as a fallback if dragging is unreliable.
  • Rename folders.
  • Delete folders.
  • See the selected world and its destination clearly.
  • Cancel an operation without changing anything.

All controls must actually work. Do not create buttons that only look functional.

  1. Safe Folder Deletion

When deleting a folder, display a confirmation dialog with these options:

Delete Folder Only

  • Delete the folder and its organization data.
  • Keep all worlds that were inside it.
  • Return those worlds to the unorganized worlds list.

Delete Folder and Worlds

  • Warn that the actual world saves will be permanently deleted.
  • Display how many worlds will be affected.
  • Require a second confirmation before deleting any save files.
  • Handle file errors safely.

Cancel

  • Close the dialog without making changes.

Never delete world saves when the user only wants to delete a folder. Never execute destructive actions without explicit confirmation.

  1. Minecraft-Themed Design

The interface must look like it belongs in vanilla Minecraft.

Create or use appropriate pixel-art assets:

  • Closed folder icon.
  • Open folder icon.
  • Selected folder icon.
  • Folder tabs and optional decorative details.
  • Vanilla-style buttons, borders, panels, and backgrounds.
  • Hover effects and selection indicators.

Use Minecraft's existing GUI textures where appropriate. If additional assets are needed, use internet images as visual references for Minecraft-style pixel art, but create original textures or use assets with compatible licenses.

All textures must be included in the project under the correct resource paths. Do not leave missing PNG files, placeholder textures, or purple-and-black missing-texture squares.

Use Minecraft's GUI rendering system rather than making a web page or a separate external application.

  1. Data Persistence

Store folder information in a reliable JSON configuration file or another appropriate format.

Requirements:

  • Save folder names and unique IDs.
  • Save which worlds belong to each folder.
  • Load folder data when Minecraft starts.
  • Preserve organization after restarting Minecraft.
  • Handle renamed, missing, or externally deleted worlds.
  • Use stable world identifiers rather than relying only on world display names.
  • Handle corrupted configuration data gracefully.
  • Use safe file-writing practices.
  • Do not modify the actual world saves just to organize them.
  • Work offline after installation.
  1. Technical Compatibility

Use verified dependencies and APIs for Minecraft 1.21.11.

Include:

  • Fabric Loader.
  • Compatible Fabric API.
  • Correct Java version for the selected Minecraft toolchain.
  • Correct mappings.
  • Gradle build configuration.
  • Fabric mod metadata.
  • Mixin configuration if required.
  • Proper client initialization.
  • Resource files and language translations.

Use the correct methods and signatures for Minecraft 1.21.11. Do not blindly copy outdated code from earlier versions.

Keep the implementation client-side if possible. Avoid unnecessary server requirements.

  1. Quality-of-Life Features

Implement these if practical:

  • Search worlds by name.
  • Sort folders alphabetically.
  • Reorder folders.
  • Optional folder colors or custom icons.
  • Tooltips for buttons.
  • Keyboard navigation.
  • Multi-select worlds.
  • A setting to choose the default world-selection view.
  • Clear visual feedback when moving worlds.

Prioritize core functionality and stability over optional features.

  1. Testing

Build and debug the project if tools are available.

Check:

  • Folder creation and renaming.
  • Moving worlds between folders.
  • Moving worlds out of folders.
  • Folder deletion with and without deleting worlds.
  • Saving and loading organization data.
  • Returning to the world selection menu after playing.
  • GUI resizing and scrolling.
  • Correct texture loading.
  • Compatibility with the specified Minecraft and Fabric versions.

Fix compilation errors and broken functionality. Never claim that something was compiled or tested unless it actually was.

  1. Required Deliverables

Create a complete, organized project containing:

  • All Java source files.
  • Gradle configuration and wrapper.
  • Fabric metadata.
  • Mixin files if necessary.
  • All PNG textures.
  • Language files.
  • Data storage classes.
  • GUI classes.
  • README with installation and build instructions.
  • Tests for important logic where practical.

Most importantly, provide the complete project as a ZIP file and the compiled mod JAR if the build succeeds. If your environment cannot create downloadable files, provide every file's complete contents and exact build instructions.

Do not stop at planning, do not provide only snippets, and do not leave essential methods unimplemented.

Start by verifying the Minecraft 1.21.11 Fabric environment, then implement, build, debug, and package the actual mod.

The final result must be a usable Minecraft-themed world-folder system that integrates naturally into the Singleplayer menu and keeps world saves safe.

Kodari AI
KodariOct 19 at 11:51 am 6
WorldFolders
Adds a folder management system to Minecraft's Singleplayer world selection menu. Players can create, rename, and delete folders to organize their worlds, move worlds between folders, and view worlds by folder or all together. Features a Minecraft-themed interface with custom textures, persistent JSON data storage, and safe deletion options. Includes drag-and-drop and menu-based world movement, search functionality, and settings for default view. Client-side only, integrates seamlessly with vanilla UI.
  1. Verify the 1.21.11 world-list and client APIs needed for safe world discovery, launch, and deletion.

  2. Build the folder data store and client-side folder-management interface.

  3. Integrate it with vanilla’s Singleplayer screen while preserving its normal world controls.

  4. Add metadata, translations, project configuration, and usage documentation.

Created the client-side World Folders Fabric project for Minecraft 1.21.11. It adds a button to vanilla’s Singleplayer screen and an owo-ui manager with All Worlds and Unorganized views, searchable folder lists, create/rename, edit mode, and a working Move to Folder chooser. Folder assignments use save-folder names and are stored atomically in config/worldfolders.json.

Folder-only deletion preserves saves. Deleting a folder’s worlds requires a separate permanent-deletion confirmation showing the affected count. A custom folder icon, English translations, Fabric metadata, Gradle configuration, manifest.kod, and README are included.

I couldn’t build or test the mod here, so no compiled JAR or ZIP is attached. To build and download it in Kodari: click Compile in the top bar (on phone: ⋮ → Compile Project), click Compile in the dialog, then click Download after it succeeds. If the build fails, use Auto-fix in chat or Fix in the build window.

oof3559

Update my existing Fabric mod "World Folders" (id: worldfolders, version 1.0.0) for Minecraft 1.21.11, Fabric Loader 0.19.5, Fabric API 0.141.6, owo-lib 0.13.0, Java 21. It currently adds a "Folders" button to the Singleplayer screen that opens a separate owo-lib screen. Folder data is stored in config/worldfolders.json (WorldFolderStore).

NEW FEATURE: show the folders directly inside the vanilla Singleplayer world list (SelectWorldScreen / WorldSelectionList), with expandable folders.

Requirements:

  1. Each folder appears as a row at the top of the world list, with the folder icon (assets/worldfolders/textures/gui/folder.png), the folder name, and the number of worlds inside it.
  2. Tapping/clicking a folder row expands or collapses it. When expanded, the worlds in that folder appear directly below it, indented, and show the normal world entry (icon, name, details). Show an arrow or +/- to indicate open or closed.
  3. Remember which folders are expanded, and save this in config/worldfolders.json.
  4. Worlds that are not in any folder appear normally below all the folders.
  5. Selecting an indented world must work exactly like vanilla: Play Selected World, Edit, Delete and Re-Create buttons all work with it.
  6. The search box must keep working. When searching, show matching worlds and auto-expand folders that contain a match.
  7. Keep the existing "Folders" button and its management screen (add, rename, delete folders, move worlds). After closing that screen, the world list must refresh.
  8. Make it work on a small screen (Android launcher, low GUI scale). Move the "Folders" button so it doesn't overlap anything, for example the top-left corner of the screen.
  9. Implement it with a Mixin on WorldSelectionList (and its entry classes if needed). Add the mixin config JSON to the mod, register it in fabric.mod.json, and use the correct Yarn/intermediary names for 1.21.11. Do not change the mod id.
  10. Do not crash if config/worldfolders.json is missing, empty or corrupted. Just start with no folders.
  11. TEXT FIX: Anywhere in my mod, text that is too long for its button or label must NOT scroll or move continuously (no marquee/ticker effect). This includes the "Edit Folders" / "Finish Editing" button, the folder buttons, world names and file names in the Folders screen. Show the full text at once instead, using one of these:

- wrap the text onto two lines and make the button taller to fit, or - make the button wider, or - shrink the text scale so it fits.

Never cut it off with "..." and never animate it. Use tooltips only as an extra, not as the only way to read the full name. Check this at a low GUI scale on a small Android screen, and with long folder names and long world names.

Build it and give me the finished .jar. Before finishing, double-check that every mixin target and method name exists in 1.21.11.

Kodari AI
KodariOct 19 at 1:01 pm 6
  1. Inspect the existing folder store, manager screen, and world-selection integration points.

  2. Verify the 1.21.11 Yarn list and entry APIs for a safe mixin implementation.

  3. Implement expandable folder rows, persistence, search behavior, refresh, and no-marquee text fitting.

  4. Update mixin metadata and project versions, then report build availability.

Updated World Folders 1.0.0 for Minecraft 1.21.11 with Fabric Loader 0.19.5 and Fabric API 0.141.6.

The Singleplayer list now shows alphabetized folder rows with icons, world counts, expand/collapse indicators, and indented vanilla world entries. Expanded folders are saved in config/worldfolders.json; search results auto-expand folders containing matches. I also added refresh-on-return from the management screen, preserved vanilla world selection and actions, and adjusted folder controls and labels to fit smaller screens without marquee text.

Verified the mixin targets against the mounted 1.21.11 Yarn source: WorldListWidget#showSummaries, SelectWorldScreen#refreshWidgetPositions, and the SelectWorldScreen.levelList field. The actual Yarn list class is WorldListWidget.

I couldn’t build or test the mod here, so no compiled JAR or ZIP is attached. To build and download it in Kodari, click Compile in the top bar (phone: ⋮ → Compile Project), click Compile in the dialog, then click Download when it succeeds. If the build fails, use Auto-fix in chat or Fix in the build window.

oof3559

My World Folders mod now crashes on startup with:

IllegalClassLoadError: com.kodari.worldfolders.client.WorldFoldersClient is in a defined mixin package com.kodari.worldfolders.client.* owned by worldfolders.mixins.json and cannot be referenced directly.

Also: "Reference map 'worldfolders.refmap.json' for worldfolders.mixins.json could not be read."

Please fix:

  1. Move ALL mixin classes into their own package, for example com.kodari.worldfolders.mixin, and set "package" in worldfolders.mixins.json to exactly that. The mixin package must contain ONLY mixin classes. WorldFoldersClient, the screen and the store stay in com.kodari.worldfolders.client.
  2. Fix the refmap problem. Either build properly with Fabric Loom so worldfolders.refmap.json is generated and included in the jar, or write every @Mixin target, @Inject method and @Shadow using the intermediary names (class_xxx / method_xxx) so no refmap is needed. Make sure "refmap" in the mixins json matches the file that is actually in the jar.
  3. Set "compatibilityLevel": "JAVA_21" and "client": [ ...mixin class names... ] in the mixins json, and make sure it is registered under "mixins" in fabric.mod.json.
  4. Before giving me the jar, list every file in it, and confirm that each mixin class listed in the json exists at that exact path.
Kodari AI
KodariOct 19 at 1:21 pm 1
  1. Locate every mixin class and inspect the mixin JSON, mod metadata, and Loom configuration.

  2. Move mixins into a dedicated package, correct refmap generation/registration, and set the requested Java 21 client mixin config.

  3. Check the resulting archive contents and confirm every configured mixin path.

Moved all three mixin classes into com.kodari.worldfolders.mixin; WorldFoldersClient and the other non-mixin classes remain in the client package. Updated the accessor import, set the mixin JSON package to com.kodari.worldfolders.mixin, and configured Loom’s Mixin annotation processor with worldfolders.refmap.json as the refmap name. The JSON’s JAVA_21, client entries, and fabric.mod.json registration are in place.

The three configured mixins correspond to these source paths, which compile to the matching package paths in the JAR:

  • com/kodari/worldfolders/mixin/SelectWorldScreenAccessor.class

  • com/kodari/worldfolders/mixin/SelectWorldScreenMixin.class

  • com/kodari/worldfolders/mixin/WorldListWidgetMixin.class

I can’t build or inspect a JAR in this environment, so I can’t provide a truthful complete JAR file listing or attach a finished JAR. To build and download it in Kodari, click Compile in the top bar (phone: ⋮ → Compile Project), click Compile, then click Download when it succeeds. Check the resulting archive for those three classes and worldfolders.refmap.json; I haven’t verified those entries in a built archive.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
manifest.kod
README.md
settings.gradle
Code
17 1,533
src/client/java/com/kodari/worldfolders/client/WorldFoldersClient.java
package com.kodari.worldfolders.client;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.screen.v1.ScreenEvents;
import net.fabricmc.fabric.api.client.screen.v1.Screens;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.world.SelectWorldScreen;
import net.minecraft.client.gui.screen.world.WorldListWidget;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.text.Text;
import com.kodari.worldfolders.mixin.SelectWorldScreenAccessor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public final class WorldFoldersClient implements ClientModInitializer {
    private static final Logger LOGGER = LoggerFactory.getLogger("worldfolders");

    @Override
    public void onInitializeClient() {
        ScreenEvents.AFTER_INIT.register((client, screen, scaledWidth, scaledHeight) -> {
            if (!(screen instanceof SelectWorldScreen)) {
                return;
            }

            ButtonWidget foldersButton = ButtonWidget.builder(Text.translatable("screen.worldfolders.open"), button -> {
                WorldFolderStore store = WorldFolderStore.load(client.runDirectory.toPath().resolve("config/worldfolders.json"));
                client.setScreen(new WorldFoldersScreen(screen, store, null, false, false, ""));
            }).dimensions(4, 4, Math.min(64, Math.max(42, scaledWidth - 8)), 20).build();
            Screens.getButtons(screen).add(foldersButton);
        });
    }

    static void refreshSelectWorldScreen(Screen screen) {
        if (!(screen instanceof SelectWorldScreen selectWorldScreen)) {
            return;
        }

        WorldListWidget list = ((SelectWorldScreenAccessor) selectWorldScreen).worldfolders$getLevelList();
        if (list instanceof WorldFoldersListAccess access) {
            access.worldfolders$refresh();
        }
    }

    public static Logger logger() {
        return LOGGER;
    }
}