public class ParticleTypeNote extends ParticleType
Class used to represent note particle type that can construct colored particle packet.
It provides a non-reflective packetNote
and packet method overloads
to construct particle packet with desired parameters.
Some packetNote methods overloads have to validate color parameter(s)
to properly select certain color.
All packet methods does not validate parameters in any way.
ParticleType| Constructor and Description |
|---|
ParticleTypeNote() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
packetNote(boolean far,
double x,
double y,
double z,
org.bukkit.Color color)
Construct particle packet that will
spawn 1 colored note particle at specified position
with provided color.
|
java.lang.Object |
packetNote(boolean far,
double x,
double y,
double z,
double color)
Construct particle packet that will
spawn 1 colored note particle at specified position
with provided color.
|
java.lang.Object |
packetNote(boolean far,
double x,
double y,
double z,
int r,
int g,
int b)
Construct particle packet that will
spawn 1 colored note particle at specified position
with provided color.
|
java.lang.Object |
packetNote(boolean far,
org.bukkit.Location loc,
org.bukkit.Color color)
Construct particle packet that will
spawn 1 colored note particle at specified position
with provided color.
|
java.lang.Object |
packetNote(boolean far,
org.bukkit.Location loc,
double color)
Construct particle packet that will
spawn 1 colored note particle at specified position
with provided color.
|
java.lang.Object |
packetNote(boolean far,
org.bukkit.Location loc,
int r,
int g,
int b)
Construct particle packet that will
spawn 1 colored note particle at specified position
with provided color.
|
java.lang.Object |
packetNote(boolean far,
org.bukkit.util.Vector loc,
org.bukkit.Color color)
Construct particle packet that will
spawn 1 colored note particle at specified position
with provided color.
|
java.lang.Object |
packetNote(boolean far,
org.bukkit.util.Vector loc,
double color)
Construct particle packet that will
spawn 1 colored note particle at specified position
with provided color.
|
java.lang.Object |
packetNote(boolean far,
org.bukkit.util.Vector loc,
int r,
int g,
int b)
Construct particle packet that will
spawn 1 colored note particle at specified position
with provided color.
|
public java.lang.Object packetNote(boolean far,
org.bukkit.Location loc,
org.bukkit.Color color)
Construct particle packet that will spawn 1 colored note particle at specified position with provided color.
This method may not work correctly due to bug - MC-80658. It affects MC versions between 1.8 and 1.13 where most of the colors are gray-ish.
It has been fixed in MC 1.14 where normal colors spectrum works again.
Note particle can't be dimmed and brighten so certain checks have to be performed:
Otherwise, an UnsupportedOperationException will
be thrown.
Examples of valid colors:
Examples of colors that will throw an exception:
It is wise to check, if particle is supported by current Spigot version
using isValid method.
far - if true, packets will be rendered much further
than 16 blocks (flag is ignored prior to MC 1.8 versions).loc - a Location containing position.color - a Color object with specified color.Packet object.java.lang.IllegalStateException - when requested particle type
is not supported by this server version.java.lang.UnsupportedOperationException - when color does not
have at least 1 color channel with 255 value
or when there is more than 2 color channels active at the same time.public java.lang.Object packetNote(boolean far,
org.bukkit.util.Vector loc,
org.bukkit.Color color)
Construct particle packet that will spawn 1 colored note particle at specified position with provided color.
This method may not work correctly due to bug - MC-80658. It affects MC versions between 1.8 and 1.13 where most of the colors are gray-ish.
It has been fixed in MC 1.14 where normal colors spectrum works again.
Note particle can't be dimmed and brighten so certain checks have to be performed:
Otherwise, an UnsupportedOperationException will
be thrown.
Examples of valid colors:
Examples of colors that will throw an exception:
It is wise to check, if particle is supported by current Spigot version
using isValid method.
far - if true, packets will be rendered much further
than 16 blocks (flag is ignored prior to MC 1.8 versions).loc - a Vector containing position.color - a Color object with specified color.Packet object.java.lang.IllegalStateException - when requested particle type
is not supported by this server version.java.lang.UnsupportedOperationException - when color does not
have at least 1 color channel with 255 value
or when there is more than 2 color channels active at the same time.public java.lang.Object packetNote(boolean far,
double x,
double y,
double z,
org.bukkit.Color color)
Construct particle packet that will spawn 1 colored note particle at specified position with provided color.
This method may not work correctly due to bug - MC-80658. It affects MC versions between 1.8 and 1.13 where most of the colors are gray-ish.
It has been fixed in MC 1.14 where normal colors spectrum works again.
Note particle can't be dimmed and brighten so certain checks have to be performed:
Otherwise, an UnsupportedOperationException will
be thrown.
Examples of valid colors:
Examples of colors that will throw an exception:
It is wise to check, if particle is supported by current Spigot version
using isValid method.
far - if true, packets will be rendered much further
than 16 blocks (flag is ignored prior to MC 1.8 versions).x - component of a position.y - component of a position.z - component of a position.color - a Color object with specified color.Packet object.java.lang.IllegalStateException - when requested particle type
is not supported by this server version.java.lang.UnsupportedOperationException - when color does not
have at least 1 color channel with 255 value
or when there is more than 2 color channels active at the same time.public java.lang.Object packetNote(boolean far,
org.bukkit.Location loc,
int r,
int g,
int b)
Construct particle packet that will spawn 1 colored note particle at specified position with provided color.
This method may not work correctly due to bug - MC-80658. It affects MC versions between 1.8 and 1.13 where most of the colors are gray-ish.
It has been fixed in MC 1.14 where normal colors spectrum works again.
Note particle can't be dimmed and brighten so certain checks have to be performed:
Otherwise, an UnsupportedOperationException will
be thrown.
Examples of valid colors:
Examples of colors that will throw an exception:
It is wise to check, if particle is supported by current Spigot version
using isValid method.
far - if true, packets will be rendered much further
than 16 blocks (flag is ignored prior to MC 1.8 versions).loc - a Location containing position.r - red color value that should be between 0 and 255.g - green color value that should be between 0 and 255.b - blue color value that should be between 0 and 255.Packet object.java.lang.IllegalStateException - when requested particle type
is not supported by this server version.java.lang.UnsupportedOperationException - when color does not
have at least 1 color channel with 255 value
or when there is more than 2 color channels active at the same time.public java.lang.Object packetNote(boolean far,
org.bukkit.util.Vector loc,
int r,
int g,
int b)
Construct particle packet that will spawn 1 colored note particle at specified position with provided color.
This method may not work correctly due to bug - MC-80658. It affects MC versions between 1.8 and 1.13 where most of the colors are gray-ish.
It has been fixed in MC 1.14 where normal colors spectrum works again.
Note particle can't be dimmed and brighten so certain checks have to be performed:
Otherwise, an UnsupportedOperationException will
be thrown.
Examples of valid colors:
Examples of colors that will throw an exception:
It is wise to check, if particle is supported by current Spigot version
using isValid method.
far - if true, packets will be rendered much further
than 16 blocks (flag is ignored prior to MC 1.8 versions).loc - a Vector containing position.r - red color value that should be between 0 and 255.g - green color value that should be between 0 and 255.b - blue color value that should be between 0 and 255.Packet object.java.lang.IllegalStateException - when requested particle type
is not supported by this server version.java.lang.UnsupportedOperationException - when color does not
have at least 1 color channel with 255 value
or when there is more than 2 color channels active at the same time.public java.lang.Object packetNote(boolean far,
double x,
double y,
double z,
int r,
int g,
int b)
Construct particle packet that will spawn 1 colored note particle at specified position with provided color.
This method may not work correctly due to bug - MC-80658. It affects MC versions between 1.8 and 1.13 where most of the colors are gray-ish.
It has been fixed in MC 1.14 where normal colors spectrum works again.
Note particle can't be dimmed and brighten so certain checks have to be performed:
Otherwise, an UnsupportedOperationException will
be thrown.
Examples of valid colors:
Examples of colors that will throw an exception:
It is wise to check, if particle is supported by current Spigot version
using isValid method.
far - if true, packets will be rendered much further
than 16 blocks (flag is ignored prior to MC 1.8 versions).x - component of a position.y - component of a position.z - component of a position.r - red color value that should be between 0 and 255.g - green color value that should be between 0 and 255.b - blue color value that should be between 0 and 255.Packet object.java.lang.IllegalStateException - when requested particle type
is not supported by this server version.java.lang.UnsupportedOperationException - when color does not
have at least 1 color channel with 255 value
or when there is more than 2 color channels active at the same time.public java.lang.Object packetNote(boolean far,
org.bukkit.Location loc,
double color)
Construct particle packet that will spawn 1 colored note particle at specified position with provided color.
Parameters are not validated in any way.
Note particle can't be dimmed and brighten.
To color this particle, you have to use scale between 0.0 and 1.0. An valid proportion can be made by taking an index of certain note's color divided by 24 (amount of color notes).
Those note colors can be found on the wiki page about Note Block here: NoteBlock#Notes
It is wise to check, if particle is supported by current Spigot version
using isValid method.
far - if true, packets will be rendered much further
than 16 blocks (flag is ignored prior to MC 1.8 versions).loc - a Location containing position.color - a proportion value representing note color.Packet object.java.lang.IllegalStateException - when requested particle type
is not supported by this server version.public java.lang.Object packetNote(boolean far,
org.bukkit.util.Vector loc,
double color)
Construct particle packet that will spawn 1 colored note particle at specified position with provided color.
Parameters are not validated in any way.
Note particle can't be dimmed and brighten.
To color this particle, you have to use scale between 0.0 and 1.0. An valid proportion can be made by taking an index of certain note's color divided by 24 (amount of color notes).
Those note colors can be found on the wiki page about Note Block here: NoteBlock#Notes
It is wise to check, if particle is supported by current Spigot version
using isValid method.
far - if true, packets will be rendered much further
than 16 blocks (flag is ignored prior to MC 1.8 versions).loc - a Vector containing position.color - a proportion value representing note color.Packet object.java.lang.IllegalStateException - when requested particle type
is not supported by this server version.public java.lang.Object packetNote(boolean far,
double x,
double y,
double z,
double color)
Construct particle packet that will spawn 1 colored note particle at specified position with provided color.
Parameters are not validated in any way.
Note particle can't be dimmed and brighten.
To color this particle, you have to use scale between 0.0 and 1.0. An valid proportion can be made by taking an index of certain note's color divided by 24 (amount of color notes).
Those note colors can be found on the wiki page about Note Block here: NoteBlock#Notes
It is wise to check, if particle is supported by current Spigot version
using isValid method.
far - if true, packets will be rendered much further
than 16 blocks (flag is ignored prior to MC 1.8 versions).x - component of a position.y - component of a position.z - component of a position.color - a proportion value representing note color.Packet object.java.lang.IllegalStateException - when requested particle type
is not supported by this server version.Copyright © 2020. All Rights Reserved.