Mustafa Ghullam mustafa

I want to make a fabric mod my fabric version is 1.21.11 and I have fabric API and some other libraries but the mod we are creating requires any Library or has any dependency tell me separately and do not code it into mod. Now I want to make a mod that glows eyes crimson and has a 4x4 crimson glow in chest that connects and goes through whole body like blood and shows some aura and shows the sword glowing with red crimson energy but this is active only when I am wearing full armour and is immediately turned off when I am missing any of 4 pieces of armor

Kodari AI
KodariOct 7 at 6:12 am 1
CrimsonArmorAura
A Fabric mod that activates a crimson blood-vein effect when the player wears a full set of armor. When all four armor pieces are equipped, the player's eyes glow crimson, a 4x4 crimson glow emanates from the chest and spreads through the body like blood vessels, a red aura surrounds the player, and the held sword glows with crimson energy. The effect instantly deactivates the moment any armor piece is removed. No external dependencies required beyond Fabric API.

Plan: create a client-side crimson particle effect, enable it only with all four armor slots filled, and add the Fabric project metadata. I’ll keep it dependency-light; the effect won’t alter gameplay or require a third-party library.

[Generation stopped]

Mustafa Ghullam mustafa

Btw the 4x4 mean a small 2x2 pixels glow in the upper chest

Kodari AI
KodariOct 7 at 6:26 am 2

Plan:

  1. Build a client-side effect that checks all four armor slots every tick and disables immediately when any piece is missing.

  2. Render crimson eye, 2×2 upper-chest, vein, aura, and sword-energy accents using vanilla particles; no third-party library dependency.

Added the client-side crimson effect. It activates only while all four armor slots are occupied and stops spawning effects on the next client tick after any piece is removed. The visuals include crimson eye particles, a 2×2 glow on the upper chest, vein-like trails, a rotating aura, and energy particles around a sword in the main hand. Already-spawned particles fade naturally.

Dependency: Fabric API only, which you already have. No additional libraries are required. The mod metadata declares Fabric API as a runtime requirement; it does not bundle the library.

Mustafa Ghullam mustafa

Make it

Kodari AI
KodariOct 7 at 6:55 am 1

Plan: change the upper-chest glow to four tiny crimson particles in a 2×2 layout; leave the aura, veins, eyes, and sword effects unchanged.

Updated the upper-chest glow to use four tiny crimson particles arranged in a 2×2 pattern. The effect still activates only while all four armor slots are filled; no additional library is required beyond Fabric API.

Mustafa Ghullam mustafa

Make it again and check for possible errors

Kodari AI
KodariOct 7 at 7:00 am 1

Plan:

  1. Review the current client effect and metadata for the exact implementation and any obvious logic issues.

  2. Verify each Minecraft/Fabric API call against the 1.21.11 source.

  3. Correct the effect and likely compile issues without adding dependencies.

Moved CrimsonArmorClient into src/client/java, the correct client-only source set; leaving it in src/main/java could cause compile errors with split source sets.

Checked the Minecraft and Fabric API calls against the 1.21.11 Yarn source. The signatures used are valid, including the tick callback, dust particles, armor-slot checks, sword tag, and particle spawning. The effect stops spawning when armor is missing; particles already spawned fade out naturally. I didn’t run a full build. No extra library is needed beyond Fabric API.

Mustafa Ghullam mustafa

What should I do now

Kodari AI
KodariOct 7 at 7:20 am 1

Compile the project in Kodari:

  1. Click Compile in the top bar—or on phone, tap ⋮ → Compile Project.

  2. Click Compile in the window.

  3. If it succeeds, click Download and put the mod JAR in your Minecraft mods folder alongside Fabric API.

  4. Launch Minecraft with Fabric 1.21.11, equip all four armor pieces, and check the effect. Removing any piece should stop new effect particles; existing particles fade away.

If compilation fails, use Auto-fix in the chat or Fix in the build window.

Mustafa Ghullam mustafa

It's saying it's missing files for fabric mod

Kodari AI
KodariOct 7 at 7:23 am 1
  1. Add the missing Loom build configuration for Minecraft 1.21.11 and the split main/client source sets.

  2. Add Gradle settings and version properties matching the existing Fabric API setup.

  3. Make the mod descriptor version come from the build configuration.

Added the missing Fabric Loom project files: build.gradle, settings.gradle, and gradle.properties. The build is configured for Minecraft 1.21.11, Yarn mappings, Java 21, Fabric Loader/API, and the split client source set. I also connected fabric.mod.json’s version to the build.

Try Compile again. The only mod dependency declared is Fabric API; no extra library is required.

Mustafa Ghullam mustafa

It's working but it's showing black spots on screen

Kodari AI
KodariOct 8 at 2:31 pm 1

[Generation stopped]

Mustafa Ghullam mustafa

Black spots all over the screen

Kodari AI
KodariOct 8 at 2:32 pm 1

Those black spots are likely the mod’s custom particles rendering incorrectly. Leave the mod disabled for now, then rejoin the world to clear any particles already on screen. If the spots remain with the mod disabled, they’re coming from something else.

Mustafa Ghullam mustafa

Its because of mod

Kodari AI
KodariOct 8 at 2:36 pm 1

Understood—the mod is causing the black spots. Disable or remove it for now; the spots should stop appearing after you reload the world.

Mustafa Ghullam mustafa

Now should I change my game settings or is there a fault in mod

Kodari AI
KodariOct 8 at 2:37 pm 1

It’s most likely a bug in the mod’s particle effect, not a game-settings problem. You shouldn’t need to change your graphics settings.

Disable the mod and reload the world. If the spots disappear, that confirms the mod is causing them; leave it disabled until the particle effect is fixed.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
5 201
src/client/java/com/kodari/crimsonarmor/CrimsonArmorClient.java
package com.kodari.crimsonarmor;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.item.ItemStack;
import net.minecraft.particle.DustParticleEffect;
import net.minecraft.registry.tag.ItemTags;

public final class CrimsonArmorClient implements ClientModInitializer {
    private static final DustParticleEffect EYE_GLOW = new DustParticleEffect(0xFF1830, 0.45f);
    private static final DustParticleEffect CHEST_GLOW = new DustParticleEffect(0xFF1028, 0.55f);
    private static final DustParticleEffect CHEST_PIXEL = new DustParticleEffect(0xFF1028, 0.12f);
    private static final DustParticleEffect VEIN_GLOW = new DustParticleEffect(0xC90020, 0.35f);
    private static final DustParticleEffect AURA_GLOW = new DustParticleEffect(0xE00025, 0.6f);

    @Override
    public void onInitializeClient() {
        ClientTickEvents.END_CLIENT_TICK.register(CrimsonArmorClient::onClientTick);
    }

    private static void onClientTick(MinecraftClient client) {
        ClientPlayerEntity player = client.player;
        ClientWorld world = client.world;
        if (player == null || world == null || !hasFullArmor(player)) {
            return;
        }

        spawnCrimsonEffect(player, world);
    }

    private static boolean hasFullArmor(ClientPlayerEntity player) {
        return !player.getEquippedStack(EquipmentSlot.HEAD).isEmpty()
                && !player.getEquippedStack(EquipmentSlot.CHEST).isEmpty()
                && !player.getEquippedStack(EquipmentSlot.LEGS).isEmpty()
                && !player.getEquippedStack(EquipmentSlot.FEET).isEmpty();
    }

    private static void spawnCrimsonEffect(ClientPlayerEntity player, ClientWorld world) {
        double x = player.getX();
        double y = player.getY();
        double z = player.getZ();
        double yaw = Math.toRadians(player.getYaw());
        double forwardX = -Math.sin(yaw);
        double forwardZ = Math.cos(yaw);
        double rightX = Math.cos(yaw);
        double rightZ = Math.sin(yaw);

        double faceX = x + forwardX * 0.16;
        double faceZ = z + forwardZ * 0.16;
        double eyeY = player.getEyeY() - 0.07;
        spawn(world, EYE_GLOW, faceX - rightX * 0.065, eyeY, faceZ - rightZ * 0.065);
        spawn(world, EYE_GLOW, faceX + rightX * 0.065, eyeY, faceZ + rightZ * 0.065);

        double chestX = x + forwardX * 0.17;
        double chestZ = z + forwardZ * 0.17;
        double chestY = y + 1.28;
        for (double side : new double[]{-1.0, 1.0}) {
            for (double vertical : new double[]{-1.0, 1.0}) {
                spawn(world, CHEST_PIXEL,
                        chestX + rightX * side * 0.022,
                        chestY + vertical * 0.022,
                        chestZ + rightZ * side * 0.022);
            }
        }

        for (int i = 0; i < 6; i++) {
            double veinY = y + 1.18 - i * 0.13;
            spawn(world, VEIN_GLOW, x + forwardX * 0.16, veinY, z + forwardZ * 0.16);
        }
        for (double side : new double[]{-1.0, 1.0}) {
            for (int i = 0; i < 4; i++) {
                double lateral = side * (0.09 + i * 0.075);
                spawn(world, VEIN_GLOW,
                        x + forwardX * 0.15 + rightX * lateral,
                        y + 1.34 - i * 0.045,
                        z + forwardZ * 0.15 + rightZ * lateral);
            }
            for (int i = 0; i < 4; i++) {
                spawn(world, VEIN_GLOW,
                        x + forwardX * 0.14 + rightX * side * (0.08 + i * 0.025),
                        y + 0.62 - i * 0.14,
                        z + forwardZ * 0.14 + rightZ * side * (0.08 + i * 0.025));
            }
        }

        for (int i = 0; i < 6; i++) {
            double angle = player.age * 0.08 + i * Math.PI / 3.0;
            double auraX = x + Math.cos(angle) * 0.52;
            double auraZ = z + Math.sin(angle) * 0.52;
            double auraY = y + 0.35 + (i % 3) * 0.48 + Math.sin(angle * 1.7) * 0.08;
            spawn(world, AURA_GLOW, auraX, auraY, auraZ, 0.0, 0.012, 0.0);
        }

        ItemStack heldItem = player.getMainHandStack();
        if (heldItem.isIn(ItemTags.SWORDS)) {
            double swordX = x + rightX * 0.38 + forwardX * 0.28;
            double swordZ = z + rightZ * 0.38 + forwardZ * 0.28;
            spawn(world, CHEST_GLOW, swordX, y + 0.88, swordZ);
            spawn(world, AURA_GLOW, swordX, y + 1.08, swordZ, 0.0, 0.015, 0.0);
        }
    }

    private static void spawn(ClientWorld world, DustParticleEffect effect, double x, double y, double z) {
        spawn(world, effect, x, y, z, 0.0, 0.0, 0.0);
    }

    private static void spawn(ClientWorld world, DustParticleEffect effect, double x, double y, double z,
                              double velocityX, double velocityY, double velocityZ) {
        world.addParticleClient(effect, x, y, z, velocityX, velocityY, velocityZ);
    }
}