Class EnchantmentMixin
java.lang.Object
johnsmith.enchantingoverhauled.mixin.enchantment.EnchantmentMixin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetMaxCost(int level, org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable<Integer> cir) Clamps the maximum enchanting cost using the configured global lower and upper bounds.voidgetMaxLevel(org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable<Integer> cir) Overrides the maximum level for all scalable enchantments based on the global configuration.voidgetMinCost(int level, org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable<Integer> cir) Clamps the minimum enchanting cost using the configured global lower and upper bounds.
-
Constructor Details
-
EnchantmentMixin
public EnchantmentMixin()
-
-
Method Details
-
getMaxLevel
public void getMaxLevel(org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable<Integer> cir) Overrides the maximum level for all scalable enchantments based on the global configuration.Logic: 1. If the enchantment is naturally single-level (e.g. Mending, Silk Touch), preserve it. 2. Otherwise, force it to the configured global max level (e.g., 3).
-
getMinCost
public void getMinCost(int level, org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable<Integer> cir) Clamps the minimum enchanting cost using the configured global lower and upper bounds. -
getMaxCost
public void getMaxCost(int level, org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable<Integer> cir) Clamps the maximum enchanting cost using the configured global lower and upper bounds.
-