<本站文本内容除另有声明外,转载时均必须注明出处。(详情…中文Minecraft Wiki是完全公开的。请勇于扩充与修正内容!Minecraft中文Wiki微博正在更新!或许有兴趣去看看想与其他用户进行编辑上的沟通?社区专页正是为此创建的。翻译或创建页面之前,不妨看看译名标准化Wiki条例页面。需要管理员的协助?在管理员告示板留言也许可以帮到您。>

Minecraft Wiki:沙盒/基岩版beta物品文档

来自Minecraft Wiki
跳转至: 导航搜索
Information icon.svg
此特性为基岩版独有。
Ic translate.svg
此条目的(部分)内容需要翻译。

你可以帮助我们来翻译此条目,但请勿使用机器翻译

这里是基岩版beta 1.13.0.4物品文档。 新的特性、行为和能力在这个版本中不是最终的且在正式版前可能更改,不会另行通知。如果附加包异常,请在beta版测试完成后检查该文档。资源包和行为包创建后不保证在正式版也可以正常工作。

物品[编辑源代码]

minecraft:block[编辑源代码]

类型 默认值 描述
字符串

minecraft:camera[编辑源代码]

类型 名称 默认值 描述
Decimal black_bars_duration
Decimal black_bars_screen_ratio
Decimal shutter_duration
Decimal picture_duration
Decimal slide_away_duration

minecraft:foil[编辑源代码]

让物品出现附魔的光效

类型 名称 默认值 描述
布尔值 True, false false

minecraft:food[编辑源代码]

让食物可以食用

类型 名称 默认值 描述
整数 Nutrition 1 食用后获得多少饥饿值
布尔值 can_always_eat false 如果设置为true,那么即使饥饿值已经满了,也可以食用
字符串 using_converts_to 吃完后会转化为另一个物品,类似于吃掉蘑菇煲会重新得到一个木碗
字符串 saturation_modifier normal 食物所提供的饱和度,包括“差”、“低”、“正常”、“好”、“高”和“超自然”
数组 effects 玩家食用食物后的状态效果,包括“名称”、“概率”、“持续时间”和“等级”
布尔值 is_meat 定义这种食物是否为肉
字符串 on_use_action
列表 on_use_range
字符串 cooldown_type
整数 cooldown_time 定义此物品食用的冷却间隔

minecraft:hand_equipped[编辑源代码]

How item will look like on hand

Type Name Default Value Description
Boolean True, false false Setting it to true will make it held like a tool

minecraft:max_damage[编辑源代码]

Type Name Default Value Description
Integer value The maximum durability an item can sustain before breaking

minecraft:max_stack_size[编辑源代码]

Type Name Default Value Description
Integer value 64 How much the item can be stacked

minecraft:seed[编辑源代码]

Type Name Default Value Description
String crop_result Transform this item into crop when planted
List plant_at Block where this item can be planted

minecraft:stacked_by_data[编辑源代码]

Make items with same identifier but with different data value become unstackable

Type Name Default Value Description
Boolean True, false false Only used to items with multiple data value

minecraft:use_duration[编辑源代码]

The amount of time it takes to use an item

Type Name Default Value Description
Integer value The amount of time from when the item is first used to when it is finished
Code Example
Example for food item
{
  "format_version": "1.10",
  "minecraft:item": {
    "description": {
      "identifier": "minecraft:chorus_fruit"
    },

    "components": {
      "minecraft:use_duration": 32,
      "minecraft:food": {
        "nutrition": 4,
        "saturation_modifier": "low",
        "on_use_action": "chorus_teleport",
        "on_use_range": [ 8, 8, 8 ],
        "cooldown_type": "chorusfruit",
        "cooldown_time": 20,
        "can_always_eat": true
      }
    }
  }
}
Another example for food item
{
  "format_version": "1.10",
  "minecraft:item": {
    "description": {
      "identifier": "minecraft:appleEnchanted"
    },
    
    "components": {
      "minecraft:hand_equipped": false,
      "minecraft:stacked_by_data": true,
      "minecraft:use_duration": 32,
      "minecraft:foil": true,
      "minecraft:food": {
        "nutrition": 4,
        "saturation_modifier": "supernatural",
        "can_always_eat": true,
        "effects": [
          {
            "name": "regeneration",
            "chance": 1.0,
            "duration": 30,
            "amplifier": 4
          },
          {
            "name": "absorption",
            "chance": 1.0,
            "duration": 120, // 2 * 60
            "amplifier": 3
          },
          {
            "name": "resistance",
            "chance": 1.0,
            "duration": 300,
            "amplifier": 0
          },
          {
            "name": "fire_resistance",
            "chance": 1.0,
            "duration": 300,
            "amplifier": 0
          }
        ]
      }
    }
  }
} 
Example for seeds item
{
  "format_version": "1.10",
  "minecraft:item": {
    "description": {
      "identifier": "minecraft:sweet_berries"
    },

    "components": {
      "minecraft:use_duration": 32,

      "minecraft:food": {
        "nutrition": 2,
        "saturation_modifier": "low",
        "is_meat":  false
      },
      "minecraft:seed": {
        "crop_result": "sweet_berry_bush",
        "plant_at": [
          "grass",
          "dirt",
          "podzol"
        ]
      }
    }
  }
} 
Example of camera item
{
  "format_version": "1.10",
  "minecraft:item": {
    "description": {
      "identifier": "minecraft:camera"
    },
    
    "components": {
      "minecraft:use_duration": 100000,
      "minecraft:block": "camera",
      "minecraft:camera": {
        "black_bars_duration": 0.2,
        "black_bars_screen_ratio": 0.08,
        "shutter_duration": 0.2,
        "picture_duration": 1.0,
        "slide_away_duration": 0.2
      }
    }
  }
}