Package io.papermc.paper.registry.data
Interface EnchantmentRegistryEntry.EnchantmentCost
- Enclosing interface:
- EnchantmentRegistryEntry
public static interface EnchantmentRegistryEntry.EnchantmentCost
The enchantment cost interface represents the cost of applying an enchantment, split up into its different components.
- 
Method SummaryModifier and TypeMethodDescriptionintReturns the additional cost added per level of the enchantment to be applied.intbaseCost()Returns the base cost of this enchantment cost, no matter what level the enchantment has.of(int baseCost, int additionalPerLevelCost) Creates a new enchantment cost instance based on the passed values.
- 
Method Details- 
baseCostint baseCost()Returns the base cost of this enchantment cost, no matter what level the enchantment has.- Returns:
- the cost in levels.
 
- 
additionalPerLevelCostint additionalPerLevelCost()Returns the additional cost added per level of the enchantment to be applied. This cost is applied per level above the first.- Returns:
- the cost added to the baseCost()for each level above the first.
 
- 
of@Contract(value="_,_ -> new", pure=true) static EnchantmentRegistryEntry.EnchantmentCost of(int baseCost, int additionalPerLevelCost) Creates a new enchantment cost instance based on the passed values.- Parameters:
- baseCost- the base cost of the enchantment cost as returned by- baseCost()
- additionalPerLevelCost- the additional cost per level, as returned by- additionalPerLevelCost()
- Returns:
- the created instance.
 
 
-