Create a client-side Fabric mod for Minecraft 1.21.11 that lets users configure custom item appearances through an in-game GUI, like CIT. Provide an accessible keybind to open the editor. Users can create/edit/delete rules selecting a base item, specifying an exact custom item name condition (e.g. Eclipse), selecting a texture and optionally an item model, and save rules persistently. Matching items should render with the configured appearance only when both item type and custom name match; other items remain unchanged. Support practical file paths/resource identifiers and explain how to supply texture/model assets and use the GUI in a README. Handle invalid input and missing resources gracefully. Implement feature code only.

Kodari AI
KodariNov 3 at 11:20 am 4
CustomItemTexture
A client-side Fabric mod for Minecraft 1.21.11 that provides an in-game GUI for creating custom item appearance rules, similar to CIT. Players can assign custom textures and optional item models to items based on exact custom name matches. The mod includes a keybind to open the editor, persistent rule storage, and graceful handling of invalid input or missing resources. Matching items render with custom appearances only when both item type and custom name match, while all other items remain unchanged. The mod supports practical resource identifiers and includes a README explaining asset supply and GUI usage.
  1. Locate the 1.21.11 item-render hook and client keybind/resource APIs.

  2. Read the owo-ui guidance and build a persistent rules editor with graceful validation.

  3. Add the client-only mod setup, rendering integration, assets guidance, and README.

Added the client-side editor, O keybind, persistent rule storage, and rendering hook. Rules apply only when both the item ID and exact custom name match; if an asset is missing, the item keeps its vanilla appearance. The README explains setup and asset paths.

Rules save to config/itemappearances/rules.json. When the model field is blank, the texture ID is also used as the item-model ID, so provide the corresponding definition under assets/<namespace>/items/<path>.json. For example, if your definition is assets/mymod/items/eclipse.json, enter mymod:eclipse as the model ID.

The workspace compile tool returned: 'Not compiled: "CustomItemTexture" is busy or is missing its source, plugin descriptor or build file.' The project is idle and currently contains src, README.md and manifest.kod but no build file. Investigate project setup and add the required Fabric 1.21.11 Gradle build configuration and any necessary files so the workspace can compile the existing client mod, retaining its existing functionality and dependencies. Do not write tests.

Kodari AI
KodariNov 3 at 11:22 am 2
  1. Inspect the existing mod files and expected project layout.

  2. Add the minimal Fabric 1.21.11 Loom build configuration and any missing setup files.

  3. Preserve current functionality and dependencies; add no tests.

Added Fabric Loom Gradle configuration for Minecraft 1.21.11, Yarn build 5, Java 21, Fabric Loader and Fabric API. It configures Loom’s split source sets so the existing src/client code and mixin resource are included; owo-lib remains supplied through the existing manifest.kod, and MixinExtras through Fabric Loader. No tests were added.

Fix a production startup crash in the Fabric 1.21.11 Item Appearances mod. User log: Mixin apply for mod itemappearances failed itemappearances.client.mixins.json:ItemModelManagerMixin -> net.minecraft.class_10442: InvalidInjectionException: @ModifyExpressionValue ... could not find any targets matching 'update(Lnet/minecraft/client/render/item/ItemRenderState;Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/item/ItemDisplayContext;Lnet/minecraft/world/World;Lnet/minecraft/util/HeldItemContext;I)V' ... No refMap loaded. Inspect ItemModelManagerMixin, client mixin JSON and Loom setup; correct production remapping/refmap generation and the target signature/injection as necessary so the distributed jar works under Fabric Loader 0.19.3 on 1.21.11 while preserving item rules and compatibility. Address root cause rather than simply disabling the injection. Feature code/config only; no tests.

Kodari AI
KodariNov 3 at 11:31 am 1
  1. Check the mixin, config, and Loom setup against the crash.

  2. Verify the target’s Yarn signature in 1.21.11 source.

  3. Fix remapping/refmap and injection configuration while retaining the appearance rules.

Corrected the crash’s root causes: the update descriptor referenced ItemDisplayContext from the wrong package, and the mixin had no configured refmap. The descriptor now matches the 1.21.11 Yarn signature, and Loom is configured to generate the refmap named by the client mixin config. Existing appearance rules and the injection remain enabled.

jayjosephlmain

make it so theres a selection gui so you choose what texture instead of doing all of that causethen its way easier to use

Kodari AI
KodariNov 6 at 4:26 pm 2
  1. Inspect the current editor and rule fields to find the simplest texture-picker integration.

  2. Add an in-GUI picker that lists available textures and fills the rule field.

  3. Update the usage guide with how to select and supply textures.

Added a searchable Choose texture picker to the editor. It lists PNGs under textures/item/ from active mods and resource packs, and selecting one fills in its texture ID automatically. Updated the README with the picker and asset setup instructions.

jayjosephlmain

i meant a list for the actual resource pack list so i choose what texture of the custom appearances since i dont care about 3d models only the textures

Kodari AI
KodariNov 6 at 4:36 pm 4
  1. Replace the ID-only picker with a thumbnail browser showing textures and their active resource-pack source.

  2. Make new rules texture-only: keep the base item’s model shape, but remap its rendered texture; preserve legacy model overrides.

  3. Update the README and mixin registration for the new behavior.

The texture picker now shows thumbnail previews from enabled resource packs, with each texture’s source pack listed. New rules only require a texture: the mod keeps the base item’s shape and remaps its texture, so no custom model JSON or 3D model is needed. Existing saved model overrides remain supported, and the README explains the texture paths and pack priority behavior.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
manifest.kod
README.md
settings.gradle
Code
13 819
src/client/java/dev/kodari/itemappearances/AppearanceClient.java
package dev.kodari.itemappearances;

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.minecraft.client.MinecraftClient;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.texture.Sprite;
import net.minecraft.client.texture.SpriteAtlasTexture;
import net.minecraft.util.Identifier;
import org.lwjgl.glfw.GLFW;

public final class AppearanceClient implements ClientModInitializer {
    private static final KeyBinding.Category CATEGORY = KeyBinding.Category.create(Identifier.of("itemappearances", "general"));
    private static KeyBinding openEditor;

    @Override
    public void onInitializeClient() {
        AppearanceRules.load();
        openEditor = KeyBindingHelper.registerKeyBinding(
                new KeyBinding("key.itemappearances.open_editor", GLFW.GLFW_KEY_O, CATEGORY)
        );
        ClientTickEvents.END_CLIENT_TICK.register(client -> {
            while (openEditor.wasPressed()) {
                client.setScreen(new AppearanceEditorScreen());
            }
        });
    }

    public static boolean resourcesExist(AppearanceRule rule) {
        Identifier texture = Identifier.tryParse(rule.textureId());
        if (texture == null) {
            return false;
        }

        String texturePath = texture.getPath();
        if (texturePath.startsWith("textures/")) {
            texturePath = texturePath.substring("textures/".length());
        }
        if (texturePath.endsWith(".png")) {
            texturePath = texturePath.substring(0, texturePath.length() - ".png".length());
        }
        if (!texturePath.startsWith("item/")) {
            return false;
        }

        MinecraftClient client = MinecraftClient.getInstance();
        Identifier textureResource = Identifier.of(texture.getNamespace(), "textures/" + texturePath + ".png");
        if (client.getResourceManager().getResource(textureResource).isEmpty()) {
            return false;
        }

        String modelId = rule.modelId();
        if (modelId == null || modelId.isBlank()) {
            return true;
        }
        Identifier model = Identifier.tryParse(modelId);
        if (model == null) {
            return false;
        }

        Identifier modelResource = Identifier.of(model.getNamespace(), "items/" + model.getPath() + ".json");
        return client.getResourceManager().getResource(modelResource).isPresent();
    }

    public static Sprite textureSprite(String textureId) {
        Identifier texture = Identifier.tryParse(textureId);
        if (texture == null) {
            return null;
        }

        String spritePath = texture.getPath();
        if (spritePath.startsWith("textures/")) {
            spritePath = spritePath.substring("textures/".length());
        }
        if (spritePath.endsWith(".png")) {
            spritePath = spritePath.substring(0, spritePath.length() - ".png".length());
        }
        if (!spritePath.startsWith("item/")) {
            return null;
        }

        try {
            Identifier spriteId = Identifier.of(texture.getNamespace(), spritePath);
            return MinecraftClient.getInstance().getAtlasManager()
                    .getAtlasTexture(SpriteAtlasTexture.ITEMS_ATLAS_TEXTURE)
                    .getSprite(spriteId);
        } catch (RuntimeException exception) {
            return null;
        }
    }
}