Pets are a premium feature. On the free version every
pet: block is dropped with a notice and the mob loads as an ordinary wild mob, so nothing else breaks. See Licensing.pet: block. It is the same mob as before (same model, stats and effect lines) and it still spawns wild like any other. It becomes a pet the moment a player owns it, and from then on it follows them, fights for them, levels up, and can be put away and called back.
Getting one
There are three ways, and they all end in the same collection:- Taming. Right-click a wild one while holding its
tame.item. Each try spends the item (consume: falsekeeps it) and succeeds withchance. On success, that very mob becomes yours where it stands, with hearts above it. On failure it puffs smoke and its+onTameFaillines run. Vanilla taming never applies to a mob with apet:block. - Permission.
permission: some.nodeputs the pet in the menu of anyone with that node, ready to claim with one click. - Command.
/le pets give <player> <mob>adds one to a player’s collection. It works from the console, so a store, a crate or a quest plugin can hand pets out.
pets.max-owned in config.yml caps how many pets one player can own.
The pets menu
/le pets opens a player’s collection. Every player can use it; there’s no permission to grant.
Each pet’s own menu has Summon / Put away, Ride, its fighting Mode, Rename, Skins, Backpack, a button for each signal, and Release (shift-click to confirm; anything in its backpack is handed to you first).
Owners can also right-click their pet in the world: holding something it eats feeds it, anything else opens its menu. Other players can’t ride, feed or open somebody else’s pet.
The menus use the same art, overlay and button textures as the Entities menu.
Out in the world
A pet:- Follows its owner. It walks back once it is more than
follow.distanceaway. Pastfollow.teleport, or when the owner changes world, it teleports beside them. - Fights according to its mode:
- Defend (the default) takes on whatever hurts its owner or itself.
- Aggressive also joins whatever its owner hits, and picks fights with monsters within 12 blocks.
- Passive never fights.
- Uses threat like every mob, so it never targets an ally. A pet is always an ally of its owner and of that owner’s other pets, whatever
factions.ymlsays. See Factions & Threat. - Attacks with its base entity’s own attack when it has one (wolves, foxes, zombies). Otherwise it gets a plain melee hit, so a pet pig on defend still bites.
- Is safe from its owner. The owner can’t hurt it (unless
pets.owner-can-hurtis on), and it never hurts the owner. - Is never saved with the chunk. It only exists beside an owner who is online. Logging off puts it away and logging back on brings it back. A pet lost to an unloading chunk is summoned back to its owner.
- Is left alone by
/le killall, so a cleanup never takes someone’s pet.
pets.max-active decides how many can be out at once; summoning one more puts the oldest away.
Riding
Withmount: walk or mount: fly, the Ride button in the pet’s menu puts the owner on it.
- A model with a seat bone (
p_…, see Bone Tags) is ridden on that seat with the engine’s own walk and fly controls. - Any other pet is ridden as a plain passenger: movement keys move it, jump hops (walk) or climbs (fly), and a flying pet goes where you look.
- Sneak to get off.
mount-speedmultiplies its speed while ridden. - Only the owner can ride it, and only from the menu.
Levels and evolving
A pet earns experience from kills (kill-xp) and from food (xp). Reaching level 2 costs xp, and each level after costs growth times the one before. Every level above 1 adds the per-level health, damage, armor and speed on top of the mob’s own stats. <caster.level> and the level condition read the pet’s level.
With evolve, the pet turns into the into mob when it reaches that level, where it stands, and keeps its name, level, experience and backpack. The into mob needs a pet: block of its own. A pet that grows through a mob’s aging chain stays the same pet too.
Dying
A pet that dies drops nothing and goes back to the collection, keeping its backpack. It can be summoned again afterrespawn, at full health; the menu shows how long is left.
Skins and signals
Skins are other models the owner can dress the pet in from its menu. Each one can need a permission; locked ones show as locked. Signals are menu buttons that fire the pet’s+onSignal:<name> lines, with the owner as @trigger: a howl, a trick, a special attack on command. Every signal the pet’s lines listen for gets a button even when signals: doesn’t list it; listing one only sets its label and icon.
Pet triggers
The mob’s own effect lines can react to pet life:@owner and @ownerLocation, and the hasOwner and ownerIsOnline conditions, work on pets the same way they do on any owned mob.
Where collections are saved
Each player’s pets are saved inplugins/LodeEntities/pets/<uuid>.yml: names, levels, experience, mode, skin, health and backpack. It’s a plain YAML file, so staff can read it or fix it by hand while that player is offline. Collections are saved when their owner logs off, when the server stops, and every pets.autosave seconds in between.
After a /le reload, a pet whose mob was deleted or lost its pet: block goes home and shows as unavailable in the menu. It stays in the collection, so restoring the config brings it back.