JSM Developer API Documentation
    Preparing search index...

    Interface Block

    A Block is a registered PreBlock that has a namespace attached to it. Only use this to mutate the level.

    API functions will return different refrences for the same block. You must check the namespace and identifier instead of the actual object itself.

    interface Block {
        identifier: string;
        name: string;
        namespace: string;
        texture: PixelArray;
    }
    Index

    Properties

    identifier: string

    The identifier of the block.

    The identifier must only have lowercase letters and underscores.

    name: string

    The human-readable name of the block.

    This is the name that will be shown to users.

    namespace: string

    The namespace of the mod the block belongs to.

    This is automatically filled in by the game.

    texture: PixelArray

    The block's texture on all sides. This field is unavailable from blocks retrieved from BuiltinBlocks.

    This texture must be 16 by 16 pixels.