-
Notifications
You must be signed in to change notification settings - Fork 4
Item configuration
This page will show some examples on how to configure item stacks.
You can add the glow effect by using the following nbt structure:
"nbt": {
"HideFlags": 1,
"ench": [
{
"id": 32,
"lvl": 1
}
],
"Enchantments": [
{
"id": "minecraft:efficiency",
"lvl": 1
}
]
}
Like above just without hiding the enchantment attributes.
"nbt": {
"ench": [
{
"id": 32,
"lvl": 1
}
],
"Enchantments": [
{
"id": "minecraft:efficiency",
"lvl": 1
}
]
}
This example will add the efficiency enchantment to items on legacy and modern client versions.
You can set the name of the SkullOwner by setting the following nbt tag:
"nbt": {
"SkullOwner": "PlayerName"
}
The Minecraft client will fetch the skin for the given player name.
If you don't want the client to resolve the skin by name or you want to show a custom texture, you can use this advanced approach:
"nbt": {
"SkullOwner": {
"Name": "Something but must not empty",
"Properties": {
"textures": [
{
"value": "Base64 encoded skin data"
}
]
}
}
}
You can obtain the Base64 encoded skin data by using the Mojang API.
You can use placeholders in item names, descriptions (lores) and even NBT data. Placeholders are delimited using curly brackets. For example {viewer}
. You can set the replacement values in code using the replacements
method of AbstractMenu
.