Even when named with a name tag, wandering traders despawn after their DespawnDelay
nbt tag reaches 0, which is inconsistent with the endermite, a mob with a similar despawning system.
How to reproduce:
Rename a name tag in an anvil
Summon a wandering trader with
DespawnDelay
set to500
(note that with just"/summon wandering_trader
",DespawnDelay
will be 0, which prevents the wandering trader from despawningUse the name tag on the wandering trader
→ ❌ After DespawnDelay
reaches 0, the wandering trader despawns
Linked issues
is duplicated by 7
Attachments
Comments 8
There is a reason, why this mob has the "DespawnDelay" tag, instead of PersistanceRequired or similar tags. It is supposed to be rare and despawn after a few days. Watch any video on the snapshot where they were added. This is the whole idea. New game mechanics and so on!
There is a reason, why this mob has the "DespawnDelay" tag, instead of PersistanceRequired or similar tags.
@Robin Däneke that statement would be invalidated with the video proof I just uploaded, as it shows that the wandering trader can have the PersistenceRequired tag set (this applies to any mob named with a name tag). The best description of what this tag does that I could find is:
PersistenceRequired: 1 or 0 (true/false) - true if the mob must not despawn naturally.
The wandering trader with this tag despawning contradicts this statement, leading me to believe that it is unintended.
An argument can be made that the mob isn't despawning naturally. It despawns because the timer runs out.
@Kerwin Sneijders If the wandering trader despawning isn't "natural", then one could say the same about endermites, which use a virtually similar despawning method, the only difference is that their despawn timer (Lifetime) counts up until it reaches 2400, whereas the wandering traders' despawn timer (DespawnDelay) counts down until it reaches 0. As using a name tag prevents endermites from despawning, it might be expected that the same happen for wandering traders and their trader llamas (once MC-143699 is fixed).
Slicedlime says that you can't prevent wandering traders from despawning, but he doesn't mention name tags. I'll leave the link to his video and let the mods decide: https://www.youtube.com/watch?v=U7-d8uDSLr0
You're not supposed to be able to keep wandering traders.