mojira.dev
MC-222462

Villager cure discount resets

Issue:
Villager cure discount resets

My guess what is cause of issue:
Villager cure discount is not preserved on zombie villager (or zobie villager being currently cured) on chunk unloading.

How to replicate issue:
1. Spawn Villager and put composter so that he becomes farmer.
2. Trade with him so that his trades becomes locked.
3. Spawn zombie, let it turn villager into zombie villager and dispose zombie.
4. Cure zombie villager (with being close to him) and verify cure discount.
5. Spawn zombie, let it turn villager into zombie villager and dispose zombie.
6. Cure zombie villager (with being close to him) and verify double cure discount.
7. Spawn zombie, let it turn villager into zombie villager and dispose zombie.
8. Start curing zombie villager (apply weakness and give golden apple) and go 2000+ blocks away before curing ends.
9. Go back to zombi villager and wait for him to transform back to being villager.
10. Verify that cure discount is applied only once instead of 3 times.

Attachments

Comments 5

@yusufulus: I think issue is related, as it have the same cause (zombie villager is not preserving its cure discount count on unloading/loading). Only difference is how this issue got found. Now I know what I can't go away or even reconect when transforming zombie villager back to being villager. Thanks for info.

 

PS. How to add this issue as "related to" to issue MC-198493? I think both issues have important data that can help fixing problem.

I experienced this in 1.17 tonight.

1) infected 8 villagers then cured them for 1 level of discounts. Rates lowered as expected.

2) reinfected 7 villagers, then pot/gappled all but 1: I was out of gapples.

3) before all of these 7 had cured (I am unsure timing, or how many might have cured before), I left and traveled to the nether to search for more gold.

4) I returned via a different portal in the overworld (2000m away) and elytra'd back. I did hear 1 cure sound as I came back into the room, but didn't see who. All were cured when I walked over, except the one where I had run out before I could.

5) 4 of the 7 have the same level 1 discounts afer being cured the 2nd time. 2 have level 2nd of discounts. As for the last untreated one, I pot/gappled at this point and one cured they look as if they had been through 2 rounds of the process.

I both left the dimension for well over 30 minutes, and returned to the overworld many chunks away from their location, before traveling back, so both of those conditions would have been in effect during the curing time. I assume chunk unloading, as stated by the OP could be the cause.

I read the conditions for MC-198493 but the conditions here are a better reflection of what I experienced.

Attached two screenshots to illustrate: both of these farmers have been through the 2 rounds of infection/cure and were part of the issue above. One's rates looks like they've only been through 1 round. The other looks like 2 rounds.

Can confirm for 1.18.1

by looking at their nbt data, zombie villagers lose their Gossips when unloaded

This is still happening in 1.19.2.  If my villagers get accidentally zombified, they lose all their gossips as I'm running around the world taking care of other business.  When I go to cure them again, they are back to a major_positive value for my UUID of 20 instead of 100.  I have to use commands to edit their Gossips data and restore it to 100 after curing.

xbelphegorx

(Unassigned)

Community Consensus

(Unassigned)

villager-trade

1.16.5, 1.17, 1.17.1, 1.18.1

Retrieved