Yu Joong-hyeok

tell me what this mod does, and compile it into functioning .JAR

Kodari AI
KodariNov 2 at 7:16 am 1
  1. What the mod does: It adds persistent player nicknames and optional local-file skins, an optional immortality setting, and an optional sound when a player dies. It includes /unstable commands to manage these features. Skins are read from config/unstablemod/skins/; filenames starting with slim_ use the slim player model. The source has not yet been compiled or tested in-game, so I can’t confirm it runs successfully.

  2. Build the JAR: On desktop, click Compile in the top bar; on phone, tap ⋮ → Compile Project. In the window, click Compile. When it succeeds, click Download on the build. If it fails, use Auto-fix in the chat or Fix in the build window.

Kodari can make mistakes. Review important code before using.
Files
src
.gitignore
API_AUDIT.md
build.gradle
gradle.properties
LICENSE
README.md
settings.gradle
skins-go-here.txt
Code
23 3,713
src/main/java/dev/unstablemod/UnstableModClient.java
package dev.unstablemod;

import dev.unstablemod.client.ClientSkinManager;
import dev.unstablemod.network.IdentityPayload;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
import net.minecraft.client.MinecraftClient;
import net.minecraft.text.Text;

public final class UnstableModClient implements ClientModInitializer {
    @Override
    public void onInitializeClient() {
        ClientPlayNetworking.registerGlobalReceiver(IdentityPayload.ID, (payload, context) ->
                context.client().execute(() -> {
                    MinecraftClient client = context.client();
                    if (client.player != null) {
                        if (payload.nickname().isBlank()) {
                            client.player.setCustomName(null);
                            client.player.setCustomNameVisible(false);
                        } else {
                            client.player.setCustomName(Text.literal(payload.nickname()));
                            client.player.setCustomNameVisible(true);
                        }
                    }
                    ClientSkinManager.apply(payload.skinFile(), payload.skinModel());
                })
        );
    }
}