mojira.dev

Tim Wilson

Assigned

No issues.

Reported

No issues.

Comments

@Ezekiel The instructions given by Markku explaining how to reproduce the issue are to allow it to be demonstrated in SSP.

If playing SMP, all that needs to happen for the issue to occur is for the chunk containing the villager to be unloaded before the villager has renewed it's last trade option, i.e. while the player is still trading or immediately after the trade window is closed. This can happen due either a client disconnect from server or due to a server crash/restart, both of which unfortunately occur all too commonly when playing SMP.

Very well summarised Tilman - great post, and I agree that your proposed solution would be the ideal fix for the problem. If implemented, it would not only fix all future villager trades but also 'repair' existing broken villagers in both SP and SMP environments.

I can also confirm this issue remains unfixed in 1.6.1.

This is a major issue on legit SMP servers where a player may invest a great deal of resources into training a testificate to unlock all trade options, only to have that testificate's trades rendered useless by a server crash or by a forced disconnect that causes the chunk to unload while the villager's last trade option is being traded.

I have personally lost one blacksmith with all diamond armour, tool and weapons trades plus two librarians with paper as their last trade in the last two weeks. On two occasions the server crashed during trading, and on the other occasion a connection dropout ("End of Stream" error) immediately after I closed the trade window was the issue. On all three occasions the last trade option was locked when I logged back into the server, and those testificates are now useless for further trading as their trade options cannot be reset.

To fix the issue, it seems a simple logic check is required on opening of the trade window - if the last trade is locked, then force a refresh of the trade updates.