DARSH Sharma

make a minecraft cosmetic mod with cape animated and normal

Kodari AI
KodariNov 1 at 1:52 pm 7
AnimatedCapesMod
A Fabric mod for Minecraft 1.26.3 that adds customizable animated and static capes to the game. Players can equip capes through a simple command or GUI, with support for both standard static cape designs and fully animated capes featuring custom frame-by-frame textures. The mod includes a cape rendering system that seamlessly integrates with the player model, a configuration system for defining cape animations with adjustable frame rates and looping options, and a server-side permission system to control cape access. Features smooth client-side animation interpolation, compatibility with vanilla cape rendering, and a developer API for creating custom cape animations.
  • Add normal and animated cape styles, switchable with a key.

  • Render the selected cape locally using Minecraft’s cape physics.

Added normal and animated cape styles. Press P to cycle between them and your original cape.

The cosmetic is available in survival without crafting, but is visible only on your client. Keep the vanilla Cape skin setting enabled.

DARSH Sharma

what is the game version of this mod

Kodari AI
KodariNov 1 at 1:55 pm 1

The mod targets Minecraft 26.3 with Fabric.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
10 145
src/client/java/com/kodari/capecosmetics/CapeCosmeticsClient.java
package com.kodari.capecosmetics;

import com.mojang.blaze3d.platform.InputConstants;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.keymapping.v1.KeyMappingHelper;
import net.minecraft.client.KeyMapping;
import net.minecraft.core.ClientAsset;
import net.minecraft.resources.Identifier;

public final class CapeCosmeticsClient implements ClientModInitializer {
    private static final Identifier NORMAL = Identifier.fromNamespaceAndPath("capecosmetics", "textures/entity/cape.png");
    private static final Identifier GLOW = Identifier.fromNamespaceAndPath("capecosmetics", "textures/entity/cape_glow.png");
    private static int style = 1;
    private static long ticks;

    public static ClientAsset.Texture selectedCape() {
        if (style == 0) return null;
        Identifier texture = style == 2 && (ticks / 10) % 2 == 1 ? GLOW : NORMAL;
        return new ClientAsset.ResourceTexture(texture, texture);
    }

    @Override
    public void onInitializeClient() {
        KeyMapping.Category category = KeyMapping.Category.register(Identifier.fromNamespaceAndPath("capecosmetics", "controls"));
        KeyMapping cycle = KeyMappingHelper.registerKeyMapping(new KeyMapping(
                "key.capecosmetics.cycle", InputConstants.Type.KEYBOARD, InputConstants.KEY_P, category));
        ClientTickEvents.START_CLIENT_TICK.register(client -> {
            ticks++;
            while (cycle.consumeClick()) style = (style + 1) % 3;
        });
    }
}