Data component format/block transformer

Minecraft Wiki article. Categories: Top-level_data_pages

📌 Mirrored from Minecraft Wiki

This article is reproduced from Data component format/block transformer on the Minecraft Wiki. Mirrored from revision 3692658. 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 List / JSON Array] minecraft:block_transformer: The game iterates through this list until it finds an element whose block state provider returns a result.
      • [NBT Compound / JSON Object]: A single object in the list.
        • [NBT Compound / JSON Object] block_state_provider: A block state provider which provides the state for the transformed block. Only block state providers used in world generation are allowed.
        • [String][NBT Compound / JSON Object] sound: Optional. One server-side sound event (an [String] ID, or a new [NBT Compound / JSON Object] server-side sound event definition) to play upon successful transformation. Defaults to none.
        • [String] particle: Optional. The particle to use for the interaction. Can be one of none, scrape, wax_on, or wax_off. Defaults to none.
        • [NBT List / JSON Array] disallowed_faces: Optional. Interacting with one of the specified faces will not transform the block.
          • [String]: An element in the list. Can be one of up, down, north, south, east, or west.
        • [String] loot: Optional. The loot table to use for dropping items upon successful transformation. If not present, no loot is dropped.
        • [String] drop_strategy: Optional. Where in the block space the dropped loot should spawn. Can be either from_middle (loot spawns at the center of the block space) or clicked_face (loot spawns at the center of the face interacted with). Defaults to from_middle.
        • [String] transform_type: Optional. Configures how nearby blocks should be affected by the transformation. Can be either single_block (only the targeted block is affected) or copper_chest (if input and output blocks are both copper chests of any weathering state, waxed or unwaxed, this transformation will affect both sides of a double chest).
        • [Boolean] consume_on_use: Optional. Whether or not the item should be consumed upon successful transformation, if it is stackable and the player is in survival or adventure mode. Defaults to true.
        • [Int] item_damage_per_use: Optional. How much durability the item loses upon successful transformation, if it is not stackable and the player is in survival or adventure mode. Defaults to 1.

Sources