Disable MC-163962 fix by default

It changes restocking behavior pretty drastically compared to Vanilla, keep it as a config option for those that want it

Fixes #12761
This commit is contained in:
Nassim Jahnke
2025-06-30 11:39:07 +02:00
parent 57c202e015
commit 4d854e66b8
2 changed files with 5 additions and 4 deletions

View File

@@ -63,12 +63,11 @@
);
}
@@ -124,7 +_,7 @@
}
@@ -125,6 +_,7 @@
public void updateDemand() {
- this.demand = this.demand + this.uses - (this.maxUses - this.uses);
+ this.demand = Math.max(0, this.demand + this.uses - (this.maxUses - this.uses)); // Paper - Fix MC-163962
this.demand = this.demand + this.uses - (this.maxUses - this.uses);
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().misc.preventNegativeVillagerDemand) this.demand = Math.max(0, this.demand); // Paper - Fix MC-163962
}
public ItemStack assemble() {

View File

@@ -357,6 +357,8 @@ public class GlobalConfiguration extends ConfigurationPart {
@Comment("Defines how many orbs groups can exist in an area.")
@Constraints.Min(1)
public IntOr.Default xpOrbGroupsPerArea = IntOr.Default.USE_DEFAULT;
@Comment("See Fix MC-163962; prevent villager demand from going negative.")
public boolean preventNegativeVillagerDemand = false;
}
public BlockUpdates blockUpdates;