使用方法
此模组添加了一种新的数据类型,名为 push_to_craft。将文件放入整合包或模组的 data 文件夹中的 push_to_craft 目录下(位于 recipes 或 tags 目录之下)。
一个有效的 JSON 文件结构如下:
additions: 数组 - 定义要添加到目标中的所有物品或标签- 条目为物品 ID 的 字符串。可以通过在名称前加上
#来使用标签。
- 条目为物品 ID 的 字符串。可以通过在名称前加上
targets: 数组 或 字符串 - 定义要在配方中针对哪些物品和标签- 条目为物品 ID 或标签的 字符串。
recipes: 对象 - 提供选择特定物品的条件types: 数组 - 可选 - 定义要针对哪些配方序列化器- 条目为配方序列化器 ID 的 字符串
ids: 数组 - 可选 - 定义要针对哪些配方- 条目为 字符串,可以是以下几种形式之一:
- 精确的配方 ID,例如
minecraft:anvil - 命名空间特定的正则表达式,仅将 ID 的最后一部分标记为正则,例如
minecraft:.* - 以正斜杠开头和结尾的完整正则表达式,例如
/.*craft:.*/
- 精确的配方 ID,例如
- 条目为 字符串,可以是以下几种形式之一:
示例
这使得你可以在任何地方用黑石替代圆石:
{
"additions": [
"minecraft:blackstone"
],
"targets": [
"minecraft:cobblestone"
],
"recipes": {}
}
这使得你可以在合成和熔炼配方中使用绿宝石和各种木板作为钻石和铁矿石的替代品:
{
"additions": [
"minecraft:emerald",
"#minecraft:planks"
],
"targets": [
"minecraft:diamond",
"minecraft:iron_ore"
],
"recipes": {
"types": [
"crafting_shaped",
"crafting_shapeless",
"blasting"
],
"ids": [
"minecraft:/.*/"
]
}
}
模组开发者
如果你是模组开发者并希望在你的项目中使用此模组,你可以通过我的 Maven 仓库进行引用:
repositories {
maven {
name "Siphalor's Maven"
url "https://maven.siphalor.de"
}
}
dependencies {
modCompile "de.siphalor:pushtocraft-1.15:+"
// 你可以选择将此模组包含在你的 jar 文件中
include "de.siphalor:pushtocraft-1.15:+"
}
Usage
This mod adds a new data type called push_to_craft. Put the files into a push_to_craft directory in your datapack or data folder of your mod (beneath the recipes or tags directories).
A valid json file is built like this:
additions: Array - Defines all items or tags that you want to add to the targets- Entries are item ids as Strings. You can use tags by prepending a
#.
- Entries are item ids as Strings. You can use tags by prepending a
targets: Array or String - Defines which items and tags to target in the recipes- Entries are item ids or tags as Strings.
recipes: Object - Gives conditions for which items to choosetypes: Array - optional - Defines which recipe serializers to target- Entries are recipe serializer ids as Strings
ids: Array - optional - Defines which recipes to target- Entries are Strings that are either of these:
- Exact recipe ids à la
minecraft:anvil - Namespace specific regular expression that only mark the last part of the id as regex à la
minecraft:.* - A complete regular expression beginning and ending with a forward slash à la
/.*craft:.*/
- Exact recipe ids à la
- Entries are Strings that are either of these:
Example
This allows you to use blackstone in favor of cobblestone everywhere:
{
"additions": [
"minecraft:blackstone"
],
"targets": [
"minecraft:cobblestone"
],
"recipes": {}
}
This allows you to use emeralds and all kinds of planks as alternatives to diamonds and iron ores in crafting and smelting recipes:
{
"additions": [
"minecraft:emerald",
"#minecraft:planks"
],
"targets": [
"minecraft:diamond",
"minecraft:iron_ore"
],
"recipes": {
"types": [
"crafting_shaped",
"crafting_shapeless",
"blasting"
],
"ids": [
"minecraft:/.*/"
]
}
}
Modders
If you're a modder and like to use this in your projects you can do so using my maven:
repositories {
maven {
name "Siphalor's Maven"
url "https://maven.siphalor.de"
}
}
dependencies {
modCompile "de.siphalor:pushtocraft-1.15:+"
// Optionally you can include this mod into your jar
include "de.siphalor:pushtocraft-1.15:+"
}
下载 Push To Craft
下载 Push To Craft
下载 Push To Craft
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Push To Craft
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Push To Craft
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Push To Craft
下载 Push To Craft
下载 Push To Craft
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Push To Craft
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Push To Craft
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
版本 1.0.6
- 修复了各种兼容性问题,尤其是反序列化钩子(deserialization_hooks)相关的问题(例如 Create 的依赖项)
由 Siphalor 发布
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧