Package dev.cerus.maps.api.graphics
Class ColorCache
java.lang.Object
dev.cerus.maps.api.graphics.ColorCache
Lazy cache that maps rgb values to map colors
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte
rgbToMap(int r, int g, int b)
Retrieves a cached color.
-
Method Details
-
rgbToMap
public static byte rgbToMap(int r, int g, int b)Retrieves a cached color. If the color is not cached it will be calculated and then cached.Takes up 16MB of memory when full
- Parameters:
r
- Red valueg
- Green valueb
- Blue value- Returns:
- Cached map color
-