BlockMapColors 5.46.0
Base map colour of each block, as vanilla Bedrock reports it (resources/block_map_colors.json, generated by tools/generate-block-map-colors.php from a Bedrock Dedicated Server block state dump).
Colours are 0xRRGGBB ints; NONE means the block doesn't show on maps (air, glass, ...) so the map looks through it.
Constants
FALLBACK
public const FALLBACK = 0x707070Used for blocks missing from the table, so that new blocks still show up
NONE
public const NONE = -1SHADE_HIGH
public const SHADE_HIGH = 255SHADE_LOW
public const SHADE_LOW = 180Brightness multipliers used for height shading (out of 255), as in vanilla
SHADE_LOWEST
public const SHADE_LOWEST = 135SHADE_NORMAL
public const SHADE_NORMAL = 220WATER
public const WATER = 0x4040ffMethods
__construct()
public function __construct(?string $path = null)getColor()
public function getColor(int $stateId) : intReturns the base map colour (0xRRGGBB) of the given block state, or NONE if it doesn't show on maps.
getColorByName()
public function getColorByName(string $name, ?string $pillarAxis = null) : intReturns the base map colour (0xRRGGBB) of the block with the given vanilla ID, or NONE if it doesn't show on maps. Blocks missing from the table get FALLBACK.
isKnown()
public function isKnown(string $name) : boolReturns whether the table has a colour (or explicitly no colour) for the given block.
shade()
public static function shade(int $color, int $brightness) : intApplies a shading brightness (SHADE_*) to a base colour.
