Item configuration - Simplix-Softworks/Cirrus GitHub Wiki

Item configuration

This page will show some examples on how to configure item stacks.

Add enchantment glow

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
    }
  ]
}

Add enchantments

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.

SkullOwner or Skull texture

By name

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.

By texture property (hash)

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.

Placeholders / Replacements

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.