25 lines
1.0 KiB
Markdown
25 lines
1.0 KiB
Markdown
# OurVillagers
|
|
|
|
A server-side Fabric mod that makes two changes to villager mechanics:
|
|
|
|
1. **Always Zombify** — Villagers *always* convert to zombie villagers when killed by a zombie, regardless of difficulty.
|
|
|
|
2. **Shared Cure Discounts** — When *any* player cures a zombie villager, *all* players get the trading discount.
|
|
|
|
## How It Works
|
|
|
|
### Always Zombify
|
|
**`ZombieMixin`** injects at the head of `Zombie.killedEntity()`. When the target is a villager, it unconditionally attempts conversion via `convertVillagerToZombieVillager()` and cancels the vanilla logic. This bypasses both the difficulty check and the 50% random skip on Normal difficulty.
|
|
|
|
### Shared Cure Discounts
|
|
**`VillagerGossipsMixin`** injects at the head of `GossipContainer.getReputation()`. It scans all players' gossip data for the highest `MAJOR_POSITIVE` value (the cure discount). If any player has cured the villager, that bonus is applied to every player's trade prices.
|
|
|
|
## Building
|
|
|
|
```bash
|
|
./gradlew build
|
|
# Output: build/libs/ourvillagers-1.0.0.jar
|
|
```
|
|
|
|
Requires Java 25+.
|