BlockEntity: {
    type: "compound";
    value: {
        CustomName?: { type: "string"; value: string };
        id: { type: "string"; value: string };
        isMovable: { type: "byte"; value: 0 | 1 };
        x: { type: "int"; value: number };
        y: { type: "int"; value: number };
        z: { type: "int"; value: number };
    };
}

The BlockEntity schema.

All block entities share this base.

Type declaration

  • type: "compound"
  • value: {
        CustomName?: { type: "string"; value: string };
        id: { type: "string"; value: string };
        isMovable: { type: "byte"; value: 0 | 1 };
        x: { type: "int"; value: number };
        y: { type: "int"; value: number };
        z: { type: "int"; value: number };
    }
    • OptionalCustomName?: { type: "string"; value: string }

      (May not exist) The custom name of the block entity.

    • id: { type: "string"; value: string }

      The savegame ID of the block entity.

    • isMovable: { type: "byte"; value: 0 | 1 }

      1 or 0 (true/false) - true if the block entity is movable with a piston.

      0 | 1

      • 0: false
      • 1: true
    • x: { type: "int"; value: number }

      X coordinate of the block entity.

    • y: { type: "int"; value: number }

      Y coordinate of the block entity.

    • z: { type: "int"; value: number }

      Z coordinate of the block entity.