DAI 3.3 // PERSISTENT CONTENT STATE

Persistent Item Components & JSON Block Entities

DAI 3.3 adds an open registry-codec bridge for item Data Components and a generic synchronized state/inventory block entity for JSON-owned DAI blocks.

Open item Data Component bridge

item_component_set/remove/copy mutate persistent vanilla or modded item Data Components through their registry codecs. action is the component ID; target selects mainhand, offhand, slot:N, inventory:N or hotbar:N.

{
  "type":"item_component_set",
  "action":"minecraft:custom_model_data",
  "target":"mainhand",
  "arguments":{"value":{"floats":[1.0]}}
}

Read with item_component_exists and item_component_json.

Persistent JSON block entities

A registry-backed DAI block can opt into generic persistent state/inventory:

"block": {
  "block_entity": true,
  "inventory_slots": 9,
  "block_entity_sync": true,
  "block_entity_tick_interval": 20
}

Inventory slots are clamped to 0–54. Inventory or a positive block-entity tick interval automatically requires the generic JSON block entity.

Typed state actions + conditions

Use block_entity_set_boolean, block_entity_set_number, block_entity_set_string, block_entity_add_number, block_entity_toggle_boolean and block_entity_clear. Read with block_entity_state / block_entity_state_exists.

Inventory slots

block_entity_slot_set uses action as item ID, target as block position, slot as slot index and value as count. block_entity_slot_clear clears a slot; block_entity_slot_item/count inspect it.

Authority

Persistent mutations are server-authoritative. Recheck costs and permissions in the same server-owned action/function that performs the mutation.