耐久损伤配方

耐久损伤配方

添加2种新的合成配方类型,在合成过程中对可损坏的输入物品造成损伤而不是消耗它们。这些配方类型可直接用于你的模组或数据包中!

装备

Durability Damage Recipe

描述

本模组添加了 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"

合成器“耐久度不足”选项:"OFF"、"ON"、"LORE_FRIENDLY"

示例 .minecraft/config/durabilitydamagerecipe.json:

{
  "craftingNotificationOption": "ON",
  "crafterNotificationOption": "ON"
}

支持

如果你有错误报告、功能请求或任何其他类型的问题,请发布到我们的 GitHub issues 页面。这是我们所有模组的 issues 页面,因此请务必在帖子中包含模组名称和版本。我们感谢所有反馈!

如果你想支持开发,可以在我们的 BuyMeACoffee 留下小费。请仅在你力所能及的范围内这样做——否则,使用、分享和享受这个模组本身就是足够的支持。谢谢!