编辑

通过


Entity Documentation - minecraft:knockback_resistance

Determines an entity's resistance to knockback from melee attacks. A value of 0.0 means no resistance, while 1.0 provides full immunity to knockback (like iron golems).

Alternate Simple Representations

This item can also be represented as a Decimal number.

Knockback Resistance Properties

Name Default Value Type Description Example Values
max not set Decimal number Maximum potential knockback resistance for this entity. Ender Dragon: 100
value not set Decimal number The amount of knockback resistance, from 0.0 (none) to 1.0 (full immunity). Armor Stand: 1, Ender Dragon: 100, Hoglin: 0.6

Samples

Armor Stand

"minecraft:knockback_resistance": {
  "value": 1
}

Breeze

"minecraft:knockback_resistance": {
  "value": 0
}

Ender Dragon

"minecraft:knockback_resistance": {
  "value": 100,
  "max": 100
}

Hoglin

"minecraft:knockback_resistance": {
  "value": 0.6
}