![]() |
VOOZH | about |
Enchantment providers are used to source one or more enchantments for use in specific scenarios, such as mobs spawning with enchanted equipment.
Enchantment providers are stored as JSON files within a data pack in the data/<namespace>/enchantment_provider folder.
Always returns the same enchantment
minecraft:singleReturns random enchantments from a list of possible enchantments, using a configured cost. Similarβ[more information needed] to the cost of an enchanting table.
minecraft:enchantments_by_cost#, or an [NBT List / JSON Array] array containing [String] IDs) β set of all possible enchantmentsWorks the same way as enchantments_by_cost but the cost is determined using the local difficulty of the area.
The effective cost is calculated by min_cost + rand(0, local_difficulty_factor * max_cost_span). Where:
rand(a,b) refers to a random number between a and b.local_difficulty_factor is: local_difficulty/2 - 1 clamped to a value between 0 and 1.minecraft:enchantments_by_cost_with_difficulty#, or an [NBT List / JSON Array] array containing [String] IDs) β set of all possible enchantments1 β The base cost at local difficulty below 2.0 βFactor of the uniform randomization range for local difficulty.Enchantment providers are used by the game in specific cases listed below:
| Enchantment provider | Used for the enchantments of |
|---|---|
minecraft:mob_spawn_equipment |
armor and weapons of a mob that spawns with enchanted equipment |
minecraft:pillager_spawn_crossbow |
the enchanted crossbow of a spawned pillager |
minecraft:raid/pillager_post_wave_3 |
the enchanted crossbow of a spawned pillager in waves 4 and 5 of a raid |
minecraft:raid/pillager_post_wave_5 |
the enchanted crossbow of a spawned pillager in waves above 5 of a raid |
minecraft:raid/vindicator |
the enchanted axe of a spawned vindicator in waves 1 to 5 of a raid |
minecraft:raid/vindicator_post_wave_5 |
the enchanted axe of a spawned vindicator in waves above 5 of a raid |
minecraft:enderman_loot_drop |
the "fake tool" used in the loot tables of the block held by an enderman when killed. |
Enchantment providers are used to determine the traded equipment depending on biome, profession, equipment (i.e. the item traded) and trading level. They follow the format minecraft:trades/<biome>_<profession>_<equipment>_<level>.
minecraft:trades/desert_armorer_boots_4minecraft:trades/desert_armorer_chestplate_4minecraft:trades/desert_armorer_chestplate_5minecraft:trades/desert_armorer_helmet_4minecraft:trades/desert_armorer_leggings_4minecraft:trades/desert_armorer_leggings_5minecraft:trades/jungle_armorer_boots_4minecraft:trades/jungle_armorer_boots_5minecraft:trades/jungle_armorer_chestplate_4minecraft:trades/jungle_armorer_helmet_4minecraft:trades/jungle_armorer_helmet_5minecraft:trades/jungle_armorer_leggings_4minecraft:trades/plains_armorer_boots_4minecraft:trades/plains_armorer_boots_5minecraft:trades/plains_armorer_chestplate_4minecraft:trades/plains_armorer_helmet_4minecraft:trades/plains_armorer_leggings_4minecraft:trades/plains_armorer_leggings_5minecraft:trades/savanna_armorer_boots_4minecraft:trades/savanna_armorer_chestplate_4minecraft:trades/savanna_armorer_chestplate_5minecraft:trades/savanna_armorer_helmet_4minecraft:trades/savanna_armorer_helmet_5minecraft:trades/savanna_armorer_leggings_4minecraft:trades/snow_armorer_boots_4minecraft:trades/snow_armorer_boots_5minecraft:trades/snow_armorer_helmet_4minecraft:trades/snow_armorer_helmet_5minecraft:trades/swamp_armorer_boots_4minecraft:trades/swamp_armorer_boots_5minecraft:trades/swamp_armorer_chestplate_4minecraft:trades/swamp_armorer_helmet_4minecraft:trades/swamp_armorer_helmet_5minecraft:trades/swamp_armorer_leggings_4minecraft:trades/taiga_armorer_chestplate_5minecraft:trades/taiga_armorer_leggings_5