The bug
I placed a drowned spawner with drowned spawn egg and command,then I changed the data of drowned made the spawner spawn a drowned with a trident by using "data" command. But when I far away from the spawner and return, the data of spawner got lost and it spawn normal drowned.
How to reproduce
Place a spawner
/setblock ~ ~ ~ spawner
Right click this spawner with a drowned spawn egg
Use this command to change the spawned drowned by this spawner
/data merge block x y z {SpawnData:{HandItems:[{id:"trident",Count:1},{}]}}
→ ✔ It will spawn drowned holding a trident
Move far away from this spawner
Go back to the spawner
→ ❌ It will spawn empty-handed drowned, not drowned holding a trident
Note: it won't happene if I use this command directly:
/setblock ~ ~ ~ spawner{SpawnData:{id:"drowned",HandItems:[{id:"trident",Count:1},{}]}}
Comments 5
Still reproducible in 21w15a. Seems that you have to manually move far away (fly or walk) for the issue to occur.
This has nothing to do with travelling away from the spawner and returning. The SpawnData
tag only stores the data for the next entity (or group of entities) to be spawned by the spawner, hence the provided /data merge
command will only cause the spawner to spawn a trident-wielding drowned once (before 1.18, anyway). For the command to work, the SpawnPotentials
tag should be modified instead.
The reason the /setblock
command functions as intended here is because the SpawnPotentials
tag is empty, so the SpawnData
tag gets copied to the SpawnPotentials
tag.
I cannot reproduce this in 21w08b.