Configurable minimum demand for trades

Addresses MC-163962 where villager demand decreases indefinitely. Paper adds a patch to fix this by preventing demand from going below zero. This patch adds a config option to allow the minimum demand to instead be configurable.
This commit is contained in:
Totorewa
2025-01-12 14:25:36 -08:00
committed by granny
parent f551cb43d0
commit d01b838fb6
4 changed files with 27 additions and 61 deletions

View File

@@ -22,6 +22,15 @@
this.startTrading(player);
}
@@ -503,7 +_,7 @@
private void updateDemand() {
for (MerchantOffer merchantOffer : this.getOffers()) {
- merchantOffer.updateDemand();
+ merchantOffer.updateDemand(this.level().purpurConfig.villagerMinimumDemand); // Purpur - Configurable minimum demand for trades
}
}
@@ -707,7 +_,7 @@
@Override