feat: set max uses

This commit is contained in:
darwincereska
2026-05-05 17:18:53 -04:00
parent 9822bd799c
commit d976806f0f
2 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ minecraft_version=1.21.11
yarn_mappings=1.21.11+build.5 yarn_mappings=1.21.11+build.5
loader_version=0.19.2 loader_version=0.19.2
# Mod Properties # Mod Properties
mod_version=1.0-SNAPSHOT mod_version=1.1
maven_group=dev.darwincereska maven_group=dev.darwincereska
archives_base_name=NoVillagerCooldown archives_base_name=NoVillagerCooldown
# Dependencies # Dependencies
@@ -27,4 +27,16 @@ public abstract class TradeOfferNotSoldOut {
this.uses = 0; this.uses = 0;
} }
} }
// Set max count to very high number
@Inject(method = "getMaxUses", at = @At("HEAD"), cancellable = true)
private void novillagercooldown$getMaxUses(CallbackInfoReturnable<Integer> cir) {
cir.setReturnValue(10000);
}
// Set the demand bonus to 0
@Inject(method = "getDemandBonus", at = @At("HEAD"), cancellable = true)
private void novillagercooldown$noDemandBonus(CallbackInfoReturnable<Integer> cir) {
cir.setReturnValue(0);
}
} }