"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
Object.defineProperty(exports, "__esModule", { value: true });
const Block_1 = require("./Block");
class BlockCubeLine {
    _cube;
    _plane;
    _y;
    get cube() {
        return this._cube;
    }
    get y() {
        return this._y;
    }
    get x() {
        return this._plane.x;
    }
    get plane() {
        return this._plane;
    }
    blocks;
    constructor(cube, plane, y) {
        this.blocks = [];
        this._cube = cube;
        this._plane = plane;
        this._y = y;
    }
    z(z) {
        if (z > this._cube.maxZ) {
            throw new Error("Value exceeds maximum Z");
        }
        while (z >= this.blocks.length) {
            const block = new Block_1.default(undefined);
            block.line = this;
            block.z = this.blocks.length;
            this.blocks[this.blocks.length] = block;
        }
        return this.blocks[z];
    }
}
exports.default = BlockCubeLine;

//# sourceMappingURL=../maps/minecraft/BlockCubeLine.js.map
