{{about|the game mechanic|the enchantment|Knockback}}
[[File:Knockback (mechanic).png|thumb|An example of a villager taking knockback from a zombie.]]
'''Knockback''' represents the pushback from attacks or natural causes.
== Attack knockback ==
When receiving damage from players, [[mob]]s, [[explosion]]s, and most [[projectile]]s, entities are also knocked back. The direction of knockback is determined by the direction of the incoming attack.
=== Versus grounded entities ===
Knockback dealt to grounded entities knocks them into the air and away from the attack.
=== Versus airborne entities ===
Knockback dealt to airborne entities differs between {{el|java}} and {{el|bedrock}}. {{IN|java}}, knockback against airbone entities only knocks them away from the attack and does not knock them further into the air. {{IN|bedrock}}, knockback against airborne entities is identical to knockback against grounded entities.
=== Versus entities in vehicles ===
Entities inside [[minecart]]s or [[boat]]s, as well as entities that are riding mountable entities like [[horse]]s and [[camel]]s, never receive any knockback when attacked.
=== Versus entities during [[Damage#Immunity|attack invulnerability time]] ===
Knockback dealt to entities during attack invulnerability time, the 0.5 seconds (500ms) of invulnerability received after taking [[damage]], differs between {{el|java}} and {{el|bedrock}}. {{IN|java}}, knockback against invulnerable entities is completely negated, except for when attacking with a [[sword]] that has the [[Knockback]] enchantment. {{IN|bedrock}}, knockback against invulnerable entities is identical to knockback against grounded and airborne entities, which results in higher CPS (clicks per second) giving higher knockback.
== Knockback sources ==
=== Natural damage ===
Most [[Damage#Natural damage|natural damage]] sources, damage sources that are received indirectly, cause a stutter in movement but do not deal any horizontal knockback. Natural damage sources that cause a movement stutter include damage from burning, drowning, lightning, falling, suffocation, entity cramming, starvation, and [[status effect]]s like [[poison]], [[Wither (effect)|wither]], and [[instant damage]]. Block-inflicted damage from [[fire]], [[cactus]], [[lava]], [[magma]] blocks, [[campfire]]s, and [[sweet berry bush]]es also cause the same movement-stuttering knockback.
Other indirect damage sources deal knockback in the traditional manner rather than causing a movement stutter. This includes the breath attack of the [[ender dragon]], the beam attack of [[guardian]]s and [[elder guardian]]s, the sonic boom attack of [[warden]]s, the roar attack of [[ravager]]s, [[evoker fang]]s, damage from the [[Thorns]] enchantment, and the effect cloud from [[Lingering Potion of Harming|lingering potions of harming]].
=== Damageless attacks ===
Attacks that deal {{hp|0}} or less fail to deal knockback. The [[Weakness]] status effect can cause attacks that deal {{hp|0}}, causing them to deal no knockback.
=== Snowballs and eggs ===
Thrown [[egg]]s and [[snowball]]s cause knockback to mobs even if they do not deal any damage. In [[Bedrock Edition|''Bedrock Edition'']], thrown eggs and snowballs also apply knockback to players.
== Sprint-knockback attack ==
Attacking while [[sprinting]] will cause a sprint-knockback attack to be performed, causing extra knockback and playing a unique sound. Sprint-knockback attacks require an attack cooldown charge of at least 84.8% {{in|java}}, and performing a sprint-knockback attack cancels a sprint.
== Knockback resistance ==
=== [[Attribute]] ===
Knockback resistance reduces knockback by multiplying the velocity value that a mob receives from an attack's knockback. If the velocity the mob would have without any knockback resistance is , and the mob has a knockback resistance of , then the mob's actual velocity is determined by the formula . Each piece of [[netherite armor]] adds 10% knockback resistance to its wearer, giving 40% knockback resistance with a full set.
=== Natural knockback resistance ===
{{main|Mob}}
[[Mob#Knockback_resistance|Certain mobs]] have natural knockback resistance that causes them to resist knockback from attacks. [[Iron golem]]s, [[shulker]]s, [[agent]]s, [[NPC]]s, [[warden]]s, and [[ender dragon]]s have 100% knockback resistance, while other mobs have varying levels of knockback resistance.
{| class="wikitable"
! '''Mob'''
! '''Knockback resistance'''
|-
! {{EntityLink|Agent}}
| 100% (are invulnerable)
|-
! {{EntityLink|Drowned}}
| 0%–5% (determined on [[spawning|spawn]])
|-
! {{EntityLink|Hoglin}}
| 60%
|-
! {{EntityLink|id=Husk|Husk}}
| 0%–5% (determined on spawn)
|-
! {{EntityLink|Glow Squid}}
| 85%
|-
! {{EntityLink|Iron Golem}}
| 100%
|-
! {{EntityLink|NPC}}
| 100% (are invulnerable)
|-
! {{EntityLink|Ravager}}
| 70%{{only|java|short=1}}
50%{{only|bedrock|short=1}}
|-
! {{EntityLink|Squid}}
| 85%
|-
! {{EntityLink|Shulker}}
| 100%
|-
! {{EntityLink|Warden}}
| 100%
|-
! {{EntityLink|Zoglin}}
| 60%
|-
! {{EntityLink|Zombie}}
| 0%–5% (determined on spawn)
|-
! {{EntityLink|Zombie Villager}}
| 0%–5% (determined on spawn)
|-
! {{EntityLink|Zombified Piglin}}
| 0%–5% (determined on spawn)
|}
== Sounds ==
{{Edition|Java}}
{{SoundTable
| type = java
| {{SoundLine
|sound =Knockback attack1.ogg
|sound2=Knockback attack2.ogg
|sound3=Knockback attack3.ogg
|sound4=Knockback attack4.ogg
|subtitle=Knockback attack
|source=player
|description=When a player deals a sprint-knockback attack
|id=entity.player.attack.knockback
|translationkey=subtitles.entity.player.attack.knockback
|volume=0.7
|pitch=1.0
| distance = 16
}}
}}
== History ==
{{HistoryTable
|{{HistoryLine|java classic}}
|{{HistoryLine||0.24_SURVIVAL_TEST|Added the knockback mechanic.
|Mobs and the player now take knockback when damage is taken.}}
|{{HistoryLine|java beta}}
|{{HistoryLine||July 26, 2011|link={{tweet|notch|95850815276843008}}|Notch first teased how sprint-knockback attacks would work.}}
|{{HistoryLine||1.8|dev=Pre-release|The [[Adventure Update]] extended the combat system with sprint-knockback attacks.}}
|{{HistoryLine|java}}
|{{HistoryLine||1.3.1|dev=12w25a|Removed the downward knockback while drowning.}}
|{{HistoryLine||1.9|dev=15w36a|Fishing bobbers no longer inflict knockback when attaching to an entity.}}
|{{HistoryLine|||dev=15w46a|Iron golems now resist 100% of knockback.}}
|{{HistoryLine|||dev=15w47b|Added sounds for sprint-knockback attacks.}}
|{{HistoryLine|||dev=15w49a|Entities that are airborne no longer take vertical knockback when attacked, now only taking horizontal knockback.}}
|{{HistoryLine||1.14.3|dev=pre3|Mobs take knockback when damaged by splash and lingering water bottles, which is applied away from the bottle's owner.}}
|{{HistoryLine||1.16|dev=20w06a|The knockback resistance attribute now decreases the knockback taken from attacks, in addition to its existing effect of giving a random chance to ignore all knockback.}}
|{{HistoryLine||1.18.2|dev=22w03a|The knockback resistance attribute no longer gives a random chance to ignore all knockback.}}
|{{HistoryLine|upcoming java}}
|{{HistoryLine||Combat Tests|dev=Combat Test 5|Entities that are airborne now take vertical knockback when attacked, rather than only taking horizontal knockback.}}
|{{HistoryLine|console}}
|{{HistoryLine||xbox=TU1|xbone=CU1|ps3=1.00|psvita=1.00|ps4=1.00|wiiu=Patch 1|switch=1.0.1|Added the knockback mechanic.
}}
|{{HistoryLine||xbox=TU14|xbone=CU1|ps3=1.04|psvita=1.00|ps4=1.00|wiiu=Patch 1|switch=1.0.1|Removed the downward knockback while drowning.}}
|{{HistoryLine||xbox=TU46|xbone=CU36|ps3=1.38|psvita=1.38|ps4=1.38|wiiu=Patch 15|switch=1.0.1|Iron golems now resist 100% of knockback.|Entities that are airborne no longer take vertical knockback when attacked, now only taking horizontal knockback.}}
|{{HistoryLine||xbox=TU53|xbone=CU43|ps3=1.49|psvita=1.49|ps4=1.50|wiiu=Patch 23|switch=1.0.3|Fishing bobbers no longer inflict knockback when attaching to an entity.}}
|{{HistoryLine||xbox=TU57|xbone=CU49|ps3=1.57|psvita=1.56|ps4=1.56|wiiu=Patch 27|switch=1.0.7|Fishing bobbers once again inflict knockback when attaching to an entity.{{check version}}}}
}}
== Issues ==
{{issue list}}
== Navigation ==
{{Navbox gameplay}}
[[pt:Repulsão (mecânica)]]