Blocks and Entities Collision

Discussion in 'Plugin Development' started by Someone_Like_You, May 7, 2014.

Thread Status:
Not open for further replies.
  1. Im making a pole shooting wither skulls at nearby players, but I cant get it to work without the wither skull to explode because its touching the pole itself... I can make the wither skull coming from abit higer, but then it will shoot only on far players because its colliding with the pole... any ideas how can I solve it?
     
  2. Offline

    LeoFSU

  3. Offline

    Garris0n

    It doesn't implement Cancellable.

    @OP Depends on if you feel like getting into NMS.
     
  4. Garris0n hmm, do I have any other choices in here? if no Il go NMS...
    EDIT: Just got an idea, teleport the projectile 1 block out to the x or z so it wont collide with the pole, any ideas how would I make it with compact code though?
     
  5. Offline

    Garris0n

    Add its direction vector to its location and teleport it there.
     
  6. Offline

    minoneer

    An easyer (although not as pretty) alternative would be to randomize the launch location around the top of the pole. This way some will still colide with the post, but some will launch in any direction without colisions.
     
  7. Garris0n minoneer thanks for both. however I need that 100% of the entities will lanuch... so for Garris0n, Im really bad with vectors, Il be honest... bit of code would help alot (with explain if can ;) )
     
  8. Offline

    Garris0n

    Probably something along the lines of entityLocation.add(entityLocation.getDirection().multiply(distance)). Then teleport it there.
     
Thread Status:
Not open for further replies.

Share This Page