UNPKG

@minecraft/creator-tools

Version:

Minecraft Creator Tools command line and libraries.

33 lines (32 loc) 936 B
"use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const BlockVolumeLine_1 = __importDefault(require("./BlockVolumeLine")); class BlockVolumePlane { _cube; _x; lines; get x() { return this._x; } constructor(cube, x) { this.lines = []; this._cube = cube; this._x = x; } y(y) { if (y > this._cube.maxY) { throw new Error("Value exceeds maximum Y"); } while (y >= this.lines.length) { const newY = this.lines.length; this.lines[newY] = new BlockVolumeLine_1.default(this._cube, this, newY); } return this.lines[y]; } } exports.default = BlockVolumePlane;