diff --git a/gradle.properties b/gradle.properties index a511d58..6ab5fb0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ minecraft_version=1.21.11 yarn_mappings=1.21.11+build.5 loader_version=0.19.2 # Mod Properties -mod_version=1.0-SNAPSHOT +mod_version=1.1 maven_group=dev.darwincereska archives_base_name=NoVillagerCooldown # Dependencies diff --git a/src/main/java/dev/darwincereska/novillagercooldown/mixin/TradeOfferNotSoldOut.java b/src/main/java/dev/darwincereska/novillagercooldown/mixin/TradeOfferNotSoldOut.java index 914b01f..6a15800 100644 --- a/src/main/java/dev/darwincereska/novillagercooldown/mixin/TradeOfferNotSoldOut.java +++ b/src/main/java/dev/darwincereska/novillagercooldown/mixin/TradeOfferNotSoldOut.java @@ -27,4 +27,16 @@ public abstract class TradeOfferNotSoldOut { this.uses = 0; } } + + // Set max count to very high number + @Inject(method = "getMaxUses", at = @At("HEAD"), cancellable = true) + private void novillagercooldown$getMaxUses(CallbackInfoReturnable cir) { + cir.setReturnValue(10000); + } + + // Set the demand bonus to 0 + @Inject(method = "getDemandBonus", at = @At("HEAD"), cancellable = true) + private void novillagercooldown$noDemandBonus(CallbackInfoReturnable cir) { + cir.setReturnValue(0); + } }