弃用通知
由于 Mojang 已更改配方组件的指定方式,不再允许在原料中通过组件进行指定,而是仅使用 ID 或标签,因此本模组无法再更新到 1.21.2 之后的版本。
此处将不再发布任何更新。
Fixed It For You, Mojang - Custom Crafting
有时候 Mojang 离成功只差一步,却又像泼下一桶岩浆般将其毁掉。
随着 Minecraft 1.20.5 引入了 物品组件,我们获得了从合成配方结果中添加和移除组件的能力,但 Mojang 不允许配方原料指定组件,导致你可以意外地使用未更改的物品来满足要求。
此模组修复了该问题,并允许所有类型的配方受益。
新组件
附魔能力
该组件以 JSON 格式编写为 "fifymcc:enchantablity": <任意非负整数>。当此组件存在于物品栈上时,其中的值将用于确定附魔能力。
燃料值
该组件以 JSON 格式编写为 "fifymcc:fuel_value": <任意正整数>。当此组件存在于物品堆叠上时,其中的值将用于判断其是否可以作为燃料使用,以及它能燃烧多少刻(ticks)。
如果您希望移除某个燃料物品的燃烧能力,可以使用 "!fifymcc:fuel_value": {} 代替。
配方余量
此组件赋予物品堆在配方中改变其消耗方式的能力。该功能的基础 JSON 格式为 "fifymcc:recipe_remainder": { "type": <余量标识符>, ...其他字段 }。
堆叠剩余
此功能允许物品指定在配方中被消耗时,转换为指定的物品堆栈。
{
"type": "fifymcc:item_stack",
// 此处可放置任意物品 ID
"id": "minecraft:stone",
// 可选字段,用于附加您想要的任何组件
"components": { }
}
概率余量
当物品附加此余量时,存在一个可配置的概率,使得该物品在合成时不会被消耗。
{
"type": "fifymcc:chance",
// 值介于 0 和 1 之间,不包括 0。
// 这表示使用该物品进行合成时有 30% 的概率会被消耗
"break_chance": 0.3,
// 可选字段,用于指定随机数生成器(RNG)。如果未提供,则使用默认随机值
"seed": 12383
}
受损残留物
具有此残留物的堆叠在使用于合成时会受到耐久度损伤。遵循“无损”附魔的效果。如果该堆叠拥有 minecraft:unbreakable 组件,则不会受到耐久度损伤。如果该堆叠缺少必需的 minecraft:damage 和 minecraft:max_damage 组件,则该堆叠将被完全消耗。
{
"type": "fifymcc:damaged",
// 可选字段。决定物品每次合成所受到的耐久度损伤量。默认为 1
"damage": 4,
// 可选字段。决定堆叠在耐久度归零后是否消失。如果为 false,堆叠不会消失但无法再用于合成。默认为 true
"can_break": false
}
未消耗残留物
如果在堆叠上指定了此项,则在合成发生后它将保留下来。
// 无需额外字段
{ "type": "fifymcc:unconsumed" }
示例配方
以下是一个无序合成配方,它需要一个被重新着色为灰烬堆的毒马铃薯,以及任意一个具有自定义模型数据(custom_model_data)为 1 且属于 minecraft:sand 标签的物品。该配方要求毒马铃薯不能拥有食物组件,并且必须具有正确的物品名称和自定义模型数据。
{
"type": "minecraft:crafting_shapeless",
"category": "misc",
"ingredients": [
{
"item": "minecraft:poisonous_potato",
"components": {
// 任何匹配的堆叠都不能拥有食物组件
"!minecraft:food": {},
"minecraft:item_name": "{\"translate\": \"namespace.item.ash\",\"fallback\": \"Ash\"}",
"minecraft:custom_model_data": 1
}
},
{
"item": "minecraft:bone_meal",
"components": {
// 此骨粉不会被配方消耗
"fifymcc:recipe_remainder": { "type": "fifymcc:unconsumed" }
}
},
{
"tag": "minecraft:sand",
"components": {
"minecraft:custom_model_data": 1
}
},
{
"item": "minecraft:dirt"
},
{
"item": "minecraft:gravel"
}
],
"result": {
"count": 4,
"id": "minecraft:dirt"
}
}
受影响的方块/界面
- 工作台
- 玩家物品栏(合成网格)
- 熔炉及其衍生方块(烟熏炉、高炉等)。同时影响输入槽和燃料槽
- 铁砧(目前仅支持
minecraft:smithing_transform配方。修饰纹样配方将很快更新) - 织布机(仅限染色槽)
注意事项
- 由于 EMI、JEI 和 REI 使用物品来查找涉及它们的配方,这些自定义配方将与用于它们或由它们产生的物品相关联,并且不会在其 GUI 中作为单独的物品显示。
- 我尚未在原版合成空间之外测试此功能。这可能与提供原版合成块之外的自定义合成功能的模组兼容或不兼容。如果相关模组使用了内置的
Ingredient.test()方法,则应该兼容。
路线图
- 使铁砧能够处理自定义剩余物
- 新增组件以允许指定修复原料
DEPRECATION NOTICE
As Mojang has removed the ability to specify components in ingredients by switching to just the id or tag for ingredients, this mod can no longer be updated beyond 1.21.2
No more updates will be made here.
Fixed It For You, Mojang - Custom Crafting
Sometimes Mojang gets really close to a great thing and then drops it like a Bucket of Lava.
With the introduction of Item Components in Minecraft 1.20.5, we were given the ability to add and remove components from the result of a crafting recipe, but Mojang didn't allow recipe ingredients to specify components, making it so you could accidentally use unaltered items to fill the requirements.
This mod fixes that and allows all recipe types to benefit.
New Components
Enchantability
This component is written in json as "fifymcc:enchantablity": <any non-negative integer>. When this is on an itemstack, the value in it is used to determine enchantability.
Fuel Value
This component is written in json as "fifymcc:fuel_value": <any positive integer>. When this is on an item stack, the value in it is used to determin whether it can be used as fuel and for how long, in ticks, it'll burn.
If you wish to remove the ability for a fuel item to burn, you can do "!fifymcc:fuel_value": {} instead.
Recipe Remainder
This component gives item stacks the ability to change how they are consumed within recipes. The base json for this is "fifymcc:recipe_remainder: { "type": <remainder identifier>, ...additional fields }.
Stack Remainder
This allows an item to specify that when they are consumed in a recipe, they transform into the specified item stack.
{
"type": "fifymcc:item_stack",
// Any item id can be put here
"id": "minecraft:stone",
// Optional field to attach any components you want
"components": { }
}
Chance Remainder
When an item has this remainder attached to it, there is a configurable chance that the item will not be consumed when crafting.
{
"type": "fifymcc:chance",
// Value between 0 and 1, excluding 0.
// This is a 30% chance that the item will be consumed when crafting with it
"break_chance": 0.3,
// Optional field for specifying the RNG. If not provided a random value will be used
"seed": 12383
}
Damaged Remainder
Stacks that have this remainder will take durability damage when used in crafting. Respects the unbreaking enchantment. If the stack has the minecraft:unbreakable component on it, it will not take durability damage. If the stack does not have the required minecraft:damage and minecraft:max_damage components, then the stack will be consumed instead.
{
"type": "fifymcc:damaged",
// Optional field. Determines how much durability damage the item
// takes per craft. Defaults to 1
"damage": 4,
// Optional field. Determines if the stack disappears after reaching 0 durability. If false, the stack doesn't disappear but can no longer be used for crafting. Defaults to true
"can_break": false
}
Unconsumed Remainder
If this is specified on a stack, then it will remain after crafting occurs.
// No additional fields necessary
{ "type": "fifymcc:unconsumed" }
Example Recipe
Below is a shapeless crafting recipe that takes a poisonous potato that has been reskinned into a pile of ash, and any item in the minecraft:sand tag that has custom_model_data of 1. The recipe requires that the poisonous potato not have the food component, and that it have the correct item name and custom model data.
{
"type": "minecraft:crafting_shapeless",
"category": "misc",
"ingredients": [
{
"item": "minecraft:poisonous_potato",
"components": {
// Any matching stack must not have the food component on it
"!minecraft:food": {},
"minecraft:item_name": "{\"translate\": \"namespace.item.ash\",\"fallback\": \"Ash\"}",
"minecraft:custom_model_data": 1
}
},
{
"item": "minecraft:bone_meal",
"components": {
// This bonemeal will not be cosumed by the recipe
"fifymcc:recipe_remainder": { "type": "fifymcc:unconsumed" }
}
},
{
"tag": "minecraft:sand",
"components": {
"minecraft:custom_model_data": 1
}
},
{
"item": "minecraft:dirt"
},
{
"item": "minecraft:gravel"
}
],
"result": {
"count": 4,
"id": "minecraft:dirt"
}
}
Affected Blocks/Screens
- Crafting Table
- Player Inventory (Crafting Grid)
- Furnace and any derived block (Smoker, Blast Furnce, etc.). Affects both input and fuel slot
- Smithing Table (Only
minecraft:smithing_transformrecipes for now. Trim recipes will be updated soon) - Loom (Only Dye slot)
Caveats
- Due to how EMI, JEI, and REI use items to look up recipes involving them, these custom recipes will be associated with the item used or produced by them and won't show up as seperate item within their GUIs.
- I have not tested this outside of the vanilla crafting space. This may or may not work with mods that provide their own crafting functionality outside of the vanilla crafting blocks. If the mod in question uses the builtin Ingredient.test() method, then it should be compatible.
Roadmap
- Get anvil working with custom remainders
- New component to allow specifying repair ingredient
下载 FIFYM: Custom Crafting
下载 FIFYM: Custom Crafting
下载 FIFYM: Custom Crafting
下载 FIFYM: Custom Crafting
下载 FIFYM: Custom Crafting
下载 FIFYM: Custom Crafting
下载 FIFYM: Custom Crafting
下载 FIFYM: Custom Crafting
下载 FIFYM: Custom Crafting
下载 FIFYM: Custom Crafting
- 已更新以支持 1.21.1
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧