This mod adds various mechanics to avoid losing your pets, to enhance game experience.
Features:
Pet will follow you when you teleport or enter a portal
Your leashed mobs will follow you when you enter a portal
Pet will be forced to teleport to you if it is about to be unloaded
Pet won't attack enemies if its health is lower than 20%
Pet will teleport to your back if its health is lower than 20%
Pet won't enter a portal unless it is close to you
Parrot won't dismount from your shoulder when you are floating on the water
Parrot won't dismount from your shoulder unless you jump in place
Sweeping Edge effect won't hurt your pets
Pet friendly fire game rule
All these features can be disabled or configured if you have installed Kiwi (Forge). Besides, in-game config UI is provided if you have installed Cloth Config (Forge)