1.16.5, 1.17, 1.17.1, 1.18.1
Java: 1.8.0_51 64bit
Windows 10 Pro
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.
MC-198493 Villagers lose their discounts when relogging while it is a zombie villager