StructureTemplate: {
    type: "compound";
    value: {
        format_version: { type: "int"; value: 1 };
        size: {
            type: "list";
            value: { type: "int"; value: [number, number, number] };
        };
        structure: {
            type: "compound";
            value: {
                block_indices: {
                    type: "list";
                    value: {
                        type: "list";
                        value: [
                            { type: "int"; value: number[] },
                            { type: "int"; value: number[] },
                        ];
                    };
                };
                entities: {
                    type: "list";
                    value: { type: "compound"; value: ActorPrefix["value"][] };
                };
                palette: {
                    type: "compound";
                    value: {
                        default: {
                            type: "compound";
                            value: {
                                block_palette: {
                                    type: "list";
                                    value: { type: "compound"; value: (...)[] };
                                };
                                block_position_data: {
                                    type: "compound";
                                    value: { [key: `${(...)}`]: { type: ...; value: ... } };
                                };
                            };
                        };
                    };
                };
            };
        };
        structure_world_origin: {
            type: "list";
            value: { type: "int"; value: [number, number, number] };
        };
    };
}

The StructureTemplate schema.

Type declaration

  • type: "compound"
  • value: {
        format_version: { type: "int"; value: 1 };
        size: {
            type: "list";
            value: { type: "int"; value: [number, number, number] };
        };
        structure: {
            type: "compound";
            value: {
                block_indices: {
                    type: "list";
                    value: {
                        type: "list";
                        value: [
                            { type: "int"; value: number[] },
                            { type: "int"; value: number[] },
                        ];
                    };
                };
                entities: {
                    type: "list";
                    value: { type: "compound"; value: ActorPrefix["value"][] };
                };
                palette: {
                    type: "compound";
                    value: {
                        default: {
                            type: "compound";
                            value: {
                                block_palette: {
                                    type: "list";
                                    value: { type: "compound"; value: (...)[] };
                                };
                                block_position_data: {
                                    type: "compound";
                                    value: { [key: `${(...)}`]: { type: ...; value: ... } };
                                };
                            };
                        };
                    };
                };
            };
        };
        structure_world_origin: {
            type: "list";
            value: { type: "int"; value: [number, number, number] };
        };
    }
    • format_version: { type: "int"; value: 1 }

      The format version of the structure.

      1

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

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

    • structure: {
          type: "compound";
          value: {
              block_indices: {
                  type: "list";
                  value: {
                      type: "list";
                      value: [
                          { type: "int"; value: number[] },
                          { type: "int"; value: number[] },
                      ];
                  };
              };
              entities: {
                  type: "list";
                  value: { type: "compound"; value: ActorPrefix["value"][] };
              };
              palette: {
                  type: "compound";
                  value: {
                      default: {
                          type: "compound";
                          value: {
                              block_palette: {
                                  type: "list";
                                  value: { type: "compound"; value: (...)[] };
                              };
                              block_position_data: {
                                  type: "compound";
                                  value: { [key: `${(...)}`]: { type: ...; value: ... } };
                              };
                          };
                      };
                  };
              };
          };
      }

      The structure data.

      • type: "compound"
      • value: {
            block_indices: {
                type: "list";
                value: {
                    type: "list";
                    value: [
                        { type: "int"; value: number[] },
                        { type: "int"; value: number[] },
                    ];
                };
            };
            entities: {
                type: "list";
                value: { type: "compound"; value: ActorPrefix["value"][] };
            };
            palette: {
                type: "compound";
                value: {
                    default: {
                        type: "compound";
                        value: {
                            block_palette: {
                                type: "list";
                                value: { type: "compound"; value: (...)[] };
                            };
                            block_position_data: {
                                type: "compound";
                                value: { [key: `${(...)}`]: { type: ...; value: ... } };
                            };
                        };
                    };
                };
            };
        }
        • block_indices: {
              type: "list";
              value: {
                  type: "list";
                  value: [
                      { type: "int"; value: number[] },
                      { 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).

        • entities: { type: "list"; value: { type: "compound"; value: ActorPrefix["value"][] } }

          The list of entities in the structure.

        • palette: {
              type: "compound";
              value: {
                  default: {
                      type: "compound";
                      value: {
                          block_palette: {
                              type: "list";
                              value: { type: "compound"; value: (...)[] };
                          };
                          block_position_data: {
                              type: "compound";
                              value: { [key: `${(...)}`]: { type: ...; value: ... } };
                          };
                      };
                  };
              };
          }

          The block palette.

          • type: "compound"
          • value: {
                default: {
                    type: "compound";
                    value: {
                        block_palette: {
                            type: "list";
                            value: { type: "compound"; value: (...)[] };
                        };
                        block_position_data: {
                            type: "compound";
                            value: { [key: `${(...)}`]: { type: ...; value: ... } };
                        };
                    };
                };
            }
            • default: {
                  type: "compound";
                  value: {
                      block_palette: {
                          type: "list";
                          value: { type: "compound"; value: (...)[] };
                      };
                      block_position_data: {
                          type: "compound";
                          value: { [key: `${(...)}`]: { type: ...; value: ... } };
                      };
                  };
              }

              The default block palette.

              • type: "compound"
              • value: {
                    block_palette: {
                        type: "list";
                        value: { type: "compound"; value: (...)[] };
                    };
                    block_position_data: {
                        type: "compound";
                        value: { [key: `${(...)}`]: { type: ...; value: ... } };
                    };
                }
                • block_palette: { type: "list"; value: { type: "compound"; value: (...)[] } }

                  The block palette.

                • block_position_data: { type: "compound"; value: { [key: `${(...)}`]: { type: ...; value: ... } } }

                  The block entity data.

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

      The world origin of the structure, as a tuple of 3 integers.

      This is used for entity and block entity data, to get relative positions.