java.lang.Object
com.github.retrooper.packetevents.protocol.color.Color
com.github.retrooper.packetevents.protocol.color.AlphaColor
All Implemented Interfaces:
net.kyori.adventure.util.RGBLike

public final class AlphaColor extends Color
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final AlphaColor
     

    Fields inherited from class com.github.retrooper.packetevents.protocol.color.Color

    BIT_MASK, blue, green, red
  • Constructor Summary

    Constructors
    Constructor
    Description
    AlphaColor(@org.jetbrains.annotations.Range(from=0L, to=1L) float red, @org.jetbrains.annotations.Range(from=0L, to=1L) float green, @org.jetbrains.annotations.Range(from=0L, to=1L) float blue)
     
    AlphaColor(@org.jetbrains.annotations.Range(from=0L, to=1L) float alpha, @org.jetbrains.annotations.Range(from=0L, to=1L) float red, @org.jetbrains.annotations.Range(from=0L, to=1L) float green, @org.jetbrains.annotations.Range(from=0L, to=1L) float blue)
     
    AlphaColor(@org.jetbrains.annotations.Range(from=0L, to=255L) int red, @org.jetbrains.annotations.Range(from=0L, to=255L) int green, @org.jetbrains.annotations.Range(from=0L, to=255L) int blue)
     
    AlphaColor(@org.jetbrains.annotations.Range(from=0L, to=255L) int alpha, @org.jetbrains.annotations.Range(from=0L, to=255L) int red, @org.jetbrains.annotations.Range(from=0L, to=255L) int green, @org.jetbrains.annotations.Range(from=0L, to=255L) int blue)
     
    AlphaColor(int rgb)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @org.jetbrains.annotations.Range(from=0L, to=255L) int
     
    int
     
    @org.jetbrains.annotations.Range(from=0L, to=255L) int
     
    static AlphaColor
    decode(NBT nbt, ClientVersion version)
     
    static NBT
    encode(AlphaColor color, ClientVersion version)
     
    @org.jetbrains.annotations.Range(from=0L, to=255L) int
     
    @org.jetbrains.annotations.Range(from=0L, to=255L) int
    red()
     
    withAlpha(@org.jetbrains.annotations.Range(from=0L, to=255L) int alpha)
     
    withBlue(@org.jetbrains.annotations.Range(from=0L, to=255L) int blue)
     
    withGreen(@org.jetbrains.annotations.Range(from=0L, to=255L) int green)
     
    withRed(@org.jetbrains.annotations.Range(from=0L, to=255L) int red)
     

    Methods inherited from class com.github.retrooper.packetevents.protocol.color.Color

    encode, read, write

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.kyori.adventure.util.RGBLike

    asHSV
  • Field Details

  • Constructor Details

    • AlphaColor

      public AlphaColor(@org.jetbrains.annotations.Range(from=0L, to=255L) int red, @org.jetbrains.annotations.Range(from=0L, to=255L) int green, @org.jetbrains.annotations.Range(from=0L, to=255L) int blue)
    • AlphaColor

      public AlphaColor(@org.jetbrains.annotations.Range(from=0L, to=255L) int alpha, @org.jetbrains.annotations.Range(from=0L, to=255L) int red, @org.jetbrains.annotations.Range(from=0L, to=255L) int green, @org.jetbrains.annotations.Range(from=0L, to=255L) int blue)
    • AlphaColor

      public AlphaColor(@org.jetbrains.annotations.Range(from=0L, to=1L) float red, @org.jetbrains.annotations.Range(from=0L, to=1L) float green, @org.jetbrains.annotations.Range(from=0L, to=1L) float blue)
    • AlphaColor

      public AlphaColor(@org.jetbrains.annotations.Range(from=0L, to=1L) float alpha, @org.jetbrains.annotations.Range(from=0L, to=1L) float red, @org.jetbrains.annotations.Range(from=0L, to=1L) float green, @org.jetbrains.annotations.Range(from=0L, to=1L) float blue)
    • AlphaColor

      public AlphaColor(int rgb)
  • Method Details

    • decode

      public static AlphaColor decode(NBT nbt, ClientVersion version)
    • encode

      public static NBT encode(AlphaColor color, ClientVersion version)
    • withAlpha

      public AlphaColor withAlpha(@org.jetbrains.annotations.Range(from=0L, to=255L) int alpha)
    • withRed

      public AlphaColor withRed(@org.jetbrains.annotations.Range(from=0L, to=255L) int red)
      Overrides:
      withRed in class Color
    • withGreen

      public AlphaColor withGreen(@org.jetbrains.annotations.Range(from=0L, to=255L) int green)
      Overrides:
      withGreen in class Color
    • withBlue

      public AlphaColor withBlue(@org.jetbrains.annotations.Range(from=0L, to=255L) int blue)
      Overrides:
      withBlue in class Color
    • asRGB

      public int asRGB()
      Overrides:
      asRGB in class Color
    • alpha

      public @org.jetbrains.annotations.Range(from=0L, to=255L) int alpha()
    • red

      public @org.jetbrains.annotations.Range(from=0L, to=255L) int red()
      Specified by:
      red in interface net.kyori.adventure.util.RGBLike
      Overrides:
      red in class Color
    • green

      public @org.jetbrains.annotations.Range(from=0L, to=255L) int green()
      Specified by:
      green in interface net.kyori.adventure.util.RGBLike
      Overrides:
      green in class Color
    • blue

      public @org.jetbrains.annotations.Range(from=0L, to=255L) int blue()
      Specified by:
      blue in interface net.kyori.adventure.util.RGBLike
      Overrides:
      blue in class Color