# πΎ Shared Villager Discounts
**Cure once, everyone benefits!**
In vanilla Minecraft, when a player spends time, potions, and golden apples to cure a zombie villager, only *that specific player* receives the permanent trade discount. On multiplayer SMP servers or LAN worlds, other players still have to pay full price — forcing everyone to either repeatedly infect and cure the same villager or build massive, redundant trading halls.
**Shared Villager Discounts** fixes this seamlessly by making villager discounts a community-wide benefit.
---
### β¨ Features
* **π€ Shared Cure Discounts**: When any player cures a zombie villager, all players on the server automatically receive the lowest trade prices.
* **π Shared Trading Reputation**: Trading experience and reputation accumulated on a villager are pooled together, unlocking better prices for everyone.
* **π‘οΈ Fair Penalty Isolation**: If an individual player accidentally hits or kills a villager, the negative reputation only penalizes that specific player — your teammates' discounts remain completely safe.
* **π Offline Player Support**: The original player who cured the villager does not need to be online for others to enjoy the discount.
* **π Retroactive Compatibility**: Works instantly with villagers cured before installing the mod. No re-curing required!
* **β‘ Server-Side Only**: Can be installed solely on dedicated servers. Connecting clients do not need to install the mod.
---
### π§ How It Works
Minecraft villagers store player interactions in an internal data structure called the **Gossip System** (`MAJOR_POSITIVE`, `MINOR_POSITIVE`, `TRADING`, etc.).
Normally, when a player opens a trading menu, the villager only checks the reputation tied to that specific player's UUID. **Shared Villager Discounts** hooks into the reputation lookup method via Mixin:
1. It aggregates all positive gossip points across every player known to that villager.
2. It caps each category at vanilla maximums (`100` for major positive, `200` for minor positive, and `25` for trading) to prevent exploit inflation.
3. It subtracts only the interacting player's own negative gossip.
Your world save files remain 100% clean and vanilla-compatible with zero NBT bloat!
---
### βοΈ Requirements & Compatibility
* **Minecraft Version**: 26.3
* **Mod Loader**: Fabric Loader (0.19.0+)
* **Environment**: Server & Client (Singleplayer / LAN / Dedicated Server)
* **Fabric API**: Optional (runs purely on lightweight Mixins with zero external dependencies)