Solved Fireball comet?

Discussion in 'Plugin Development' started by Qaez, Nov 29, 2013.

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

    Qaez

    Hello guys,

    I have a question because I want to make kind of a comet like in this video:


    00:56 is the comet part

    I really love this!
    Can you please give an example?
     
  2. Offline

    caseif

    It looks as though the blaze rod launches a fire charge, then creates a firework effect when the blaze rod collides with a block. This can be done by using the Player#launchProjectile() method, assigning metadata to the projectile, and listening to the ProjectileHitEvent and checking the metadata. If it contains a certain key/value pair, create a FireworkEffect at the projectile's location.
     
  3. Offline

    xTrollxDudex

  4. Offline

    Qaez

    ShadyPotato thanks, but it also creates firework during the launch of the fireball, so how do I create that?
     
  5. Offline

    GreatMinerZ

  6. Offline

    Qaez

    GreatMinerZ Yeah I know that and I use that, but thats not what I mean

    I mean the trail behind the fireball GreatMinerZ xTrollxDudex ShadyPotato

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
  7. Offline

    xTrollxDudex

    Qaez
    Did you edit the railgun code?
     
  8. Offline

    Windy Day

    Use something like this:
    Code:
        Location location = player.getEyeLocation();
                      BlockIterator blocksToAdd = new BlockIterator(location, Y-offset Double, Distance);
                      Location blockToAdd;
                      while(blocksToAdd.hasNext()) {
                          blockToAdd = blocksToAdd.next().getLocation();
                          //shot fire work
                      }
    Or save the fired entity schedule a repeating task then ever second or so play a firework at its location which would kinda make a trail.
     
  9. Offline

    Qaez

    Wow thank you Windy Day I will try That! , xTrollxDudex. I did not understand that code really good

    Windy Day but what is the distance and what is the y-offset?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
  10. Offline

    GreatMinerZ

    Qaez Use this in your code:

    Code:java
    1. int Distance = 25; //The distance it should travel
    2. int Y-offset = 3; //The Y-offset
     
  11. Offline

    Qaez

  12. Offline

    GreatMinerZ

    Qaez No problem :)
     
  13. Offline

    Qaez

Thread Status:
Not open for further replies.

Share This Page