Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Creators
Details
This mod adds a custom humanoid companion entity called a BattleBuddy that you can spawn and manage with /battlebuddy commands.
The buddy:
Can be created with /battlebuddy create (name)
Belongs to a specific player, (and stores the ownerās UUID)
Follows you around, and (teleports back if it gets far away)
Fights hostile mobs depending on its mode (passive/defender/aggressive)
Can wear armor + hold a shield, and can be given melee + ranged weapons
Can also carry items for you (with a ā10 unique item typesā limit)
The entityās behavior Stats / basics
30 HP, 4 attack damage, 0.35 base move speed, 40 follow range
Marked as persistent (setPersistenceRequired()), so it wonāt despawn normally
Immune to fall damage
Explosion knockback is reduced (velocity scaled down)
Combat modes
Mode can be:
PASSIVE: wonāt attack Piglins or Endermen at all
DEFENDER (default): only attacks Piglins/Endermen if theyāre already āaggroādā on something
AGGRESSIVE: attacks hostile mobs freely
It also has a ācombat focusā timer:
Defender focus lasts ~5 seconds
Aggressive focus lasts ~10 seconds
While focused, it prioritizes threats near the owner and may stop following to fight.
Following you
Tries to stay about 4 blocks behind you
If itās too far, it pathfinds faster to catch up
If it gets very far (~50 blocks+), it will teleport near you to a āsafe-ishā spot
Weapons + ranged logic
It has stored melee and stored ranged weapon slots internally, and it swaps what it holds based on distance:
Close: equips melee
Far: equips ranged
Ranged attacks:
If target is a Blaze ā it always throws snowballs
If target is in water ā it throws a real trident projectile (āharpoonā)
Otherwise, if it has a bow/crossbow stored and is holding it ā it fires arrows
Defensive/survival āsmartā behavior
If it has a shield, it has a 90% chance to block mob/arrow-type attacks (and deletes incoming arrows when it blocks)
If it gets negative potion effects for ~3 seconds, it clears them and plays a drinking sound (like āauto-milkā)
Regenerates 1 HP every ~2 seconds if not full
If itās on fire / in lava, it gives itself Fire Resistance (like auto-drinking a fire res potion)
Has special creeper avoidance: if it canāt one-shot a creeper, it will āpoke and retreatā / kite to avoid explosions
Loot/kill credit to the owner
When it damages a mob, it tries to set the mobās ālast hurt by playerā to the owner, so the player gets credit (useful for loot/XP rules).
Death behavior
On death it:
Strips the āunbreakableā flag off anything it drops
Drops stored weapons + carried items
On death, Broadcasts a death message to all players (like a player death message)
and gets removed from the ownerās tracked list (freeing the slot)
Player interaction: giving gear/items to the buddy
Right-click your buddy (owner only):
Give armor ā it equips it
Give shield ā equips offhand
Give melee weapon ā stores as its melee weapon
Give bow/crossbow ā stores as ranged weapon
Give any other item ā stores it in an internal carry map (one stack per item type)
Important constraints:
It enforces a 10 unique item-types total across:
equipped gear
stored melee/ranged weapons
carried item types
Items it equips/stores are made Unbreakable while the buddy has them.
Shift + empty hand on the buddy dumps everything back to you (and removes Unbreakable before returning).
All commands are under /battlebuddy and require permission level 2 (OP).
/battlebuddy create <name> Spawns a buddy at your position, assigns owner/name, tracks it in your persistent data.
/battlebuddy call <name> Teleports your loaded buddy near you.
/battlebuddy delete <name> Deletes the buddy from your tracked list and discards the entity if itās loaded.
/battlebuddy delete all Two-step confirmation (type twice within 30 seconds), deletes all tracked buddies.
/battlebuddy list Lists your buddies and shows stored settings like follow/mode.
/battlebuddy follow <name> <yes|no> Saves a follow flag + optional āanchorā position in your player persistent data. (not working yet will be future update maybe)
/battlebuddy mode passive|defender|aggressive <name> Stores the mode, and if the buddy is loaded it applies it immediately.
/battlebuddy save <name> Saves a full NBT snapshot of the buddy (up to 5 saves total).
/battlebuddy load <name> Restores the saved snapshot (spawns a new buddy if needed), then teleports it to you.
/battlebuddy clearsave <name> / clearsave all Deletes saved snapshots.
Also:
Your buddy list + saved states are stored in your player persistent NBT, and copied on death (PlayerEvent.Clone) so it survives respawns.
You can have up to 5 buddies and 5 saved states.



