Михаил

Create a client-side Minecraft Fabric mod for version 1.21.1 named "SparkTiers Tagger" that fetches, caches, and displays player PvP tiers above their nametags, in the TAB list, and in chat.

The mod must scrape or fetch data from the Spark Tiers web application at: https://pages.dev

  1. COMPATIBILITY & LIFECYCLE (Fabric 1.21.1):
  • Use the standard Fabric API for registration (ClientModInitializer).
  • Target Minecraft Java Edition 1.21.1. Ensure full compatibility with standard modern performance mods like Sodium and Iris.
  • Use standard Fabric network threads for non-blocking asynchronous data fetching to prevent game-loop stuttering.
  1. GAMEMODES TO SUPPORT:

The mod must read and parse rankings for the following 11 specific gamemodes found on the website:

  • Sword
  • NethPot
  • UHC
  • SMPKit
  • Mace
  • Axe
  • DiaPot
  • DiaSMP
  • Cart
  • Spear Mace
  • CPvP
  1. TIER & RANK FORMATTING:
  • Players are ranked from Tier 1 (T1) down to Tier 5 (T5).
  • Each tier contains sub-divisions: High Tier (HT) and Low Tier (LT) (e.g., HT1, LT1, HT2, LT2, ..., HT5, LT5).
  • Include an adaptive "Highest Tier" setting that falls back to showing a player's best overall ranking across all gamemodes if they are unranked (-) in the currently active gamemode.
  1. REGION TAGS:
  • Parse and display the player's competitive region suffix next to their tier tag.
  • Supported regions: AS (Asia), ME (Middle East), EU (Europe), NA (North America), OC (Oceania), SA (South America), AF (Africa).
  1. KEYBINDS & COMMANDS:
  • Add a client-side command /sparktiers <player> that prints a formatted breakdown of a player's tiers, points, title (e.g., Combat Cadet), and region directly into chat.
  • Add an in-game GUI configuration panel (compatible with ModMenu and Cloth Config API) to allow players to manually select which gamemode to display, adjust RGB tier colors, and toggle nametag visibility.
  • Register keybinds using Fabric KeyBindingRegistry to quickly cycle through the active gamemodes in-game.
  1. CACHING & PERFORMANCE:
  • Implement a local asynchronous JSON caching system (saved to .minecraft/config/sparktiers-tagger.json) that caches player lookup data for 20-30 minutes to minimize repetitive network requests and avoid API rate limits.
  • Handle unranked players, failed network connections, or 404 responses gracefully without lagging the render engine.
Kodari AI
KodariOct 26 at 9:28 am 1
SparkTiersTagger
A client-side Fabric mod for Minecraft 1.21.1 that fetches player PvP tier data from Spark Tiers web application. It asynchronously caches rankings for 11 gamemodes across 7 regions, displays tier tags (HT1-LT5) above nametags, in TAB list, and chat, with adaptive highest-tier fallback. Features client-side commands for tier breakdowns, GUI configuration via ModMenu/Cloth Config for gamemode selection and RGB colors, and keybinds for cycling gamemodes. Handles unranked players and network failures gracefully without render lag.

Plan:

  1. Set up the Fabric client project and its entrypoint for Minecraft 1.21.1.

  2. Add asynchronous lookup, persistent 25-minute cache, tier formatting, and graceful failure handling.

  3. Wire nametag/TAB/chat display, lookup command, cycle keybind, and a ModMenu settings screen.

[Generation stopped]

Михаил

for 1.21.11

Kodari AI
KodariOct 26 at 9:29 am 1

The generation was stopped before any content could be produced.

Михаил

Create a client-side Minecraft Fabric mod for version 1.21.11 named "SparkTiers Tagger" that fetches, caches, and displays player PvP tiers above their nametags, in the TAB list, and in chat.

The mod must scrape or fetch data from the Spark Tiers web application at: https://pages.dev

  1. COMPATIBILITY & LIFECYCLE (Fabric 1.21.11):
  • Use the standard Fabric API for registration (ClientModInitializer).
  • Target Minecraft Java Edition 1.21.11 explicitly. Ensure full compatibility with standard modern performance mods like Sodium and Iris on this specific version.
  • Use standard Fabric network threads for non-blocking asynchronous data fetching to prevent game-loop stuttering.
  1. GAMEMODES TO SUPPORT:

The mod must read and parse rankings for the following 11 specific gamemodes found on the website:

  • Sword
  • NethPot
  • UHC
  • SMPKit
  • Mace
  • Axe
  • DiaPot
  • DiaSMP
  • Cart
  • Spear Mace
  • CPvP
  1. TIER & RANK FORMATTING:
  • Players are ranked from Tier 1 (T1) down to Tier 5 (T5).
  • Each tier contains sub-divisions: High Tier (HT) and Low Tier (LT) (e.g., HT1, LT1, HT2, LT2, ..., HT5, LT5).
  • Include an adaptive "Highest Tier" setting that falls back to showing a player's best overall ranking across all gamemodes if they are unranked (-) in the currently active gamemode.
  1. REGION TAGS:
  • Parse and display the player's competitive region suffix next to their tier tag.
  • Supported regions: AS (Asia), ME (Middle East), EU (Europe), NA (North America), OC (Oceania), SA (South America), AF (Africa).
  1. KEYBINDS & COMMANDS:
  • Add a client-side command /sparktiers <player> that prints a formatted breakdown of a player's tiers, points, title (e.g., Combat Cadet), and region directly into chat.
  • Add an in-game GUI configuration panel (compatible with ModMenu and Cloth Config API) to allow players to manually select which gamemode to display, adjust RGB tier colors, and toggle nametag visibility.
  • Register keybinds using Fabric KeyBindingRegistry to quickly cycle through the active gamemodes in-game.
  1. CACHING & PERFORMANCE:
  • Implement a local asynchronous JSON caching system (saved to .minecraft/config/sparktiers-tagger.json) that caches player lookup data for 20-30 minutes to minimize repetitive network requests and avoid API rate limits.
  • Handle unranked players, failed network connections, or 404 responses gracefully without lagging the render engine.
Kodari AI
KodariOct 26 at 9:48 am 6
  1. Bootstrap the 1.21.11 Fabric client mod and confirm the Spark Tiers site/API details.

  2. Implement async player lookups, JSON parsing, and a 25-minute disk cache.

  3. Add nametag/TAB/chat tags, command and cycle keybind, plus a ModMenu settings screen.

Created the SparkTiers Tagger Fabric 1.21.11 client mod with Java 21, split client sources, nametag and TAB-list tier tags, chat suffixes, /sparktiers <player>, a gamemode-cycle keybind, per-rank RGB colors, and asynchronous lookups cached for 25 minutes at config/sparktiers-tagger.json. The settings screen uses YACL with ModMenu integration.

Data-source limitation: https://pages.dev is Cloudflare’s general homepage, not a Spark Tiers app or API endpoint. I added an editable JSON URL template, but you’ll need to enter the actual Spark Tiers endpoint for live player data. The parser expects a JSON response containing player details and gamemode tiers. The settings UI uses YACL rather than Cloth Config.

Михаил

the problem is, that the website page is only 1: https://sparktiers-d60.pages.dev/ and players there could be clicked and the popup will pop up with their tiers and thats the problem, i need the tiertagger be like mctiers and pvptiers one, so it works the same and tiers fetch normally, also cracked players also can use it right? Because website owner made a website like using html not using an ai website builder, the website pops up player's tiers, it doesnot create a separate webpage for a separate player

Kodari AI
KodariOct 26 at 10:04 am 1

You’re right: the current mod is pointed at the wrong place. It assumes there’s a JSON URL like .../api/players/{player} and defaults to https://pages.dev/.... That is not the Spark Tiers site, which is https://sparktiers-d60.pages.dev/. The site is a single-page app: clicking a player opens a modal, and the tier data is loaded behind the scenes. The mod needs to call the same data request the modal uses; guessing a player page URL or parsing the visible page won’t provide that data. The site’s page text indicates it saves changes to Firebase, but that alone doesn’t reveal the player-data request or its response format.

The screenshot’s HTTP 301 is consistent with the incorrect URL. The mod also needs the actual request and response shape before its parser can be made to fetch real rankings. Please open the site in a browser, open Developer Tools → Network → Fetch/XHR, clear the list, then click a player. Send the request URL, method, and response JSON for the request that contains their tiers. Remove any cookies, authorization headers, or private tokens before sharing. With those details, the mod can query the same source directly—no separate player webpage is required.

Cracked players: the mod can run client-side without Mojang authentication. If the site’s lookup is by username, cracked players can use it too; their tier lookup would be name-based rather than dependent on a Mojang account.

Михаил

The SparkTiers website doesn't make individual player requests. Instead, it opens a persistent Google Firestore event stream via this link to load the leaderboard data directly into memory.

Modify the Fabric mod's backend fetching loop to read from this Firestore streaming endpoint. Since the data fields contain structured text mapping player IDs to their respective tiers (like Sword, NethPot, Mace), write a string-matching parser that extracts the username and their sub-tier strings (HT1-LT5) directly from the stream payload.

Kodari AI
KodariOct 26 at 10:13 am 1
  1. Trace the current fetch/cache code and inspect the site’s loaded assets for its Firestore stream details.

  2. Update the backend parser and refresh loop to consume the verified stream format.

I checked https://sparktiers-d60.pages.dev/, but it only exposes the app shell—not the Firestore stream URL or its event format. The current backend still expects a per-player JSON URL, so replacing it with the site URL would not work. Firestore listeners commonly use a WebChannel protocol, not a plain JSON or SSE stream; guessing a URL or string format would leave the mod unable to read rankings reliably.

Please share the actual stream request’s URL, method, request body, and a sample response event from Developer Tools → Network → Fetch/XHR after the leaderboard loads. Redact cookies, authorization headers, and session tokens. With those details I can adapt the fetch loop and parser to the site’s real stream format.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
manifest.kod
settings.gradle
Code
14 892
src/client/java/net/kodari/sparktiers/SparkTiersClient.java
package net.kodari.sparktiers;

import com.mojang.brigadier.arguments.StringArgumentType;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager;
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
import net.fabricmc.fabric.api.client.message.v1.ClientReceiveMessageEvents;
import net.kodari.sparktiers.client.SparkTiersConfig;
import net.kodari.sparktiers.client.data.SparkTiersStore;
import net.kodari.sparktiers.client.data.SparkTiersStore.ModeTier;
import net.kodari.sparktiers.client.data.SparkTiersStore.PlayerData;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayNetworkHandler;
import net.minecraft.client.network.PlayerListEntry;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.text.MutableText;
import net.minecraft.text.Style;
import net.minecraft.text.Text;
import net.minecraft.util.Identifier;

import java.util.Map;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionException;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.Locale;

public final class SparkTiersClient implements ClientModInitializer {
    public static final String MOD_ID = "sparktiers-tagger";
    private static final ConcurrentMap<String, PlayerData> PLAYERS = new ConcurrentHashMap<>();
    private static final KeyBinding.Category CATEGORY = KeyBinding.Category.create(Identifier.of(MOD_ID, "main"));
    private static final KeyBinding CYCLE_MODE = KeyBindingHelper.registerKeyBinding(
            new KeyBinding("key.sparktiers.cycle", 75, CATEGORY)
    );
    private static int ticks;

    @Override
    public void onInitializeClient() {
        SparkTiersConfig.load();
        registerCommands();
        registerChatTags();
        ClientTickEvents.END_CLIENT_TICK.register(SparkTiersClient::onClientTick);
    }

    private static void registerCommands() {
        ClientCommandRegistrationCallback.EVENT.register((dispatcher, registryAccess) -> dispatcher.register(
                ClientCommandManager.literal("sparktiers")
                        .then(ClientCommandManager.argument("player", StringArgumentType.word())
                                .executes(context -> {
                                    String playerName = StringArgumentType.getString(context, "player");
                                    lookupPlayer(playerName).whenComplete((result, error) -> MinecraftClient.getInstance().execute(() -> {
                                        if (error != null) {
                                            addChatMessage(Text.literal("SparkTiers lookup failed: " + failureMessage(error)));
                                        } else if (result == null || result.isEmpty()) {
                                            addChatMessage(Text.literal("No Spark Tiers data found for " + playerName + "."));
                                        } else {
                                            printBreakdown(result.get());
                                        }
                                    }));
                                    return 1;
                                }))
        ));
    }

    private static void registerChatTags() {
        ClientReceiveMessageEvents.ALLOW_CHAT.register((message, signedMessage, sender, params, receptionTimestamp) -> {
            if (sender == null) {
                return true;
            }
            String playerName = sender.name();
            PlayerData player = PLAYERS.get(normalizeName(playerName));
            if (player == null) {
                lookupPlayer(playerName);
                return true;
            }
            Text suffix = tierSuffix(player);
            if (suffix == null) {
                return true;
            }
            Text taggedMessage = message.copy().append(suffix);
            MinecraftClient.getInstance().execute(() -> addChatMessage(taggedMessage));
            return false;
        });
    }

    private static void onClientTick(MinecraftClient client) {
        while (CYCLE_MODE.wasPressed()) {
            SparkTiersConfig.GameMode[] modes = SparkTiersConfig.GameMode.values();
            SparkTiersConfig.activeMode = modes[(SparkTiersConfig.activeMode.ordinal() + 1) % modes.length];
            SparkTiersConfig.save();
            addChatMessage(Text.literal("SparkTiers mode: " + SparkTiersConfig.activeMode.displayName()));
        }
        if (++ticks % 200 != 0) {
            return;
        }
        ClientPlayNetworkHandler networkHandler = client.getNetworkHandler();
        if (networkHandler == null) {
            return;
        }
        for (PlayerListEntry entry : networkHandler.getPlayerList()) {
            lookupPlayer(entry.getProfile().name());
        }
    }

    private static CompletableFuture<Optional<PlayerData>> lookupPlayer(String name) {
        return SparkTiersStore.lookup(name).whenComplete((result, error) -> {
            if (error == null && result != null) {
                String key = normalizeName(name);
                if (result.isPresent()) {
                    PLAYERS.put(key, result.get());
                } else {
                    PLAYERS.remove(key);
                }
            }
        });
    }

    public static Text appendTier(Text original, String playerName) {
        PlayerData player = PLAYERS.get(normalizeName(playerName));
        if (player == null) {
            lookupPlayer(playerName);
            return original;
        }
        Text suffix = tierSuffix(player);
        return suffix == null ? original : original.copy().append(suffix);
    }

    private static Text tierSuffix(PlayerData player) {
        ModeTier tier = player.tierFor(SparkTiersConfig.activeMode);
        if (!tier.isRanked() && SparkTiersConfig.highestTierFallback) {
            Map.Entry<String, ModeTier> highest = player.highestTier();
            if (highest != null) {
                tier = highest.getValue();
            }
        }
        if (!tier.isRanked()) {
            return null;
        }
        int color = SparkTiersConfig.colorForRank(tier.rank());
        MutableText tag = Text.literal(" [").setStyle(Style.EMPTY.withColor(color));
        tag.append(Text.literal(tier.rank()).setStyle(Style.EMPTY.withColor(color)));
        if (player.region() != null && !player.region().isBlank()) {
            tag.append(Text.literal(" " + player.region()).setStyle(Style.EMPTY.withColor(0xAAAAAA)));
        }
        tag.append(Text.literal("]").setStyle(Style.EMPTY.withColor(color)));
        return tag;
    }

    private static void printBreakdown(PlayerData player) {
        StringBuilder heading = new StringBuilder(player.name());
        if (player.title() != null && !player.title().isBlank()) {
            heading.append(" — ").append(player.title());
        }
        if (player.region() != null && !player.region().isBlank()) {
            heading.append(" [").append(player.region()).append(']');
        }
        if (player.points() != null) {
            heading.append(" · ").append(player.points()).append(" points");
        }
        addChatMessage(Text.literal(heading.toString()));
        for (SparkTiersConfig.GameMode mode : SparkTiersConfig.GameMode.values()) {
            ModeTier tier = player.tierFor(mode);
            MutableText line = Text.literal(mode.displayName() + ": ");
            if (tier.isRanked()) {
                line.append(Text.literal(tier.rank()).setStyle(Style.EMPTY.withColor(SparkTiersConfig.colorForRank(tier.rank()))));
            } else {
                line.append(Text.literal("-"));
            }
            if (tier.points() != null) {
                line.append(Text.literal(" (" + tier.points() + " points)"));
            }
            addChatMessage(line);
        }
    }

    private static void addChatMessage(Text message) {
        MinecraftClient client = MinecraftClient.getInstance();
        if (client.inGameHud != null) {
            client.inGameHud.getChatHud().addMessage(message);
        }
    }

    private static String failureMessage(Throwable error) {
        Throwable cause = error;
        while (cause instanceof CompletionException && cause.getCause() != null) {
            cause = cause.getCause();
        }
        return cause.getMessage() == null ? cause.getClass().getSimpleName() : cause.getMessage();
    }

    private static String normalizeName(String name) {
        return name.toLowerCase(Locale.ROOT);
    }
}