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

NameTypeOptionalDescription
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

NameTypeDescription
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

KeyTypeDefaultDescription
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.

  1. Create Item (COMPASS) → Item PDC
  2. Set op=SET, key=quest_id, value=dragon_quest, valueType=STRING
  3. Item PDC → item → Player Give Item