Bukkit effects

Discussion in 'Bukkit Discussion' started by RingOfStorms, May 25, 2013.

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

    RingOfStorms

    Edits below on colored particles + bubbles + new code!

    Seems like not many people are using these, so I thought I'd share a video of all the ones that are working right now. Note that the icon and tile crack do work, and I can get them working fine, just not enough lines on a sign to do the id for them.



    Note that tile crack is the same as block break, but you can do individual particles. And an icon crack is like when a pick breaks, however it is unreliable across different sized texturepacks.

    Here is the class that I use, you can simply call it like ParticleEffect.EFFECT.sendToLocation(args...);

    some notes for icon/tile crack:
    If you use icon or tile you must put in the string at the end.

    ParticleEffect.TILECRACK.sendToLocation(arg0, arg1, arg2, arg3, arg4, arg5, arg6, "35_1");
    The example above would be a particle of orange wool. 35 is the id for wool, and 1 is the data for orange wool.

    The iconcrack only takes a number and does not support the _Data - It also is unreliable and will not show the same item for everyone (it changes on different sized texturepacks)

    ParticleEffect.TILECRACK.sendToLocation(arg0, arg1, arg2, arg3, arg4, arg5, arg6, "1");
    Since it is not consistent I did not test many numbers since I will personally not use it until something changes in the packet code itself to make it consistent across texturepacks.


    Edit 1: (Colored particles)
    Colored particles like notes, reddust, mobspell, mobspellambient all seem to have complelty random colors. There is only 1 exception to thiss, which is to set the speed to zero.

    A zero speed will make reddust be red, notes green, and mobspell's a black color.

    Any other speed will cause the client to choose a random color, but at least we can do reddust, green notes, and black swirls reliable :p

    Edit 2: (BUBBLES!)
    Bubbles work if they are under water!
    [​IMG]


    Edit 3: (Improved code) [Click]
     
  2. Offline

    DSH105

    RingOfStorms
    The 'bubble' particle effect only works underwater ;)
    Also, you might want to optimise your sendToLocation so that it doesn't just send the packet to all players. I posted this earlier in another thread. Just a suggestion :)
     
  3. Offline

    RingOfStorms

    Do you recommend per player? I find it way less useful to do it per player, so I did it for a location to all players in 100 blocks. Just my personal preference.
     
  4. Offline

    DSH105

    Actually, just nevermind. I like :). I just had a look at the source of one of my plugins and what you have is probably better. I was thinking of something else...

    Anyway, I was also working on getting configurable colours for the note, mobSpell, mobSpellAmbient and spell effects, but I haven't got there yet. stirante has also helped with some researching on this as well.
     
  5. Offline

    RingOfStorms

    Just found out that the only colors are green for notes, red for dust, and black for mob spell that can be chosen. Set the speed to zero, and the client falls back to the default color. If it is not zero, then it chooses a random color.
     
  6. Offline

    DSH105

    Yeah, I did some research and discovered that the RGB colour is defined by a random.nextGaussian() (multiplied by the speed). This makes it possible to determine how much variety of colour an effect has by increasing or decreasing the speed. What I was going to was possibly make an extension of some NMS classes to control that.
     
  7. Offline

    Hoolean

  8. Offline

    RingOfStorms

  9. Offline

    TigerHix

    [COLOR=rgba(0, 0, 0, 0.247059)]We seem to have missed the [/COLOR]
    [COLOR=rgba(0, 0, 0, 0.247059)]gist[/COLOR]
    [COLOR=rgba(0, 0, 0, 0.247059)] of that [/COLOR]
    [COLOR=rgba(0, 0, 0, 0.247059)]gist[/COLOR]
    [COLOR=rgba(0, 0, 0, 0.247059)] you were looking for.[/COLOR]

    Sad :(
     
  10. Offline

    RingOfStorms

    https://gist.github.com/RingOfStorms/6194879
     
Thread Status:
Not open for further replies.

Share This Page