Class EnchantmentMixin

java.lang.Object
johnsmith.enchantingoverhauled.mixin.enchantment.EnchantmentMixin

public class EnchantmentMixin extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    void
    getMaxLevel(org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable<Integer> cir)
    Overrides the maximum level for all scalable enchantments based on the global configuration.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.