Library [1.8] ParticleEffect v1.7

Discussion in 'Resources' started by DarkBladee12, Jun 20, 2013.

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

    MTN

    That's what I thougt ;)
     
  2. Offline

    Wingzzz

    Just check which direction they're facing and do it according to that direction. You can make a switch for all four directions, bit bulky...
     
  3. Offline

    DarkBladee12

    Wingzzz WavyWonderz If you take 0.1 or lower as offset it'll almost look like the original effect!
     
  4. Offline

    Wingzzz

    Awesome!
     
  5. Offline

    Ultimate_n00b

    Almost done with this recode?
     
  6. Offline

    DarkBladee12

    Ultimate_n00b Huh? It's already recoded as you may have seen it's version 1.1 now instead of 1.0 :p
     
    stirante, ampayne2 and Ultimate_n00b like this.
  7. Offline

    ArthurHoeke

    But how to spawn a effect on a location?
     
  8. Offline

    DarkBladee12

    ArthurHoeke Can you explain further what you mean exactly? Because all methods need an input of a location where the effect will be displayed...
     
  9. Offline

    ArthurHoeke

    DarkBladee12 I made this but i get errors..
    ParticleEffects.CRIT.display(world2, -816.47790D, 98.200D, 787.46948D);
     
  10. Offline

    DarkBladee12

    ArthurHoeke You're missing some paramters there and you can't use doubles and negative values... Here's the correct usage: "ParticleEffect.display(Location loc, float offsetX, float offsetY, float offsetZ, float speed, int amount)"
     
  11. Offline

    ArthurHoeke

    Can you give me a example?
     
  12. Offline

    DarkBladee12

    ArthurHoeke
    Code:java
    1. Location loc = new Location(world, x, y, z);
    2. ParticleEffect.CRIT.display(loc, 1.0F, 1.0F, 1.0F, 0.9F, 33);
     
  13. Offline

    ArthurHoeke

    DarkBladee12 He don't find display...
    ParticleEffects.CRIT.display(loc, 1.0F, 1.0F, 1.0F, 0.9F, 33);
     
  14. Offline

    DarkBladee12

    ArthurHoeke Are you sure that you're using the latest version? By the way it's "ParticleEffect" not "ParticleEffects"!
     
  15. Offline

    ThatBenderGuy

    I can't import the classes properly.
    I have this error on both classes
    this is line one on both classes
    Code:
    import java.lang.reflect.Constructor;
    
    and it's literally just that first "i" that's underlined red

    EDIT:
    Fixed it, just had to state the class's package at the top
     
  16. Offline

    ArthurHoeke

    DarkBladee12 If i do particleeffect i get red underline under particleeffect
     
  17. Offline

    DarkBladee12

    ArthurHoeke Make sure that you've copied the classes right in your plugin...
     
  18. Offline

    ArthurHoeke

  19. Offline

    ThatBenderGuy

    ArthurHoeke are you sure you are using the right capitalizations? Example:
    Code:
    ParticleEffect.SPLASH.display(player.getLocation(), 0.5f, 0.0f, 0.5f, 1.0F, 500);
     
  20. Offline

    ArthurHoeke

    I fixed particleeffect but now i get a red underline on display.. ThatBenderGuy

    Fixed it :D

    DarkBladee12 Can i make that the paritcles play on cordinates?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Oct 29, 2015
  21. Offline

    DarkBladee12

    ArthurHoeke Yeah, just make a new Location like this: "new Location(world, x, y, z)" and use it as the "loc" parameter of the display method!
     
  22. Offline

    ArthurHoeke

    DarkBladee12
    Something like this?
    Location loc = new Location(world2, -802.48030D, 95.200D, 765.53113D);
    ParticleEffect.CLOUD.display(loc(), 0.5f, 0.0f, 0.5f, 1.0F, 500);
    But this dont works loc and location is underlined
     
  23. Offline

    darkness1999

    You have to import Location (probably) and:

    ParticleEffect.CLOUD.display(loc, whatever, whatever, whatever, whatever, whatever);
     
  24. Offline

    darkness1999

    Could you please update your Library already now to material names @DarkBladee12?

    Because I'd like to prepare my plugins for 1.7.
     
  25. Offline

    DarkBladee12

    darkness1999 Sure, but it will most likely break on the 1.7 Bukkit version, because the packet does require an id input in 1.6 and most likely the name input in 1.7! So I don't see any benefits from changing the input to material.
     
  26. Offline

    vividMario52

    Hello there. I'm having a problem with this library. I'm trying to display effects, but only FIREWORK_SPARK works.
    Code:java
    1. ParticleEffect.HEART.play(entity.getLocation().add(0.4f, 0, 0), 0, 0.01f, 0, 0.1f, 1); // doesn't display anything, or say anything in the console

    Code:java
    1. ParticleEffect.FIREWORKS_SPARK.play(entity.getLocation().add(0, 0, 0.4f), 0, 0.01f, 0, 0.1f, 1); //works
     
  27. Offline

    Wingzzz

    You should be calling the method from the class like so:
    Code:java
    1. ParticleEffect.play(args);

    (Not sure what you've named the methods so I've gone off of your post :))
     
  28. Offline

    DarkBladee12

    vividMario52 Wingzzz If you're using the latest version of my library it should look like that:

    Code:java
    1. ParticleEffect.NAME.display(args);


    If it still doesn't work try out another speed value, because it determines some special things for some particles ;)
     
  29. Offline

    Wingzzz

    Ah, I guess I've still got the old version.. It's been working like a charm though- advantages/changes of the updated one?
     
  30. Offline

    DarkBladee12

    Wingzzz Well the new one should be a little bit more efficient. It also uses my new ReflectionUtil class, which had some major improvements!
     
Thread Status:
Not open for further replies.

Share This Page