Chandrashekar Niloor

Minecraft Mod Development Prompt: Custom Weapon ⚔️

Create a complete Minecraft Java Edition mod named Custom Weapon for Fabric 1.21.11.

The mod must add a powerful boss mob called Demon Blade, a special spawn egg, and a legendary weapon called Demon Slayer Sword.

  1. Demon Blade Spawn Egg Add a custom spawn egg named Demon Blade Spawn Egg. Using the egg spawns the Demon Blade boss. Add a custom texture and a dark, demonic appearance. Give the boss a large health bar, powerful attacks, and custom animations where possible. Make the boss compatible with survival and creative modes. 2. Demon Blade Boss Abilities

Ability 1: Punch Power

Performs a powerful melee punch. Deals high damage and knocks nearby enemies backward. Add punch animations and impact particles.

Ability 2: Ground Smash

The boss slams the ground. Creates a shockwave that damages nearby enemies and launches them into the air. Spawn ground-crack particles and play a powerful impact sound.

Ability 3: Stone Rain

Summons multiple stones above nearby enemies. Stones fall from the sky and deal damage on impact. Add falling-stone particles, impact sounds, and a cooldown to balance the attack. 3. Demon Blade Boss Defeat Reward When the Demon Blade boss dies, it must drop the legendary Demon Slayer Sword. Guarantee at least one sword drop. Display a dramatic lightning and particle effect when the boss is defeated. Ensure the sword is collectible and usable in survival mode. 4. Demon Slayer Sword Abilities

TNT Throw

Right-click to throw a TNT projectile toward the direction the player is looking. The TNT should explode after a short fuse. Prevent the projectile from damaging its owner. Make the ability work in survival and creative modes.

Lightning Strike

Add a separate sword ability that summons lightning at the targeted location. Use a configurable cooldown. Add lightning particles and sound effects.

Legendary Enchantments

Sharpness level 255. Mending level 1. Unbreakable: the sword must never lose durability. Give the sword a unique name, glowing enchanted appearance, and custom tooltip describing its abilities. 5. Technical Requirements Minecraft Java Edition 1.21.11. Fabric Loader and Fabric API versions compatible with Minecraft 1.21.11. Use Java and the Fabric toolchain. Create all required source files, entity registration, item registration, entity attributes, loot tables, recipes if needed, textures, models, language files, and configuration files. Use proper Minecraft entity and item APIs compatible with the specified version. Include a valid fabric.mod.json, Gradle build files, and all necessary dependencies. Ensure the mod compiles without errors. Do not use pseudocode, placeholder methods, or missing classes. Use original custom textures or clearly identified temporary textures. Provide complete source code and instructions for building the mod into a .jar file. Explain how to install the mod and its dependencies. Test for compatibility with Fabric 1.21.11 and fix compilation errors. Final Goal

Deliver a playable, complete Minecraft mod named Custom Weapon, featuring the Demon Blade boss, its spawn egg, three unique boss attacks, and the legendary Demon Slayer Sword with TNT throwing, lightning strikes, Sharpness 255, Mending, and unbreakable durability.

Kodari AI
KodariOct 29 at 10:28 am 21
DemonBladeWeaponry
Adds the Demon Blade boss mob with a spawn egg and three unique attacks: Punch Power, Ground Smash, and Stone Rain. Defeating the boss guarantees a drop of the legendary Demon Slayer Sword, which features TNT throwing on right-click, a lightning strike ability with cooldown, Sharpness 255, Mending, and unbreakable durability. Includes custom textures, models, language files, and full Fabric 1.21.11 compatibility.
  1. Set up the Fabric 1.21.11 project and register the boss, spawn item, and legendary sword.

  2. Add GeckoLib boss model/animations and the three attacks, defeat effects, and guaranteed sword drop.

  3. Implement the sword abilities, configurable lightning cooldown, survival recipe, assets, and metadata.

Custom Weapon is set up for Fabric 1.21.11 with a textured, animated Demon Blade boss, a custom spawn item, and the Demon Slayer Sword.

  • Survival access: Craft the Demon Blade Spawn Egg using 4 obsidian, 2 blaze powder, 1 soul sand, 1 nether star, and 1 magma cream. The boss has a 250-health boss bar and uses punch, ground smash, and stone rain attacks. Defeating it guarantees a Demon Slayer Sword drop.

  • Demon Slayer Sword: Has Sharpness 255, Mending I, and unbreakable durability. Right-click throws an owner-safe TNT-style blast; sneak + right-click calls lightning at the targeted block. Change lightning_cooldown_ticks in config/customweapon.properties (100 ticks is 5 seconds).

  • Assets and dependencies: Includes custom item textures, the boss model and animations, entity rendering, item models, language entries, recipe, loot table, and GeckoLib bundling configuration.

To build and download it in Kodari, click Compile in the desktop top bar, or tap ⋮ → Compile Project on mobile. Click Compile in the window; when it succeeds, click Download. Install Fabric Loader for 1.21.11 and Fabric API. Put the mod JAR and the GeckoLib JAR from the downloaded bundle into your mods folder.

Kodari can make mistakes. Review important code before using.
Files
config
src
build.gradle
gradle.properties
manifest.kod
settings.gradle
Code
30 26,467
src/main/java/com/kodari/customweapon/CustomWeaponMod.java
package com.kodari.customweapon;

import com.kodari.customweapon.entity.DemonBladeEntity;
import com.kodari.customweapon.registry.ModEntities;
import com.kodari.customweapon.registry.ModItems;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.util.Identifier;

public class CustomWeaponMod implements ModInitializer {
    public static final String MOD_ID = "customweapon";

    @Override
    public void onInitialize() {
        ModConfig.load();
        ModEntities.initialize();
        ModItems.initialize();
        FabricDefaultAttributeRegistry.register(ModEntities.DEMON_BLADE, DemonBladeEntity.createAttributes().build());

        ItemGroupEvents.modifyEntriesEvent(RegistryKey.of(RegistryKeys.ITEM_GROUP, Identifier.ofVanilla("combat")))
                .register(entries -> entries.add(ModItems.DEMON_SLAYER_SWORD));
        ItemGroupEvents.modifyEntriesEvent(RegistryKey.of(RegistryKeys.ITEM_GROUP, Identifier.ofVanilla("spawn_eggs")))
                .register(entries -> entries.add(ModItems.DEMON_BLADE_SPAWN_EGG));
    }
}