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 Summary
Modifier and TypeMethodDescriptionRetrieves the dynamic configuration wrapper controlling the enchantment's anvil combination cost.Retrieves the dynamic configuration wrapper controlling the enchantment's maximum enchanting table cost.Retrieves the dynamic configuration wrapper controlling the enchantment's maximum level.Retrieves the dynamic configuration wrapper controlling the enchantment's minimum enchanting table cost.Retrieves the dynamic configuration wrapper controlling the primary items for this enchantment in the enchanting table.Retrieves the dynamic configuration wrapper controlling the active equipment slot groups for this enchantment.Retrieves the dynamic configuration wrapper controlling the set of items compatible with this enchantment.Retrieves the dynamic configuration wrapper controlling the enchantment's rarity weight.voidAttaches the dynamic configuration wrapper controlling the enchantment's anvil combination cost.voidAttaches the dynamic configuration wrapper controlling the enchantment's maximum enchanting table cost.voidAttaches the dynamic configuration wrapper controlling the enchantment's maximum level.voidAttaches the dynamic configuration wrapper controlling the enchantment's minimum enchanting table cost.voidAttaches the dynamic configuration wrapper controlling the primary items for this enchantment in the enchanting table.voidAttaches the dynamic configuration wrapper controlling the active equipment slot groups for this enchantment.voidAttaches the dynamic configuration wrapper controlling the set of items compatible with this enchantment.voidAttaches the dynamic configuration wrapper controlling the enchantment's rarity weight.
-
Method Details
-
enchantment_core$setMaxLevelWrapper
Attaches the dynamic configuration wrapper controlling the enchantment's maximum level.- Parameters:
wrapper- TheIntPropertyWrapperformax_level.
-
enchantment_core$getMaxLevelWrapper
IntPropertyWrapper enchantment_core$getMaxLevelWrapper()Retrieves the dynamic configuration wrapper controlling the enchantment's maximum level.- Returns:
- The attached
IntPropertyWrapper, ornullif not configured.
-
enchantment_core$setWeightWrapper
Attaches the dynamic configuration wrapper controlling the enchantment's rarity weight.- Parameters:
wrapper- TheIntPropertyWrapperforweight.
-
enchantment_core$getWeightWrapper
IntPropertyWrapper enchantment_core$getWeightWrapper()Retrieves the dynamic configuration wrapper controlling the enchantment's rarity weight.- Returns:
- The attached
IntPropertyWrapper, ornullif not configured.
-
enchantment_core$setAnvilCostWrapper
Attaches the dynamic configuration wrapper controlling the enchantment's anvil combination cost.- Parameters:
wrapper- TheIntPropertyWrapperforanvil_cost.
-
enchantment_core$getAnvilCostWrapper
IntPropertyWrapper enchantment_core$getAnvilCostWrapper()Retrieves the dynamic configuration wrapper controlling the enchantment's anvil combination cost.- Returns:
- The attached
IntPropertyWrapper, ornullif not configured.
-
enchantment_core$setMinCostWrapper
Attaches the dynamic configuration wrapper controlling the enchantment's minimum enchanting table cost.- Parameters:
wrapper- TheCostPropertyWrapperformin_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, ornullif not configured.
-
enchantment_core$setMaxCostWrapper
Attaches the dynamic configuration wrapper controlling the enchantment's maximum enchanting table cost.- Parameters:
wrapper- TheCostPropertyWrapperformax_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, ornullif not configured.
-
enchantment_core$setSupportedItemsWrapper
Attaches the dynamic configuration wrapper controlling the set of items compatible with this enchantment.- Parameters:
wrapper- TheItemSetPropertyWrapperforsupported_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, ornullif not configured.
-
enchantment_core$setPrimaryItemsWrapper
Attaches the dynamic configuration wrapper controlling the primary items for this enchantment in the enchanting table.- Parameters:
wrapper- TheItemSetPropertyWrapperforprimary_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, ornullif not configured.
-
enchantment_core$setSlotsWrapper
Attaches the dynamic configuration wrapper controlling the active equipment slot groups for this enchantment.- Parameters:
wrapper- TheSlotListPropertyWrapperforslots.
-
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, ornullif not configured.
-