Library [1.8] ParticleEffect v1.7

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

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

    mung3r

    @RingOfStorms , @DarkBladee12 , I got it to work but it's... strange. My observations:

    The particle shows up with the right color. However, the particle itself only shows maybe 1 out of 4 times. This behavior may give the impression that it's not working.

    Also, only *one* particle shows up in the right color. Not sure how to control the amount (since it has to be set to zero) other than sending a crap ton of packets to get a decent amount to show. This problem is compounded by the fact that the particle shows up only some of the time.
     
  2. Offline

    MinecraftMart

    Eehm im still a bit confused with how to use BLOCK_CRACK

    Does someone have an example?
     
  3. Offline

    RingOfStorms

    Read the main post and click on the particle demo link, you can even view it's source. It includes crack particles.
     
  4. Offline

    zurg200

    Can someone show me how to properly set this up? Its confusing to meh..
     
  5. Offline

    brandonlima

    May i ask for some help with certain particles such as the cloud? how would i get it to not shoot all over the place and to stay in one consistent spot. By the way thanks for the amazing Library :D
     
  6. Offline

    DarkBladee12

    @brandonlima

    The CLOUD particle effect will spawn at a specific location if the offsets and the speed value is set to 0 ;)

    @zurg200

    1. Make two new classes in your project: ParticleEffect and ReflectionUtils
    2. Head over to the GitHub repo and copy the code of those classes into yours
    3. Fix imports for ReflectionHandler in the ParticleEffect class
    4. You can now access the library with ParticleEffect.NAME.display(args)

    Here's an example:

    Code:
    Player player = Bukkit.getPlayer("DarkBlade12");
    Location center = player.getLocation();
    // The following code spawns CRIT particles with all offsets set to 1, a speed of 1, an amount of 20 and a visibility range of 32 blocks
    ParticleEffect.CRIT.display(1F, 1F, 1F, 1F, 20, center, 32D); 


    @MinecraftMart

    Code:
    Player player = Bukkit.getPlayer("DarkBlade12");
    Location center = player.getLocation();
    // The following code spawns BLOCK_CRACK particles which look like black wool
    ParticleEffect.BLOCK_CRACK.display(new BlockData(Material.WOOL, (byte) 15), 1F, 1F, 1F, 1F, 30, center, 32);
     
    Last edited by a moderator: Jan 4, 2015
  7. Offline

    97WaterPolo

    @DarkBladee12
    BlockData isn't part of your lib, if you mean ParticleData I am getting a "Cannot instantiate the type ParticleEffect.ParticleData"

    Code:
    ParticleEffect.BLOCK_CRACK.display(new ParticleData(Material.REDSTONE_BLOCK, 0), 1F, 1F, 1F, 1F, 30, e.getLocation(), 32);
     
  8. Offline

    DarkBladee12

    @97WaterPolo

    You didn't copy the code properly then, since you can clearly see here that BlockData is included!

    @RingOfStorms

    Do you have any clue how the color of the NOTE effect is handled? It seems that it's an BGR format instead of a RGB format.
     
    Last edited: Jan 3, 2015
  9. Offline

    zurg200

    But I tried that :( and I did all the importing of your plugin and reflections and it said t find main class so I deleted the plugin.. Should I try it again? Note I'm adding it to my custom plugin for particles but it couldn't load.. Anything I'm doing wrong? Can u show meh how to make a cloud effect with rain? I wanna make that
     
    Last edited: Jan 3, 2015
  10. Offline

    97WaterPolo

    I did see it, and import it which is why I was wondering why it wasn't working. You have to add the brackets for it to work for me.
     
  11. Offline

    RingOfStorms

    I haven't tried with note effect. I'm out of town for the next couple of days, but once I get back home I can look through the client again and make a list of all of the particle's and any "special" mechanics like direction/colors. I'll report back here later in the week.
     
    DarkBladee12 likes this.
  12. Offline

    DarkBladee12

    @RingOfStorms

    Thanks, I'll wait with my next version of the library till then in order to provide all features particle effects have to offer. I've also tested all particles if they're directional or not.
     
  13. Offline

    RingOfStorms

    I've made a post, I hope it makes sense, it is quite dense and i had a bit of trouble making it easy to follow.

    Most of the particles are the same, but I've made a small list of ones I think you'll find interesting!
    • Red Dust
    • Note
    • Splash
    • All of the Spell particles at the end of my post
     
    Last edited: Jan 7, 2015
    NathanWolf, DarkBladee12 and mung3r like this.
  14. Offline

    Minecraftair

    Nice work! :)
     
    Last edited: Jan 8, 2015
  15. Offline

    DarkBladee12

    @RingOfStorms

    Thanks a lot for your work, I'm going to update the lib soon! ;)
     
  16. Offline

    Duuuckkky

    Hey is there a way to check if the particle come in contact while flying through the air?
     
  17. Offline

    DarkBladee12

    @RingOfStorms

    I added methods for colorable particles, removed the zero amount check and added notes for special behavior like the splash effect in the new version. I'm going to add the size feature of the EXPLOSION_LARGE effect, which was mentioned by @Cybermaxke, later!

    @Duuuckkky

    Well you could only do that with directional particles since they don't fly into a random direction. For doing that you would've to code a class which calculates the location of the particle every tick and checks if it's hitting a player or a mob.
     
  18. Offline

    GalacticMeadows

    When using this, a player having the effect is the only one able to see it. Other players on the server can't see it.
     
  19. Offline

    BagduFagdu

    If I want to make a particle display on top of a player, do I make something like this? :

    Code:
    ParticleEffect.HEART.display(float 0, float 0, float 0, float 2, int 15, Location p.getLocation(), double 15);
     
  20. Offline

    DarkBladee12

    @GalacticMeadows

    Are you using the method with the range parameter? Because the others only display the effect for the players in the list/array!

    @BagduFagdu

    You need to add like 2.3 to the y-value of the player location to play the effect above the player head.
     
  21. Offline

    metmad22

    @DarkeBladee12 Amazing library dude!
     
    Last edited: Jan 15, 2015
  22. Offline

    Hellgast

    Thank you for making this! It's really cool.
     
  23. Offline

    GrandmaJam

    @DarkBladee12 Does the 1.8 version work with 1.7-1.8? Say if I login to a server with 1.7 can I see the particle? Same with 1.8.
     
  24. Offline

    ChipDev

    Love that you added the colors and the notes.
    *I think implementing 2 enum's with 3 (Explained in my post) and 1 (Note) ParticleEffect's
     
    GrandmaJam likes this.
  25. Offline

    metmad22

    GrandmaJam likes this.
  26. Offline

    GrandmaJam

  27. Offline

    metmad22

    GrandmaJam likes this.
  28. Offline

    BuyMeDrink

    I don't know whether it is true place to ask but I will ask it anyways because I am literally trying to solve this for 3 days. So sorry for asking it here. My problem : I want to display a particle at the same position. For example, I want to create a fire particle above the player's hand. So when player rotates, particle should rotate with player's hand and keep spawning above the player's hand. I used a method with cos and sins but I have never got to result that I wanted. Do you guys know how to solve this problem? Maybe I should use direction() method? Sorry for my bad English.
     
  29. Offline

    DarkBladee12

    @BuyMeDrink

    Hey, I'm sorry but i still haven't found a way to do this. A quite long while ago I asked the exact same question on the forums, but nobody could really help me out :/ Maybe @RingOfStorms can help you out, because he could look for the arm/item render method in the Minecraft code and think of a possible way to calculate the location.
     
  30. Offline

    Deleted user

    The ENCHANTMENT_TABLE particle isn't displayed on Spigot 1.8-R0.1.
    It was a problem related to my server.
     
Thread Status:
Not open for further replies.

Share This Page