lawliet.yml

Develop a Minecraft mod that allows players to view and join a customizable list of servers directly within the game. Include features for adding servers with user-defined tags such as "cracked," "PVP," or "survival," and implement a search/filter function to display servers based on selected tags. Additionally, provide an intuitive interface for managing the server list and ensure compatibility with both the Java and Bedrock editions of Minecraft.

Kodari AI
KodariAug 12 at 2:58 am 2
ServerBrowser
Adds an in-game server browser accessible via a keybind or command. Players can add servers with custom tags (e.g., "cracked", "PVP", "survival") and filter the list by selecting tags. The interface displays server names, addresses, and tags, with buttons to join or remove entries. Supports both Java and Bedrock server addresses, storing data in a config file for persistence.

I’ll build a client-side Fabric server browser with persistent JSON storage, tag filtering/search, add/edit/remove controls, and Java/Bedrock edition metadata. Bedrock entries will be represented and filterable, while native joining will be restricted to Java unless a Bedrock protocol bridge is installed.

  1. Project foundation: Fabric 1.21.11 Gradle setup and client-only metadata.

  2. Server data: JSON-backed entries with Java/Bedrock edition, tags, notes, and CRUD operations.

  3. Browser UI: searchable/tag-filterable list with add, edit, delete, and join actions.

  4. Client integration: keybind to open the browser plus localized labels and guidance for Bedrock bridging.

Created the Fabric 1.21.11 client-side server browser project with:

  • Persistent JSON-backed server storage.

  • Add, edit, delete, and confirmation-based removal.

  • Search by name, address, notes, or tags.

  • Multi-tag filtering using comma-separated values.

  • Java and Bedrock edition labels.

  • Direct Java server joining.

  • Bedrock catalog support with protocol-bridge guidance.

  • Scrollable browser interface.

  • O key opening the browser.

  • Fabric Loom 1.14 and Java 21 configuration.

lawliet.yml

The compilation failed with this error:

code
Compilation failed with 12 error(s):

ERROR in src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java at line 75: cannot find symbol
        context.drawBorder(20, y, width - 40, ROW_HEIGHT - 4, 0xFF4C5966);
               ^
  symbol: method drawBorder(int,int,int,int,int)
  location: variable context of type DrawContext

ERROR in src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java at line 98: cannot find symbol
        context.drawBorder(x, y, buttonWidth, buttonHeight, hovered ? 0xFF8CC8F0 : 0xFF596775);
               ^
  symbol: method drawBorder(int,int,int,int,int)
  location: variable context of type DrawContext

ERROR in src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java at line 103: method does not override or implement a method from a supertype
    @Override
    ^

ERROR in src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java at line 105: method mouseClicked in interface ParentElement cannot be applied to given types;
        if (super.mouseClicked(mouseX, mouseY, button)) {
                 ^

ERROR in src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java at line 163: incompatible types: boolean cannot be converted to ServerType
        ServerInfo serverInfo = new ServerInfo(entry.name, entry.address, false);
                                                                          ^

ERROR in src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java at line 164: no suitable method found for connect(ServerBrowserScreen,MinecraftClient,ServerAddress,ServerInfo,boolean)
        ConnectScreen.connect(this, minecraft, ServerAddress.parse(entry.address), serverInfo, false);
                     ^

ERROR in   src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java at line 105: method mouseClicked in interface ParentElement cannot be applied to given types;
          if (super.mouseClicked(mouseX, mouseY, button)) {
                   ^

ERROR in   src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java at line 164: no suitable method found for connect(ServerBrowserScreen,MinecraftClient,ServerAddress,ServerInfo,boolean)
          ConnectScreen.connect(this, minecraft, ServerAddress.parse(entry.address), serverInfo, false);
                       ^

ERROR in   src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java at line 163: incompatible types: boolean cannot be converted to ServerType
          ServerInfo serverInfo = new ServerInfo(entry.name, entry.address, false);
                                                                            ^

ERROR in   src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java at line 103: method does not override or implement a method from a supertype
      @Override
      ^

ERROR in   src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java at line 75: cannot find symbol
          context.drawBorder(20, y, width - 40, ROW_HEIGHT - 4, 0xFF4C5966);
                 ^
  symbol: method drawBorder(int,int,int,int,int)
  location: variable context of type DrawContext

ERROR in   src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java at line 98: cannot find symbol
          context.drawBorder(x, y, buttonWidth, buttonHeight, hovered ? 0xFF8CC8F0 : 0xFF596775);
                 ^
  symbol: method drawBorder(int,int,int,int,int)
  location: variable context of type DrawContext


=== COMPILATION ERROR ANALYSIS ===

MISSING METHODS:
  - drawBorder(int,int,int,int,int)
ACTION: Check method names and signatures

TYPE MISMATCHES:
  - incompatible types: boolean cannot be converted to ServerType
  - incompatible types: boolean cannot be converted to ServerType
ACTION: Fix variable types or casting

FILES TO INVESTIGATE:
  - src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java
  -   src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariAug 12 at 2:59 am 1
  1. Update the screen to the current 1.21.11 DrawContext, input, and connection APIs.

  2. Preserve the existing server-list behavior and fix only the reported compile errors.

  3. Add the corrected screen as the project artifact.

  1. Fixed DrawContext border rendering with drawStrokedRectangle.

  2. Migrated mouse input to MouseButtonEvent and the 1.21.11 Screen signature.

  3. Updated ServerInfo to use ServerInfo.ServerType.OTHER.

  4. Preserved the existing ConnectScreen.connect(...) call.

Updated artifact: src/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java

lawliet.yml

The compilation failed with this error:

code
Compilation failed with 6 error(s):

ERROR in src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java at line 6: cannot find symbol
import net.minecraft.client.input.MouseButtonEvent;
                                 ^
  symbol: class MouseButtonEvent
  location: package net.minecraft.client.input

ERROR in src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java at line 105: cannot find symbol
    public boolean mouseClicked(MouseButtonEvent click, boolean doubled) {
                                ^
  symbol: class MouseButtonEvent
  location: class ServerBrowserScreen

ERROR in src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java at line 169: no suitable method found for connect(ServerBrowserScreen,MinecraftClient,ServerAddress,ServerInfo,boolean)
        ConnectScreen.connect(this, minecraft, ServerAddress.parse(entry.address), serverInfo, false);
                     ^

ERROR in   src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java at line 169: no suitable method found for connect(ServerBrowserScreen,MinecraftClient,ServerAddress,ServerInfo,boolean)
          ConnectScreen.connect(this, minecraft, ServerAddress.parse(entry.address), serverInfo, false);
                       ^

ERROR in   src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java at line 6: cannot find symbol
  import net.minecraft.client.input.MouseButtonEvent;
                                   ^
  symbol: class MouseButtonEvent
  location: package net.minecraft.client.input

ERROR in   src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java at line 105: cannot find symbol
      public boolean mouseClicked(MouseButtonEvent click, boolean doubled) {
                                  ^
  symbol: class MouseButtonEvent
  location: class ServerBrowserScreen


=== COMPILATION ERROR ANALYSIS ===

MISSING CLASSES:
  - MouseButtonEvent
ACTION: Create these classes or check imports

FILES TO INVESTIGATE:
  - src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java
  -   src/main/java/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariAug 12 at 3:00 am 1
  1. Replace the nonexistent MouseButtonEvent with the 1.21.11 Click input record.

  2. Pass the required nullable CookieStorage argument to ConnectScreen.connect.

  3. Preserve the existing UI and server actions.

Fixed the compilation errors in ServerBrowserScreen.java:

  • Replaced nonexistent MouseButtonEvent with the 1.21.11 Click record.

  • Updated the mouseClicked method signature.

  • Added the required nullable CookieStorage argument to ConnectScreen.connect(...).

Updated artifact: src/client/java/com/kodari/serverbrowser/ServerBrowserScreen.java

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
12 618
src/main/java/com/kodari/serverbrowser/ServerBrowserMod.java
package com.kodari.serverbrowser;

import net.fabricmc.api.ModInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ServerBrowserMod implements ModInitializer {
    public static final String MOD_ID = "kodari_server_browser";
    public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);

    @Override
    public void onInitialize() {
    }
}