A Fabric mod for Minecraft Java Edition 26.3. Trade caravans travel between villages: a merchant, two pack llamas and two iron-golem guards. Escort them safely to earn emeralds and reputation. Or rob them, and become an outlaw whom villages refuse to trade with.
Requirements
| Version | |
|---|---|
| Minecraft Java Edition | 26.3 |
| Fabric Loader | 0.20.1 or newer |
| Fabric API | 0.166.0+26.3 or newer (built and tested with 0.166.0+26.3) |
| Java | 25 or newer |
Gameplay
When caravans appear
Every 2 minutes, during the day in the Overworld, there is a 50 % chance that a caravan departs. This only happens if fewer than 2 caravans are already travelling.
- A random player is chosen. The caravan starts from the nearest village within 192 blocks of that player.
- Its destination is the nearest other village that is 150 – 1500 blocks away.
- Every player within 160 blocks sees: "🐪 A caravan is leaving the village at X, Z for the village at X, Z. Escort it for a reward!"
A caravan consists of:
- a Caravan Merchant: a named wandering trader. You can trade with it along the way.
- 2 trader llamas, leashed to the merchant.
- 2 Caravan Guards: named iron golems that follow the merchant and defend it.
Travelling
- The merchant walks towards the destination along the terrain. It sets a new waypoint about 20 blocks ahead every 2 seconds.
- If it makes less than 8 blocks of progress in 10 seconds (water, cliffs, ravines), the whole caravan hops 12 blocks forward together, so the leashes do not break.
- A caravan only moves while its area is loaded, which means a player has to be nearby. A forgotten caravan waits where it is.
- If a caravan is still on the road after 3 in-game days of actual travel, it gives up and disbands.
Ambush
About 35 % of caravans are ambushed. Once a caravan has covered 40 % of its route, 3–4 pillagers spawn about 18 blocks ahead of it and attack the merchant. A raid horn sounds, and nearby players see "⚔ Ambush!".
Escorting: reward
Stay within 32 blocks of the merchant while it travels. You must be present for at least 30 % of the travel time (and at least 20 seconds). When the caravan reaches its destination (within 12 blocks of the village):
- +10 reputation
- 4 – 9 emeralds, placed in your inventory or dropped at your feet if it is full
- 30 experience points
- Villagers within 64 blocks of the destination receive positive gossip about you. Vanilla gossip makes their prices cheaper.
When the caravan arrives, the merchant stays to trade for about 5 minutes and then leaves as normal. The guards vanish.
Attacking: penalty
- The first time you hit any caravan member: −15 reputation. You can no longer earn the escort reward for this caravan, and the guards turn on you (except in Creative mode).
- If you kill the merchant, you rob the caravan. It drops 6 – 14 emeralds and two random trade goods (cocoa beans, sugar, leather, paper, glow berries, a nautilus shell or a map). You also get −25 reputation. Villagers within 64 blocks get strong negative gossip about you, and the whole area is told who robbed the caravan.
Reputation
Reputation goes from −100 to +100 and starts at 0. It survives death.
| Reputation | Effect |
|---|---|
| ≥ 20, trusted | Every time you open a villager's trades, its positive gossip about you is topped up to reputation ÷ 4. You get lower prices. |
| ≤ −40, outlaw | Villagers and wandering traders refuse to trade with you. Every 5 seconds, natural (not player-built) iron golems within 20 blocks attack you. This does not happen in Creative or Spectator mode. |
You get a chat message when you become trusted or become an outlaw. Negative reputation recovers by +2 per in-game day.
Commands
| Command | Permission | Description |
|---|---|---|
/caravan reputation |
everyone | Shows your current reputation. |
/caravan list |
everyone | Lists active caravans: position, destination and number of guards. |
/caravan spawn |
operator (level 2) | Starts a caravan from the village nearest to the command's position, up to 2000 blocks away. It works from the server console with execute positioned <x> <y> <z> run caravan spawn. |
/caravan setreputation <value> |
operator (level 2) | Sets your own reputation (−100 … 100). |
How it works (technical)
- Active caravans are stored on the Overworld
ServerLevelwith the Fabric Data Attachment API (caravans:caravans), so they survive restarts. - Each caravan member carries a persistent
caravans:memberattachment with the caravan's UUID. - Player reputation is a persistent attachment (
caravans:reputation) that is copied on death. - Damage and death are handled with
ServerLivingEntityEvents.AFTER_DAMAGE/AFTER_DEATH. Trade refusal usesUseEntityCallback. - The mod adds no blocks, items or textures. It only adds behaviour, so it is safe to add to an existing world.
Translations
English (en_us) and Bulgarian (bg_bg).
Known limitations
- Caravans only travel in the Overworld.
- In worlds where villages are far apart (more than 1500 blocks), no destination is found and no caravan departs.
- Over water the caravan moves by repeated forward hops rather than by swimming or using boats.
- Reputation is global. It is not tracked separately for each village.
In-game screenshots
All screenshots use the English game interface.