# Block Pack

<table><thead><tr><th>Name</th><th width="338">Description</th><th width="102">Required</th><th>Type</th><th>Default</th></tr></thead><tbody><tr><td>name</td><td>Name to refer to this block by in code</td><td>Yes</td><td>String</td><td></td></tr><tr><td>display</td><td>Display name of the block seen in player's inventory</td><td>No</td><td>String</td><td></td></tr><tr><td>meta</td><td>Metadata created by React frontend (not documented)</td><td>No</td><td>Object</td><td></td></tr><tr><td>mesh</td><td>defMesh options for creating a prop block type. Takes precedence over faces array. The mesh must have a geometry attached. The geometry is used as the prop rather than the Object3D and its children.</td><td>No</td><td>Object</td><td></td></tr><tr><td>faces</td><td>Data that describes the color/texture of each of this block's faces. The array can either have 6 elements (1 for each side in the order SNX, SPX, SNY, SPY, SNZ, SPZ) or 1 element that applies to the entire block</td><td>No</td><td>Array</td><td></td></tr><tr><td>faces::color</td><td>The solid color to paint the block. If you want this block's color to be entirely derived from its texture, set this to "white" because the solid color and texture colors are always multiplied together.</td><td>No</td><td>Color</td><td>"white"</td></tr><tr><td>faces::texture</td><td>Object describing the image to paint on the block</td><td>No</td><td>Object</td><td></td></tr><tr><td>faces::texture::asste</td><td>sset name. The alpha (transparency) channel is ignored.</td><td>Yes</td><td>String</td><td></td></tr><tr><td>faces::texture::pos</td><td>The coordinates of the actual texture within the asset file. This allows putting multiple textures in the same file (called a texture atlas), decreasing download time. Note that the origin (0, 0) is the top left corner.</td><td>No</td><td>Box2</td><td>entire image</td></tr><tr><td>rotate*</td><td>Whether or not to rotate the paint and texture based on what direction the block was built from. For example grass would be false, because the top is always green, but wood is true, to have the lighter colored inside of the tree rotated to face whichever block side was originally selected.</td><td>No</td><td>Boolean</td><td>false</td></tr><tr><td>lights*</td><td>Array of defLight options</td><td>No</td><td>Object</td><td></td></tr><tr><td>health*</td><td>Default amount of health this block has. The percentage of remaining health determines how cracked the block appears. Health can be depleted either through coding or impact (if enabled).</td><td>No</td><td>Number</td><td>1</td></tr><tr><td>maxImpact</td><td>Maximum magnitude of impulse this block can sustain from an impact before becoming unsnapped. -1 for infinity (takes no impact damage)</td><td>No</td><td>Number</td><td>2000</td></tr><tr><td>gravity</td><td><p></p><p>Enum describing the effect of planet's gravity on this type of block</p><ul><li><pre><code>    "disabled" - Block is unaffected by gravity
</code></pre></li><li><pre><code>    "single" - The block will fall in the direction of gravity if it is not supported underneath by a gravity disabled or chain block
</code></pre></li><li><pre><code>    "chain" - This block and any other gravity chain blocks attached to this block will fall as one big bobby object in the direction of gravity if they are not attached to at least one gravity disabled block. Any gravity single blocks supported by the chain will also fall individually
</code></pre></li></ul></td><td>No</td><td>String</td><td>"disabled"</td></tr><tr><td>gravitySnap</td><td>Whether to allow this block to snap back to the grid if it has become unsnapped. Does not apply to RBChunks consisting of multiple blocks</td><td>No</td><td>Boolean</td><td>false</td></tr><tr><td>unsnapAnimation</td><td><p>Enum describing the physics animation that plays when the unsnaps from the grid. This will always be "ragdoll" for blocks that have gravity enabled</p><ul><li><pre><code>    "disabled" - Block instantly vanishes
</code></pre></li><li><pre><code>    "ragdoll" - Block turns into a rigid body
</code></pre></li></ul><p>n* "crumble" - In addition to ragdoll, the block also crumbles into smaller pieces n* "smithereens" - A poof of dust/smoke is all that remains</p></td><td>No</td><td>String</td><td>"ragdoll"</td></tr><tr><td>material</td><td>These will only affect rigid bodies. Players, AI, and vehicles' wheels are not rigid bodies. https://gameworksdocs.nvidia.com/PhysX/4.1/documentation/physxguide/Manual/RigidBodyDynamics.html#friction-and-restitution</td><td>No</td><td>Object</td><td></td></tr><tr><td>material::staticFriction</td><td></td><td>No</td><td>Number</td><td>0.5</td></tr><tr><td>material::dynamicFriction</td><td></td><td>No</td><td>Number</td><td>0.5</td></tr><tr><td>material::restitution</td><td>AKA bounciness. 0 for no bounce, 1 for bouncing back to original height</td><td>No</td><td>Number</td><td>0</td></tr><tr><td>interactLabel</td><td>Whether or not to automatically add an "interact" label to every block of this type. This is needed because the server is unaware of whether or not the block has client-sided interact events on it.</td><td>No</td><td>Boolean</td><td>false</td></tr><tr><td>sound</td><td>Dictionary of defSound objects for different events</td><td>No</td><td>Object</td><td></td></tr><tr><td>sound::build</td><td></td><td>No</td><td>Object</td><td>[build sound from snd-default]</td></tr><tr><td>sound::break</td><td></td><td>No</td><td>Object</td><td>[break sound from snd-default]</td></tr><tr><td>sound::footstep</td><td></td><td>No</td><td>Object</td><td>footstep sound from snd-default</td></tr><tr><td>impact*</td><td></td><td>No</td><td>Object</td><td></td></tr></tbody></table>

```
/**
 * You may register up to 65536 (2^16) block types
 * 
 * Options for Mod are passed in here as well
 * OPT Array blocks - List of block type objects included in this block pack
 *     REQ String name - Name to refer to this block by in code
 *     REQ String display - Name to refer to this block by in game
 *     OPT Object meta - Metadata created by React frontend (not documented)
 *     OPT Object mesh - defMesh options for creating a prop block type. Takes precedence over faces array. The mesh must have a geometry attached. The geometry is used as the prop rather than the Object3D and its children.
 *     OPT Array faces - Data that describes the color/texture of each of this block's faces. The array can either have 6 elements (1 for each side in the order SNX, SPX, SNY, SPY, SNZ, SPZ) or 1 element that applies to the entire block
 *         OPT Color color ["white"] - The solid color to paint the block. If you want this block's color to be entirely derived from its texture, set this to "white" because the solid color and texture colors are always multiplied together.
 *         OPT Object texture - Object describing the image to paint on the block
 *             REQ String asset - Asset name. The alpha (transparency) channel is ignored.
 *             OPT Box2 pos [entire image] - The coordinates of the actual texture within the asset file. This allows putting multiple textures in the same file (called a texture atlas), decreasing download time. Note that the origin (0, 0) is the top left corner.
n*     OPT Boolean rotate [false] - Whether or not to rotate the paint and texture based on what direction the block was built from. For example grass would be false, because the top is always green, but wood is true, to have the lighter colored inside of the tree rotated to face whichever block side was originally selected.
n*     OPT Object lights - Array of defLight options
n*     OPT Number health [1] - Default amount of health this block has. The percentage of remaining health determines how cracked the block appears. Health can be depleted either through coding or impact (if enabled).
 *     OPT Number maxImpact [2000] - Maximum magnitude of impulse this block can sustain from an impact before becoming unsnapped. -1 for infinity (takes no impact damage)
 *     OPT String gravity ["disabled"] - Enum describing the effect of planet's gravity on this type of block
 *         "disabled" - Block is unaffected by gravity
 *         "single" - The block will fall in the direction of gravity if it is not supported underneath by a gravity disabled or chain block
 *         "chain" - This block and any other gravity chain blocks attached to this block will fall as one big bobby object in the direction of gravity if they are not attached to at least one gravity disabled block. Any gravity single blocks supported by the chain will also fall individually
 *     OPT Boolean gravitySnap [false] - Whether to allow this block to snap back to the grid if it has become unsnapped. Does not apply to RBChunks consisting of multiple blocks
 *     OPT String unsnapAnimation ["ragdoll"] -  Enum describing the physics animation that plays when the unsnaps from the grid. This will always be "ragdoll" for blocks that have gravity enabled
 *         "disabled" - Block instantly vanishes
 *         "ragdoll" - Block turns into a rigid body
n*         "crumble" - In addition to ragdoll, the block also crumbles into smaller pieces
n*         "smithereens" - A poof of dust/smoke is all that remains
 *     OPT Object material - These will only affect rigid bodies. Players, AI, and vehicles' wheels are not rigid bodies. https://gameworksdocs.nvidia.com/PhysX/4.1/documentation/physxguide/Manual/RigidBodyDynamics.html#friction-and-restitution
 *         OPT Number staticFriction [0.5]
 *         OPT Number dynamicFriction [0.5]
 *         OPT Number restitution [0] - AKA bounciness. 0 for no bounce, 1 for bouncing back to original height
 *     OPT Object sound - Dictionary of defSound objects for different events
 *         OPT Object build [build sound from snd-default]
 *         OPT Object break [break sound from snd-default]
 *         OPT Object footstep [footstep sound from snd-default]
n*         OPT Object impact
 */
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.brownbricks.com/engine-api/defs/defs-array/mod/block-pack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
