Volucraft
Minecraft 中的 3D(体积)合成! 我等待这一刻已经太久了……
如何使用 Volucraft
首先,从创造模式物品栏中获取一个“聚变台”(Amalgamation Table),它位于功能方块分类下的工作台旁边; 或者自行合成(上方放置 3 个铁锭,中间环绕放置 3 个相邻的工作台并在中间放入任意潜影盒,剩余两个槽位各放入一个漏斗)。
配方
由于 3D 配方的特性,任何能够通过刚性变换*匹配配方的 ItemStack 朝向都是有效的输入。
*只要配方保持在聚变台的边界内,旋转、镜像和位移均被接受。
Volucraft 自带一个包含四个配方的数据包:
- 附魔金苹果 - 中心放置 1 个苹果,周围环绕 26 个金块。
- 三叉戟 - 中心放置一个海晶碎片,然后在其中一个角放置另一个海晶碎片。将一根骨头放在该碎片的对角位置,然后将另外两根骨头放在相邻的角上。
- 哭泣的黑曜石 (x4) - 底部放置 4 个黑曜石,然后在它们正上方的 4 个格子里交替放置恶魂之泪与龙息,最后在这之上再放置 4 个黑曜石。
- 钻石 - 27 个煤块
创建你自己的配方
Volucraft 的配方是数据驱动的,就像常规的合成配方一样!
它们存放在常规的 data/\<modid\>/recipe 文件夹中,但类型和模式不同。键(key)和结果(result)字段与常规合成配方完全相同。
参见下方的示例(三叉戟配方):
{
"type": "volucraft:amalgamation",
"key": {
"/": "minecraft:prismarine_shard",
"V": "minecraft:bone"
},
"pattern": [
[
"V V",
" ",
" V"
],
[
" ",
" / ",
" "
],
[
" ",
" ",
"/ "
]
],
"result": {
"id": "minecraft:trident"
}
}
请注意,该模式由 3 个常规的 2D 模式堆叠而成。
自 0.2.0 版本起,也支持无形状配方(类型为 volucraft:amalgamation_shapeless)。
它们的格式与 crafting_shapeless 配方相同,但支持最多 27 种原料,而非通常的 9 种。
查看配方
自 0.0.3 版本起,Volucraft 通过 Reliable Recipe Viewer 集成支持配方查看!
2D 合成配方
自 0.2.0 版本起,聚变台现在接受常规合成配方。
2D 有形状配方和无形状配方会自动分别添加为有形状和无形状的聚变配方。
其他配方(如火箭配方)在原版中已得到处理,但在其他模组中未得到处理(请参阅 给模组开发者)。
请注意,挤出配方的 ID 是在原始配方 ID 后附加 .volucraft_autoextruded。
挤出配方会与其 2D 对应物一起自动授予和撤销。
配置
Volucraft 可以在客户端进行配置以符合你的偏好。
0.1.0 之前
它自带两个内置资源包和一个由 YACL 支持的可选配置文件。
这两个资源包修改了插槽的半透明度。
- 所有半透明插槽 - 默认使所有插槽渲染为半透明,而不仅仅是包含物品时变为半透明
- 更多半透明插槽 - 包含物品的插槽将变得比平时更不透明
YACL 配置文件控制聚变台屏幕中包含立方体部分的背景颜色。
它带有一个由 YACL 支持的可选配置文件(你需要安装 YACL 才能访问配置)。 YACL 配置文件控制插槽的半透明度和包含插槽的聚变台屏幕部分的背景颜色。
兼容性
为了将 2D 配方转换为 3D,Volucraft 使用挤出公式(Extrusion Formulas)和挤出器(Extruders)。
挤出公式是数据驱动的,位于 data/namespace/volucraft_extrusion_formula/path.json,
其中 namespace 和 path 对应于注册的 RecipeSerializer 的命名空间和路径。
挤出公式具有以下格式:
"extruder_namespace:extruder_path"
其中 extruder_namespace 和 extruder_path 对应于注册的 ExtrusionFormula$Extruder 的命名空间和路径。
默认的挤出器表如下所示。
默认情况下,所有可以转换的原版 RecipeSerializer 都有一个挤出公式。
挤出器是从 2D 到 3D 的真正转换器,将 2D CraftingRecipe 转换为 3D AmalgamationRecipe。
这些需要由模组注册(参见 VolucraftRegistries 和 ExtrusionFormula)。
| 类名 | ID | 转换方式 | 说明 | 用于 |
|---|---|---|---|---|
| ShapedRecipeExtruder | volucraft:shaped | ShapedRecipe 转为 ShapedAmalgamationRecipe | 应用于常规的形状合成配方。 | minecraft:crafting_shaped |
| ShapelessRecipeExtruder | volucraft:shapeless | ShapelessRecipe 转为 ShapelessAmalgamationRecipe | 应用于常规的无形状合成配方。 | minecraft:crafting_shapeless |
| Flattener | volucraft:flattened | CraftingRecipe 转为 FlattenedAmalgamationRecipe | 应用于特殊配方,(功能上)生成一个 3x3x1 的 AmalgamationRecipe。 | minecraft:crafting_decorated_pot, minecraft:crafting_imbue |
| BasicallyShaplessRecipeExtruder | volucraft:basically_shapeless | CraftingRecipe 转为 BasicallyShapelessAmalgamationRecipe | 应用于特殊配方,其中槽位数量无关紧要。这通常发生在配方遍历所有给定材料且不关心其相对位置时。 | minecraft:crafting_dye, minecraft:crafting_bannerduplicate, minecraft:crafting_bookcloning, minecraft:crafting_firework_rocket, minecraft:crafting_firework_star, minecraft:crafting_firework_star_fade, minecraft:crafting_mapextending, minecraft:crafting_repairitem, minecraft:crafting_shielddecoration, minecraft:crafting_transmute |
面向模组开发者
想要贡献?请提交 PR!
否则,要将此项目作为依赖项添加,请使用 Modrinth 的 Maven。你还需要添加 registrar。
背景
这个模组最初是为了参加 Modfest 26 而制作的。
然而,由于时间不足和一些糟糕的决定,Modfest 26 的截止日期到了,而我却没有什么可以提交的。
不过,Mod Garden: DIY 活动正在启动,鉴于我有一个很棒的模组概念但几乎没有代码展示出来,我决定尽可能多地编写模组的其余部分(虽然我没多少代码)。
因此,我得以拥有第一个(据我所知)能够同时显示 ModFest 和 Mod Garden 徽章(技术上)而不需要撒谎的模组!
这有多酷呢?
特别鸣谢
感谢 Phanastrae、Celeste、Typho 和 Cassian 提供的帮助!
Volucraft
3D (Volumetric) Crafting in Minecraft! I've been waiting for this for so long...
How to Volucraft
To start, obtain an Amalgamation Table from the Creative Inventory (in Functional Blocks after the Crafting Table), or craft one (3 iron ingots on the top, any shulker box in the middle surrounded by 3 adjacent crafting tables, and one hopper in each of the two remaining slots).
Recipes
Due to the nature of 3D recipes, any orientation of ItemStacks that can be transformed rigidly* to match a recipe is a valid input.
*Rotations, reflections, and translations are all accepted as long as the recipe remains within the bounds of the Amalgamation Table.
Volucraft comes with one builtin datapack with four recipes:
- Enchanted Golden Apple - 26 Gold Blocks surround 1 Apple in the center.
- Trident - One Prismarine Shard is placed in the center, then another shard is placed in one of the corners. A bone is placed in the opposite corner of the shard, then the other two bones are placed in adjacent corners.
- Crying Obsidian (x4) - 4 Obsidian are placed the bottom, then alternating Ghast Tears and Dragon's Breath are placed in the 4 tiles immediately above it, and then 4 more Obsidian are placed above those.
- Diamond - 27 Coal Blocks
Creating Your Own Recipe
Volucraft recipes are data-driven, like regular crafting recipes! They go in the regular data/<modid>/recipe folder, but with a different type and pattern. The key and result fields remain identical to regular crafting recipes. See the example (trident recipe) below:
{
"type": "volucraft:amalgamation",
"key": {
"/": "minecraft:prismarine_shard",
"V": "minecraft:bone"
},
"pattern": [
[
"V V",
" ",
" V"
],
[
" ",
" / ",
" "
],
[
" ",
" ",
"/ "
]
],
"result": {
"id": "minecraft:trident"
}
}
Note how the pattern consists of 3 regular 2D patterns stacked on top of each other.
As of 0.2.0, Shapeless Recipes (type volucraft:amalgamation_shapeless) are also supported.
They have the same format as crafting_shapeless recipes, but support up to 27 ingredients instead of the usual 9.
Viewing Recipes
As of 0.0.3, Volucraft supports recipe viewing via Reliable Recipe Viewer integration!
2D Crafting Recipes
As of 0.2.0, the Amalgamation Table now accepts regular crafting recipes.
2D Shaped and Shapeless recipes are automatically added as Shaped and Shapeless Amalgamation recipes, respectively.
Other recipes, such as firework recipes, are accounted for in vanilla, but not for other mods (see For Mod Developers).
Note that the id of the extruded recipe is the original recipe's id appended with .volucraft_autoextruded.
Extruded recipes are automatically granted and revoked along with their 2D counterparts.
Configuration
Volucraft can be configured on the client to match your preferences.
Before 0.1.0
It comes with two builtin resource packs and an optional config powered by YACL.
The two resource packs modify the translucency of the slots.
- All Translucent Slots - makes all slots render translucent by default, instead of only turning translucent when containing items
- More Translucent Slots - slots that contain items will become even less opaque than usual
The YACL config controls the color of the background of the portion of the Amalgamation Table screen that contains the cube.
It comes with an optional config powered by YACL (you will need to install YACL to access the config). The YACL config controls slot translucency and the background color of the portion of the Amalgamation Table screen that contains the slots.
Compatibility
To translate 2D recipes to 3D, Volucraft uses Extrusion Formulas and Extruders.
Extrusion Formulas are data-driven and located at data/namespace/volucraft_extrusion_formula/path.json,
where namespace and path correspond to the namespace and path of the registered RecipeSerializer.
Extrusion Formulas have the following format:
"extruder_namespace:extruder_path"
where extruder_namespace and extruder_path correspond to the namespace and path of the registered ExtrusionFormula$Extruder.
A table of default extruders can be found below.
By default, all vanilla RecipeSerializers that can be translated have an extrusion formula.
Extruders are the real translators from 2D to 3D and convert 2D CraftingRecipes to 3D AmalgamationRecipes.
These need to be registered by a mod (see VolucraftRegistries and ExtrusionFormula).
| Class Name | Id | Conversion | Details | Used for |
|---|---|---|---|---|
| ShapedRecipeExtruder | volucraft:shaped | ShapedRecipe to ShapedAmalgamationRecipe | Applied to normal shaped crafting recipes. | minecraft:crafting_shaped |
| ShapelessRecipeExtruder | volucraft:shapeless | ShapelessRecipe to ShapelessAmalgamationRecipe | Applied to normal shapeless crafting recipes. | minecraft:crafting_shapeless |
| Flattener | volucraft:flattened | CraftingRecipe to FlattenedAmalgamationRecipe | Applied to special recipes, (functionally) producing an 3x3x1 AmalgamationRecipe. | minecraft:crafting_decorated_pot, minecraft:crafting_imbue |
| BasicallyShaplessRecipeExtruder | volucraft:basically_shapeless | CraftingRecipe to BasicallyShapelessAmalgamationRecipe | Applied to special recipes, where the number of slots doesn't matter. This usually occurs when the recipe searches through all the given ingredients and doesn't care about their relative positioning. | minecraft:crafting_dye, minecraft:crafting_bannerduplicate, minecraft:crafting_bookcloning, minecraft:crafting_firework_rocket, minecraft:crafting_firework_star, minecraft:crafting_firework_star_fade, minecraft:crafting_mapextending, minecraft:crafting_repairitem, minecraft:crafting_shielddecoration, minecraft:crafting_transmute |
For Mod Developers
Want to contribute? Open a PR!
Otherwise, to add this project as a dependency, use Modrinth's maven. You'll also need to add registrar.
Background
This mod was originally made with the intention of bringing it to Modfest 26.
However, after a lack of time and a few bad decisions, Modfest 26's deadline arrived and I didn't have anything to submit.
However, Mod Garden: DIY was starting up, and seeing as I had an amazing mod concept lying around and barely any code to
show for it, I decided to write as much of the rest of the mod (I didn't have a lot) as I could.
Thanks to this, I get to have the first mod (to my knowledge) that can display both ModFest and Mod Garden badges (technically) without lying!
How cool is that?
Special Mentions
Thank you to Phanastrae, Celeste, Typho, and Cassian for your assistance!
下载 Volucraft
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Volucraft
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Volucraft
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Volucraft
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Volucraft
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Volucraft
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Volucraft
下载 Volucraft
下载 Volucraft
下载 Volucraft
Registrar 0.2.9
- 移植至 26.2
- 允许始终旋转 3D 合成网格(前提是光标在边界内)
- 挤出公式现在由数据驱动
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
可定制的鞘翅模组,支持装饰纹饰、旗帜图案等更多功能!
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
评论 0
登录后参与评分
还没有评论,来抢沙发吧