Custom Enchantment Upgrade Recipes - DaFuqs/Spectrum GitHub Wiki
Enchantment Upgrade recipes in the Enchanter differ quite a bit from other recipe types. Specifically, you need just a single recipe file to specify a complete upgrade path for all levels of an enchantment. As is normal for recipes in the Enchanter, it requires a structure with 8 Item Bowls, making the input 9 items, with a tenth item to supply experience (Usually a Knowledge Gem). The bowls have to be filled with a specified amount of a single item and an enchanted book with the enchantment wished to upgrade. The result is always an Enchanted Book with a level equal to the previous level + 1.
The crafting duration is dependent on the amount of items required for each upgrade step.
You are able to specify enchantment upgrades over the usual max level (and very welcome to!).
Upgrading to those levels will be not possible until the player unlocked the advancement spectrum:milestones/unlock_overenchanting_with_enchanter
though. If you do not like overenchanting at all or want to make it accessible right when unlocking the Enchanter instead, feel free to modify this advancement with a data pack.
Properties
Entry | Type | Default | Description |
---|---|---|---|
group | string | empty | A string that represents a recipe group. Recipes with a common group will only trigger a single unlock popup, if multiple are unlocked at once. Add a localization string recipeGroup.spectrum.<<your_group_string>> so the toast popup is properly localized |
secret | boolean | false | If true, the recipe will never be listed in recipe listing mods, like REI |
required_advancement | advancement_identifier | empty | The advancement a player needs to have to be able to see this recipe. Spectrum will automatically show a toast to the player when this advancement has been unlocked and reached the set tier |
enchantment | enchantment_identifier | The enchantment to upgrade | |
levels | level_entry list | An array specifying the requirements for upgrading the enchantment, starting with level 1 => level 2 |
Enchantment Level Entry
Entry | Type | Description |
---|---|---|
item | item_identifier | The item identifier required in the Item Bowls (no tags allowed) |
item_count | int | The total item count required in the Item Bowls |
experience | int | The experience consumed from the Knowledge Gem for this upgrade step |
Example: Upgrade path for enchanted books with the "Treasure Hunter" enchantment.
Note that there are four level specifications, for levels 1 => 2, 2 => 3, 3 => 4, and 4 => 5.
{
"type": "spectrum:enchantment_upgrade",
"enchantment": "spectrum:treasure_hunter",
"levels": [
{
"experience": 200,
"item": "spectrum:light_blue_pigment",
"item_count": 8
},
{
"experience": 400,
"item": "spectrum:light_blue_pigment",
"item_count": 32
},
{
"experience": 2000,
"item": "spectrum:light_blue_pigment",
"item_count": 128
},
{
"experience": 10000,
"item": "spectrum:light_blue_pigment",
"item_count": 512
}
],
"required_advancement": "spectrum:unlocks/enchantments/treasure_hunter"
}