Class NoteColor
java.lang.Object
xyz.xenondevs.particle.data.ParticleData
xyz.xenondevs.particle.data.color.ParticleColor
xyz.xenondevs.particle.data.color.NoteColor
An implementation of the
ParticleColor class to support note colors.- Since:
- 10.06.2019
- Author:
- ByteZ
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatgetBlue()Returns 0 because the offsetZ isn't used by the color of notes.floatgetGreen()Returns 0 because the offsetY isn't used by the color of notes.floatgetRed()Gets the red value of the color.static NoteColorrandom()Generates a randomNoteColorinstance to support rainbow trails, cloaks and other effects that can be constructed using the note particle.voidsetEffect(ParticleEffect effect) Sets theParticleEffect.Converts the currentParticleDatainstance into nms data.Methods inherited from class xyz.xenondevs.particle.data.ParticleData
getEffect
-
Constructor Details
-
NoteColor
public NoteColor(int note) Initializes a newParticleDataobject.- Parameters:
note- the note that should be displayed.
-
-
Method Details
-
setEffect
Sets theParticleEffect.- Overrides:
setEffectin classParticleData- Parameters:
effect- theParticleEffectthat should be displayed.
-
getRed
public float getRed()Gets the red value of the color.- Overrides:
getRedin classParticleColor- Returns:
- the red value.
-
getGreen
public float getGreen()Returns 0 because the offsetY isn't used by the color of notes.- Overrides:
getGreenin classParticleColor- Returns:
- 0.
-
getBlue
public float getBlue()Returns 0 because the offsetZ isn't used by the color of notes.- Overrides:
getBluein classParticleColor- Returns:
- 0.
-
toNMSData
Converts the currentParticleDatainstance into nms data. If the current minecraft version was released before 1.13 an int array should be returned. If the version was released after 1.12 a nms "ParticleParam" has to be returned.- Specified by:
toNMSDatain classParticleColor- Returns:
- the nms data.
-
random
Generates a randomNoteColorinstance to support rainbow trails, cloaks and other effects that can be constructed using the note particle.- Returns:
- a random
NoteColorinstance.
-