Firework direction

Discussion in 'Plugin Development' started by Altarry, Oct 11, 2014.

Thread Status:
Not open for further replies.
  1. Hello all,

    I want to right click on bow for launch a firework on the player direction.

    Code:java
    1. Location l = p.getLocation() // location
    2. Firework fw = (Firework) l.getWorld().spawn(
    3. l, Firework.class);

    but this code don't launch a firework on the player direction but it launch a firework on the player.
    Good evening all.
     
  2. Offline

    SmooshCakez

    Fireworks go up by default, you're doing nothing to prevent this, and you're doing nothing to actually move the firework. The best way to accomplish this would probably be to use NMS and override EntityFireworks' move(); method.
     
  3. I'm not coming to NMS. I just want to make the system as a "quake" for shooting.
     
  4. Offline

    SmooshCakez

    Pretty sure you can only accomplish this by using NMS or using ugly, inefficient scheduler teleportation or something like that. You could also try setting the firework's velocity, but it'd still go up.
     
  5. Offline

    coasterman10

    Once you spawn the firework, set its velocity. Bukkit has a built-in method for this.
     
  6. Offline

    xTrollxDudex

    Vouch.

    No, NMS apparently is not the answer to everything :)
     
Thread Status:
Not open for further replies.

Share This Page