Throwing away far a skeleton

Discussion in 'Plugin Development' started by xMalwarez, Sep 26, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    xMalwarez

    Hello,

    I want throwing away skeleton but I want to send very far because there I can only send it to 5/10 blocks from me.

    Here is my current code:

    Code:java
    1. final Skeleton mob = (Skeleton)p.getWorld().spawnEntity(p.getLocation(), EntityType.SKELETON);
    2. mob.setVelocity(p.getLocation().getDirection());
     
  2. Offline

    IkBenHarm

    xMalwarez
    try multiplying the velocity
    So like:
    p.getLocation().getDirection() * 10

    No idea if this will work btw, just came up
     
  3. Offline

    d3v1n302418

    IkBenHarm Multiplying a vector with '*'? Doubt it.
    xMalwarez Try multiplying his direction with the direction.multiply(double d);
     
  4. Offline

    IkBenHarm

    d3v1n302418 oh, your right... Tnx for the correction!
     
Thread Status:
Not open for further replies.

Share This Page