@minecraft/creator-tools
Version:
Minecraft Creator Tools command line and libraries.
41 lines (39 loc) • 1.03 kB
JavaScript
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
Object.defineProperty(exports, "__esModule", { value: true });
const Block_1 = require("./Block");
class BlockCubeLine {
get cube() {
return this._cube;
}
get y() {
return this._y;
}
get x() {
return this._plane.x;
}
get plane() {
return this._plane;
}
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