🏷️ Properties

Please note that, regardless of the type of property, you must configure a default value within a reasonable range for each one.

Custom Property

boolean

A property of type boolean can only have two possible values: true or false.

properties:
  happy:
    type: boolean
    default: false

int

A property of type int can take any integer value within the specified range.

properties:
  mode:
    type: int
    default: 1
    range: 1~3

string

A property of type string can only take values from a predefined set of options.

properties:
  color:
    type: string
    default: red
    values:
      - read
      - green
      - blue

Hard-coded Property

Please note that the property name must be the same as the examples to take effect

facing

The facing values ​​are east, south, west, north, up, down. When a block has this hardcoded property, its placement orientation will automatically adapt.

properties:
  facing:
    type: 4-direction # 6-direction
    default: north

waterlogged

waterlogged determines whether this block can contain water.

Please note: When using this state, you must ensure that the corresponding visual block also contains water, otherwise the client cannot render the water.

properties:
  waterlogged:
    type: boolean
    default: false

axis

Axis determines whether the blocks are placed along the axis, such as pillar and log. The axis can only be x, y, z

properties:
  axis:
    type: axis
    default: y

Last updated