📦LiteItems

LiteItem is a simple JSON-based data model used to describe Minecraft items inside plugins powered by LiteCore.

It allows you to define item properties such as material, display name, lore, custom model data, NBT tags, and more — in a clean and readable format. You can use it to both create items and recognize them during plugin logic.

🛠️ How to get LiteItem data

  1. Hold the item in your hand.

  2. Run the command:

    /[your_plugin] core data
  3. The plugin will print a LiteItem model based on the held item — you can copy it and use it in your configs.

📘 LiteItem Structure

There are two formats for LiteItem:

1. Full NBT Encoded

Stores the complete internal NBT data of the item:

{
  "lite_item": {
    "amount": 1,
    "data": "rO0ABXNyABp..."
  }
}

This method is exact but not editable by hand.


2. Readable JSON Format

Easier to modify manually and recommended when you only care about certain properties:

{
  "lite_item": {
    "amount": 64,
    "material": "OAK_LOG",
    "display_name": "§aMy log",
    "lore": [
      "Hello!",
      "This is my log =)"
    ],
    "head_url": "f2f52f927efffd...",
    "custom_model_data": "1001",
    "compare": "material,display_name,custom_model_data",
    "use_sounds": [
      "ENTITY_SHEEP_SHEAR",
      "ENTITY_SHEEP_SHEAR:0.5:2"
    ],
    "damage": 10,
    "nbt": {
      "plugin_name:log_key": "oak_log"
    }
  }
}

🔍 Field Explanation

Field
Description

amount

Amount of the item

material

Item material (e.g. "DIAMOND_SWORD")

display_name

Colored name of the item (§ codes supported)

lore

List of lore lines

custom_model_data

Model ID used for resource pack texture binding

head_url

Base64 texture hash (for heads)

nbt

Custom NBT tags stored in the item

use_sounds

Sounds to play when using this item. Format: "SOUND" or "SOUND:volume:pitch"

damage

Can represent either item damage or amount consumed; supports random range "1-5"

compare

Comma-separated list of fields used to identify the item (see below)

🧠 Understanding compare

Sometimes players might rename or slightly modify items. To prevent this from breaking plugin logic, you can specify which fields should be used when comparing items.

Example:

{
  "lite_item": {
    "material": "OAK_LOG",
    "display_name": "§aMy log",
    "custom_model_data": "1001",
    "compare": "material,display_name,custom_model_data"
  }
}
  • If a player renames the item, and display_name is part of compare, the item will no longer match.

  • To make it more tolerant, reduce the comparison to non-editable fields:

"compare": "custom_model_data"

Now, the plugin identifies any item with the same custom_model_data, regardless of name or damage.

🎯 Usage Example

Say you create a seed item via GUI:

{
  "seed_item": {
    "amount": 1,
    "material": "WHEAT_SEEDS",
    "display_name": "§fトマトの種",
    "custom_model_data": "10009"
  }
}

To avoid mismatches if the player renames the item, limit the comparison:

{
  "seed_item": {
    "amount": 1,
    "material": "WHEAT_SEEDS",
    "display_name": "§fトマトの種",
    "custom_model_data": "10009",
    "compare": "custom_model_data"
  }
}

This way, only the model ID is used for recognition.

Last updated