Steps to Reproduce:
Prepare two Trader Llamas.
Tame two Trader Llamas.
Breed the Trader Llamas using Hay Bale.
Wait for the Trader Llamas to reach adulthood, then wait 2-3 in-game days.
Observed Results:
Trader Llamas that transition from juvenile to adult will despawn.
Expected Results:
Trader Llamas that transition from juvenile to adult will not despawn.
Environment
Windows 11
Bred trader llamas still use the
TraderLlamadespawn timer.TraderLlamasetsint despawnDelay = 47999;. Breeding (makeNewLlamawithBREEDING) doesn’t disable despawning. Every tickaiStep()callsthis.maybeDespawn(), and because the baby is not tamed by defaultcanDespawn()stays true and with the timer counting down eventuallydiscard()is called. ThecanDespawn()check returns false if the llama is tamed, leashed to something other than the wandering trader, or has a player passenger.