ShahzebEmpire25

--- šŸ“Ž Attached 1 file(s):

File: pasted-code-1795094495385.txt

txt
Create a complete Minecraft mod for [Forge / Fabric / NeoForge - version 1.21.11] that adds Throwable Shurikens ranging across 5 material tiers: Wooden, Stone, Iron, Diamond, and Netherite.

Core Mechanics & Features:

Right-Click Throwing: Right-clicking launches the shuriken forward like a fast, spinning projectile with custom throw sound effects and crit particle trails.

Multi-Target Ricochet (Homing Bounce): Upon hitting an enemy, the shuriken automatically seeks out and bounces to other nearby hostile targets within a 6-block radius before returning. Higher tiers deal more damage and hit more targets (Wood: 2 dmg / 2 bounces, Stone: 3.5 dmg / 3 bounces, Iron: 5 dmg / 5 bounces, Diamond: 7 dmg / 7 bounces, Netherite: 9.5 dmg / 10 bounces).

Boomerang Return: After hitting its maximum number of targets or striking a solid block, the shuriken smoothly curves back through the air into the thrower's inventory.

Disc-Style Appearance & Textures: Design the item textures in a flat, circular 4-bladed star layout modeled after Minecraft's Music Disc silhouette. Generate 16x16 pixel-art texture files (or exact RGBA pixel grids/PNGs) for all 5 material tiers, along with crafting recipes, item model JSONs, and full Java entity/renderer code.

[Viewing 1 image]

Kodari AI
KodariThu at 1:38 pm 20
ShurikenThrower
Adds throwable shurikens in 5 material tiers (Wood, Stone, Iron, Diamond, Netherite) to Fabric 1.21.11. Right-click launches a spinning projectile with custom sounds and crit particles. Shurikens ricochet between nearby hostile targets within 6 blocks, dealing tier-based damage (2-9.5) and bouncing 2-10 times. After exhausting bounces or hitting blocks, they boomerang back to the thrower's inventory. Includes 16x16 disc-style textures, crafting recipes, item models, and full entity/renderer code.

Created the Fabric 1.21.11 shuriken mod with five tiers, ricochets, returning projectiles, particle trails, and 16Ɨ16 textures.

In survival, craft the wooden, stone, iron, and diamond tiers with four matching materials around a stick. Upgrade the diamond shuriken with a netherite ingot and upgrade template at a smithing table.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
29 316
src/main/java/com/kodari/shurikens/Shurikens.java
package com.kodari.shurikens;

import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.SpawnGroup;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroups;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.util.Identifier;

public class Shurikens implements ModInitializer {
    public static final String ID = "shurikens";
    private static final RegistryKey<EntityType<?>> PROJECTILE_KEY = RegistryKey.of(RegistryKeys.ENTITY_TYPE, Identifier.of(ID, "shuriken"));
    public static final EntityType<ShurikenEntity> PROJECTILE = Registry.register(Registries.ENTITY_TYPE, PROJECTILE_KEY,
            EntityType.Builder.<ShurikenEntity>create((type, world) -> new ShurikenEntity(type, world), SpawnGroup.MISC)
                    .dimensions(0.35F, 0.35F).build(PROJECTILE_KEY));
    public static final Item WOODEN = register("wooden_shuriken", 2F, 2);
    public static final Item STONE = register("stone_shuriken", 3.5F, 3);
    public static final Item IRON = register("iron_shuriken", 5F, 5);
    public static final Item DIAMOND = register("diamond_shuriken", 7F, 7);
    public static final Item NETHERITE = register("netherite_shuriken", 9.5F, 10);

    private static Item register(String name, float damage, int targets) {
        RegistryKey<Item> key = RegistryKey.of(RegistryKeys.ITEM, Identifier.of(ID, name));
        return Registry.register(Registries.ITEM, key, new ShurikenItem(new Item.Settings().registryKey(key), damage, targets));
    }

    @Override
    public void onInitialize() {
        ItemGroupEvents.modifyEntriesEvent(ItemGroups.COMBAT).register(entries -> {
            entries.add(WOODEN); entries.add(STONE); entries.add(IRON); entries.add(DIAMOND); entries.add(NETHERITE);
        });
    }
}