Interface ConfigurableEnchantmentDefinition

All Known Implementing Classes:
EnchantmentMixin

public interface ConfigurableEnchantmentDefinition
Duck interface injected into Enchantment via mixin to attach and query live configuration property wrappers on top of static enchantment definitions.

Populated during deserialization by EnchantmentCodecMixin and queried at runtime by EnchantmentMixin to dynamically rebuild Enchantment.EnchantmentDefinition records whenever configured values deviate from their datapack fallbacks.

  • Method Details

    • enchantment_core$setMaxLevelWrapper

      void enchantment_core$setMaxLevelWrapper(IntPropertyWrapper wrapper)
      Attaches the dynamic configuration wrapper controlling the enchantment's maximum level.
      Parameters:
      wrapper - The IntPropertyWrapper for max_level.
    • enchantment_core$getMaxLevelWrapper

      IntPropertyWrapper enchantment_core$getMaxLevelWrapper()
      Retrieves the dynamic configuration wrapper controlling the enchantment's maximum level.
      Returns:
      The attached IntPropertyWrapper, or null if not configured.
    • enchantment_core$setWeightWrapper

      void enchantment_core$setWeightWrapper(IntPropertyWrapper wrapper)
      Attaches the dynamic configuration wrapper controlling the enchantment's rarity weight.
      Parameters:
      wrapper - The IntPropertyWrapper for weight.
    • enchantment_core$getWeightWrapper

      IntPropertyWrapper enchantment_core$getWeightWrapper()
      Retrieves the dynamic configuration wrapper controlling the enchantment's rarity weight.
      Returns:
      The attached IntPropertyWrapper, or null if not configured.
    • enchantment_core$setAnvilCostWrapper

      void enchantment_core$setAnvilCostWrapper(IntPropertyWrapper wrapper)
      Attaches the dynamic configuration wrapper controlling the enchantment's anvil combination cost.
      Parameters:
      wrapper - The IntPropertyWrapper for anvil_cost.
    • enchantment_core$getAnvilCostWrapper

      IntPropertyWrapper enchantment_core$getAnvilCostWrapper()
      Retrieves the dynamic configuration wrapper controlling the enchantment's anvil combination cost.
      Returns:
      The attached IntPropertyWrapper, or null if not configured.
    • enchantment_core$setMinCostWrapper

      void enchantment_core$setMinCostWrapper(CostPropertyWrapper wrapper)
      Attaches the dynamic configuration wrapper controlling the enchantment's minimum enchanting table cost.
      Parameters:
      wrapper - The CostPropertyWrapper for min_cost.
    • enchantment_core$getMinCostWrapper

      CostPropertyWrapper enchantment_core$getMinCostWrapper()
      Retrieves the dynamic configuration wrapper controlling the enchantment's minimum enchanting table cost.
      Returns:
      The attached CostPropertyWrapper, or null if not configured.
    • enchantment_core$setMaxCostWrapper

      void enchantment_core$setMaxCostWrapper(CostPropertyWrapper wrapper)
      Attaches the dynamic configuration wrapper controlling the enchantment's maximum enchanting table cost.
      Parameters:
      wrapper - The CostPropertyWrapper for max_cost.
    • enchantment_core$getMaxCostWrapper

      CostPropertyWrapper enchantment_core$getMaxCostWrapper()
      Retrieves the dynamic configuration wrapper controlling the enchantment's maximum enchanting table cost.
      Returns:
      The attached CostPropertyWrapper, or null if not configured.
    • enchantment_core$setSupportedItemsWrapper

      void enchantment_core$setSupportedItemsWrapper(ItemSetPropertyWrapper wrapper)
      Attaches the dynamic configuration wrapper controlling the set of items compatible with this enchantment.
      Parameters:
      wrapper - The ItemSetPropertyWrapper for supported_items.
    • enchantment_core$getSupportedItemsWrapper

      ItemSetPropertyWrapper enchantment_core$getSupportedItemsWrapper()
      Retrieves the dynamic configuration wrapper controlling the set of items compatible with this enchantment.
      Returns:
      The attached ItemSetPropertyWrapper, or null if not configured.
    • enchantment_core$setPrimaryItemsWrapper

      void enchantment_core$setPrimaryItemsWrapper(ItemSetPropertyWrapper wrapper)
      Attaches the dynamic configuration wrapper controlling the primary items for this enchantment in the enchanting table.
      Parameters:
      wrapper - The ItemSetPropertyWrapper for primary_items.
    • enchantment_core$getPrimaryItemsWrapper

      ItemSetPropertyWrapper enchantment_core$getPrimaryItemsWrapper()
      Retrieves the dynamic configuration wrapper controlling the primary items for this enchantment in the enchanting table.
      Returns:
      The attached ItemSetPropertyWrapper, or null if not configured.
    • enchantment_core$setSlotsWrapper

      void enchantment_core$setSlotsWrapper(SlotListPropertyWrapper wrapper)
      Attaches the dynamic configuration wrapper controlling the active equipment slot groups for this enchantment.
      Parameters:
      wrapper - The SlotListPropertyWrapper for slots.
    • enchantment_core$getSlotsWrapper

      SlotListPropertyWrapper enchantment_core$getSlotsWrapper()
      Retrieves the dynamic configuration wrapper controlling the active equipment slot groups for this enchantment.
      Returns:
      The attached SlotListPropertyWrapper, or null if not configured.