Silent Playz
📎 1 file 3,401 chars
📄
pasted-code-1793279179328.txt
txt 50 lines
▶
Create a complete working Minecraft Fabric mod named **IMMORTAL CLIENT LOADING SCREEN**.

### Main goal
Replace the normal Minecraft Mojang loading screen with my uploaded image, “Immortal Neon Game Loading Overlay”. Use the uploaded image as the visual reference and use the actual image asset in the mod. The design must preserve the IMMORTAL CLIENT logo, crown, neon-blue glow, futuristic progress bar, and black background.

### Required features
1. Display my IMMORTAL CLIENT logo during Minecraft startup instead of the default Mojang loading screen wherever technically possible.
2. Create a fullscreen custom loading interface with a pure black background and the IMMORTAL CLIENT logo centered on the screen.
3. Show an animated neon-blue progress bar with a percentage from 1% to 100%.
4. Update the percentage smoothly using actual Minecraft loading/resource reload progress wherever the Fabric API allows it. Do not simply pretend that a timer represents real loading progress.
5. Show the text “LOADING GAME...” beneath the progress bar.
6. Add a subtle cyan glow, animated highlights, and a futuristic blue border.
7. Scale the interface correctly to different screen resolutions without stretching the logo.
8. Use a transparent PNG logo asset if possible, so the black background blends perfectly with the screen.
9. Close the custom loading interface when Minecraft finishes loading and the main menu is ready.
10. Avoid crashes, infinite loading screens, excessive CPU/GPU usage, and conflicts with other Fabric mods.

### Compatibility
- Minecraft Java Edition.
- Fabric Loader.
- Target Minecraft version: 1.21.11 initially.
- Use the correct Java version, Fabric Loom version, Yarn mappings or Mojang mappings, and Fabric API version compatible with the target Minecraft version.
- Verify the exact available dependencies instead of inventing version numbers.
- Keep the code structured so compatibility with additional Minecraft versions can be added later.

### Technical implementation
- Use Java and Fabric lifecycle/resource reload hooks.
- Investigate the Minecraft loading overlay and resource reload progress APIs for the selected version.
- If the Mojang loading screen cannot be replaced through a supported hook, implement the closest reliable replacement and clearly explain the limitation.
- Register the required mixins only if necessary and provide the correct mixin configuration.
- Do not use nonexistent classes, methods, mappings, or Fabric events.
- Keep rendering on the correct Minecraft render thread.
- Handle missing logo assets gracefully.

### Deliverables
Generate the complete buildable project, not just a concept or pseudocode:
- settings.gradle
- build.gradle
- gradle.properties
- fabric.mod.json
- Java source files
- Mixin classes and configuration if required
- Logo and other assets under the correct resources directory
- README with installation and troubleshooting steps
- Windows build instructions using gradlew.bat build
- Output location of the final mod JAR in build/libs/

Explain how to install the finished JAR in the Minecraft mods folder and how to test it in a clean Fabric installation.

Important: Do not claim that the Mojang loading screen has been replaced unless the implementation actually does so. Build a functional mod and verify compilation before declaring it complete.
Kodari AI
KodariOct 29 at 1:18 pm 4
ImmortalClientLoadingScreen
Replaces Minecraft's default Mojang loading screen with a custom IMMORTAL CLIENT themed interface featuring a pure black background, centered logo, animated neon-blue progress bar with real loading percentage updates, "LOADING GAME..." text, cyan glow effects, and futuristic border. Scales across resolutions without stretching, closes when main menu is ready, handles missing assets gracefully, and integrates with Fabric lifecycle hooks for accurate progress tracking.
  1. Identify the 1.21.11 loading-overlay hook and real reload progress.

  2. Create the mod source, mixin/configuration, and loading-screen artwork.

  3. Add project metadata and installation/troubleshooting documentation.

Created the Fabric 1.21.11 mod project with a client-only mixin that draws the custom loading interface over vanilla’s SplashOverlay. It uses the overlay’s smoothed, real resource-reload progress, keeps vanilla’s loading and error-handling lifecycle intact, and shows the main menu when vanilla removes the overlay.

Limitations: This does not replace the earlier Mojang branding shown before SplashOverlay starts. The attachment contained the written specification, not a logo image, so the project uses a generated crown crest at src/main/resources/assets/immortal_loading/textures/gui/immortal_crest.png and draws the requested name as text. The README covers installation and testing; it uses Kodari’s build flow rather than local gradlew.bat instructions. No compilation result is available here, so I can’t claim the build has been verified.

To build and download the JAR in Kodari:

  1. On desktop, click Compile in the top bar; on phone, tap ⋮ → Compile Project.

  2. Click Compile in the window.

  3. When it succeeds, click Download. The configured artifact name is immortal-client-loading-screen-1.0.0.jar, under build/libs/ in the project output. Install it in the client’s mods folder alongside Fabric Loader and Fabric API.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
README.md
settings.gradle
Code
8 228
src/client/java/dev/kodari/immortal_loading/mixin/SplashOverlayMixin.java
package dev.kodari.immortal_loading.mixin;

import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gl.RenderPipelines;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.SplashOverlay;
import net.minecraft.util.Identifier;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(SplashOverlay.class)
public abstract class SplashOverlayMixin {
    @Shadow
    private float progress;

    @Unique
    private static final Identifier immortal_loading$LOGO = Identifier.of("immortal_loading", "gui/immortal_crest");

    @Inject(method = "render", at = @At("TAIL"))
    private void immortal_loading$renderCustomOverlay(DrawContext context, int mouseX, int mouseY, float deltaTicks, CallbackInfo ci) {
        MinecraftClient client = MinecraftClient.getInstance();
        int screenWidth = client.getWindow().getScaledWidth();
        int screenHeight = client.getWindow().getScaledHeight();
        int centerX = screenWidth / 2;
        int centerY = screenHeight / 2;

        context.fill(0, 0, screenWidth, screenHeight, 0xFF000000);

        int panelWidth = Math.max(0, Math.min(460, screenWidth - 24));
        int panelLeft = Math.max(0, (screenWidth - panelWidth) / 2);
        int panelRight = Math.min(screenWidth, panelLeft + panelWidth);
        int panelTop = Math.max(0, centerY - 128);
        int panelBottom = Math.min(screenHeight, centerY + 106);
        if (panelRight > panelLeft && panelBottom > panelTop) {
            context.fill(panelLeft, panelTop, panelRight, panelTop + 1, 0xFF087EAB);
            context.fill(panelLeft, panelBottom - 1, panelRight, panelBottom, 0xFF087EAB);
            context.fill(panelLeft, panelTop, panelLeft + 1, panelBottom, 0xFF087EAB);
            context.fill(panelRight - 1, panelTop, panelRight, panelBottom, 0xFF087EAB);
            context.fill(panelLeft + 1, panelTop + 1, panelLeft + 2, panelTop + 24, 0xFF36DFFF);
            context.fill(panelRight - 2, panelBottom - 24, panelRight - 1, panelBottom - 1, 0xFF36DFFF);
        }

        int logoSize = Math.max(1, Math.min(96, Math.min(screenWidth - 40, screenHeight / 3)));
        int logoX = centerX - logoSize / 2;
        int logoY = centerY - logoSize - 42;
        if (client.getResourceManager().getResource(immortal_loading$LOGO).isPresent()) {
            context.drawTexture(RenderPipelines.GUI_TEXTURED, immortal_loading$LOGO, logoX, logoY, 0.0F, 0.0F, logoSize, logoSize, 64, 64);
        } else {
            immortal_loading$drawFallbackCrest(context, centerX, logoY, logoSize);
        }

        int titleY = logoY + logoSize + 8;
        context.drawCenteredTextWithShadow(client.textRenderer, "IMMORTAL CLIENT", centerX, titleY, 0xFFB6F7FF);

        float displayProgress = Math.max(0.01F, Math.min(1.0F, progress));
        int percent = Math.max(1, Math.min(100, Math.round(displayProgress * 100.0F)));
        int barWidth = Math.max(1, Math.min(280, screenWidth - 48));
        int barX = centerX - barWidth / 2;
        int barY = centerY + 10;
        int innerWidth = Math.max(1, barWidth - 4);
        int fillWidth = Math.max(1, Math.min(innerWidth, Math.round(innerWidth * displayProgress)));

        context.drawCenteredTextWithShadow(client.textRenderer, percent + "%", centerX, barY - 18, 0xFF65E8FF);
        context.fill(barX - 2, barY - 2, barX + barWidth + 2, barY + 9, 0x6630DFFF);
        context.fill(barX - 1, barY - 1, barX + barWidth + 1, barY + 8, 0xFF1386B2);
        context.fill(barX, barY, barX + barWidth, barY + 7, 0xFF06131D);
        context.fill(barX + 2, barY + 2, barX + 2 + fillWidth, barY + 5, 0xFF27D8FF);

        if (fillWidth > 6) {
            int travel = fillWidth - 5;
            int highlightX = barX + 2 + (int) ((System.nanoTime() / 10_000_000L) % travel);
            context.fill(highlightX, barY + 2, highlightX + 3, barY + 5, 0xFFFFFFFF);
        }

        context.drawCenteredTextWithShadow(client.textRenderer, "LOADING GAME...", centerX, barY + 18, 0xFF78DDEC);
    }

    @Unique
    private static void immortal_loading$drawFallbackCrest(DrawContext context, int centerX, int y, int size) {
        int unit = Math.max(1, size / 16);
        int baseY = y + size * 3 / 4;
        int halfWidth = size / 4;
        int left = centerX - halfWidth;
        int right = centerX + halfWidth;
        context.fill(left, baseY, right, baseY + unit * 2, 0xFF36DFFF);
        context.fill(left, baseY - unit * 3, left + unit * 2, baseY + unit, 0xFFB6F7FF);
        context.fill(centerX - unit, baseY - unit * 5, centerX + unit, baseY + unit, 0xFFB6F7FF);
        context.fill(right - unit * 2, baseY - unit * 3, right, baseY + unit, 0xFFB6F7FF);
    }
}