Item
item/pdc
Item PDC
Reads or writes a PersistentDataContainer value on an ItemStack.
Note: PDC values are stored inside the ItemMeta — SET and REMOVE must return a cloned ItemStack with the updated meta. Always pass the returned item output to the next node. Keys use the "pnode" namespace (e.g. "pnode:my_key").
Inputs
| Name | Type | Optional | Description |
|---|---|---|---|
item |
item_stack | The source ItemStack (will be cloned on SET/REMOVE). | |
key |
string | ✓ | PDC key name (namespaced as "pnode:key"). |
value |
string | ✓ | Value to store (SET only). |
Outputs
| Name | Type | Description |
|---|---|---|
item |
item_stack | Modified clone (SET/REMOVE) or unchanged item (GET/HAS). |
value |
string | Retrieved value as string (GET), or empty string if not found. |
has |
boolean | True if the key exists (HAS). |
Properties
| Key | Type | Default | Description |
|---|---|---|---|
op |
string | "GET" |
GET, SET, HAS, or REMOVE. |
key |
string | "my_key" |
Key |
value |
string | "" |
Value |
valueType |
string | "STRING" |
STRING, INTEGER, DOUBLE, or BOOLEAN. |
Examples
Tag an item with custom data
Mark an item as a quest item using PDC.
- Create Item (COMPASS) → Item PDC
- Set op=SET, key=quest_id, value=dragon_quest, valueType=STRING
- Item PDC → item → Player Give Item