Hey guys! Just thought I'd give all the addon developers a heads up and quick tutorial on the new particle methods I've added to PK! Let me first show how I'll break down each method, optional variables (overloaded method variables for you smarty pants people) will be in italics and required parameters will be in bold. In each example I will be purposely using the most overloaded methods.
playLightningbendingParticle(Location loc, float xOffset, float yOffset, float zOffset)
This method is the lightning equivalent of playAirbendingParticle(). Pretty straightforward, this method will display lightning particles at the passed in Location with the optional X, Y, and Z offsets!
Example: playLightningbendingParticle(location, 0, 0, 0);
displayColoredParticle(Location loc, ParticleEffect type, String hexVal, float xOffset, float yOffset, float zOffset)
This method allows you to enter in a specific hexadecimal value and display a colored particle of the applicable types at the passed in Location with the optional X, Y, and Z offsets! Currently the applicable types are RED_DUST, MOB_SPELL and MOB_SPELL_AMBIENT which must be passed in the following format: ParticleEffect.<Name>. If nothing is passed in they will default to RED_DUST. The String argument is must meet one of the two following formats: "#RRGGBB" or "RRGGBB" (# is not required). As a side note a small list of certain colors will not be exactly the same as their corresponding hexadecimal values when using RED_DUSTparticles, for instance most shades of yellow will appear slightly green. I'm working on a implementing a slight conditional shift but it will take time to solve every case.
Example: displayColoredParticle(location, ParticleEffect.RED_DUST,"#00CC00",0,0,0)
Example: displayColoredParticle(location, ParticleEffect.MOB_SPELL,"#CC0066",0,0,0)
displayParticleVector(Location loc, ParticleEffect type, float xTrans, float yTrans, float zTrans)
This method allows you to "graph" specific vectors using particles! Applicable particle effects currently include FIREWORK_SPARK, SMOKE, LARGE_SMOKE, ENCHANT_TABLE, PORTAL, FLAME, CLOUD, and SNOW_SHOVEL which must be passed in the following format: ParticleEffect.<Name>. The xTrans, yTrans, and zTrans are all relative meaning 1 1 1 will make the particle travel positive 1 in each axis.
Example: displayParticleVector()location, ParticleEffect.FLAME, 1 1 1)
Thanks for reading! If you have any further questions feel free to ask!
playLightningbendingParticle(Location loc, float xOffset, float yOffset, float zOffset)
This method is the lightning equivalent of playAirbendingParticle(). Pretty straightforward, this method will display lightning particles at the passed in Location with the optional X, Y, and Z offsets!
Example: playLightningbendingParticle(location, 0, 0, 0);
displayColoredParticle(Location loc, ParticleEffect type, String hexVal, float xOffset, float yOffset, float zOffset)
This method allows you to enter in a specific hexadecimal value and display a colored particle of the applicable types at the passed in Location with the optional X, Y, and Z offsets! Currently the applicable types are RED_DUST, MOB_SPELL and MOB_SPELL_AMBIENT which must be passed in the following format: ParticleEffect.<Name>. If nothing is passed in they will default to RED_DUST. The String argument is must meet one of the two following formats: "#RRGGBB" or "RRGGBB" (# is not required). As a side note a small list of certain colors will not be exactly the same as their corresponding hexadecimal values when using RED_DUSTparticles, for instance most shades of yellow will appear slightly green. I'm working on a implementing a slight conditional shift but it will take time to solve every case.
Example: displayColoredParticle(location, ParticleEffect.RED_DUST,"#00CC00",0,0,0)
Example: displayColoredParticle(location, ParticleEffect.MOB_SPELL,"#CC0066",0,0,0)
displayParticleVector(Location loc, ParticleEffect type, float xTrans, float yTrans, float zTrans)
This method allows you to "graph" specific vectors using particles! Applicable particle effects currently include FIREWORK_SPARK, SMOKE, LARGE_SMOKE, ENCHANT_TABLE, PORTAL, FLAME, CLOUD, and SNOW_SHOVEL which must be passed in the following format: ParticleEffect.<Name>. The xTrans, yTrans, and zTrans are all relative meaning 1 1 1 will make the particle travel positive 1 in each axis.
Example: displayParticleVector()location, ParticleEffect.FLAME, 1 1 1)
Thanks for reading! If you have any further questions feel free to ask!
Last edited: