Script API - v1.19.70
    Preparing search index...

    Contains the combination of type BlockType and properties (also sometimes called block state) which describe a block (but does not belong to a specific Block). This type was introduced as of version 1.17.10.21.

    Index

    Constructors

    Properties

    type: BlockType

    The BlockType that the permutation has.

    Methods

    • Beta

      Returns Record<string, string | number | boolean>

      Returns the list of all of the properties that the permutation has.

      Returns all available properties associated with this block.

    • Beta

      Parameters

      • propertyName: string

      Returns undefined | string | number | boolean

      Returns the property if the permutation has it, else null.

      Gets a property for the permutation.

    • Beta

      Returns string[]

      Creates a copy of the permutation.

    • Beta

      Parameters

      • tag: string

      Returns boolean

      Returns true if the permutation has the tag, else false.

      Checks to see if the permutation has a specific tag.

      import { world } from "@minecraft/server";

      // Fetch the block
      const block = world.getDimension("overworld").getBlock({ x: 1, y: 2, z: 3 });
      const blockPerm = block.getPermutation();

      console.log(`Block is dirt: ${blockPerm.hasTag("dirt")}`);
      console.log(`Block is wood: ${blockPerm.hasTag("wood")}`);
      console.log(`Block is stone: ${blockPerm.hasTag("stone")}`);
    • Beta

      Parameters

      • blockName: string
      • Optionalproperties: Record<string, string | number | boolean>

      Returns boolean

    • Beta

      Parameters

      • name: string
      • value: string | number | boolean

      Returns BlockPermutation

    • Beta

      Parameters

      • blockName: string
      • Optionalproperties: Record<string, string | number | boolean>

      Returns BlockPermutation