Skip to content
BasaltSoftware
Bedrock 1.26.60

Site colour

Discord
Esc

    ↑↓ moveEnter openEsc close

    Keyboard shortcuts
    Ctrl K
    Search the whole site, from any page
    /
    Jump to the sidebar search, or search the whole site where there isn't one
    Enter
    Open the top search result
    Esc
    Clear the search, or close this panel
    ?
    Show these shortcuts
    Blocks

    BlockPermutation

    A block's type and states, as minecraft:oak_log with pillar_axis: "y".

    Class in @minecraft/server

    A block’s type and states, as minecraft:oak_log with pillar_axis: "y".

    import { BlockPermutation } from '@minecraft/server';

    read-only

    readonly type: { readonly id: string };

    read-only

    readonly typeId: string;

    type.id.

    read-only

    readonly localizationKey: string;

    The block type’s name key in the language files.

    static

    static resolve(blockName: string, states?: Record<string, boolean | number | string>): BlockPermutation;

    A permutation of a block; states left out take its defaults.

    Parameters
    blockName
    string
    statesoptional
    Record<string, boolean | number | string>
    Returns
    BlockPermutation
    getState(stateName: string): boolean | number | string | undefined;
    Parameters
    stateName
    string
    Returns
    boolean | number | string | undefined
    getAllStates(): Record<string, boolean | number | string>;
    Returns
    Record<string, boolean | number | string>
    withState(name: string, value: boolean | number | string): BlockPermutation;

    A copy with one state changed.

    Parameters
    name
    string
    value
    boolean | number | string
    Returns
    BlockPermutation
    matches(blockName: string, states?: Record<string, boolean | number | string>): boolean;

    Whether it’s this block, with these states if given.

    Parameters
    blockName
    string
    statesoptional
    Record<string, boolean | number | string>
    Returns
    boolean
    getItemStack(amount?: number): ItemStack | undefined;

    An item stack of the block.

    Parameters
    amountoptional
    number
    Returns
    ItemStack | undefined
    getTags(): string[];

    The block type’s tags.

    Returns
    string[]
    hasTag(tag: string): boolean;

    Whether it has this block tag.

    Parameters
    tag
    string
    Returns
    boolean
    canContainLiquid(liquidType: LiquidType): boolean;

    Whether the block can hold this liquid.

    Parameters
    liquidType
    LiquidType
    Returns
    boolean
    canBeDestroyedByLiquidSpread(liquidType: LiquidType): boolean;

    Whether spreading liquid would break it.

    Parameters
    liquidType
    LiquidType
    Returns
    boolean
    isLiquidBlocking(liquidType: LiquidType): boolean;

    Whether it stops this liquid.

    Parameters
    liquidType
    LiquidType
    Returns
    boolean
    liquidSpreadCausesSpawn(liquidType: LiquidType): boolean;

    Whether liquid spreading onto it spawns the block’s drop.

    Parameters
    liquidType
    LiquidType
    Returns
    boolean

    Block.permutation, Block.setPermutation, Dimension.setBlockPermutation, Dimension.fillBlocks, BlockExplodeAfterEvent.explodedBlockPermutation, BlockComponentBlockBreakEvent.brokenBlockPermutation, BlockComponentBlockStateChangeEvent.previousPermutation, BlockComponentEntityEvent.blockPermutation, BlockComponentOnPlaceEvent.previousBlock, BlockComponentPlayerBreakEvent.brokenBlockPermutation, BlockComponentPlayerPlaceBeforeEvent.permutationToPlace, EntityBreathableComponent.getBreatheBlocks, EntityBreathableComponent.getNonBreatheBlocks, EntityHitBlockAfterEvent.hitBlockPermutation, ItemComponentMineBlockEvent.minedBlockPermutation, ItemComponentUseOnEvent.usedOnBlockPermutation, LootTableManager.generateLootFromBlockPermutation, PlayerCancelBreakingBlockAfterEvent.blockPermutation, PlayerStartBreakingBlockAfterEvent.blockPermutation, BlockEventOptions.permutations, BlockFilter.excludePermutations, BlockFilter.includePermutations