程序包 org.bukkit.map
类 MapPalette
java.lang.Object
org.bukkit.map.MapPalette
Represents the palette that map items use.
These fields are hee base color ranges. Each entry corresponds to four colors of varying shades with values entry to entry + 3.
-
嵌套类概要
修饰符和类型类说明static interface
Holds cached information for matching map colors of a given RBG color. -
字段概要
修饰符和类型字段说明static final byte
已过时。Magic valuestatic final byte
已过时。Magic valuestatic final byte
已过时。Magic valuestatic final byte
已过时。Magic valuestatic final byte
已过时。Magic valuestatic final byte
已过时。Magic valuestatic final byte
已过时。Magic valuestatic final byte
已过时。Magic valuestatic final byte
已过时。Magic valuestatic final byte
已过时。Magic valuestatic final byte
已过时。Magic valuestatic final byte
已过时。Magic valuestatic final byte
已过时。Magic valuestatic final byte
已过时。Magic value -
方法概要
修饰符和类型方法说明getColor
(byte index) 已过时。Magic valuestatic @org.jetbrains.annotations.NotNull byte[]
imageToBytes
(@NotNull Image image) 已过时。Magic valuestatic byte
matchColor
(int r, int g, int b) 已过时。Magic valuestatic byte
matchColor
(@NotNull Color color) 已过时。Magic valuestatic @NotNull BufferedImage
resizeImage
(@Nullable Image image) Resize an image to 128x128.static void
setMapColorCache
(@NotNull MapPalette.MapColorCache mapColorCache) Sets the given MapColorCache.
-
字段详细资料
-
TRANSPARENT
已过时。Magic value- 另请参阅:
-
LIGHT_GREEN
已过时。Magic value- 另请参阅:
-
LIGHT_BROWN
已过时。Magic value- 另请参阅:
-
GRAY_1
已过时。Magic value- 另请参阅:
-
RED
已过时。Magic value- 另请参阅:
-
PALE_BLUE
已过时。Magic value- 另请参阅:
-
GRAY_2
已过时。Magic value- 另请参阅:
-
DARK_GREEN
已过时。Magic value- 另请参阅:
-
WHITE
已过时。Magic value- 另请参阅:
-
LIGHT_GRAY
已过时。Magic value- 另请参阅:
-
BROWN
已过时。Magic value- 另请参阅:
-
DARK_GRAY
已过时。Magic value- 另请参阅:
-
BLUE
已过时。Magic value- 另请参阅:
-
DARK_BROWN
已过时。Magic value- 另请参阅:
-
-
方法详细资料
-
resizeImage
Resize an image to 128x128.- 参数:
image
- The image to resize.- 返回:
- The resized image.
-
imageToBytes
@Deprecated @NotNull public static @org.jetbrains.annotations.NotNull byte[] imageToBytes(@NotNull @NotNull Image image) 已过时。Magic valueConvert an Image to a byte[] using the palette.- 参数:
image
- The image to convert.- 返回:
- A byte[] containing the pixels of the image.
-
matchColor
已过时。Magic valueGet the index of the closest matching color in the palette to the given color.- 参数:
r
- The red component of the color.b
- The blue component of the color.g
- The green component of the color.- 返回:
- The index in the palette.
-
matchColor
已过时。Magic valueGet the index of the closest matching color in the palette to the given color.- 参数:
color
- The Color to match.- 返回:
- The index in the palette.
-
getColor
已过时。Magic valueGet the value of the given color in the palette.- 参数:
index
- The index in the palette.- 返回:
- The Color of the palette entry.
-
setMapColorCache
Sets the given MapColorCache.- 参数:
mapColorCache
- The map color cache to set
-