Change knockback of snowballs

Discussion in 'Spigot Plugin Development' started by domisum, May 22, 2016.

  1. Hello Spigot community,

    I want to change the knockback snowballs have when they collide with another entity. I don't want to completely deactivate it, but instead multiply it by a decimal value like 0.5. How can I achieve this?
  2. Get their velocity and multiply it.
  3. Assuming the hit entity is a walking animal, the velocity also contains the walking of the entity, so the multiplying of the entity's velocity also impacts things other than snowball knockback.
  4. Find out the normal amount of knock back velocity a snowball imparts.
    Can't find that anywhere online but should be simply enough to find out. Have a stationary player and hit them with a snowball and print out the velocity after they get hit.
    Then just cancel projectile hit event and apply your own knock back velocity so you can change it.
  5. For ones who still google this it helps...