Enchantment provider

Helpers that build a minecraft:enchantment_provider object, one for each of its types. Where a field takes one, write the helper's call; its name is the type it makes. Click a type to see what it accepts.

ByCost

ByCost
ByCost(enchantments, cost)
enchantments
EnchantmentsType
cost
IntProvider of int

Cost to use for the Enchanting process.

ByCostWithDifficulty

ByCostWithDifficulty
ByCostWithDifficulty(enchantments, min_cost, max_cost_span)
enchantments
EnchantmentsType
min_cost
int 0..

Positive integer representing the minimum possible cost

max_cost_span
int 0..

Span of the cost randomization when the special factor is at its maximum.

Single

Single
Single(enchantment, level)
enchantment
enchantment id
level
IntProvider of int