Metadata System
Add Special Functions to Items
Overview
The metadata system allows you to add special functions to items, such as custom durability, attribute bonuses, and special effects. With simple configurations, you can equip items with rich functionalities.
What is Metadata
Metadata refers to additional function configurations for items. They do not affect the basic appearance of items but add special behaviors and effects to them.
Complete List of Metadata Types
All metadata types implemented in Zaphkiel:
Metadata Type | Function | Example Usage |
---|---|---|
attribute | Attribute bonuses | Modify attributes like attack damage, attack speed, and armor value |
can-destroy | List of breakable blocks | Restrict blocks a tool can break in Adventure mode |
can-place-on | List of placeable blocks | Restrict positions where a block can be placed in Adventure mode |
color | Color setting | Dye leather armor, set potion colors |
data | Item data value | Set the CustomModelData of an item |
icon | Icon material | Dynamically change the item's material type |
itemflag | Item flags | Hide displays of enchantments, attributes, etc. |
native | Native NBT | Directly set the item's NBT data |
potion | Potion effects | Add base potion types and custom effects to potion items |
shiny | Glowing effect | Make items glow like enchanted ones without showing enchantment info |
skull | Skull settings | Custom player skulls, textured skulls, HeadDatabase integration |
spawner | Spawn egg type | Set the entity type spawned by a spawn egg |
tiphareth | Tiphareth integration | Integrate with the Tiphareth plugin's resource pack |
unbreakable | Unbreakable status | Set items to be unbreakable |
unique | Unique identifier | Add unique identification info to items |
Basic Metadata Configuration
Durability Metadata
Equip items with a custom durability system:
Attribute Metadata
Add attribute bonuses to items:
Appearance & Visual Metadata
Color Metadata (color)
Set colors for leather armor and potions:
Icon Metadata (icon)
Dynamically change the item's material type:
Shiny Metadata (shiny)
Make items glow like enchanted ones without showing enchantment info:
Skull Metadata (skull)
Customize player skulls and textured skulls:
Functional Metadata
Data Metadata (data)
Set the CustomModelData of an item:
Item Flag Metadata (itemflag)
Hide various types of item info displays:
Important Note
- In Minecraft 1.21+, the
HIDE_ATTRIBUTES
flag can only hide modified attributes - For items with default attributes (e.g., weapons), you need to first modify these attributes (e.g., set to 0) using the
attribute
metadata, thenHIDE_ATTRIBUTES
will take effect - If you only set
HIDE_ATTRIBUTES
without modifying attributes, the weapon's default attack damage and attack speed will still be displayed
Unbreakable Metadata (unbreakable)
Set items to be unbreakable:
Unique Identifier Metadata (unique)
Add unique identifiers to each item instance:
Adventure Mode Metadata
Can-Destroy Metadata (can-destroy)
Restrict blocks a tool can break in Adventure mode:
Can-Place-On Metadata (can-place-on)
Restrict positions where a block can be placed in Adventure mode:
Potion & Entity Metadata
Potion Metadata (potion)
Add base potion types and custom effects to potion items:
Spawn Egg Metadata (spawner)
Deprecation Warning
This metadata is deprecated in Minecraft 1.13+. Starting from 1.13, different entity types correspond to different spawn egg item types, and the spawned entity of a spawn egg cannot be modified via NBT data.
It is recommended to directly use the corresponding spawn egg item types (e.g., zombie_spawn_egg
, skeleton_spawn_egg
, etc.).
Set the entity type spawned by a spawn egg:
Advanced Metadata
Based on the mapping support information provided, here is the complete documentation for native NBT metadata (native
).
Native NBT Metadata (native)
Directly set the item's NBT data, supporting nested structures and data mapping:
Basic Usage
Nested Structure Support
The native
metadata fully supports complex nested NBT structures:
Data Mapping Integration
The native
metadata is perfectly integrated with data-mapper
data mapping, supporting dynamic display and data reference:
Mapping Syntax Explanation
When referencing native
NBT data in data-mapper
, use the following syntax:
"&Path"
- Reference nested values in NBT, using dots to separate pathsit
- Reference values with the same name from thedata
node- Supports complex Kether script expressions for data processing
Practical Application Example
Tiphareth Integration Metadata (tiphareth)
Integrate with the Tiphareth plugin's resource pack:
Practical Metadata Examples
Equipment Items
Metadata Locking
Locking Metadata
Use the !!
suffix to lock metadata, ensuring forced application after configuration updates:
Functions of Locking
- Balance Adjustment: Take effect immediately after modifying weapon attributes
- Function Fixes: Force updates after fixing metadata issues
- Unified Standards: Ensure all items of the same type use the same metadata