编辑

通过


Entity Documentation - minecraft:healable

How entities heal.

Healable Properties

Name Default Value Type Description Example Values
filters not set Minecraft filter The filter group that defines the conditions for using this item to heal the entity. Parrot: {"operator":"!=","test":"is_riding","value":true}
force_use false Boolean true/false Determines if item can be used regardless of entity being at full health. Parrot: true
items not set Array of Items items The array of items that can be used to heal this entity. Llama: [{"item":"wheat","heal_amount":2},{"item":"hay_block","heal_amount":10}], Parrot: [{"effects":[{"amplifier":0,"chance":1,"duration":1000,"name":"fatal_poison"}],"heal_amount":0,"item":"cookie"}]

Items

The array of items that can be used to heal this entity.

Items Properties

JSON path: items

Name Default Value Type Description
effects not set Array of Effects items
heal_amount 1 Integer number The amount of health this entity gains when fed this item.
item not set String Item identifier that can be used to heal this entity.

Effects

Effects Properties

JSON path: items > effects

Name Default Value Type Description Example Values
amplifier not set Decimal number Parrot: 0
chance not set Decimal number Parrot: 1
duration not set Decimal number Parrot: 1000
name not set String Parrot: "fatal_poison"

Samples

Llama

"minecraft:healable": {
  "items": [
    {
      "item": "wheat",
      "heal_amount": 2
    },
    {
      "item": "hay_block",
      "heal_amount": 10
    }
  ]
}

Parrot

"minecraft:healable": {
  "filters": {
    "operator": "!=",
    "test": "is_riding",
    "value": true
  },
  "force_use": true,
  "items": [
    {
      "effects": [
        {
          "amplifier": 0,
          "chance": 1,
          "duration": 1000,
          "name": "fatal_poison"
        }
      ],
      "heal_amount": 0,
      "item": "cookie"
    }
  ]
}

Sniffer

"minecraft:healable": {
  "items": [
    {
      "item": "torchflower_seeds",
      "heal_amount": 2
    }
  ]
}