
描述
此模组添加了 2 种新的配方类型,它们会损坏可损耗的输入物品而不是将其消耗殆尽,方便你在模组或数据包中使用!
一个示例用法是使用铲子制作圆石以获取燧石的配方,完成后返还铲子并减少少量耐久度。
让你的想象力尽情驰骋吧!
功能:
- 新的配方类型:durabilitydamagerecipe:crafting_damage_shapeless 和 durabilitydamagerecipe:crafting_damage_shaped
- 这些配方类型类似于 minecraft:crafting_shapeless 和 minecraft:crafting_shaped 配方类型,但接受一个额外参数:damage(损耗)
- damage 默认为 1,控制在使用这些合成配方的可损耗物品上施加的损耗量
- 如果配方的 damage 大于任何可损耗输入物品的剩余耐久度,则无法进行合成
- 合成台方块在执行合成后会弹出可损耗物品
- 在合成或使用合成台方块时,“耐久度不足”的通知显示方式可配置
- 如果安装了 Treatise,可通过游戏内文档查看说明
- 如果安装了 Mod Menu,可通过游戏内配置界面进行修改
物品受到的耐久损耗目前不受物品附魔(如耐久)的影响。
使用配方:
如果你不知道如何创建数据包,请点击此处了解教程。
配方 .json 文件应添加到 data/<namespace>/recipe 文件夹中。
1.21.4/5 版本示例 custom_shapeless_recipe.json:
{
"type": "durabilitydamagerecipe:crafting_damage_shapeless",
"category": "misc",
"group": "flint",
"ingredients": [
"minecraft:gravel",
"#minecraft:shovels"
],
"damage": 1,
"result": {
"count": 1,
"id": "minecraft:flint"
}
}
1.21.4/5 版本示例 custom_shaped_recipe.json:
{
"type": "durabilitydamagerecipe:crafting_damage_shaped",
"category": "building",
"group": "cobblestone",
"key": {
"S": "minecraft:stone",
"P": "#minecraft:pickaxes"
},
"pattern": [
"SSS",
"SPS",
"SSS"
],
"damage": 8,
"result": {
"count": 8,
"id": "minecraft:cobblestone"
}
}
1.21.1 版本示例 custom_shapeless_recipe.json:
{
"type": "durabilitydamagerecipe:crafting_damage_shapeless",
"category": "misc",
"group": "flint",
"ingredients": [
{
"item": "minecraft:gravel"
},
{
"tag": "minecraft:shovels"
}
],
"damage": 1,
"result": {
"count": 1,
"id": "minecraft:flint"
}
}
1.21.1 版本示例 custom_shaped_recipe.json:
{
"type": "durabilitydamagerecipe:crafting_damage_shaped",
"category": "building",
"group": "cobblestone",
"key": {
"P": {
"tag": "minecraft:pickaxes"
},
"S": {
"item": "minecraft:stone"
}
},
"pattern": [
"SSS",
"SPS",
"SSS"
],
"damage": 8,
"result": {
"count": 8,
"id": "minecraft:cobblestone"
}
}
配置:
合成网格“耐久度不足”选项:“OFF”(关闭)、“ON”(开启)、“LORE_FRIENDLY”(lore 友好模式)
合成台“耐久度不足”选项:“OFF”(关闭)、“ON”(开启)、“LORE_FRIENDLY”(lore 友好模式)
.minecraft/config/durabilitydamagerecipe.json 示例:
{
"craftingNotificationOption": "ON",
"crafterNotificationOption": "ON"
}
支持
如果你有 bug 报告、功能请求或其他类型的问题,请发布在我们的 GitHub issues 页面。这是所有模组的统一问题反馈页,请务必在帖子中包含模组的名称和版本号。我们感谢所有的反馈!
如果你想支持开发工作,可以在我们的 BuyMeACoffee 页面留下打赏。当然,这仅在你力所能及的情况下进行——否则,使用、分享并享受该模组本身就是最好的支持。谢谢!

Description
This mod adds 2 new recipe types that damage damageable input items instead of using them up, ready to use in your mod or data pack!
An example usage would be a recipe to craft gravel with a shovel to get flint, returning the shovel with some durability loss.
Let your imagination run wild!
Features:
- New recipe types: durabilitydamagerecipe:crafting_damage_shapeless and durabilitydamagerecipe:crafting_damage_shaped
- These recipe types are similar to the minecraft:crafting_shapeless and minecraft:crafting_shaped recipe types, but accept an additional parameter: damage
- Damage defaults to 1 and controls the amount of damage applied to damageable items used in these crafting recipes
- If a recipe's damage is greater than the remaining durability of any of the damageable input items, crafting is not possible
- Crafter block will eject damageable items after performing the craft
- Configurable display of "not enough durability" notifications when crafting or using Crafter block
- In-game documentation is available via Treatise if installed
- In-game configuration is available via Mod Menu if installed
The durability damage taken by an item is currently not affected by the item's enchantments, like Unbreaking.
Using the recipes:
Click here to learn how to create a data pack if you don't know how.
Recipe .json files should be added to the data/<namespace>/recipe folder.
Example 1.21.4/5 custom_shapeless_recipe.json:
{
"type": "durabilitydamagerecipe:crafting_damage_shapeless",
"category": "misc",
"group": "flint",
"ingredients": [
"minecraft:gravel",
"#minecraft:shovels"
],
"damage": 1,
"result": {
"count": 1,
"id": "minecraft:flint"
}
}
Example 1.21.4/5 custom_shaped_recipe.json:
{
"type": "durabilitydamagerecipe:crafting_damage_shaped",
"category": "building",
"group": "cobblestone",
"key": {
"S": "minecraft:stone",
"P": "#minecraft:pickaxes"
},
"pattern": [
"SSS",
"SPS",
"SSS"
],
"damage": 8,
"result": {
"count": 8,
"id": "minecraft:cobblestone"
}
}
Example 1.21.1 custom_shapeless_recipe.json:
{
"type": "durabilitydamagerecipe:crafting_damage_shapeless",
"category": "misc",
"group": "flint",
"ingredients": [
{
"item": "minecraft:gravel"
},
{
"tag": "minecraft:shovels"
}
],
"damage": 1,
"result": {
"count": 1,
"id": "minecraft:flint"
}
}
Example 1.21.1 custom_shaped_recipe.json:
{
"type": "durabilitydamagerecipe:crafting_damage_shaped",
"category": "building",
"group": "cobblestone",
"key": {
"P": {
"tag": "minecraft:pickaxes"
},
"S": {
"item": "minecraft:stone"
}
},
"pattern": [
"SSS",
"SPS",
"SSS"
],
"damage": 8,
"result": {
"count": 8,
"id": "minecraft:cobblestone"
}
}
Config:
Crafting grid "not enough durability" options: "OFF", "ON", "LORE_FRIENDLY"
Crafter "not enough durability" options: "OFF", "ON", "LORE_FRIENDLY"
Example .minecraft/config/durabilitydamagerecipe.json:
{
"craftingNotificationOption": "ON",
"crafterNotificationOption": "ON"
}
Support
If you have a bug report, feature request, or any other type of issue, please post on our GitHub issues page. This is an issues page for all of our mods, so be sure to include the mod's name and version in your post. We appreciate all feedback!
If you'd like to support development, you can leave a tip at our BuyMeACoffee. Only if it's within your means- otherwise, using, sharing, and enjoying the mod is support enough. Thank you!
评论 0
登录后参与评分
还没有评论,来抢沙发吧