程序包 org.bukkit.map
类 MapPalette
java.lang.Object
org.bukkit.map.MapPalette
表示地图物品使用的调色板。
这些字段是基础颜色范围。每个条目对应四种不同深浅的颜色,其值从条目到条目+3。
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明static final byte已过时。魔法值static final byte已过时。魔法值static final byte已过时。魔法值static final byte已过时。魔法值static final byte已过时。魔法值static final byte已过时。魔法值static final byte已过时。魔法值static final byte已过时。魔法值static final byte已过时。魔法值static final byte已过时。魔法值static final byte已过时。魔法值static final byte已过时。魔法值static final byte已过时。魔法值static final byte已过时。魔法值 -
方法概要
修饰符和类型方法说明getColor(byte index) 已过时。魔法值static @org.jetbrains.annotations.NotNull byte[]imageToBytes(@NotNull Image image) 已过时。魔法值static bytematchColor(int r, int g, int b) 已过时。魔法值static bytematchColor(@NotNull Color color) 已过时。魔法值static @NotNull BufferedImageresizeImage(@Nullable Image image) 将图像调整为128x128大小。static voidsetMapColorCache(@NotNull MapPalette.MapColorCache mapColorCache) 设置给定的MapColorCache。
-
字段详细资料
-
TRANSPARENT
已过时。魔法值- 另请参阅:
-
LIGHT_GREEN
已过时。魔法值- 另请参阅:
-
LIGHT_BROWN
已过时。魔法值- 另请参阅:
-
GRAY_1
已过时。魔法值- 另请参阅:
-
RED
已过时。魔法值- 另请参阅:
-
PALE_BLUE
已过时。魔法值- 另请参阅:
-
GRAY_2
已过时。魔法值- 另请参阅:
-
DARK_GREEN
已过时。魔法值- 另请参阅:
-
WHITE
已过时。魔法值- 另请参阅:
-
LIGHT_GRAY
已过时。魔法值- 另请参阅:
-
BROWN
已过时。魔法值- 另请参阅:
-
DARK_GRAY
已过时。魔法值- 另请参阅:
-
BLUE
已过时。魔法值- 另请参阅:
-
DARK_BROWN
已过时。魔法值- 另请参阅:
-
-
方法详细资料
-
resizeImage
将图像调整为128x128大小。原文: Resize an image to 128x128.
- 参数:
image- 要调整大小的图像。- 返回:
- 调整大小后的图像。
-
imageToBytes
@Deprecated(since="1.6.2") @NotNull public static @org.jetbrains.annotations.NotNull byte[] imageToBytes(@NotNull @NotNull Image image) 已过时。魔法值使用调色板将图像转换为byte[]。原文: Convert an Image to a byte[] using the palette.
- 参数:
image- 要转换的图像。- 返回:
- 包含图像像素的byte[]。
-
matchColor
已过时。魔法值获取调色板中与给定颜色最匹配的颜色索引。原文: Get the index of the closest matching color in the palette to the given color.
- 参数:
r- 颜色的红色分量。b- 颜色的蓝色分量。g- 颜色的绿色分量。- 返回:
- 调色板中的索引。
-
matchColor
已过时。魔法值获取调色板中与给定颜色最匹配的颜色索引。原文: Get the index of the closest matching color in the palette to the given color.
- 参数:
color- 要匹配的Color对象。- 返回:
- 调色板中的索引。
-
getColor
已过时。魔法值获取调色板中给定颜色的值。原文: Get the value of the given color in the palette.
- 参数:
index- 调色板中的索引。- 返回:
- 调色板条目的Color对象。
-
setMapColorCache
设置给定的MapColorCache。原文: Sets the given MapColorCache.
- 参数:
mapColorCache- 要设置的地图颜色缓存。
-