Picked up villagers are stored at a hard-coded location in the Overworld (1,-70,1). If this location is not currently loaded when a villager head is placed then the stored villager will not be retrieved and a new one is spawned in and placed instead.
This can happen if the server's spawn is far enough away from chunk 0,0.
This means that you lose the villager with the profession and trades you were expecting.
Picked up villagers are stored at a hard-coded location in the Overworld (
1,-70,1
). If this location is not currently loaded when a villager head is placed then the stored villager will not be retrieved and a new one is spawned in and placed instead.This can happen if the server's spawn is far enough away from chunk
0,0
.This means that you lose the villager with the profession and trades you were expecting.
https://github.com/Clickism/ClickVillagers/blob/90afe95e46c9e672e9f586d7af87aefa4bbefea4/src/main/java/me/clickism/clickvillagers/ClickVillagers.java#L148-L160
Bukkit.getEntity(uuid)
appears to only get an entity if it is loaded, otherwise it returns null.Possible ways to fix:
Current workaround is to force load the chunk:
/forceload add 0 0