• Hello Guest! Did you know that ProjectKorra has an official Discord server? A lot of discussion about the official server, development process, and community discussion happens over there. Feel free to join now by clicking the link below.

    Join the Discord Server

Particle API Changes - Developers, Please Read!

OmniCypher

Staff member
Lead Developer
Administrator
Plugin Developer
Hello all, just wanted to make a quick post concerning some changes I'm making to the particle API, because this effects a lot of the developers in the community I wanted your opinions on what I'm planning.

To begin, this new API will include all of the particle method capabilities found in GeneralMethods, specifically the ones I covered in this post http://projectkorra.com/forum/threads/omnis-particle-method-tutorial.2513/ This means that you can easily create general, vector, and colored particles from the same place. However, there are a few minor things we need to decide on and I'd like your input.

Firstly, the current API has way to many overloaded methods, I have cut the numbers down a lot but, how should the method's be structured? Personally, I think this way is the best, but I am opened to suggestions.

https://gist.github.com/OmniCypher-/15e527057a33b744573b

In this example each type has two overloaded methods, one will send the particle(s) to all players while the other allows you to specify a list of specific players. In addition the "extendedRange" boolean determines if the particle will be displayed once desired player(s) are more then 16 blocks away.

Secondly, I had some ideas regarding features I wanted input on. Do you guys want the colored methods to take hexadecimal values like displayColoredParticle(), RGB values or both? I'm leaning towards both.

Examples: ("#FFFFFF", 0, 0, 0, location, true) || (new Color (255, 255, 255), 0, 0, 0, location, true)

Third, (Only applies to REDSTONE particles) I can make colors a lot more exact which by cutting down the randomness it creates each particle with. While this would solve the whole "Stray greens in my blues" issue, the only downside is that it will compromise how accurate values are. These methods could create any exact color, but passing in the RGB/HEX value you desire may not work, you would need to "fiddle" with it a little to get what you were looking for. Are you guys ok with this?

Forth, should I make a way to easily draw a particle vector from one location to another? Is that something you'd see as useful? What other vector related things would you like to see?

Fifth, is there anything I have missed? What are there things you'd like to see in the particle API? Do you want anything I've already said to be changed? Feedback is greatly appreciated!
 

Finn_Bueno_

Staff member
Plugin Developer
Verified Member
Since you said it would be harder to get the right color, maybe add a method that takes a ChatColor as argument? (Or some other color thing, and it would spawn the right colour of course)
 

OmniCypher

Staff member
Lead Developer
Administrator
Plugin Developer
Since you said it would be harder to get the right color, maybe add a method that takes a ChatColor as argument? (Or some other color thing, and it would spawn the right colour of course)
I was thinking of adding enums to easily create most of the primary, secondary and tertiary colors.
 

Varni1

Verified Member
I would rather prefer RGB and Hexadecimal values. I'm more suited with RGB, but the hexadecimal thing has attached to plenty of developers. Otherwise, everything seems fine to me.
 
Top