Class DustData
java.lang.Object
xyz.xenondevs.particle.data.ParticleData
xyz.xenondevs.particle.data.color.ParticleColor
xyz.xenondevs.particle.data.color.RegularColor
xyz.xenondevs.particle.data.color.DustData
- Direct Known Subclasses:
DustColorTransitionData
The DustData class holds information on the colors
and size of various dust particles. The standard
implementation below supports a custom color and
size. If you're looking for Transitioning colors
check out
DustColorTransitionData for more
information. The size of these particles has to
lie between 0-4. Every size above 4 is displayed
as size 4.
Please note that the size also influences the display time of the particle.
- Author:
- ByteZ
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class xyz.xenondevs.particle.data.color.RegularColor
fromHSVHue, getBlue, getGreen, getRed, random, randomMethods inherited from class xyz.xenondevs.particle.data.ParticleData
getEffect, setEffect
-
Constructor Details
-
DustData
Creates a newDustDatainstance.- Parameters:
color- the color of the dust particle.size- the size of the particle.
-
DustData
public DustData(int red, int green, int blue, float size) Creates a newDustDatainstance.- Parameters:
red- the red value of the color.green- the green value of the color.blue- the blue value of the color.size- the size of the particle.
-
-
Method Details
-
getSize
public float getSize()Gets the size of the particle.- Returns:
- the size of the particle.
-
toNMSData
Converts the underlyingDustDatainto it's nms counterparts. The return type is dependent on the value of theParticleData.getEffect(). If the getter returns neitherParticleEffect.REDSTONEorParticleEffect.DUST_COLOR_TRANSITION, thennullis returned.Please note that this class is not supported in any versions before 1.13 and could lead to errors if used in legacy versions.
- Overrides:
toNMSDatain classRegularColor- Returns:
- the nms counterpart of this
DustData
-