feat: set max uses
This commit is contained in:
+1
-1
@@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user