需要 Immersive Enchanting 和 Blueprint。对于 1.20.1,你必须使用 Immersive Enchanting 4.0.3。对于 1.21.1,你必须使用 Immersive Enchanting 6.0.1。
Fairy Dust(仙尘)的纹理取自 Indexed Enchanting 中的 Vitalis 物品,遵循其 MIT 许可证。这是一个占位纹理,我将尽快替换它。
More Consistent Enchantments
关于 Immersive Enchanting 系统的简要介绍:Ancient Books(古书)是你在探索时发现的附魔书。将它们放在附魔桌附近的雕花书架上,你就可以将附魔应用到你的工具上。附魔时这些书不会被消耗。你可以在这里阅读更多相关内容。
这是一个很棒的系统;我有一些小抱怨,无法通过数据包解决,所以我决定制作这个附加模组。
首先,在 Immersive Enchanting 中获取附魔书非常依赖随机性(RNG)。这正是本模组旨在解决的主要问题之一。因此,我添加了一个更复杂的系统来在战利品箱中分配附魔。
-
common(普通)附魔是可以应用于基本工具和护甲的附魔(镐、剑、铲、锄、头盔、胸甲、护腿、靴子、刀(Farmer's Delight)、弓、弩)。这排除了如灵魂疾行等宝藏附魔。大多数地牢箱子(怪物房、水下遗迹、沙漠神殿)包含带有普通附魔的书。
-
某些地牢具有更具体的附魔;水下遗迹会生成鱼竿和三叉戟的附魔。
-
宝藏附魔会在其应有的位置出现;迅捷潜行出现在远古城市,灵魂疾行出现在堡垒遗迹。
-
模组工具有时拥有其他工具所没有的专属附魔。这些工具通常与特定结构相关联(例如锤子和试炼密室)。这些附魔的书只在这些结构中找到,其他地方没有,因此不会污染附魔池。
在 Minecraft 中探索本质上仍然高度依赖随机性,因此如果附近没有找到你想要的附魔,应该有一个后备方案。首先,我将每个附魔与一组物品关联起来;这就是它的媒介(reagent)。例如,深海探索者的媒介是一个热带鱼物品。如果你想制作一本深海探索者书,可以使用以下合成配方:
媒介是通过数据驱动的,格式如下。你还可以通过附魔台以被称为_conjuring_(召唤)的过程获取古书。
将一本书放入附魔台的中心槽位,并将任何可附魔的物品放入媒介槽位。你将看到所有可以应用到你可附魔物品上的附魔选项,你可以花费 30 级经验将这些附魔应用到你的书上。
此外,有些附魔设计为可以在附魔台中直接使用而无需书本。在提供的数据包中,丝绸之触和效率等核心附魔就是这样实现的。
Standardized Enchantment Costs
在 Immersive Enchanting 中,要应用一个等级的附魔,除了青金石外,还需要额外的物品作为成本。所需物品的种类存在很大差异。要将一件物品的效率附魔完全升至最高等级,你需要:
- 1 个蛋糕
- 8 个红石块
- 16 个闪烁的西瓜
- 1 个兔脚
- 8 瓶龙息
Doltastic Enchantments 将这种成本标准化为_Fairy Dust_(仙尘)。仙尘是一种由半宝石材料合成的物品,或者在世界各地的战利品箱中找到。你需要多少仙尘来将物品附魔到特定等级,取决于该附魔的最高等级,具体如下:
| 最高等级 \ 施加所需消耗 |
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 |
这里有一个视频,总结了我刚才所说的所有内容。
自定义
附魔数据
本模组的所有功能均由数据驱动。若要设置材料(reagents),你需要将 json 文件放入 your_mod_id:reagents/ 文件夹中,具体示例见此处。
这是另一个示例:
{
// 格式为 "附魔": "材料"
// 材料可以是单个物品、标签(tags)或物品列表。
// 不要在列表中使用标签;不支持此操作。
"allurement:alleviating": "heart_crystals:heart_crystal_shard",
"allurement:launch": "#minecraft:saplings",
"allurement:obedience": [
"species:broken_links",
"minecraft:ghast_tear",
"dungeonsdelight:rotbulb"
]
}
若要将某个附魔标记为“宝藏附魔”(Treasure),请将其加入 #doltastic_enchantments:treasure 附魔标签中。这将使其从用于生成战利品表的采样池中移除,并且当游戏缺少对应材料时也不会出错。
若要声明某附魔无需古籍即可在附魔台上使用,请将其标记为 #doltastic_enchantments:doesnt_require_books,具体示例见此处。
任何未定义成本 json 的附魔都将自动获得上述表格所示的默认“仙尘公式”。Doltastic Enchantments 会覆盖 Immersive Enchantments 定义的所有成本 json。
我还添加了 Reliable Remover 的集成支持;被 Reliable Remover 移除的附魔将不再出现在任何池中。
战利品添加
古籍通过 Forge Global Loot Modifier 添加到战利品表中。以下是一个示例。
{
"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
}
]
}
injections 字段接受一个包含 BookInstance 对象的列表,其作用是确定哪些附魔应添加到哪些战利品表中。tables 字段处理后半部分。有三个字段用于创建将被采样以生成书籍的附魔列表:
enchantments:最简单的一项。从列表中指定的任意附魔中进行抽取。
commonEnchants:接受 true/false,将其设置为 true 可从“普通附魔”池中进行抽取;即之前定义的不可作为宝藏附魔、可应用于标准工具和盔甲等的附魔。
items:接受一个物品名称列表。从可应用于列表中任意物品的附魔列表中进行抽取,排除宝藏附魔。
weightedBookCount 控制平均注入到箱子中的书籍数量。
enchantCount(图中未显示)接受一个 UniformInt 对象,该对象将被采样以确定书籍上添加的附魔数量。例如:
"enchantCount": {
"min_inclusive": 2,
"max_inclusive": 5
}
将在生成的书籍上放置 2 到 5 个附魔。min_inclusive 和 max_inclusive 设为相同数字是可以的。
将所有内容结合起来,如果你希望每个沙漠神殿宝箱有 1/2 的概率包含一本带有任意两个三叉戟附魔的书,你可以这样做:
{
"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
}
}
]
}
请勿删除 conditions 字段,否则游戏将会崩溃。
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.
评论 0
登录后参与评分
还没有评论,来抢沙发吧