ItemComponent - Profile Component Apply (Section) — SkBee

Addon: SkBee · Category: Section · Since: 3.18.0

Syntax

apply profile [component] to %itemstacks/itemtypes/slots/blocks/entities%

Description

Apply a profile component to an item/entity/block. This is generally used for player heads and mannequins. It can also be used on players but please use with caution. See [**Profile Component**](https://minecraft.wiki/w/Data_component_format#profile) on McWiki for more details.

**Entries**: - `name` = A username with a maximum length of 16, and only consisting of username-allowed characters [optional]. - `id` = A UUID. If no other profile fields are specified, this is used to dynamically request the profile of a player with that UUID from Mojang's servers. Once received, that profile's properties (such as its skin, cape, and elytra textures) can be used for rendering. If the profile does not exist, a random default skin is provided [optional]. - `texture-value` = A base64 encoded string representing the texture data for the profile. [optional]. - `texture-signature` = A base64 encoded string representing the signature of the texture data. [optional]. - `model` = The model of the skin, either `classic` or `slim`. Defaults to `classic` if not specified. [optional]. - `texture` = Namespaced path to a player skin texture, relative to the `textures` folder in a resource pack [optional]. - `cape` = Namespaced path to a cape texture, relative to the `textures` folder in a resource pack. [optional]. - `elytra` = Namespaced path to an elytra texture, relative to the `textures` folder in a resource pack. [optional].

Examples

# Hamburger Head
set {_i} to 1 of player head
apply profile to {_i}:
	texture-value: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYmJlNjAyN2NhM2MwZTE3MDJlOGU0ODE4ZjlkYjk0NDc1NTU4MDVjZDE1NjFlYTUyZWNhODRjOTkyNDk1NTRlMyJ9fX0="
give {_i} to player

# Yours Truly's Head
set {_i} to 1 of player head
apply profile to {_i}:
	name: "ShaneBee"
give {_i} to player

# Batman
spawn a mannequin above target block of player:
	apply profile to entity:
		name: "Batman"

View source