### Anvil Cost Calculation Example Source: https://github.com/auxilor/ecoenchants/blob/master/documentation/ecoenchants/advanced-configuration.md Illustrates a specific anvil cost calculation with an exponent of 1.02 and an original cost of 25, resulting in a rounded-up cost of 28. ```Go cost = 25^1.02 + 1 ``` -------------------------------- ### Complete EcoEnchants Custom Enchantment Configuration Source: https://github.com/auxilor/ecoenchants/blob/master/documentation/ecoenchants/how-to-make-a-custom-enchant.md This is a full example of an enchantment configuration file. It demonstrates all available sections: display, mechanics, obtaining, and effects. Ensure all referenced IDs (like 'damage_multiplier', 'melee_attack', 'sword', 'common', 'normal') exist in their respective configuration files. ```yaml # === Display: what the player sees === display-name: "Example" # In-game name of the enchantment description: # Lore shown under the enchantment - "Gives a &a%placeholder%%&8 bonus to damage" placeholder: "%level% * 20" # Value injected wherever %placeholder% appears placeholders: # Extra named placeholders (optional) example: "%level% * 800" # Used as %example% in the description type: normal # Enchantment type, from types.yml # === Mechanics: where it goes and how it relates to others === targets: # Item groups it can apply to, from targets.yml - sword conflicts: # Enchantments it can't coexist with (optional) - sharpness required: # Enchantments that must be present first (optional) - unbreaking rarity: common # Rarity, from rarity.yml max-level: 4 # Highest obtainable level # === Obtaining: how players can get it naturally === tradeable: true # Buyable from villagers discoverable: true # Generates in loot chests enchantable: true # Rolls from the enchanting table # === Effects: what the enchantment actually does === effects: - id: damage_multiplier # The effect to run args: multiplier: "1 + 0.2 * %level%" # Effect strength, scaling with level triggers: - melee_attack # When it fires conditions: [ ] # When the enchantment may activate ([ ] = always) ``` -------------------------------- ### Calculate Anvil Cost with Exponent Source: https://github.com/auxilor/ecoenchants/blob/master/documentation/ecoenchants/advanced-configuration.md Demonstrates the formula for calculating anvil cost using a cost exponent. The result is rounded up to the nearest whole number. ```Go cost = level^exponent + 1 ``` -------------------------------- ### Add EcoEnchants Dependency to build.gradle.kts Source: https://github.com/auxilor/ecoenchants/blob/master/documentation/ecoenchants/api.md Configure your build.gradle.kts file to include the Auxilor repository and the EcoEnchants dependency. Replace '' with the desired EcoEnchants version. ```kotlin repositories { maven("https://repo.auxilor.io/repository/maven-public/") } dependencies { compileOnly("com.willfp:EcoEnchants:") } ``` -------------------------------- ### EcoEnchants Display Configuration Source: https://github.com/auxilor/ecoenchants/blob/master/documentation/ecoenchants/how-to-make-a-custom-enchant.md Defines the in-game name, description, and type for an enchantment. Supports color codes and placeholders for dynamic text. The 'placeholder' and 'placeholders' fields allow for custom values to be injected into the description. ```yaml display-name: "Example" # In-game name; supports color codes like &a and &8 description: # Lore shown under the enchant; one string or a list of lines, color codes and placeholders work - "Gives a &a%placeholder%%&8 bonus to damage" placeholder: "%level% * 20" # Optional; replaces %placeholder% in the description, good for scaling numbers placeholders: # Optional; define extra named placeholders when one isn't enough example: "%level% * 800" # Referenced as %example% in the description type: normal # Enchantment type from types.yml; controls coloring and grouping (e.g. normal, curse, special) ``` -------------------------------- ### Enchantment Effects Configuration Source: https://github.com/auxilor/ecoenchants/blob/master/documentation/ecoenchants/how-to-make-a-custom-enchant.md Defines the core functionality of the enchantment, including the effect ID, arguments for strength, and triggers for when the effect fires. Conditions can restrict when the enchantment is active. ```yaml effects: - id: damage_multiplier # Which effect to run args: multiplier: "1 + 0.2 * %level%" # Effect strength; scales with level triggers: - melee_attack # Event that fires the effect conditions: [ ] # Restrict when the enchant works ([ ] = always active) ``` -------------------------------- ### EcoEnchants Default Configuration Source: https://github.com/auxilor/ecoenchants/blob/master/documentation/ecoenchants/plugin-config.md This is the default configuration file for EcoEnchants, detailing options for enchanting tables, villagers, loot, and anvils. Adjust these settings to control enchantment acquisition and behavior. ```yaml # Options for enchanting items in the enchanting table enchanting-table: enabled: true # If custom enchantments should be available from enchanting tables book-multiplier: 0.5 # Multiplier applied to the chance of getting an enchantment on a book (to balance enchant numbers) maximum-obtainable-level: 30 # The max level for the enchanting table. EcoEnchants doesn't change the limit, but if you have a plugin that does, adjust this to match. cap: 5 # The maximum amount of enchantments to get at any given time reduction: 2.2 # The chance to get each subsequent enchantment is divided by this number, e.g. 2nd enchant is 2.2x less likely than 1st, 3rd is 2.2x less likely again, etc # Options for obtaining custom enchants from villagers villager: enabled: true # If custom enchantments should be available from villagers pass-through-chance: 25 # The chance to leave the book as-is with a vanilla/no enchantment applied. book-multiplier: 0.14 # Multiplier applied to the chance of getting an enchantment on a book (to balance enchant numbers) reduction: 5 # The chance to get each subsequent enchantment is divided by this number, e.g. 2nd enchant is 5x less likely than 1st, 3rd is 5x less likely again, etc # Options for obtaining custom enchants in natural loot loot: enabled: true # If custom enchantments should be available from natural loot book-multiplier: 0.5 # Multiplier applied to the chance of getting an enchantment on a book (to balance enchant numbers) reduction: 7.5 # The chance to get each subsequent enchantment is divided by this number, e.g. 2nd enchant is 7.5x less likely than 1st, 3rd is 7.5x less likely again, etc # Options for merging items in an anvil anvil: cost-exponent: 0.95 # The exponent for each enchant level to prevent constant "Too Expensive!" problems enchant-limit: -1 # The limit for the amount of enchantments on an item (-1 to disable) use-rework-penalty: true # If the rework penalty should be applied max-repair-cost: 40 # Override the maximum repair cost (-1 to make it infinite). When clamp-repair-cost is false, exceeding this cost will block the enchantment. clamp-repair-cost: true # If the repair cost should be clamped to the maximum repair cost ``` -------------------------------- ### Enchantment Obtaining Flags Source: https://github.com/auxilor/ecoenchants/blob/master/documentation/ecoenchants/how-to-make-a-custom-enchant.md Control how players can obtain the enchantment naturally. Set flags to 'false' to disable specific acquisition methods. ```yaml tradeable: true # Can be bought from villagers discoverable: true # Can generate in loot chests enchantable: true # Can roll from the enchanting table ``` -------------------------------- ### EcoEnchants Mechanics Configuration Source: https://github.com/auxilor/ecoenchants/blob/master/documentation/ecoenchants/how-to-make-a-custom-enchant.md Sets the mechanical properties of an enchantment, including which items it can be applied to ('targets'), which enchantments it conflicts with ('conflicts'), which are required ('required'), its rarity, and maximum level. ```yaml targets: # Item groups it applies to (sword, axe, bow, armor...) from targets.yml; list as many as you like - sword conflicts: # Optional; IDs of enchantments that can't share an item with this one - sharpness required: # Optional; IDs that must already be on the item before this can apply - unbreaking rarity: common # Rarity from rarity.yml; affects coloring and how likely it rolls randomly max-level: 4 # Highest level players can reach; effects scale with %level% up to here ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.