Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-223365

Cured villager trades reset during the curing process when unloading and reloading the chunk the villager is in.


    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.16.5
    • None
    • Unconfirmed
    • (Unassigned)

      Many players who are experienced in playing Minecraft and is has played end game for long time knows that villager trading is the best way to get many resources, and curing the villagers to get cheaper trades and better deals is one of the most overused features of Minecraft by experts, specifically after the 1.14 update.

      However, there's a bug in the game where if you leave the chunk a villager (or villagers) is in while they are in the curing process, whether that being dying and respawning somewhere else, logging out of the game, or by just straight up leaving and then reentering the chunk. The villagers would cure, but the villager's trade is reset, and the trade prices would be as if the villager has been cured only once.

      In the pictures I'm attaching alongside this post, the first one is when the farmer is cured 3 times, dropping the carrot 4 carrot per emerald. However, when I cured the 4th time, I logged out and log back in, and the when the villager was cured, the carrot price became 16 carrots per emerald.

      Based on my knowledge of Java, I assume that when a chunk loads, it detects that the entity is a zombie villager to begin with. And when it cures into the villager, it gets the villagers' information from I presume to be a file of some sort. However, I think that numberOfTimesCured attribute of each villager isn't saved into the file just before it is infected, meaning when the zombie villager cures, it sets back the numberOfTimesCured to 1, instead of running numberOfTimesCured++. This is one of my ideas for solving this problem, but without actual knowledge of the code of the game.

            Unassigned Unassigned
            YuriAstika Kenneth Yeap Yang Yen
            0 Vote for this issue
            0 Start watching this issue