Melee attack
A melee attack is a type of attack that mobs and players use to cause damage through close contact with a target.
All entities have a base melee attack damage. The final attack damage calculation includes the mob's base attack damage, main hand item damage, and status effects.
In Java Edition, base melee attack damage is the computed value of the attribute attack_damage. The damage from the main hand item and status effects are essentially Op0 attribute modifiers. Using the /attribute command to modify the base value or modifiers can change the base melee attack damage for the corresponding entity. For example, the base melee attack damage of a player holding a wooden sword with the Strength II effect would be calculated as:
Complete article available
This cached Wiki page is unusually large, so it is loaded on demand to keep the initial page fast.