Better Pets features

Know where every pet is, and keep it safe.

What counts as a pet

Any animal that has been tamed and has an owner: wolves, cats, parrots, horses, donkeys, mules, llamas, camels, nautiluses, and tamable animals from other mods. Pets show up in your list the first time the server sees them after the mod is installed, so pets you tamed long ago appear as soon as their chunk loads once.

The pet list

/pets (or /pets list) prints one line per pet:

Four pets in front of the player and the /pets list in chat.
Number, name, health, what it is doing, distance and direction, then buttons.

Pets far away

The server only knows about animals in loaded chunks. Better Pets remembers each pet's last known spot, health and state, so the list keeps working when you are thousands of blocks away. Those lines end with when the pet was last seen, e.g. (2 h ago). The list is saved with the world, so it survives restarts.

The /pets list seen 5.8 km away: every pet shows its distance and when it was last seen; the dead parrot has a forget button.
5.8 km from home: last known positions, and a dead parrot waiting to be forgotten.

Finding a pet

/pets find <pet> does two things for 30 seconds:

The action bar reads Rex, an up-right arrow, 23 m; Rex glows on the right side of the screen.
Looking the wrong way: the arrow says ahead and to the right.
Facing Rex: the action bar shows a straight-ahead arrow and 23 m, and the sitting wolf glows in the distance.
Facing him: straight ahead, glowing.

The arrow stops with Found Rex! once you are next to the pet. A pet in an unloaded chunk cannot glow, so the arrow points to where it was last seen instead.

Calling a pet

/pets call <pet> teleports a pet to a safe spot next to you, the same way a following dog catches up. It works when the pet is in a loaded chunk in your dimension; otherwise you are told where it is so you can go and get it. Calling unhooks the pet from a fence post and from a boat. One call per 30 seconds by default.

Naming a pet

/pets name <pet> <new name> renames it on the spot: no name tag, no anvil, no levels. Unnamed pets go by their list number, so /pets name 2 Luna names the second pet. Names can have spaces and up to 50 letters. A named pet never despawns, same as with a name tag. The pet has to be in a loaded chunk.

Colors

Names can be colored, with either of the two formats people already know from server plugins, or a mix of both. Colors do not count towards the 50 letters, and the name shows in color everywhere: above the pet, in /pets, and in every message.

You typeYou get
/pets name Rex &6RexGold. Legacy codes &0–&f, plus &l bold, &o italic, &n underline, &m strikethrough, &k obfuscated, &r reset.
/pets name Rex &#ff55aaRexAny hex color. {#ff55aa} and &x&f&f&5&5&a&a work too.
/pets name Rex <red>RexMiniMessage colors: names like <gold>, hex like <#ff55aa>, and <b>, <i>, <u>, <st>, <obf>, <reset>.
/pets name 2 <gradient:#ffb86b:#ff3c8e>Luna</gradient> &7the catA gradient, then grey text. Gradients take two or more colors.
/pets name Rex <rainbow>RexEvery letter a different color.

Write && for a plain & and \< for a plain <. Unknown codes stay as you typed them. After a rename you still refer to the pet by its plain name: /pets find Luna.

Chat after renaming: Biscuit in bold aqua, Rex in rainbow colors, Luna in an orange-to-pink gradient followed by grey 'the cat'; a too-short name and an unknown pet get red error lines.
A rainbow Rex, a gradient Luna, a bold aqua Biscuit, and what happens with a bad name or an unknown pet.

Giving a pet away

/pets give <pet> <player> makes another online player the owner. It moves to their list, follows them, and obeys them. Both of you get a message. The pet has to be in a loaded chunk.

Safe from you

Your own attacks no longer hurt your own pets: a stray sword sweep in a fight, an arrow that hits the dog in front of you, a trident thrown into the pack. Other players and mobs can still hurt them as normal. If you do want to hit your own pet, sneak while attacking.

Leads that do not snap

In vanilla, a lead breaks when the animal ends up more than 12 blocks away, which happens all the time with a sprint, an elytra glide or a fall. When you hold the lead of your pet, Better Pets pulls the pet to you once it is 8 blocks away instead, so the lead holds. Leads tied to fence posts, and leads on animals that are not your pets, behave like vanilla.

Death alerts

When a pet dies, you get its exact location in chat (click the coordinates to copy them), on top of vanilla's death message. The pet stays in your list, marked ☠ died; hover it for the cause. [forget] removes it.

Chat: Parrot was killed, followed by: Parrot died at -141 67 -46 in the overworld.
Vanilla says what happened; Better Pets says where.

Picking a pet in commands

Every <pet> takes either the pet's name or its number from /pets. Names ignore case and can be shortened to a unique start (bis for Biscuit). Put names with spaces in quotes: /pets find "Sir Barks". Tab completion suggests your pets.

Multiplayer and performance

Everything happens on the server, so vanilla clients get every feature, including the clickable buttons. Each player sees only their own pets. The mod looks at loaded animals once a second and saves the pet list every five minutes and on shutdown, to <world>/data/betterpets.json.