Interface StructureSectionData

interface StructureSectionData {
    block_indices: {
        type: "list";
        value: {
            type: "list";
            value: [
                blockLayer: { type: "int"; value: number[] },
                waterlogLayer: { type: "int"; value: number[] },
            ];
        };
    };
    palette: {
        type: "list";
        value: {
            type: "compound";
            value: {
                name: { type: "string"; value: string };
                states: {
                    type: "compound";
                    value: { [key: string]: { type: any; value: any } };
                };
                version: { type: "int"; value: number };
            }[];
        };
    };
    size: {
        type: "list";
        value: { type: "int"; value: [number, number, number] };
    };
    type: "compound";
    value: Record<
        string,
        | undefined
        | Byte
        | Short
        | Int
        | Long
        | Float
        | Double
        | String
        | List<TagType>
        | Compound
        | ByteArray
        | ShortArray
        | IntArray
        | LongArray,
    >;
}

Hierarchy (View Summary)

Properties

block_indices: {
    type: "list";
    value: {
        type: "list";
        value: [
            blockLayer: { type: "int"; value: number[] },
            waterlogLayer: { type: "int"; value: number[] },
        ];
    };
}

The block indices.

These are two arrays of indices in the block palette.

The first layer is the block layer.

The second layer is the waterlog layer, even though it is mainly used for waterlogging, other blocks can be put here to, which allows for putting two blocks in the same location, or creating ghost blocks (as blocks in this layer cannot be interacted with, however when the corresponding block in the block layer is broken, this block gets moved to the block layer).

palette: {
    type: "list";
    value: {
        type: "compound";
        value: {
            name: { type: "string"; value: string };
            states: {
                type: "compound";
                value: { [key: string]: { type: any; value: any } };
            };
            version: { type: "int"; value: number };
        }[];
    };
}

The block palette.

size: { type: "list"; value: { type: "int"; value: [number, number, number] } }

The size of the structure, as a tuple of 3 integers.

type: "compound"
value: Record<
    string,
    | undefined
    | Byte
    | Short
    | Int
    | Long
    | Float
    | Double
    | String
    | List<TagType>
    | Compound
    | ByteArray
    | ShortArray
    | IntArray
    | LongArray,
>