Data component format/lock

Minecraft Wiki article. Categories: Top-level_data_pages

📌 Mirrored from Minecraft Wiki

This article is reproduced from Data component format/lock on the Minecraft Wiki. Mirrored from revision 3428320. It is licensed CC BY-NC-SA 3.0 by the Minecraft Wiki contributors — not under the Codex’s CC BY-SA 4.0, and it may not be used commercially. Edits belong upstream, not here.

    • [NBT Compound / JSON Object] minecraft:lock: An item predicate representing the "key" to open this container. If present on a block, players must have an item that passes this predicate in their main hand in order to open the container. If they do not, interacting with the container will play a sound and display a message in the actionbar.

Sources