Library EffectLib - Manage your effects the nice way. (Text/Image in Particles)

Discussion in 'Resources' started by Slikey, Apr 21, 2014.

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

    Slikey


    You have to call Effect.start();
    so replace e.run() with e.start()


    Sorry, but I don't have really time for it. Most of the stuff is learned at school and the rest is done with pen and paper.. :/


    LCastr0 Maybe you want to do it? :p

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

    LCastr0

    Haha it was one of my plans (do a cylinder). I will start working on it when I finish the dragon.
     
  3. Offline

    LCastr0

    New Effect: CylinderLocationEffect
    • Custom ParticleType
    • Custom radius
    • Custom height
    • Custom type of the cylinder (Solid and hollow)
    • Rotation by angular velocity
    • Custom number of particles
    Screenshots:
    Screenshots (open)

    [​IMG]
    [​IMG]
    [​IMG]


    Source: Click Here

    New Effect: DragonLocationEffect
    • Custom lenght
    • Custom number of arcs
    • Custom ParticleType
    • Cusom amount of particles
    Screenshots:
    Screenshots (open)

    [​IMG][​IMG][​IMG]


    Source: Click Here

    Note: Slikey is busy, so he told me to make this update log. The updated version is coming soon!

    Note 2: I did not create any of this effects, Slikey ninja'd me :p
     
    $c0p3rZ'z and Slikey like this.
  4. Offline

    Slikey

    LCastr0 Updated. Waiting on BukkitDev. Thanks <3
     
    LCastr0 likes this.
  5. Offline

    Buuz135

    There is a way of changing the color of the redstone particles? I have seen it before but I can't figure how
     
  6. Offline

    chasechocolate

    Buuz135 you can only do all red, or all rainbow, but you can't select the exact color.
     
  7. Offline

    ChipDev

    Nice. Im going to the source right now!
    This looks more like a rocket to me... Where are the wings? xD

    Are you sure you can't have packets running there?
    What about resource packs? :confused:

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

    LCastr0

    It's an horizontal rocket :p
     
    ChipDev likes this.
  9. Offline

    ChipDev

    PlayerInteractEvent*

    Its a big accomplishment.
    Well done.
    Maybe a easier api for making them ourselves? :)

    Edible? I don't want to eat fire... :mad:

    codename_B
    Arena battle, correct? ^-^

    How to make a rotating cube..?

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

    Skyost

    LCastr0 Slikey Hi, I am using your TextLocationEffect (see this).
    Everything works fine but my text is written in white particles.
    How can I make fire particles (like this) ?

    Thank you two ;)
     
  11. Offline

    LCastr0

    Hey, good morning :)
    It's really simple, I'll explain ;)
    In your void method, under the effect.text = <your text>, put effect.particle = ParticleEffect.<name of the particle> ;)
    And for the ParticleEffect import, use the de.slikey.effectlib.util.ParticleEffect
    //Edited

    Use the CubeLocationEffect.
    Do something like this:
    Code:java
    1. CubeLocationEffect effect = new CubeLocationEffect(new EffectManager(EffectLib.instance()), location);
    2. effect.enableRotation = true;
    3. effect.start();


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

    Skyost

  13. Offline

    LCastr0

    Do the same I told Skyost to do ;)

    You're welcome :)
    Glad I can help other people :p

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

    ChipDev

    Can certain parts of the obj. be colored differently?
    EX: Frosting on a donut
    [cake]
     
  15. Offline

    Slikey

    Hey,

    yes. But you have to create your own donut effect. Maybe copy & paste the source from GitHub and make a if-statement of a certain angle. Create the particles depending on the angles that you iterate through.

    Slikey
     
  16. Offline

    LCastr0

    If you meant like use a redstone dust particle, and the top be colored with one color and the bottom with other, then no. Else, if you meant use different particles, then do as Slikey said ;o
     
  17. Offline

    ChipDev

    Hmm.. ok :p

    Thanks! :)

    LCastr0 Slikey
    How do I use CubeLocationEffect?
    (Like full code.. I have no idea how to use it :I)

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

    LCastr0


    Code:java
    1. CubeLocationEffect cube_effect = new CubeLocationEffect(new EffectManager(EffectLib.instance()), <your location here>);
    2. cube_effect.edgeLenght = <Integer value>; //This is the size of the edges
    3. cube_effect.particle = <ParticleEffect.<particle>>; //This is the type of the particle that will spawn
    4. cube_effect.particles = <Integer value>; //This is the amount of particle in each "line"/row
    5. cube_effect.enableRotation = <true/false>; //This enables or disables the rotation of the cube
    6. cube_effect.outlineOnly = <true/false>; //This changes the type of the cube. True will make it only shows the "borders" of the cube, false will show the full cube
    7. cube_effect.period = <Integer>; //This sets the period between each "run"/repetition of the effect
    8. cube_effect.start(); //This is a void, to start the effect. Use it only AFTER you've set all the options you need
     
    ChipDev likes this.
  19. Offline

    ChipDev

    L
    L0ve this!

    Slikey LCastr0
    Length is spelled wrong.
    You spelled it edgeLenght
    Not ht, th.

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

    Slikey

    Yeah, I already noticed that, but the key of an Lib is, that you never change something, that breaks use of the Lib..
     
    ChipDev and Skyost like this.
  21. Offline

    LCastr0

    I always thought it was lenght, but if you say... My english is not too good so... :p
     
  22. Offline

    ChipDev

    Yep. I guess.. it took me 2 hours to get that right. lol :p

    At least its good enough to be awesome at bukkit!

    LCastr0 Slikey
    If it doesn't sound to hard.

    A wave? :3

    Im getting
    ParticleEffect cannot be resolved to a type.
    on line 21.
    Code:java
    1. package com.chip;
    2.  
    3. import org.bukkit.Location;
    4. import org.bukkit.event.player.PlayerJoinEvent;
    5. import org.bukkit.plugin.java.JavaPlugin;
    6.  
    7. import de.slikey.effectlib.EffectLib;
    8. import de.slikey.effectlib.EffectManager;
    9. import de.slikey.effectlib.effect.CubeLocationEffect;
    10.  
    11. public class Geocube extends JavaPlugin {
    12.  
    13. public void onJoin(PlayerJoinEvent e) {
    14. Location loc = new Location(e.getPlayer().getWorld()
    15. , e.getPlayer().getLocation().getX()
    16. , e.getPlayer().getLocation().getY() + 2
    17. , e.getPlayer().getLocation().getZ());
    18.  
    19. CubeLocationEffect cube_effect = new CubeLocationEffect(new EffectManager(EffectLib.instance()), loc);
    20. cube_effect.edgeLenght = 3;
    21. cube_effect.particle = ParticleEffect.DRIP_LAVA;
    22. cube_effect.particles = 100;
    23. cube_effect.enableRotation = true;
    24. cube_effect.outlineOnly = false;
    25. cube_effect.period = 12;
    26. cube_effect.start();
    27. }
    28.  
    29. }
    30.  


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

    LCastr0

    Press CTRL+SHIFT+O, it'll import the class from EffectLib.
     
  24. Offline

    ChipDev

    lol thanks. The exact second you posted that i said
    'Nvm. Got it by Cntl - shift - o!
     
  25. Offline

    LCastr0

    xD Gj
     
  26. Offline

    Slikey



    Just a tip, you are creating a new object with every call of Player.getLocation();
    This will do the same thing, without the overhead:

    Code:java
    1.  
    2. Location loc = new Location(e.getPlayer().getWorld()
    3. , e.getPlayer().getLocation().getX()
    4. , e.getPlayer().getLocation().getY() + 2
    5. , e.getPlayer().getLocation().getZ());
    6.  
    7. Location loc = e.getPlayer().getLocation().add(0, 2, 0);
    8.  
     
  27. Offline

    LCastr0

    Slikey ChipDev I really should fully read the post/code before answering :p
    #Edit
    MY GRAMMAR
     
    ChipDev likes this.
  28. Offline

    ChipDev

    I wish I knew math otherwise.
    :3
     
  29. Offline

    LCastr0

    I wish too ;-;
     
  30. Offline

    VBayNovemV

    HELP!!!!!!!!

    I've downloaded the demo, but the commands do not work note: the plugin has been installed!
    Please help our dreams will be realized!
    Thank you Just Us! :)

    HELP
    LCastr0!!!!!!!!!!!!!



    tests have revealed the plugin does not work, but commands have dreams please help! :'(


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Oct 29, 2015
Thread Status:
Not open for further replies.

Share This Page