Shivam bhai

Act as an expert Minecraft Mod Developer. Write the complete, production-ready Java code for a custom Minecraft mod (specify Minecraft 1.21.11 using Fabric.

I need a legendary mythic weapon named "Aetheris: The Skybreaker" with custom animations, particles, and powerful combat mechanics.

Detailed Weapon Specifications & Abilities:

  1. Basic Stats:

- Item Type: Custom Melee & Ranged Hybrid Weapon (Glaive / Spear / Blade style) - Base Attack Damage: 35.0 (High Damage) - Attack Speed: 1.6 - Durability: Unbreakable / Netherite tier+

  1. Passive Abilities (Active while held in Main Hand or Off-hand):

- Flight: Grants creative-style or elytra-style continuous flight to the player while holding the weapon. - Blue Particle Aura: Spawns ambient blue swirl/flame particles (e.g., 'soul_fire_flame' and 'electric_spark') continuously orbiting the holder. - True Sight / Detection (32-block radius): Every tick, check for all living entities/players within a 32-block sphere. If any entity has the Invisibility effect or is hidden, force-apply the 'Glowing' effect with a blue/cyan outline so they cannot sneak up on the player.

  1. Active Combat Abilities & Keybinds:

- Primary Attack (Left-Click): Deals massive direct melee damage and summons a direct lightning bolt on the struck target without damaging the wielder. - Boomerang Throw (Hold & Release Right-Click): * The weapon can be charged and thrown like a projectile (similar to a Trident with Loyalty). * When it hits an entity or block, it triggers a "Destroy Attack" (causes a localized explosion/kinetic shockwave breaking nearby weak blocks and dealing AOE damage). * The weapon automatically flies back to the player's inventory immediately after impact. - Sonic Beam (Shift + Right-Click or dedicated Keybind): * Fires a high-velocity, piercing Warden-style Sonic Boom beam in the crosshair direction (range: 30-40 blocks). * Visuals: Sonic boom rings and cyan particles along the raycast trajectory. * Mechanics: Deals armor-piercing magic/knockback damage to all entities caught in the line of fire.

  1. Implementation Requirements:

- Provide clean Java class files: Item Registration, Custom Entity (for thrown projectile), Renderers/LayerDefinitions, Client Particle Tick Handlers, and Networking/Packets. - Ensure proper server-side validation to prevent desync during throw and return mechanics. - Include sound effects: Custom charge sound, lightning sound, and Warden sonic boom roar.

Kodari AI
KodariNov 8 at 2:45 pm 3
  1. Upgrade the existing relic project to Fabric 1.21.11 and establish the weapon’s base stats.

  2. Add its flight, detection, combat abilities, projectile, and presentation.

The project currently targets 1.21.1 and contains only a cosmetic relic. I’m upgrading that foundation first; the requested projectile and combat systems require additional implementation.

Foundation added: the project now targets Fabric 1.21.11. Aetheris has 35 attack damage, 1.6 attack speed, an unbreakable component, and its existing particle aura.

In survival, upgrade a netherite sword with a nether star and netherite upgrade template at a smithing table.

Not yet implemented: flight, detection, lightning, the returning projectile and shockwave, sonic beam, custom animations, and combat sounds. This is not yet the complete weapon requested.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
LICENSE
README.md
settings.gradle
Code
13 288
src/client/java/dev/aetheris/client/AetherisClient.java
package dev.aetheris.client;

import dev.aetheris.AetherisMod;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.minecraft.client.MinecraftClient;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.util.Hand;
import net.minecraft.util.math.MathHelper;

public final class AetherisClient implements ClientModInitializer {
    private static long tickCounter = 0L;

    @Override
    public void onInitializeClient() {
        ClientTickEvents.END_CLIENT_TICK.register(AetherisClient::spawnRelicAura);
    }

    private static void spawnRelicAura(MinecraftClient client) {
        if (client.world == null) return;

        tickCounter++;
        // Har doosre tick par particles: visual effect halka rahe aur low-end PCs par load kam ho.
        if ((tickCounter & 1L) != 0L) return;

        for (PlayerEntity player : client.world.getPlayers()) {
            boolean holdingRelic =
                    player.getStackInHand(Hand.MAIN_HAND).isOf(AetherisMod.AETHERIS_RELIC)
                    || player.getStackInHand(Hand.OFF_HAND).isOf(AetherisMod.AETHERIS_RELIC);

            if (!holdingRelic) continue;

            double phase = (tickCounter * 0.16) + player.getId() * 0.37;
            double radius = 0.48;
            double x = player.getX() + MathHelper.cos((float) phase) * radius;
            double z = player.getZ() + MathHelper.sin((float) phase) * radius;
            double y = player.getY() + 0.75 + 0.35 * MathHelper.sin((float) (phase * 1.7));

            client.world.addParticleClient(ParticleTypes.SOUL_FIRE_FLAME,
                    x, y, z, 0.0, 0.025, 0.0);

            double opposite = phase + Math.PI;
            client.world.addParticleClient(ParticleTypes.ELECTRIC_SPARK,
                    player.getX() + Math.cos(opposite) * radius,
                    player.getY() + 1.15 + 0.18 * Math.sin(phase),
                    player.getZ() + Math.sin(opposite) * radius,
                    0.0, 0.015, 0.0);

            // Chhote end-rod sparkles se relic ko celestial look milta hai.
            if ((tickCounter % 8L) == 0L) {
                client.world.addParticleClient(ParticleTypes.END_ROD,
                        player.getX() + (player.getRandom().nextDouble() - 0.5) * 0.7,
                        player.getY() + 1.0 + player.getRandom().nextDouble() * 0.8,
                        player.getZ() + (player.getRandom().nextDouble() - 0.5) * 0.7,
                        0.0, 0.025, 0.0);
            }
        }
    }
}