[SPIGOT-6903] Expose MapMaterialColor to API Created: 18/Jan/22  Updated: 16/Dec/23  Resolved: 16/Dec/23

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Syd Montague Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None

Version: non-applicable
Guidelines Read: Yes

 Description   

At the moment there is no non-NMS way to obtain the MapMaterialColor of a block.

Adding this to the API would significantly simplify custom map rendering and other use cases where obtaining the color of a block might be useful.



 Comments   
Comment by Syd Montague [ 25/Jan/22 ]

@FreeSoccerHDX
Obtain a IBlockData handle (e.g. from a BlockState, which wraps it) and call #getMapColor((IBlockAccess, BlockPosition). The parameters are just the world and the position, theoretically passing null should work as well.

Comment by FreeSoccerHDX [ 25/Jan/22 ]

What is the NMS way to do it ?

Generated at Sat Dec 13 15:25:58 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.