Unofficial site, not affiliated with modrinth.com.What is this?
Моды/Doltastic Enchantments
Doltastic Enchantments

Doltastic Enchantments

An addon to Alfie's wonderful "Immersive Enchanting" mod, designed to fit my own vision

6
1

Requires Immersive Enchanting and Blueprint. You MUST use Immersive Enchanting 4.0.3, newer versions will NOT WORK. 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: if you want to apply an enchantment to a tool, you must find an Ancient Book with that enchantment on it by exploring, place it in a chiseled bookshelf next to your enchanting table, and that's it. You can read more here.

This is an awesome system; I have some minor complaints with it that could not be remedied with datapacks, so I decided to make this addon.

First of all, acquiring enchanted book 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) can contain books with common enchantments.

  • In addition to this, some dungeons have more specific enchantments; underwater ruins spawn enchantments for fishing rods and tridents, for example.

  • Treasure enchantments are found in their proper places; swift sneak is in ancient cities and soul speed in bastions.

  • Modded tools sometimes have a special set of enchantments that are not shared by other tools. These tools are usually associated with structures (think maces and trial chambers). Books for these specialized enchantments are found in those structures and nowhere else, so they cannot clutter up the enchantment pool.

Jaden Nether Expansion's Pump-Charge Shotgun item enchanted with Recoil I

I am still unsatisfied with this; exploring in minecraft is inherently RNG-heavy, so I did some other stuff. First of all, I've associated every enchantment with some random item; this is its "reagent". If you want to make create a book for a specific enchantment, you can use the following crafting recipe:

Recipe for a depth strider book costing 7 diamonds, 1 book, and a tropical fish. The tropical fish is the reagent of depth strider

The resulting ancient book has Depth Strider on it, since tropical Fish is the reagent of Depth Strider. Reagents are fully data-driven, as I'll mention later. You can also acquire arbitrary ancient books using an enchanting table in a process called conjuring.

Conjuring tooltip hint

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 20 levels. 

You can do 20 levels

The netherite pickaxe in the image will not be consumed.

Ancient Books found from dungeons have a chance to contain more than one enchantments; this is only way a book can have more than one enchantments on it.

A monster box chest containing an ancient book on it with two enchantments on it

Also, you can set an enchantment to be available automatically in the enchanting table without requiring a book. In the provided datapack this is done for essential enchantments like Silk Touch, Efficiency, as well as enchantments I can't think of a reagent for, like Power and Lure and Impaling.

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

To enchant a bow with Infinity, you need a nether star.

The enchantment cost of infinity in immersive enchanting is a nether star

Doltastic Enchantments standardizes this cost into Fairy Dust. Fairy Dust is an item crafted with diamonds plus a few semiprecious materials. To enchant an item to some particular level, you need level lapis items and level - 1 fairy dust items. But if the enchantment only has 1 level (like aqua affinity) you need a flat 2 fairy dust. For example, to enchant a bow to Power 3 you need 3 lapis and 2 fairy dust. 

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, go to that enchantment's Immersive Enchanting enchantment cost json and add "requireBook": false, as shown here.

In base Immersive Enchanting, if an enchantment cost json is defined without a levels field, the game will crash. With this mod installed the enchantment cost will instead default to the level - 1 formula of Fairy Dust items. It can alternatively take in a fairyDustAmounts field which accepts a list for integers.

{
    "fairyDustAmounts": [19, 23, 29, 31, 37]
}

Will serialize to an enchantment cost taking in 19 fairy dusts for level 1, 23 dusts for level 2, et cetera.

Finally, Any enchantment with no cost json defined will default to the level - 1 formula.

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.

Совместимость

Minecraft: Java Edition

1.20.x

Платформы

Поддерживаемые окружения

Клиент и сервер

Детали

Лицензия:MIT
Опубликован:1 неделю назад
Обновлён:1 неделю назад
Главная