promotional bannermobile promotional banner

Shared-Villager-Discounts

This is a mod that automatically shares villager curing and trading discounts with all players on the server.

# 🌾 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)

Shared-Villager-Discounts Team

profile avatar
  • 3
    Projects
  • 370
    Downloads

More from maksimleong