mojira.dev
MC-143699

Trader llamas won't despawn

The bug

Trader llamas won't despawn with wandering trader, slowly filling up my world with llamas.

Linked issues

Attachments

Comments 19

Ditto. I never saw another trader after the first one (which I had to kill because reasons) but now I'm up to 6 llamas. I feel fairly harassed. Perhaps they have taken to eating villager flesh and I'm next...

EDIT: It almost seems like the number of llamas changes when I teleport away/back (long distance) but not sure. I can't stop them from re-spawning. They are a plague upon my hill. Death to all traders and llamas!

19w05a/19w06a

I have observed naturally spawning trader llamas, and the llamas had a despawn delay in their NBT. The number is set when they spawn, but the trader llamas don't despawn when DespawnDelay goes down to 0 for some reason.

can reproduce in 19w11a

9 more comments

Based on what I can see, Trader Llamas will not despawn if they are no longer leashed to the Wandering Trader. I think the best course would be to give them their own timer, if not tamed by a player, to despawn - separate from the Wandering Trader. Or, run an event to get rid of any Trader Llamas that are untamed by players along with his despawn.

The fix of this probably causes [MC-151047].

On Java 1.15.2 happens even if they are still leashed to the trader at times, and happens if the llamas gets detached from the trader because he wandered too far away from them.

If he spawns back, he'll have more llamas with him, meaning you could have infinite wandering trader llamas in your base, without interacting with him at all.

Well, this explains why my first llama didn't despawn, but the ones I've collected today are despawning. I thought it was intentional to allow the player to keep trader llamas when they were separated from the trader. Welp, off to write a datapack to revert this bug fix.

Edit: It turns out you cannot make a trader llama undespawnable even with commands. Setting the timer to 0 makes it despawn instantly and setting it to a high value still has a countdown. Looks like the only workaround is to use the schedule command and a high tick value to repeatedly up the despawn delay of the llamas. The traders themselves work fine though.

When playing on a 1.16.5 spigot server we're still collecting trader llama's... Maybe it's the server... 

Jere Eklund

migrated

Confirmed

Mob spawning

Minecraft 19w05a, Minecraft 19w06a, Minecraft 19w07a, Minecraft 19w08a, Minecraft 19w08b, ..., Minecraft 19w11a, Minecraft 19w11b, Minecraft 19w12b, Minecraft 19w13b, Minecraft 19w14a

Minecraft 1.14 Pre-Release 1, Minecraft 1.14.1 Pre-Release 1

Retrieved