Library [1.8] ParticleLib

Discussion in 'Resources' started by caseif, Nov 28, 2014.

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


    I finished up work last night on updating one of my internal libraries to 1.8, and I thought I'd share it here. Since Mojang changed the constructor for particle packets in 1.8, most if not all exisitng libraries do not function with it. My library should work for Minecraft versions going back to 1.6 and possibly even before, though I haven't tested it for that. It's simple enough to use, and consists of a single class.

    To create a particle effect:
    1. ParticleEffect effect = new ParticleEffect(ParticleEffect.ParticleType.FLAME, 0.02, 5, 0.0001);

    You can then send it to players with:
    1. effect.sendToLocation(someLocation);

    Last edited: Dec 13, 2014
    BrickBoy55, Orange Tabby and Skionz like this.
  2. Offline


    I wonder what is the "ITEM_TAKE" effect... xD
  3. Offline


    Ok.. Why this over @Darkbladde13 "s?
  4. Offline


    Thanks for this, is there anyway you can add a way to apply offsets to the particles? This is something that previous libraries support. I'm unsure if the 1.8 constructors allow for offsets anymore.

    EDIT: Nvm, saw how you managed radius. :D You should definitely consider adding some offSet args.
  5. Offline


    This is a great replacement for the previous particle lib I was using.
    Agreeing with zDylann that you should split up the radius argument into offset x y z.
    How would you display a specific icon crack as a particle? Such as a melon slice.
  6. Offline


    I'll be sure to do that in a future commit. Currently, it's not possible to pass data values, but I intend to add that feature very soon as well (probably at the same time as the separate radius arguments).
  7. Offline

    timtower Administrator Administrator Moderator

    Removed offtopic conversation.
  8. Offline


    Thanks :D
  9. Offline


    How to import a library... sorry im not very good at this importing stuff :p
  10. Offline


    Hi, First of great Library. It works great. But im having a complication i cant figure out.
       public void onBlockPlace(BlockPlaceEvent e){
         loc = (Location) e.getBlock().getLocation().add(0.5,1,0.5);
         if(e.getBlock().getType() != null){
           if(e.getBlock().getType() == Material.ANVIL){
              id = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable(){
               public void run(){
                 PE = new ParticleEffect(ParticleEffect.ParticleType.HEART, .5,1,0);
             }, 0, 20);
    as you can see i want all anvils to have the heart effect to them but, when ever i place more anvils the original effect gets moved then a new set is added as well so if i have 3 anvils, i have one anvil with 3 sets going a once, any help here?
  11. Offline


    Just a note that the icon crack packet, unless it changed in 1.8, is not something that you can reliably use. The reason is because the icon crack packet will show a different item depending on its resolution, so someone with a 32bit pack will see a different item than someone with a 16bit pack. So the only time you should really use this particle is for random particles/colors or if you force a resourcepack on the player and you know what the item will be shown as.
  12. Offline


    Like i see it you use the same variable to hold the Particle(PE). Try to use a list instead to hold each of the particles. So you store ALL the packets, maybe it will work. I'm New ro bukkit and coding, but i have S problem like This yesterday, and this work for me. I have also never user particles. But you can always try ;)
  13. How to use particle BLOCKCRACK?
    Fort example I want to play BLOCKCRACK of Stone.
    Last edited: Aug 7, 2015
  14. Offline


    You can use the generic effect with ParticleType.BLOCK_CRACK. However, particle data (i..e. block type) isn't supported by the class at the moment. I may add this if I get the chance, but I can't make any promises.
  15. Please try to add this and other datas. I will really appreciate this.
Thread Status:
Not open for further replies.

Share This Page