Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Links
Tags
Creators
Details
This mod adds a simple item: the Totem of Allying.
After using one on a tamed animal, a bond is created between the two. When right-clicking a bonded Totem of Allying, the animal assigned to it will teleport to you.
Totems of Allying have a usage cooldown of three seconds.
This mod requires the Fabric API.

Requirements
Players can use any Totem of Allying, even if its bonded animal is not owned by them.
In order for Totems of Allying and animals to be bonded,
- The totem must not be bonded to another entity
- The animal must be either tamed by the player using the totem, or tamed and not have a set owner
An exception to this is the Happy Ghast, which is not tameable. Any player can bond their totems to any happy ghast.
Totems of Allying can only be unbonded if their corresponding animal dies.
Bondable Mobs
Mobs which can be bonded to Totems of Allying include:
- Any vanilla tameable animal (horses, cats, etc.)
- Happy ghasts
- Allays that like the player
- Any modded tameable entity (hopefully)!
Tooltip
When hovering over a bonded Totem of Allying, you will see the animal's name, or its entity type if it has no custom name. If the given animal has its named changed, you can right-click it again with the totem to update the tooltip.

Animal Death
If a bonded animal dies (or used to be in a non-existent dimension and cannot be retrieved), its corresponding Totem of Allying will become unbonded.
Crafting
The Totem of Allying has the following shapeless crafting recipe:

/owner Command
As many mods and data packs add pregenerated tamed animals in structures, some of them may have an absent Owner. Because of this, a new admin command is added: /owner.
Syntax
Sets an animal's owner, tames the mob if untamed.
/owner [animal] set [new-owner]
Removes an animal's owner, untames the mob if tamed.
/owner [animal] clear
Technical Details
When a Totem of Allying is used to teleport a mob, it will first check if that entity is loaded. If it's not, it will forcibly load the chunk it's in and wait until the mob is loaded to teleport it. If the mob cannot be found within 10 ticks after the chunk has been loaded, it will be marked as dead and the totem will be unbonded. After either event, the chunk will become unloaded.
Totems of Allying work across vanilla and modded dimensions. They can be bonded to modded entities as well, as long as each mob implements the Tameable interface.
In order for the /owner command to work correctly, modded entities should also inherit from either the TameableEntity or AbstractHorseEntity classes. Even if not, though, the command will still try to access the Owner and Tame NBTs as a fallback.


