Skip to content

CustomModelDataHelper ​

com.jsmacrosce.jsmacros.client.api.helper.inventory.CustomModelDataHelper

Since2.3.0

Reads the four indexed lists resource packs can use to select or tint item models.

js
const data = Player.getPlayer()?.getMainHand().getComponents().getCustomModelData();  
if (data != null) {
  for (const label of data.getStrings()) Chat.log(label);  
}

Methods ​

getColors ​

getColors(): List<Integer>#
Returns: the packed RGB colors in component order

getFlags ​

getFlags(): List<Boolean>#
Returns: the boolean flags in component order

getFloats ​

getFloats(): List<Float>#
Returns: the numeric values in component order

getStrings ​

getStrings(): List<String>#
Returns: the strings in component order