--- ๐ Attached 1 file(s):
File: pasted-code-1789245978981.txt
Create a working Minecraft Java Edition Fabric 1.21.1 mod called **Itory Clones**.
The mod adds one custom entity: **Itory Clone**.
### Summoning
Register a configurable keybind with **keyboard key 9 as the default**.
When the player presses key 9:
* If the player has at least 1 XP point, consume exactly 1 XP point.
* Spawn one Itory Clone next to the player.
* If the player has no XP, do nothing.
### Clone
The clone must:
* have exactly **8 HP (4 hearts)**;
* remember the UUID of the player who summoned it;
* use the summoning player's Minecraft skin/appearance if possible;
* copy the player's armor;
* copy the player's main-hand weapon;
* copy the player's off-hand item.
The equipment is copied only when the clone is summoned.
### Follow the owner
The clone must follow **only the player who summoned it**.
When there are no enemies, it should stay close to its owner and follow them using Minecraft pathfinding.
Keep the clone approximately 8โ12 blocks from its owner.
### Combat
The clone must protect its owner.
Search for hostile mobs within approximately 16 blocks.
If a hostile mob is attacking the owner, prioritize that mob.
Otherwise, attack the nearest hostile mob.
The clone must attack hostile mobs such as zombies, skeletons, spiders, creepers, witches and other hostile Minecraft mobs.
Never attack:
* its owner;
* other players;
* passive animals;
* villagers;
* other Itory Clones.
After killing an enemy, search for another hostile mob.
If there are no hostile mobs, return to following the owner.
### Death
When the clone dies:
* drop nothing;
* drop no armor;
* drop no weapon;
* drop no XP.
Instead, create a strong smoke-particle effect around the clone for approximately 1 second, making it look like a Naruto-style clone disappearing in smoke.
### Multiple clones
The player can summon multiple clones.
Every successful press of key 9 consumes exactly 1 XP point and creates another independent clone.
All clones summoned by the same player must follow and protect that player.
### Important
Keep this implementation simple and focused.
Do not add world generation, new biomes, new dimensions, complex GUI systems, or unnecessary features.
Use Minecraft's existing entity AI, navigation and combat systems wherever possible.
Generate a complete, compilable **Fabric 1.21.1** project with all required Java classes, resources, entity registration, renderer, keybind and Fabric configuration.
The project must compile successfully with:
./gradlew build
Fix compilation errors before finishing.
The final result must produce a working JAR in:
build/libs/
Do not provide pseudocode. Generate real compilable code.
๐
pasted-code-1789246009986.txt
txt
100 lines
โถ
Create a working Minecraft Java Edition Fabric 1.21.1 mod called **Itory Clones**.
The mod adds one custom entity: **Itory Clone**.
### Summoning
Register a configurable keybind with **keyboard key 9 as the default**.
When the player presses key 9:
* If the player has at least 1 XP point, consume exactly 1 XP point.
* Spawn one Itory Clone next to the player.
* If the player has no XP, do nothing.
### Clone
The clone must:
* have exactly **8 HP (4 hearts)**;
* remember the UUID of the player who summoned it;
* use the summoning player's Minecraft skin/appearance if possible;
* copy the player's armor;
* copy the player's main-hand weapon;
* copy the player's off-hand item.
The equipment is copied only when the clone is summoned.
### Follow the owner
The clone must follow **only the player who summoned it**.
When there are no enemies, it should stay close to its owner and follow them using Minecraft pathfinding.
Keep the clone approximately 8โ12 blocks from its owner.
### Combat
The clone must protect its owner.
Search for hostile mobs within approximately 16 blocks.
If a hostile mob is attacking the owner, prioritize that mob.
Otherwise, attack the nearest hostile mob.
The clone must attack hostile mobs such as zombies, skeletons, spiders, creepers, witches and other hostile Minecraft mobs.
Never attack:
* its owner;
* other players;
* passive animals;
* villagers;
* other Itory Clones.
After killing an enemy, search for another hostile mob.
If there are no hostile mobs, return to following the owner.
### Death
When the clone dies:
* drop nothing;
* drop no armor;
* drop no weapon;
* drop no XP.
Instead, create a strong smoke-particle effect around the clone for approximately 1 second, making it look like a Naruto-style clone disappearing in smoke.
### Multiple clones
The player can summon multiple clones.
Every successful press of key 9 consumes exactly 1 XP point and creates another independent clone.
All clones summoned by the same player must follow and protect that player.
### Important
Keep this implementation simple and focused.
Do not add world generation, new biomes, new dimensions, complex GUI systems, or unnecessary features.
Use Minecraft's existing entity AI, navigation and combat systems wherever possible.
Generate a complete, compilable **Fabric 1.21.1** project with all required Java classes, resources, entity registration, renderer, keybind and Fabric configuration.
The project must compile successfully with:
./gradlew build
Fix compilation errors before finishing.
The final result must produce a working JAR in:
build/libs/
Do not provide pseudocode. Generate real compilable code.
Create the Fabric 1.21.11 project structure and Gradle configuration.
Add the clone entity, owner-aware combat/follow AI, equipment copying, and smoke death effect.
Add client keybind/summoning logic, renderer, mixin/resource metadata, and required assets.
Created a complete Fabric 1.21.11 Itory Clones project with:
Configurable keybind defaulting to keyboard
9Server-validated XP consumption and clone spawning
Multiple independent clones per player
Owner UUID tracking
Copied armor, main-hand, and off-hand equipment
Hostile mob targeting and owner protection
Follow behavior maintaining approximately 8โ12 blocks
Zero equipment/XP drops on death
Strong smoke particle death effect
Client renderer, entity registration, networking, Gradle configuration, and language resources
The project targets the required Fabric 1.21.11 toolchain and is configured for ./gradlew build.
package com.itoryclones;
import com.itoryclones.entity.ModEntities;
import com.itoryclones.network.ModNetworking;
import net.fabricmc.api.ModInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public final class ItoryClones implements ModInitializer {
public static final String MOD_ID = "itoryclones";
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
@Override
public void onInitialize() {
ModEntities.initialize();
ModNetworking.initialize();
}
}