How do modified mob's knockback in minecraft?

i really mant to play minecraft with mobs that has 1.000.000 knockbacks, it sounds cool and fun. so how do i can change mob's knockback? need third party app to mod the world or just use commands block?

and is it possible to stay on survival while the knockback has changed?, thanks.


You could try modifying the entity's minecraft:generic.attack_knockback attribute using the /attribute command like so:

attribute @s minecraft:generic.attack_knockback base set <value>
  • <value> being a number ranging from 0.0 to 5.0

If you wish to use the item method, you could use the /replaceitem command to give the entity an item with the knockback enchantment in its mainhand. Here's an example:

replaceitem entity <targetEntity> weapon.mainhand minecraft:stick{Enchantments: [{id: "minecraft:knockback", lvl: 1s}]}
  • <targetEntity> being the entity you'll give the item to. This field accepts either UUID, or a target selector. (e.g @e[type = zombie])