public class RegularColor extends ParticleColor
ParticleColor
class that supports normal RGB values.| Constructor and Description |
|---|
RegularColor(Color color)
Initializes a new
ParticleData
Object. |
RegularColor(int red,
int green,
int blue)
Initializes a new
ParticleData
Object. |
| Modifier and Type | Method and Description |
|---|---|
static RegularColor |
fromHSVHue(int hue)
Constructs a
RegularColor using the
HSV color spectrum. |
float |
getBlue()
Gets the blue value of the color.
|
float |
getGreen()
Gets green red value of the color.
|
float |
getRed()
Gets the red value of the color.
|
static RegularColor |
random()
Generates a random
RegularColor
instance with a high saturation. |
static RegularColor |
random(boolean highSaturation)
Generates a random
RegularColor
instance. |
Object |
toNMSData()
Converts the current
ParticleData
instance into nms data. |
getEffect, setEffectpublic RegularColor(Color color)
ParticleData
Object.color - the Color the
particle should have.public RegularColor(int red,
int green,
int blue)
ParticleData
Object.red - the red value of the color.green - the green value of the color.blue - the blue value of the color.public float getRed()
getRed in class ParticleColorpublic float getGreen()
getGreen in class ParticleColorpublic float getBlue()
getBlue in class ParticleColorpublic Object toNMSData()
ParticleData
instance into nms data. If the current
minecraft version was released before 1.13
a int array should be returned. If the
version was released after 1.12 a nms
"ParticleParam" has to be returned.toNMSData in class ParticleColorpublic static RegularColor random()
RegularColor
instance with a high saturation. If you
want a completely random Color
use random(boolean) with false
as the highSaturarion parameter.RegularColor instance.public static RegularColor random(boolean highSaturation)
RegularColor
instance. If the highSaturation parameter
is set to true, a random hue from the HSV
spectrum will be used. Otherwise 3 random
integers ranging from 0 to 255 for the RGB
values will be generated.highSaturation - determines if the colors should have a high saturation.RegularColor instance.public static RegularColor fromHSVHue(int hue)
RegularColor using the
HSV color spectrum.hue - the hue the the specific color has.RegularColor instance with the given HSV value as its Color.Color.HSBtoRGB(float, float, float)Copyright © 2020. All rights reserved.