**Auto Tracking & Persistence**: After taming any ownable entity (wolves, cats, horses, parrots, mod pets, etc.), it is automatically registered. NBT data is persisted at `<world>/trulybestfriends/<playerUUID>/<petUUID>.nbt`, with a `pets_index.nbt` index maintained.
- **Pet Management UI**: Adds a "Pet Friends" tab to the inventory screen (via L2Tabs), or accessible through a custom keybind (unbound by default, set in Options → Controls). View each pet's name, species, health, dimension, and coordinates.
- **Real-time Sync**: The server periodically pushes the latest pet state (health, position, dimension, etc.) to the client. The health bar and location info in the GUI refresh automatically without reopening the panel.
- **Recall / Release**: Single click to recall a pet into storage (with distance limit and cooldown), click again to release. Supports summoning pets to the player when their chunk is unloaded, with automatic teleport after chunk loading.
- **Area Recall**: Hold **Shift** and click the recall button to recall all pets within range at once. Use the **scroll wheel** to adjust range (1–16 blocks, default 8).
- **Cross-dimension Summoning**: Summon pets from any dimension to your side, with automatic forced chunk loading and entity deduplication.
- **Teleport**: Click coordinates to teleport to your pet, or teleport your pet to you.
- **Glow Highlight**: Apply a 5-second glowing effect to the selected pet for easy spotting in complex terrain.
- **Death & Revival**: When a tracked pet dies, its drops are cleared (NBT preserved), and it can be revived from the panel using a configurable revival item (default: 1 **Totem of Undying**). Revival applies totem effects (Regeneration, Absorption, Fire Resistance). Specific entity types can be whitelisted to keep their drops and become non-revivable (default includes `touhou_little_maid:maid`).
- **Two-step Deletion**: To prevent accidents, deleting pet data requires two steps — first left-click to enter "pending deletion" state, then Shift + left-click to confirm. Switching selection resets the pending state.
- **Shoulder Pet Tracking**: Automatically tracks entities sitting on your shoulder (e.g. parrots). When dismounted from shoulder, the UUID is automatically re-associated, preventing lost tracking.
- **Priority System**: Each pet can be assigned a priority from 1–6 for sorting in the panel and future formation features.
- **Mount Inventory Backup**: For container-carrying entities (e.g. chested horses), their inventory NBT is independently backed up, compatible with any number of slots from mod entities.
- **Multi-language Dimension Names**: Built-in display names for 20+ common dimensions (vanilla 3 + Twilight Forest, Aether, Otherside, Everbright/Everdawn, Undergarden, Bumblezone, Tropics, Gaia, Midnight, all Ad Astra planets and orbits) in both English and Chinese.
- **Offline NBT Editing**: When the server is shut down, you can directly edit `.nbt` files in the world directory. Changes will be preserved and applied to entities on next startup (recommended only for recalled entities).
Configuration
Configuration file is located at `config/trulybestfriends-common.toml`:
| Config | Default | Description |
|---|---|---|
| `syncIntervalTicks` | `103` | Interval (ticks) for full fallback scan of all loaded owned entities |
| `localSyncIntervalTicks` | `5` | Interval (ticks) for scanning nearby entities around players who completed the "Tame an Animal" advancement |
| `savePetDataCooldownTicks` | `100` | Interval (ticks) for flushing cached pet data to disk. Logout and server stop always flush immediately |
| `recallRange` | `16.0` | Maximum distance (blocks) for recalling a pet. `-1` for unlimited |
| `recallCooldownMs` | `3000` | Cooldown in ms between recall/summon actions (min 250) |
| `maxPets` | `64` | Maximum tracked pets per player (1–128) |
| `areaRecallDefaultRange` | `8` | Default area recall radius (1–16, adjustable with scroll wheel in-game) |
| `maxPendingSummons` | `6` | Max simultaneous pending summons per player for pets in unloaded chunks (+2 buffer) |
| `reviveItem` | `minecraft:totem_of_undying` | Item ID required to revive a dead pet |
| `reviveItemCount` | `1` | Number of items required for revival |
| `reviveCooldownSeconds` | `120` | Revival cooldown in seconds (0–86400) |
| `noReviveWhitelist` | see below | Entity types that keep drops and cannot be revived |
| `clearOnDeathWhitelist` | see below | Entity types whose NBT and cache are completely cleared on death |
| `autoRegisterBlacklist` | see below | Entity types excluded from auto-registration, supports `namespace:*` wildcards |
| `enableLoginLoadDiagnostics` | `false` | Validate pet NBT files on login and log counts (debug only) |
Data Storage
A
ll data is saved within the world directory. Deleting the world removes pet data; removing this mod does not corrupt the world:
```
<world>/trulybestfriends/
├── pets_index.nbt # Pet index (grouped by entity type)
└── <playerUUID>/
└── <petUUID>.nbt # Complete NBT of each pet
```
> When the server is shut down, you can directly edit `<petUUID>.nbt` files to modify recalled pets' attributes (health, name, MaxHealth, etc.). Changes will be applied via `entity.load(nbt)` on next summon. Note that `Pos` and `Dimension` will be overridden by summon placement logic.
Compatibility
**Theoretically compatible** with any mod pet implementing the `OwnableEntity` interface.
- Uses reflection to find entity container fields, compatible with any number of slots from modded mounts/backpack entities.
- Touhou Little Maid (`touhou_little_maid:maid`) is on the non-revivable whitelist by default due to conflicting death logic.
- Iron's Spells summons (spectral steed, summoned vex/zombie/skeleton/polar bear/various summoned weapons) are in the auto-register blacklist or clear-on-death whitelist to prevent accidental tracking.
- If a mod pet's death drops should not be cleared, add its entity ID to `noReviveWhitelist`.
- If a mod's ownable entity should not be tracked (e.g. temporary summons), add its entity ID or `namespace:*` to `autoRegisterBlacklist`.
- Modular Golems (`modulargolems:*_golem`) are on the non-revivable whitelist by default.
- Goety servants are on the clear-on-death whitelist for complete data cleanup.
License
This mod is licensed under **GPL-3.0**. Please comply with the license terms when referencing, integrating, or redistributing, and note the respective license constraints of compatible mods.
Feedback
Found a bug or have a feature suggestion? Please submit an issue with:
- Minecraft / Forge / mod version
- Full `latest.log` or `crash-report`
- Steps to reproduce.