0

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.

4
  • Knockback of a mob's attack or the amount of knockback a mob receives when punched with a fist?
    – aytimothy
    Commented Apr 11, 2021 at 5:13
  • @aytimothy i think the former. Commented Apr 11, 2021 at 8:49
  • So do you want the mob to have an item with knockback, or his data?
    – QmegaMax
    Commented Apr 11, 2021 at 8:58
  • @ayimothy what is the differences?
    – jackboom16
    Commented Apr 12, 2021 at 9:24

1 Answer 1

2

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])
1
  • like when the mob attack or fist or explode use this "attribute @s minecraft:generic.attack_knockback base set <value>" ?
    – jackboom16
    Commented Apr 12, 2021 at 9:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.