Updated description by GoldenHelmet
- Spawn a villager
- Place a bed and workstation and wait for the villager to link to each.
- Trade with the villager to lock in its profession.
- Place at least 32 workstations of a different type within the 32 x 32 area around the villager.
- Break and replace the villager's workstation.
The villager relinks to its workstation.
The villager does not relink to its workstation.
Using barrels causes villagers to lose links to their workstations
Summary: Trading hall with 17 villagers comprising:
6 x Double chests contain items to trade are located very close to the villagers.
In this format, you can break any workstation, angry particles emit from villager, replace the workstation and the villager immediately links back to the workstation. This works on all librarians, shepherds and the fletcher so I assume it would for the others trades but this is untested as I have too many alternate workstations in my base (<42 blocks away) for them to link to and I refuse to spend needless time breaking/replacing workstations just for them to link to the one I want them to link to. So this is all hunky dory (kinda) and as the game should work.
REPLACE 6 x Double chests with 12+BARRELS (to have discrete items in barrels instead of shared items in chests) and locate them close to the villagers
In this format, if you break any workstation, angry particles emit from villager, however, replacing the workstation does not cause the villager to immediately link back to the workstation. I have waited until the next day when they are supposed to refresh their trades and they still don't link and will not refresh their trades thus breaking the trading hall.
Solution or temporary fix as observed:
Breaking all the barrels (except the one for the fisherman) and replacing them with double chests seems to fix the linking back to the workstations for the trades where it is feasible to break and replace.
Thoughts: Perhaps because the barrel container is more "advanced" than a standard chest, requiring far more code because of villager interactions, etc - this may be causing too many instructions to be carried out over a given time frame or perhaps locks up something due to container scanning and by breaking the barrels and going back to chests frees the error....NOTE: all the barrels contained trading items, over 75% of them were almost full
Sorry for the essay, but I feel this error may be contributing to other villager trading bugs and hope this helps
EDIT: NOTE: 15 blocks away around the corner is a furnace array using 12 barrels and downstairs (say 25 blocks away diagonally) is a brewing array using 30 barrels and a cane farm using 4 barrels