1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

MC Java Edition Knockback

Discussion in 'Development' started by SkyZone, Jun 29, 2018.

  1. SkyZone

    SkyZone Slime

    Messages:
    95
    Hi guys, Im trying to create knockback like in mc java, but i dont get it working. I tried something like this:
    PHP:
    $vec $damager->getDirectionVector();
                                
    $entity->setMotion($vec->setComponents($vec->0.50.4$vec->0.5));
    but it wasnt smooth

    In MC Java, the players are knocked more back and not so high like in mcpe.

    Can you guys pls help me?
     
    Levi likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.