crmod-api
Version:
A dynamic mod/asset generator for Cosmic Reach
56 lines • 31.6 kB
HTML
<html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>BlockAction | crmod-api</title><meta name="description" content="Documentation for crmod-api"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">crmod-api</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">crmod-api</a></li><li><a href="BlockAction.html">BlockAction</a></li></ul><h1>Class BlockAction</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Defines a block action that can be performed in a <a href="TriggerSheet.html" class="tsd-kind-class">TriggerSheet</a>.</p>
<p> BlockAction</p>
</div><div class="tsd-comment tsd-typography"></div></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/arlojay/cosmic-reach-modding-api/blob/bf2f84f/api/blockAction.js#L9">api/blockAction.js:9</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="BlockAction.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="BlockAction.html#parameters" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>parameters</span></a>
<a href="BlockAction.html#type" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>type</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="BlockAction.html#clone" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>clone</span></a>
<a href="BlockAction.html#serialize" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>serialize</span></a>
<a href="BlockAction.html#explode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>explode</span></a>
<a href="BlockAction.html#playSound2d" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>play<wbr/>Sound2d</span></a>
<a href="BlockAction.html#replaceBlock" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>replace<wbr/>Block</span></a>
<a href="BlockAction.html#runTrigger" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>run<wbr/>Trigger</span></a>
<a href="BlockAction.html#setBlockStateParams" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Block<wbr/>State<wbr/>Params</span></a>
</div></section></div></details></section></section><section class="tsd-panel-group tsd-member-group"><h2>Constructors</h2><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_BlockAction" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Block<wbr/>Action</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">type</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BlockAction.html" class="tsd-signature-type tsd-kind-class">BlockAction</a><a href="#constructor.new_BlockAction" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes a new BlockAction.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">type</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="BlockAction.html" class="tsd-signature-type tsd-kind-class">BlockAction</a></h4><div class="tsd-comment tsd-typography"><h4>Memberof</h4><p>BlockAction</p>
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/arlojay/cosmic-reach-modding-api/blob/bf2f84f/api/blockAction.js#L133">api/blockAction.js:133</a></li></ul></aside></li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Properties</h2><section class="tsd-panel tsd-member"><a id="parameters" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>parameters</span><a href="#parameters" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">parameters</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div><div class="tsd-comment tsd-typography"><p>The parameters for this block action.</p>
</div><div class="tsd-comment tsd-typography"><h4>Memberof</h4><p>BlockAction</p>
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/arlojay/cosmic-reach-modding-api/blob/bf2f84f/api/blockAction.js#L126">api/blockAction.js:126</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="type" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>type</span><a href="#type" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">type</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>The type of this block action in the game.</p>
</div><div class="tsd-comment tsd-typography"><h4>Memberof</h4><p>BlockAction</p>
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/arlojay/cosmic-reach-modding-api/blob/bf2f84f/api/blockAction.js#L118">api/blockAction.js:118</a></li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group"><h2>Methods</h2><section class="tsd-panel tsd-member"><a id="clone" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>clone</span><a href="#clone" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="clone.clone-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">clone</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BlockAction.html" class="tsd-signature-type tsd-kind-class">BlockAction</a><a href="#clone.clone-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Clones the block action into a new instance.</p>
</div><h4 class="tsd-returns-title">Returns <a href="BlockAction.html" class="tsd-signature-type tsd-kind-class">BlockAction</a></h4><p>A new instance of the current block action.</p>
<div class="tsd-comment tsd-typography"><h4>Memberof</h4><p>BlockAction</p>
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/arlojay/cosmic-reach-modding-api/blob/bf2f84f/api/blockAction.js#L158">api/blockAction.js:158</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="serialize" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>serialize</span><a href="#serialize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="serialize.serialize-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">serialize</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><a href="#serialize.serialize-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Serializes the block action into a JSON object.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4><p>The serialized block action as a JSON object.</p>
<div class="tsd-comment tsd-typography"><h4>Memberof</h4><p>BlockAction</p>
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/arlojay/cosmic-reach-modding-api/blob/bf2f84f/api/blockAction.js#L144">api/blockAction.js:144</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="explode" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>explode</span><a href="#explode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="explode.explode-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">explode</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">x</span>, <span class="tsd-kind-parameter">y</span>, <span class="tsd-kind-parameter">z</span>, <span class="tsd-kind-parameter">block</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BlockAction.html" class="tsd-signature-type tsd-kind-class">BlockAction</a><a href="#explode.explode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates an explosion at the specified offset from the affected block.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">x</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The x offset.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">y</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The y offset.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">z</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The z offset.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">block</span>: <a href="Block.html" class="tsd-signature-type tsd-kind-class">Block</a></span><div class="tsd-comment tsd-typography"><p>The block to be used to replace all blocks affected by the explosion.</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="BlockAction.html" class="tsd-signature-type tsd-kind-class">BlockAction</a></h4><div class="tsd-comment tsd-typography"><h4>Static</h4><h4>Memberof</h4><p>BlockAction</p>
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/arlojay/cosmic-reach-modding-api/blob/bf2f84f/api/blockAction.js#L41">api/blockAction.js:41</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="playSound2d" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>play<wbr/>Sound2d</span><a href="#playSound2d" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="playSound2d.playSound2d-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">play<wbr/>Sound2d</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sound</span>, <span class="tsd-kind-parameter">volume</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">pitch</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">pan</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BlockAction.html" class="tsd-signature-type tsd-kind-class">BlockAction</a><a href="#playSound2d.playSound2d-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Plays a sound globally.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">sound</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The sound to play.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">volume</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 1</span></span><div class="tsd-comment tsd-typography"><p>The volume of the sound.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pitch</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 1</span></span><div class="tsd-comment tsd-typography"><p>The pitch of the sound.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pan</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></span><div class="tsd-comment tsd-typography"><p>The pan of the sound.</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="BlockAction.html" class="tsd-signature-type tsd-kind-class">BlockAction</a></h4><div class="tsd-comment tsd-typography"><h4>Static</h4><h4>Memberof</h4><p>BlockAction</p>
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/arlojay/cosmic-reach-modding-api/blob/bf2f84f/api/blockAction.js#L103">api/blockAction.js:103</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="replaceBlock" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>replace<wbr/>Block</span><a href="#replaceBlock" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="replaceBlock.replaceBlock-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">replace<wbr/>Block</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">x</span>, <span class="tsd-kind-parameter">y</span>, <span class="tsd-kind-parameter">z</span>, <span class="tsd-kind-parameter">block</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BlockAction.html" class="tsd-signature-type tsd-kind-class">BlockAction</a><a href="#replaceBlock.replaceBlock-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Replaces a block at the specified offset from the affected block with the specified block state.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">x</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The x offset.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">y</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The y offset.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">z</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The z offset.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">block</span>: <a href="Block.html" class="tsd-signature-type tsd-kind-class">Block</a></span><div class="tsd-comment tsd-typography"><p>The block to replace the existing block with.</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="BlockAction.html" class="tsd-signature-type tsd-kind-class">BlockAction</a></h4><div class="tsd-comment tsd-typography"><h4>Static</h4><h4>Memberof</h4><p>BlockAction</p>
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/arlojay/cosmic-reach-modding-api/blob/bf2f84f/api/blockAction.js#L21">api/blockAction.js:21</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="runTrigger" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>run<wbr/>Trigger</span><a href="#runTrigger" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="runTrigger.runTrigger-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">run<wbr/>Trigger</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">x</span>, <span class="tsd-kind-parameter">y</span>, <span class="tsd-kind-parameter">z</span>, <span class="tsd-kind-parameter">trigger</span>, <span class="tsd-kind-parameter">tickDelay</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BlockAction.html" class="tsd-signature-type tsd-kind-class">BlockAction</a><a href="#runTrigger.runTrigger-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Runs a trigger at the specified offset from the affected block.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">x</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The x offset.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">y</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The y offset.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">z</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The z offset.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">trigger</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The trigger to run.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">tickDelay</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></span><div class="tsd-comment tsd-typography"><p>The number of ticks to delay the trigger.</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="BlockAction.html" class="tsd-signature-type tsd-kind-class">BlockAction</a></h4><div class="tsd-comment tsd-typography"><h4>Static</h4><h4>Memberof</h4><p>BlockAction</p>
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/arlojay/cosmic-reach-modding-api/blob/bf2f84f/api/blockAction.js#L82">api/blockAction.js:82</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="setBlockStateParams" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>set<wbr/>Block<wbr/>State<wbr/>Params</span><a href="#setBlockStateParams" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="setBlockStateParams.setBlockStateParams-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Block<wbr/>State<wbr/>Params</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">x</span>, <span class="tsd-kind-parameter">y</span>, <span class="tsd-kind-parameter">z</span>, <span class="tsd-kind-parameter">params</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BlockAction.html" class="tsd-signature-type tsd-kind-class">BlockAction</a><a href="#setBlockStateParams.setBlockStateParams-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Sets the block state parameters at the specified offset from the affected block.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">x</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The x offset.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">y</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The y offset.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">z</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The z offset.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">params</span>: <span class="tsd-signature-type">any</span></span><div class="tsd-comment tsd-typography"><p>The block state parameters to be used.</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="BlockAction.html" class="tsd-signature-type tsd-kind-class">BlockAction</a></h4><div class="tsd-comment tsd-typography"><h4>Static</h4><h4>Memberof</h4><p>BlockAction</p>
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/arlojay/cosmic-reach-modding-api/blob/bf2f84f/api/blockAction.js#L61">api/blockAction.js:61</a></li></ul></aside></li></ul></section></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a><a href="#parameters" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>parameters</span></a><a href="#type" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>type</span></a><a href="#clone" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>clone</span></a><a href="#serialize" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>serialize</span></a><a href="#explode" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>explode</span></a><a href="#playSound2d" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>play<wbr/>Sound2d</span></a><a href="#replaceBlock" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>replace<wbr/>Block</span></a><a href="#runTrigger" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>run<wbr/>Trigger</span></a><a href="#setBlockStateParams" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Block<wbr/>State<wbr/>Params</span></a></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>crmod-api</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><div class="tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div></body></html>