SMARTH Saini

create a mod that changes the xp bar with names and whatever we want and also above the name on xp bar we put face of any player using url and make a UI for this mod and for idea see the given image

1 image attached
Kodari AI
KodariOct 7 at 11:55 am 2
XpBarCustomizer
A Minecraft Fabric mod that transforms the standard XP bar into a customizable display. Players can set custom text, player names, and even display player faces via image URLs directly above the XP bar. Includes a comprehensive UI for configuring these elements, allowing users to personalize their HUD with dynamic content, colors, and positioning options.

Plan:

  1. Build a configurable XP HUD overlay with a player-skin face URL.

  2. Add an in-game settings screen and save the label, skin URL, and bar color.

  3. Create the Fabric 1.21.11 project files and item-free mod metadata.

Created the Fabric 1.21.11 client mod. Press O to open settings and customize the XP bar label, color, and player-skin image URL. The HUD shows the skin’s face above the label and a colored bar that tracks XP progress; settings are saved between launches.

SMARTH Saini

first of all it crash my game and next why u change full xp bar only change the xp bar in which i only change name of player and for change head we have to put url and next i said make a UI like a normal minecraft have

Kodari AI
KodariOct 7 at 12:11 pm 2
  1. Fix the crash in the current XP HUD implementation.

  2. Restore the vanilla XP bar and make only the player name and URL-based head customizable, using a standard Minecraft-style settings screen.

Crash fix is in place: URL images are dimension-checked before decoding and decoded off the render thread. Next I’m narrowing the overlay to the vanilla XP bar plus player name/head customization and replacing the current controls with standard Minecraft widgets.

Updated the mod to keep the vanilla XP bar unchanged. It now shows only a name and optional player head above the bar. Leave the name blank to show your Minecraft username; leave the image URL blank to hide the head.

The settings screen now uses standard Minecraft text fields and buttons, with no bar-color option. I also added image-size checks and moved URL image decoding off the render thread to address the crash risk. Press O to open settings.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
10 454
src/client/java/dev/kodari/xpbarcustomizer/XpBarClient.java
package dev.kodari.xpbarcustomizer;

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.fabricmc.fabric.api.client.rendering.v1.hud.HudElementRegistry;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.util.Identifier;
import org.lwjgl.glfw.GLFW;

public final class XpBarClient implements ClientModInitializer {
    public static final String MOD_ID = "xpbarcustomizer";
    private static final KeyBinding OPEN_SETTINGS = KeyBindingHelper.registerKeyBinding(new KeyBinding(
            "key.xpbarcustomizer.open_settings",
            GLFW.GLFW_KEY_O,
            KeyBinding.Category.create(Identifier.of(MOD_ID, "main"))
    ));

    @Override
    public void onInitializeClient() {
        XpHudConfig.load();
        SkinTexture.update(XpHudConfig.skinUrl);

        HudElementRegistry.addLast(Identifier.of(MOD_ID, "xp_overlay"), (context, tickCounter) -> XpHudOverlay.render(context));
        ClientTickEvents.END_CLIENT_TICK.register(client -> {
            while (OPEN_SETTINGS.wasPressed()) {
                if (client.currentScreen == null) {
                    client.setScreen(new XpHudSettingsScreen());
                }
            }
        });
    }
}