Skip to content

ArmorTrimHelper ​

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

Since2.3.0

Identifies an armor trim by its pattern and material.

js
const trim = Player.getPlayer()?.getMainHand().getComponents().getArmorTrim();  
if (trim != null) Chat.log(`${trim.getPatternId()} with ${trim.getMaterialId()}`);

Methods ​

getMaterialId ​

getMaterialId(): String#
Returns the trim material, such as "minecraft:gold".
Returns: the registered material ID, or "[unregistered]" for an inline material

getPatternId ​

getPatternId(): String#
Returns the trim pattern, such as "minecraft:sentry".
Returns: the registered pattern ID, or "[unregistered]" for an inline pattern