cinnamonrollenjoya

Develop a Minecraft mod that adds customizable bunny ears to player characters, featuring adjustable colors and sizes. Ensure the ears droop backward for a realistic appearance and include an intuitive GUI for players to easily change their ear attributes. Additionally, incorporate an option for players to toggle the ears on or off in the settings.

Kodari AI
KodariOct 25 at 10:55 pm 5
BunnyEarCustomizer
Adds customizable bunny ears to player characters. Features adjustable colors and sizes with realistic backward-drooping animation. Includes an intuitive GUI for modifying ear attributes and a settings toggle to enable or disable ear visibility. Ears render on the player model with smooth physics and support multiple color options.
  1. Add persistent, synchronized per-player ear settings and a server-side update payload.

  2. Render backward-drooping ears on player models with adjustable color and size.

  3. Add an owo-ui editor and keybind, plus the required mod metadata and library manifest.

Added the customizable bunny-ears mod. Press B to open the settings screen, where you can toggle ears, set a hex color, and adjust their size from 50% to 150%. The ears droop backward, and each player’s settings are saved and synchronized.

The mod bundles owo-lib and Cardinal Components.

Kodari can make mistakes. Review important code before using.
Files
src
manifest.kod
Code
12 408
src/main/java/com/kodari/bunnyears/BunnyEarsMod.java
package com.kodari.bunnyears;

import com.kodari.bunnyears.component.BunnyEarsComponents;
import com.kodari.bunnyears.network.BunnyEarsPayload;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.networking.v1.PayloadTypeRegistry;
import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;

public final class BunnyEarsMod implements ModInitializer {
    public static final String MOD_ID = "bunnyears";

    @Override
    public void onInitialize() {
        PayloadTypeRegistry.playC2S().register(BunnyEarsPayload.ID, BunnyEarsPayload.CODEC);
        ServerPlayNetworking.registerGlobalReceiver(BunnyEarsPayload.ID, (payload, context) ->
                BunnyEarsComponents.EARS.maybeGet(context.player()).ifPresent(ears ->
                        ears.setSettings(payload.enabled(), payload.color(), payload.size())));
    }
}