1
0
mirror of https://github.com/Mojang/bedrock-samples.git synced 2024-11-23 11:16:14 +00:00
bedrock-samples/documentation/Blocks.html
Mike Ammerlaan 6e0daa70a8 v1.21.40.3
2024-10-22 09:25:09 -07:00

1028 lines
70 KiB
HTML

<h1>BLOCKS DOCUMENTATION </br>Version: 1.21.40.3</h1>
<h2><p id="Index">Index</p></h2>
<table border="1">
<tr> <th><a href="#Blocks">Blocks</a></th> </tr>
<tr> <td> <a href="#Block Components"> Block Components</a> </tr> </td>
<tr> <td> <a href="#Block Definition Properties"> Block Definition Properties</a> </tr> </td>
<tr> <td> <a href="#Block Description Properties"> Block Description Properties</a> </tr> </td>
<tr> <td> <a href="#Block Event Responses"> Block Event Responses</a> </tr> </td>
<tr> <td> <a href="#Block Trigger Components"> Block Trigger Components</a> </tr> </td>
</table>
<a href="#Index">Back to top</a>
<h1><p id="Blocks">Blocks</p></h1>
<h1><p id="Block Components">Block Components</p></h1>
<h2></h2>
<table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:3;">
<tr> <th style="border-style:solid; border-width:3;">Name</th> <th style="border-style:solid; border-width:3;">Type</th> <th style="border-style:solid; border-width:3;">Default Value</th> <th style="border-style:solid; border-width:3;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">bone_visibility</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">A JSON object that contains a list of key/value pairs that map from bone name in the specified geometry file (key) to a boolean that tells whether the bone should be visible or not (value).</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:breathability</td>
<td style="border-style:solid; border-width:3; padding:7px">String</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Determines whether the block is breathable by defining if the block is treated as a `solid` or as `air`. The default is `solid` if this component is omitted.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:collision_box</td>
<td style="border-style:solid; border-width:3; padding:7px">Boolean / JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px">true</td>
<td style="border-style:solid; border-width:3; padding:7px">Defines the area of the block that collides with entities. If set to true, default values are used. If set to false, the block's collision with entities is disabled. If this component is omitted, default values are used.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">origin</td>
<td style="border-style:solid; border-width:2; padding:8px">Vector [a, b, c]</td>
<td style="border-style:solid; border-width:2; padding:8px">[-8.0, 0.0, -8.0]</td>
<td style="border-style:solid; border-width:2; padding:8px">Minimal position of the bounds of the collision box. "origin" is specified as [x, y, z] and must be in the range (-8, 0, -8) to (8, 16, 8), inclusive.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">size</td>
<td style="border-style:solid; border-width:2; padding:8px">Vector [a, b, c]</td>
<td style="border-style:solid; border-width:2; padding:8px">[16.0, 16.0, 16.0]</td>
<td style="border-style:solid; border-width:2; padding:8px">Size of each side of the collision box. Size is specified as [x, y, z]. "origin" + "size" must be in the range (-8, 0, -8) to (8, 16, 8), inclusive.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:crafting_table</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Makes your block into a custom crafting table which enables the crafting table UI and the ability to craft recipes. This component supports only "recipe_shaped" and "recipe_shapeless" typed recipes and not others like "recipe_furnace" or "recipe_brewing_mix". If there are two recipes for one item, the recipe book will pick the first that was parsed. If two input recipes are the same, crafting may assert and the resulting item may vary.</br><h3><p id="crafting_tags">crafting_tags</p></h3>
Defines the tags recipes should define to be crafted on this table. Limited to 64 tags. Each tag is limited to 64 characters.</br><a href="#Index">Back to top</a><br><br>
<h3><p id="table_name">table_name</p></h3>
Specifies the language file key that maps to what text will be displayed in the UI of this table. If the string given can not be resolved as a loc string, the raw string given will be displayed. If this field is omitted, the name displayed will default to the name specified in the "display_name" component. If this block has no "display_name" component, the name displayed will default to the name of the block.</br><a href="#Index">Back to top</a><br><br>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:custom_components</td>
<td style="border-style:solid; border-width:3; padding:7px">Array</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Sets an ordered list of custom component names which are bound in script to be executed upon a block event.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:destructible_by_explosion</td>
<td style="border-style:solid; border-width:3; padding:7px">Boolean / JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px">true</td>
<td style="border-style:solid; border-width:3; padding:7px">Describes the destructible by explosion properties for this block. If set to true, the block will have the default explosion resistance. If set to false, this block is indestructible by explosion. If the component is omitted, the block will have the default explosion resistance.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">explosion_resistance</td>
<td style="border-style:solid; border-width:2; padding:8px">Decimal</td>
<td style="border-style:solid; border-width:2; padding:8px">0</td>
<td style="border-style:solid; border-width:2; padding:8px">Sets the explosion resistance for the block. Greater values result in greater resistance to explosions. The scale will be different for different explosion power levels. A negative value or 0 means it will easily explode; larger numbers increase level of resistance.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:destructible_by_mining</td>
<td style="border-style:solid; border-width:3; padding:7px">Boolean / JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px">true</td>
<td style="border-style:solid; border-width:3; padding:7px">Describes the destructible by mining properties for this block. If set to true, the block will take the default number of seconds to destroy. If set to false, this block is indestructible by mining. If the component is omitted, the block will take the default number of seconds to destroy.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">item_specific_speeds</td>
<td style="border-style:solid; border-width:2; padding:8px">Array</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">Optional array of objects to describe item specific block destroy speeds, each object contains an 'item' ItemDescriptor and a 'destroy_speed' float. This array currently requires UpcomingFeatures experiment to be enabled.</br><h5><p id="destroy_speed">destroy_speed</p></h5>
Required.</br>A destroy speed applied while using the defined 'item'.</br><a href="#Index">Back to top</a><br><br>
<h5><p id="item">item</p></h5>
Required.</br>An ItemDescriptor filtering for the item used while mining.</br><a href="#Index">Back to top</a><br><br>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">seconds_to_destroy</td>
<td style="border-style:solid; border-width:2; padding:8px">Decimal</td>
<td style="border-style:solid; border-width:2; padding:8px">0.0</td>
<td style="border-style:solid; border-width:2; padding:8px">Sets the number of seconds it takes to destroy the block with base equipment. Greater numbers result in greater mining times.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:display_name</td>
<td style="border-style:solid; border-width:3; padding:7px">Localization String</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Specifies the language file key that maps to what text will be displayed when you hover over the block in your inventory and hotbar. If the string given can not be resolved as a loc string, the raw string given will be displayed. If this component is omitted, the name of the block will be used as the display name.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:flammable</td>
<td style="border-style:solid; border-width:3; padding:7px">Boolean / JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Describes the flammable properties for this block. If set to true, default values are used. If set to false, or if this component is omitted, the block will not be able to catch on fire naturally from neighbors, but it can still be directly ignited.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">catch_chance_modifier</td>
<td style="border-style:solid; border-width:2; padding:8px">Integer</td>
<td style="border-style:solid; border-width:2; padding:8px">5</td>
<td style="border-style:solid; border-width:2; padding:8px">A modifier affecting the chance that this block will catch flame when next to a fire. Values are greater than or equal to 0, with a higher number meaning more likely to catch on fire. For a "catch_chance_modifier" greater than 0, the fire will continue to burn until the block is destroyed (or it will burn forever if the "destroy_chance_modifier" is 0). If the "catch_chance_modifier" is 0, and the block is directly ignited, the fire will eventually burn out without destroying the block (or it will have a chance to be destroyed if "destroy_chance_modifier" is greater than 0). The default value of 5 is the same as that of Planks.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">destroy_chance_modifier</td>
<td style="border-style:solid; border-width:2; padding:8px">Integer</td>
<td style="border-style:solid; border-width:2; padding:8px">20</td>
<td style="border-style:solid; border-width:2; padding:8px">A modifier affecting the chance that this block will be destroyed by flames when on fire. Values are greater than or equal to 0, with a higher number meaning more likely to be destroyed by fire. For a "destroy_chance_modifier" of 0, the block will never be destroyed by fire, and the fire will burn forever if the "catch_chance_modifier" is greater than 0. The default value of 20 is the same as that of Planks.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:friction</td>
<td style="border-style:solid; border-width:3; padding:7px">Decimal</td>
<td style="border-style:solid; border-width:3; padding:7px">0.4</td>
<td style="border-style:solid; border-width:3; padding:7px">Describes the friction for this block in a range of (0.0-0.9). Friction affects an entity's movement speed when it travels on the block. Greater value results in more friction.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:geometry</td>
<td style="border-style:solid; border-width:3; padding:7px">Identifier String</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">The description identifier of the geometry to use to render this block. This identifier must either match an existing geometry identifier in any of the loaded resource packs or be one of the currently supported Vanilla identifiers: "minecraft:geometry.full_block" or "minecraft:geometry.cross".</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:light_dampening</td>
<td style="border-style:solid; border-width:3; padding:7px">Integer</td>
<td style="border-style:solid; border-width:3; padding:7px">15</td>
<td style="border-style:solid; border-width:3; padding:7px">The amount that light will be dampened when it passes through the block, in a range (0-15). Higher value means the light will be dampened more.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:light_emission</td>
<td style="border-style:solid; border-width:3; padding:7px">Integer</td>
<td style="border-style:solid; border-width:3; padding:7px">0</td>
<td style="border-style:solid; border-width:3; padding:7px">The amount of light this block will emit in a range (0-15). Higher value means more light will be emitted.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:loot</td>
<td style="border-style:solid; border-width:3; padding:7px">Path String</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">The path to the loot table, relative to the behavior pack. Path string is limited to 256 characters.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:map_color</td>
<td style="border-style:solid; border-width:3; padding:7px">String</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Sets the color of the block when rendered to a map. The color is represented as a hex value in the format "#RRGGBB". May also be expressed as an array of [R, G, B] from 0 to 255. If this component is omitted, the block will not show up on the map.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:material_instances</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">The material instances for a block. Maps face or material_instance names in a geometry file to an actual material instance. You can assign a material instance object to any of these faces: "up", "down", "north", "south", "east", "west", or "*". You can also give an instance the name of your choosing such as "my_instance", and then assign it to a face by doing "north":"my_instance".</br><h3><p id="Material Instance">Material Instance</p></h3>
A material instance definition to map to a material instance in a geometry file. The material instance "*" will be used for any materials that don't have a match.</br><h4></h4>
<table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:1;">
<tr> <th style="border-style:solid; border-width:1;">Name</th> <th style="border-style:solid; border-width:1;">Type</th> <th style="border-style:solid; border-width:1;">Default Value</th> <th style="border-style:solid; border-width:1;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:1; padding:9px">ambient_occlusion</td>
<td style="border-style:solid; border-width:1; padding:9px">Boolean</td>
<td style="border-style:solid; border-width:1; padding:9px">true</td>
<td style="border-style:solid; border-width:1; padding:9px">Should this material have ambient occlusion applied when lighting? If true, shadows will be created around and underneath the block.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:1; padding:9px">face_dimming</td>
<td style="border-style:solid; border-width:1; padding:9px">Boolean</td>
<td style="border-style:solid; border-width:1; padding:9px">true</td>
<td style="border-style:solid; border-width:1; padding:9px">Should this material be dimmed by the direction it's facing?</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:1; padding:9px">render_method</td>
<td style="border-style:solid; border-width:1; padding:9px">String</td>
<td style="border-style:solid; border-width:1; padding:9px">opaque</td>
<td style="border-style:solid; border-width:1; padding:9px">The render method to use. Must be one of these options:</br>"opaque" - Used for a regular block texture without an alpha layer. Does not allow for transparency or translucency.</br>"double_sided" - Used for completely disabling backface culling.</br>"blend" - Used for a block like stained glass. Allows for transparency and translucency (slightly transparent textures).</br>"alpha_test" - Used for a block like the vanilla (unstained) glass. Does not allow for translucency, only fully opaque or fully transparent textures. Also disables backface culling.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:1; padding:9px">texture</td>
<td style="border-style:solid; border-width:1; padding:9px">String</td>
<td style="border-style:solid; border-width:1; padding:9px"></td>
<td style="border-style:solid; border-width:1; padding:9px">Texture name for the material.</br></td>
</tr>
</table>
<a href="#Index">Back to top</a><br><br>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:placement_filter</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Sets rules for under what conditions the block can be placed/survive</br><h3><p id="conditions">conditions</p></h3>
List of conditions where the block can be placed/survive. Limited to 64 conditions.</br><h4></h4>
<table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:1;">
<tr> <th style="border-style:solid; border-width:1;">Name</th> <th style="border-style:solid; border-width:1;">Type</th> <th style="border-style:solid; border-width:1;">Default Value</th> <th style="border-style:solid; border-width:1;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:1; padding:9px">allowed_faces</td>
<td style="border-style:solid; border-width:1; padding:9px">Array</td>
<td style="border-style:solid; border-width:1; padding:9px"></td>
<td style="border-style:solid; border-width:1; padding:9px">List of any of the following strings describing which face(s) this block can be placed on: "up", "down", "north", "south", "east", "west", "side", "all". Limited to 6 faces.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:1; padding:9px">block_filter</td>
<td style="border-style:solid; border-width:1; padding:9px">Array</td>
<td style="border-style:solid; border-width:1; padding:9px"></td>
<td style="border-style:solid; border-width:1; padding:9px">List of blocks that this block can be placed against in the "allowed_faces" direction. Limited to 64 blocks. Each block in this list can either be specified as a String (block name) or as a BlockDescriptor. A BlockDescriptor is an object that allows you to reference a block (or multiple blocks) based on its tags, or based on its name and states. The fields of a BlockDescriptor are described below.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:1;">
<tr> <th style="border-style:solid; border-width:1;">Name</th> <th style="border-style:solid; border-width:1;">Type</th> <th style="border-style:solid; border-width:1;">Default Value</th> <th style="border-style:solid; border-width:1;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:1; padding:10px">name</td>
<td style="border-style:solid; border-width:1; padding:10px">String</td>
<td style="border-style:solid; border-width:1; padding:10px"></td>
<td style="border-style:solid; border-width:1; padding:10px">The name of a block.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:1; padding:10px">states</td>
<td style="border-style:solid; border-width:1; padding:10px">Array</td>
<td style="border-style:solid; border-width:1; padding:10px"></td>
<td style="border-style:solid; border-width:1; padding:10px">The list of Vanilla block states and their values that the block can have, expressed in key/value pairs.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:1; padding:10px">tags</td>
<td style="border-style:solid; border-width:1; padding:10px">String</td>
<td style="border-style:solid; border-width:1; padding:10px">1</td>
<td style="border-style:solid; border-width:1; padding:10px">A condition using Molang queries that results to true/false that can be used to query for blocks with certain tags.</br></td>
</tr>
</table>
</td>
</tr>
</table>
<a href="#Index">Back to top</a><br><br>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:queued_ticking</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Triggers the specified event, either once, or at a regular interval equal to a number of ticks randomly chosen from the interval_range provided.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">interval_range</td>
<td style="border-style:solid; border-width:2; padding:8px">Array</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">A range of values, specified in ticks, that will be used to decide the interval between times this event triggers. Each interval will be chosen randomly from the range, so the times between this event triggering will differ given an interval_range of two different values. If the values in the interval_range are the same, the event will always be triggered after that number of ticks.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">looping</td>
<td style="border-style:solid; border-width:2; padding:8px">Boolean</td>
<td style="border-style:solid; border-width:2; padding:8px">true</td>
<td style="border-style:solid; border-width:2; padding:8px">Does the event loop? If false, the event will only be triggered once, after a delay equal to a number of ticks randomly chosen from the interval_range. If true, the event will loop, and each interval between events will be equal to a number of ticks randomly chosen from the interval_range.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">on_tick</td>
<td style="border-style:solid; border-width:2; padding:8px">Trigger</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The event that will be triggered once or on an interval.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:1;">
<tr> <th style="border-style:solid; border-width:1;">Name</th> <th style="border-style:solid; border-width:1;">Type</th> <th style="border-style:solid; border-width:1;">Default Value</th> <th style="border-style:solid; border-width:1;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:1; padding:9px">condition</td>
<td style="border-style:solid; border-width:1; padding:9px">String</td>
<td style="border-style:solid; border-width:1; padding:9px">1</td>
<td style="border-style:solid; border-width:1; padding:9px">A condition using Molang queries that results to true/false. If true on the scheduled tick, the event will be triggered. If false on the scheduled tick, the event will not be triggered.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:1; padding:9px">event</td>
<td style="border-style:solid; border-width:1; padding:9px">String</td>
<td style="border-style:solid; border-width:1; padding:9px">set_block_state</td>
<td style="border-style:solid; border-width:1; padding:9px">The event that will be triggered.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:1; padding:9px">target</td>
<td style="border-style:solid; border-width:1; padding:9px">String</td>
<td style="border-style:solid; border-width:1; padding:9px">self</td>
<td style="border-style:solid; border-width:1; padding:9px">The target of the event executed by the block.</br></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:random_ticking</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Triggers the specified event randomly based on the random tick speed gamerule. The random tick speed determines how often blocks are updated. Some other examples of game mechanics that use random ticking are crop growth and fire spreading.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">on_tick</td>
<td style="border-style:solid; border-width:2; padding:8px">Trigger</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The event that will be triggered on random ticks.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:1;">
<tr> <th style="border-style:solid; border-width:1;">Name</th> <th style="border-style:solid; border-width:1;">Type</th> <th style="border-style:solid; border-width:1;">Default Value</th> <th style="border-style:solid; border-width:1;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:1; padding:9px">condition</td>
<td style="border-style:solid; border-width:1; padding:9px">String</td>
<td style="border-style:solid; border-width:1; padding:9px">1</td>
<td style="border-style:solid; border-width:1; padding:9px">A condition using Molang queries that results to true/false. If true on the random tick, the event will be triggered. If false on the random tick, the event will not be triggered.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:1; padding:9px">event</td>
<td style="border-style:solid; border-width:1; padding:9px">String</td>
<td style="border-style:solid; border-width:1; padding:9px">set_block_state</td>
<td style="border-style:solid; border-width:1; padding:9px">The event that will be triggered.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:1; padding:9px">target</td>
<td style="border-style:solid; border-width:1; padding:9px">String</td>
<td style="border-style:solid; border-width:1; padding:9px">self</td>
<td style="border-style:solid; border-width:1; padding:9px">The target of the event executed by the block.</br></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:redstone_conductivity</td>
<td style="border-style:solid; border-width:3; padding:7px">Identifier String</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">The basic redstone properties of a block; if the component is not provided the default values are used. Requires 1.21.30 format version and above.</br>Experimental toggles required: Upcoming Creator Features (in format versions before 1.21.30)</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">allows_wire_to_step_down</td>
<td style="border-style:solid; border-width:2; padding:8px">Boolean</td>
<td style="border-style:solid; border-width:2; padding:8px">true</td>
<td style="border-style:solid; border-width:2; padding:8px">Specifies if redstone wire can stair-step downward on the block.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">redstone_conductor</td>
<td style="border-style:solid; border-width:2; padding:8px">Boolean</td>
<td style="border-style:solid; border-width:2; padding:8px">false</td>
<td style="border-style:solid; border-width:2; padding:8px">Specifies if the block can be powered by redstone.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:selection_box</td>
<td style="border-style:solid; border-width:3; padding:7px">Boolean / JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Defines the area of the block that is selected by the player's cursor. If set to true, default values are used. If set to false, this block is not selectable by the player's cursor. If this component is omitted, default values are used.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">origin</td>
<td style="border-style:solid; border-width:2; padding:8px">Vector [a, b, c]</td>
<td style="border-style:solid; border-width:2; padding:8px">[-8.0, 0.0, -8.0]</td>
<td style="border-style:solid; border-width:2; padding:8px">Minimal position of the bounds of the selection box. "origin" is specified as [x, y, z] and must be in the range (-8, 0, -8) to (8, 16, 8), inclusive.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">size</td>
<td style="border-style:solid; border-width:2; padding:8px">Vector [a, b, c]</td>
<td style="border-style:solid; border-width:2; padding:8px">[16.0, 16.0, 16.0]</td>
<td style="border-style:solid; border-width:2; padding:8px">Size of each side of the selection box. Size is specified as [x, y, z]. "origin" + "size" must be in the range (-8, 0, -8) to (8, 16, 8), inclusive.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:transformation</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">The block's translation, rotation and scale with respect to the center of its world position</br><h3><p id="rotation">rotation</p></h3>
The block's rotation in increments of 90 degrees</br><a href="#Index">Back to top</a><br><br>
<h3><p id="rotation_pivot">rotation_pivot</p></h3>
The point to apply rotation around</br><a href="#Index">Back to top</a><br><br>
<h3><p id="scale">scale</p></h3>
The block's scale</br><a href="#Index">Back to top</a><br><br>
<h3><p id="scale_pivot">scale_pivot</p></h3>
The point to apply scale around</br><a href="#Index">Back to top</a><br><br>
<h3><p id="translation">translation</p></h3>
The block's translation</br><a href="#Index">Back to top</a><br><br>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:unit_cube</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Specifies that a unit cube is to be used with tessellation.</br></td>
</tr>
</table>
<a href="#Index">Back to top</a><br><br>
<h1><p id="Block Definition Properties">Block Definition Properties</p></h1>
These properties are part of the Block Definition. This helps the system determine how to parse and initialize this block.</br><h2></h2>
<table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:3;">
<tr> <th style="border-style:solid; border-width:3;">Name</th> <th style="border-style:solid; border-width:3;">Type</th> <th style="border-style:solid; border-width:3;">Default Value</th> <th style="border-style:solid; border-width:3;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">format_version</td>
<td style="border-style:solid; border-width:3; padding:7px">String</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Specifies the version of the game this entity was made in. If the version is lower than the current version, any changes made to the entity in the vanilla version will be applied to it.</br></td>
</tr>
</table>
<h2>Code Example</h2>
Example<br / ><textarea readonly="true" cols="66" rows="20">
{
"format_version": "1.21.40",
"minecraft:block": {
"description": {
"identifier": "design:lavenderstone"
},
"components": {
"minecraft:loot": "loot_tables/chests/simple_dungeon.json",
"minecraft:destroy_time": 4.0,
"minecraft:friction": 0.6,
"minecraft:map_color": "#00ff00",
"minecraft:flammable": {
"flame_odds": 50,
"burn_odds": 0
},
"minecraft:light_emission": 1
}
}
}
</textarea> </br>
<a href="#Index">Back to top</a><br><br>
<h1><p id="Block Description Properties">Block Description Properties</p></h1>
<h2></h2>
<table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:3;">
<tr> <th style="border-style:solid; border-width:3;">Name</th> <th style="border-style:solid; border-width:3;">Type</th> <th style="border-style:solid; border-width:3;">Default Value</th> <th style="border-style:solid; border-width:3;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">identifier</td>
<td style="border-style:solid; border-width:3; padding:7px">String</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">The identifier for this block. The name must include a namespace and must not use the Minecraft namespace unless overriding a Vanilla block.</br></td>
</tr>
</table>
<a href="#Index">Back to top</a><br><br>
<h1><p id="Block Event Responses">Block Event Responses</p></h1>
Event responses for block trigger components.</br><h2></h2>
<table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:3;">
<tr> <th style="border-style:solid; border-width:3;">Name</th> <th style="border-style:solid; border-width:3;">Type</th> <th style="border-style:solid; border-width:3;">Default Value</th> <th style="border-style:solid; border-width:3;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">add_mob_effect</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Apply mob effect to target.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">amplifier</td>
<td style="border-style:solid; border-width:2; padding:8px">Integer</td>
<td style="border-style:solid; border-width:2; padding:8px">0</td>
<td style="border-style:solid; border-width:2; padding:8px">The amplifier for the mob effect.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">duration</td>
<td style="border-style:solid; border-width:2; padding:8px">Decimal</td>
<td style="border-style:solid; border-width:2; padding:8px">0.0</td>
<td style="border-style:solid; border-width:2; padding:8px">The duration of the mob effect.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">effect</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The mob effect to apply.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">target</td>
<td style="border-style:solid; border-width:2; padding:8px">Minecraft Filter</td>
<td style="border-style:solid; border-width:2; padding:8px">self</td>
<td style="border-style:solid; border-width:2; padding:8px">The target context to execute against.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">damage</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Deals damage to the target.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">amount</td>
<td style="border-style:solid; border-width:2; padding:8px">Integer</td>
<td style="border-style:solid; border-width:2; padding:8px">0</td>
<td style="border-style:solid; border-width:2; padding:8px">The amount of damage to deal.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">mob_amount</td>
<td style="border-style:solid; border-width:2; padding:8px">Integer</td>
<td style="border-style:solid; border-width:2; padding:8px">0</td>
<td style="border-style:solid; border-width:2; padding:8px">The amount of damage to deal if held by a mob.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">target</td>
<td style="border-style:solid; border-width:2; padding:8px">Minecraft Filter</td>
<td style="border-style:solid; border-width:2; padding:8px">self</td>
<td style="border-style:solid; border-width:2; padding:8px">The target context to execute against.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">type</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The type of damage to deal.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">decrement_stack</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Decrement item stack.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">die</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Kill target. If target is self and this is run from a block then destroy the block.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">target</td>
<td style="border-style:solid; border-width:2; padding:8px">Minecraft Filter</td>
<td style="border-style:solid; border-width:2; padding:8px">self</td>
<td style="border-style:solid; border-width:2; padding:8px">The target context to execute against.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">play_effect</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Spawns a particle effect relative to target position.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">data</td>
<td style="border-style:solid; border-width:2; padding:8px">Integer</td>
<td style="border-style:solid; border-width:2; padding:8px">0</td>
<td style="border-style:solid; border-width:2; padding:8px">Particle data value.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">effect</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The name of the particle effect to create.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">target</td>
<td style="border-style:solid; border-width:2; padding:8px">Minecraft Filter</td>
<td style="border-style:solid; border-width:2; padding:8px">self</td>
<td style="border-style:solid; border-width:2; padding:8px">The target context to execute against.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">play_sound</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Play a sound relative to target position.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">sound</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The name of the sound to play.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">target</td>
<td style="border-style:solid; border-width:2; padding:8px">Minecraft Filter</td>
<td style="border-style:solid; border-width:2; padding:8px">self</td>
<td style="border-style:solid; border-width:2; padding:8px">The target context to execute against.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">remove_mob_effect</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Removes mob effect from target.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">effect</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The mob effect to remove. Use 'all' to remove all mob effects from target.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">target</td>
<td style="border-style:solid; border-width:2; padding:8px">Minecraft Filter</td>
<td style="border-style:solid; border-width:2; padding:8px">self</td>
<td style="border-style:solid; border-width:2; padding:8px">The target context to execute against.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">run_command</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Triggers a slash command or a list of slash commands.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">command</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">Slash command to run.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">command array</td>
<td style="border-style:solid; border-width:2; padding:8px">Array</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">List of slash commands to run.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">target</td>
<td style="border-style:solid; border-width:2; padding:8px">Minecraft Filter</td>
<td style="border-style:solid; border-width:2; padding:8px">self</td>
<td style="border-style:solid; border-width:2; padding:8px">The target context to execute against.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">set_block</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Sets this block to another block type.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">block_type</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The type of block to set.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">set_block_at_pos</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Sets a block relative to this block to another block type.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">block_offset</td>
<td style="border-style:solid; border-width:2; padding:8px">Vector [a, b, c]</td>
<td style="border-style:solid; border-width:2; padding:8px">[0.0, 0.0, 0.0]</td>
<td style="border-style:solid; border-width:2; padding:8px">The offset from the block's center.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">block_type</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The type of block to set.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">set_block_state</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Sets a block state on this block.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">state</td>
<td style="border-style:solid; border-width:2; padding:8px">Molang</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">Block state to set on the block.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">spawn_loot</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Spawn loot from block.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">table</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">File path, relative to the Behavior Pack's path, to the loot table file.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">swing</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Event causes the actor to swing.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">teleport</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Teleport target randomly around destination point.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">avoid_water</td>
<td style="border-style:solid; border-width:2; padding:8px">Boolean</td>
<td style="border-style:solid; border-width:2; padding:8px">true</td>
<td style="border-style:solid; border-width:2; padding:8px">Determines if the teleport avoids putting the target in water.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">destination</td>
<td style="border-style:solid; border-width:2; padding:8px">Vector [a, b, c]</td>
<td style="border-style:solid; border-width:2; padding:8px">[0.0, 0.0, 0.0]</td>
<td style="border-style:solid; border-width:2; padding:8px">Origin destination of the teleport.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">land_on_block</td>
<td style="border-style:solid; border-width:2; padding:8px">Boolean</td>
<td style="border-style:solid; border-width:2; padding:8px">true</td>
<td style="border-style:solid; border-width:2; padding:8px">Determines if the teleport places the target on a block.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">max_range</td>
<td style="border-style:solid; border-width:2; padding:8px">Vector [a, b, c]</td>
<td style="border-style:solid; border-width:2; padding:8px">[8.0, 8.0, 8.0]</td>
<td style="border-style:solid; border-width:2; padding:8px">Max range the target can teleport relative to the origin destination.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">target</td>
<td style="border-style:solid; border-width:2; padding:8px">Minecraft Filter</td>
<td style="border-style:solid; border-width:2; padding:8px">self</td>
<td style="border-style:solid; border-width:2; padding:8px">The target context to execute against.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">transform_item</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Transforms item into another item.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">transform</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">Name of the item it should transform into</br></td>
</tr>
</table>
</td>
</tr>
</table>
<h2>Code Example</h2>
Event Response Example<br / ><textarea readonly="true" cols="61" rows="22">
"minecraft:block": {
"description": {
"identifier": "test:on_interact_change_state_block",
"properties": {
"custom:direction": [0, 1, 2, 3]
}
},
"components": {
"minecraft:on_interact": {
"event": "test_event"
}
},
"events": {
"test_event": {
"set_block_state": {
"custom:direction": "1"
}
}
}
}
</textarea> </br>
<a href="#Index">Back to top</a><br><br>
<h1><p id="Block Trigger Components">Block Trigger Components</p></h1>
<h2></h2>
<table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:3;">
<tr> <th style="border-style:solid; border-width:3;">Name</th> <th style="border-style:solid; border-width:3;">Type</th> <th style="border-style:solid; border-width:3;">Default Value</th> <th style="border-style:solid; border-width:3;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:on_fall_on</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Describes event for this block.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">condition</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The condition of event to be executed on the block.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">event</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The event executed on the block.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">min_fall_distance</td>
<td style="border-style:solid; border-width:2; padding:8px">Decimal</td>
<td style="border-style:solid; border-width:2; padding:8px">0.0</td>
<td style="border-style:solid; border-width:2; padding:8px">The minimum distance in blocks that an actor needs to fall to trigger this event.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">target</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px">self</td>
<td style="border-style:solid; border-width:2; padding:8px">The target of event executed on the block.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:on_interact</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Describes event for this block.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">condition</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The condition of event to be executed on the block.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">event</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The event executed on the block.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">target</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px">self</td>
<td style="border-style:solid; border-width:2; padding:8px">The target of event executed on the block.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:on_placed</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Describes event for this block.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">condition</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The condition of event to be executed on the block.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">event</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The event executed on the block.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">target</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px">self</td>
<td style="border-style:solid; border-width:2; padding:8px">The target of event executed on the block.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:on_player_destroyed</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Describes event for this block.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">condition</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The condition of event to be executed on the block.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">event</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The event executed on the block.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">target</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px">self</td>
<td style="border-style:solid; border-width:2; padding:8px">The target of event executed on the block.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:on_player_placing</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Describes event for this block.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">condition</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The condition of event to be executed on the block.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">event</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The event executed on the block.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">target</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px">self</td>
<td style="border-style:solid; border-width:2; padding:8px">The target of event executed on the block.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:on_step_off</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Describes event for this block.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">condition</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The condition of event to be executed on the block.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">event</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The event executed on the block.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">target</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px">self</td>
<td style="border-style:solid; border-width:2; padding:8px">The target of event executed on the block.</br></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="border-style:solid; border-width:3; padding:7px">minecraft:on_step_on</td>
<td style="border-style:solid; border-width:3; padding:7px">JSON Object</td>
<td style="border-style:solid; border-width:3; padding:7px"></td>
<td style="border-style:solid; border-width:3; padding:7px">Describes event for this block.</br><table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:2;">
<tr> <th style="border-style:solid; border-width:2;">Name</th> <th style="border-style:solid; border-width:2;">Type</th> <th style="border-style:solid; border-width:2;">Default Value</th> <th style="border-style:solid; border-width:2;">Description</th> </tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">condition</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The condition of event to be executed on the block.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">event</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px"></td>
<td style="border-style:solid; border-width:2; padding:8px">The event executed on the block.</br></td>
</tr>
<tr>
<td style="border-style:solid; border-width:2; padding:8px">target</td>
<td style="border-style:solid; border-width:2; padding:8px">String</td>
<td style="border-style:solid; border-width:2; padding:8px">self</td>
<td style="border-style:solid; border-width:2; padding:8px">The target of event executed on the block.</br></td>
</tr>
</table>
</td>
</tr>
</table>
<a href="#Index">Back to top</a><br><br>
<br><br>