Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Links
Creators
Details
Requires Immersive Enchanting and Blueprint. For 1.20.1, you MUST use Immersive Enchanting 4.0.3. For 1.21.1 you MUST use Immersive Enchanting 6.0.1.
Fairy Dust texture is taken from the Vitalis item in Indexed Enchanting under its MIT license. This is a placeholder texture that I will replace ASAP.
More Consistent Enchantments
A quick primer on Immersive Enchanting's systems: Ancient Books are enchanted books you find while exploring. Place them in a Chiseled Bookshelf near your enchanting table and you'll be able to apply the enchantment to your tools. The books are not consumed when you enchant. You can read more here.
This is an awesome system; I have some minor complaints that could not be remedied with datapacks, so I decided to make this addon.
Firstly, acquiring enchanted books in Immersive Enchanting is very RNG based. It is a large portion of what this mod aims to fix. As such, I added a more sophisticated system for distributing enchantments across loot chests.
-
A common enchantment is one that can be applied to basic tools and armor (pickaxes, swords, shovels, hoes, helmets, chestplates, leggings, boots, knives (Farmer's Delight), bows, crossbows). This excludes treasure enchantments like Soul Speed. Most dungeon chests (monster rooms, underwater ruins, desert temples) contain books with common enchantments.
-
Some dungeons have more specific enchantments; underwater ruins spawn enchantments for fishing rods and tridents.
-
Treasure enchantments are found in their proper places; swift sneak is in ancient cities and soul speed in bastions.
-
Modded tools sometimes have exclusive enchantments not shared by other tools. These tools are usually associated with structures (think maces and trial chambers). Books for these enchantments are found in those structures and nowhere else, so they cannot clutter up the enchantment pool.
Exploring in minecraft is still inherently RNG-heavy, so there should be backup in case the enchantment you want isn't located nearby. First of all, I've associated every enchantment with a list of items; this is its reagent. For example, the reagent of Depth Strider is a tropical fish item. If you want to create a depth strider book, you can use the following crafting recipe:
Reagents are data-driven with the following format. You can also acquire ancient books via the enchanting table in a process called conjuring.
Put a book into the center of the enchanting table and any enchantable item into the reagent slot. You will be prompted with all the enchantments which can be applied to your enchantable item, which you can put on your book for 30 levels.
Also, some enchantments are made to be available in the enchanting table without requiring a book. In the provided datapack this is done for essential enchantments like Silk Touch and Efficiency.
Standardized Enchantment Costs
In Immersive Enchanting, to apply a level enchantment you need an extra item as a cost in addition to lapis. There is a large amount of variation for the item that is needed. To fully max out an item on Efficiency, you need:
- 1 cake
- 8 redstone blocks
- 16 glistering melons
- 1 rabbit's foot
- 8 Dragon's Breath
Doltastic Enchantments standardizes this cost into Fairy Dust. Fairy Dust is an item crafted with semiprecious materials or found throughout your world in loot chests. The amonut of dust you need to enchant an item to some particular level depends on the max level of the enchantment as follows:
| max level \ cost to apply | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| 1 | 5 | ||||
| 2 | 3 | 5 | |||
| 3 | 2 | 3 | 5 | ||
| 4 | 1 | 2 | 4 | 5 | |
| 5 | 1 | 2 | 3 | 4 | 5 |
Here is a video that summarizes everything I've said.
Customization
Enchantment Data
Every feature in this mod is data-driven. To set reagents you need to put json files inside the your_mod_id:reagents/ folder, as shown here.
Here is another example:
{
// Format is "enchantment": "reagent"
// Reagent can be single item, a tags, or a list of items.
// Don't put tags inside the lists; that is not supported.
"allurement:alleviating": "heart_crystals:heart_crystal_shard",
"allurement:launch": "#minecraft:saplings",
"allurement:obedience": [
"species:broken_links",
"minecraft:ghast_tear",
"dungeonsdelight:rotbulb"
]
}
To mark an enchantment as Treasure place it in the #doltastic_enchantments:treasure enchantment tag. This will remove it from pools which are sampled to generate loot tables, and the game won't freak out when it doesn't have a reagent.
To declare that an enchantment should be available on the table without an ancient book, tag it as #doltastic_enchantments:doesnt_require_books, as shown here.
Any enchantment with no cost json defined will be automatically given the default fairy dust formula as displayed the table above. Doltastic Enchantments overwrites all cost jsons defined by Immersive Enchantments.
I've also added Reliable Remover integration; Reliably Removed enchantments will no longer show up in any pools.
Loot Adding
Ancient Books are added to loot through a Forge Global Loot Modifier. Below is an example.
{
"type": "doltastic_enchantments:ancient_book",
"conditions": [],
"injections": [
{
"items": [
"minecraft:crossbow"
],
"tables": [
"minecraft:chests/bastion_bridge",
"minecraft:chests/bastion_other",
],
"weightedBookCount": 0.09
},
{
"commonEnchants": true,
"tables": [
"minecraft:chests/simple_dungeon",
"atmospheric:chests/arid_garden"
],
"weightedBookCount": 0.8
}
]
}
The injections field accepts a list containing BookInstance objects whose purpose is to determine which enchantments should be added to which Loot Tables. The tables field handles the latter part. There are three fields which serves to create a list of enchantments which will be sampled for books to be added:
enchantments: the easy one. Draws from any enchantments specified in the list.
commonEnchants: takes in true/false, set this to true to draw from the pool of "common enchantments" as defined before; that is, nontreasure enchantments that can be applied to standard tools and armor, etc.
items: takes in a list of items names. Draws from the list of enchantments that can be applied to any item in the list, excluding treasure enchantments.
weightedBookCount controls the amount of books that will be on average injected into the chest.
enchantCount (not pictured) takes in a UniformInt object, which will be sampled to determine the amount of enchantments that will be added on the book. for example
"enchantCount": {
"min_inclusive": 2,
"max_inclusive": 5
}
Will put between 2 and 5 enchantments on the generated book. It is fine for min_inclusive and max_inclusive to be the same number.
Putting this all together, if you want each desert temple chest to have a 1 in 2 chance to contain a book with any two trident enchantment on it, you can do:
{
"type": "doltastic_enchantments:ancient_book",
"conditions": [],
"injections": [
{
"items": [
"minecraft:trident"
],
"tables": [
"minecraft:chests/desert_pyramid"
],
"weightedBookCount": 0.09,
"enchantCount": {
"min_inclusive": 2,
"max_inclusive": 2
}
}
]
}
Do not drop the conditions field or the game will crash.


