@minecraft/creator-tools
Version:
Minecraft Creator Tools command line and libraries.
51 lines (50 loc) • 1.57 kB
JavaScript
"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 BlockActor_1 = __importDefault(require("./BlockActor"));
class SignBlockActor extends BlockActor_1.default {
textIgnoreLegacyBugResolved;
ignoreLighting;
persistFormatting;
signTextColor;
text;
textOwner;
load() {
if (!this.rootTag) {
return;
}
let tag = this.rootTag.find("IgnoreLighting");
if (tag) {
this.ignoreLighting = tag.valueAsBoolean;
}
tag = this.rootTag.find("PersistFormatting");
if (tag) {
this.persistFormatting = tag.valueAsBoolean;
}
tag = this.rootTag.find("SignTextColor");
if (tag) {
this.signTextColor = tag.valueAsInt;
}
tag = this.rootTag.find("Text");
if (tag) {
this.text = tag.valueAsString;
}
tag = this.rootTag.find("TextOwner");
if (tag) {
this.textOwner = tag.valueAsString;
}
tag = this.rootTag.find("TextIgnoreLegacyBugResolved");
if (tag) {
this.textIgnoreLegacyBugResolved = tag.valueAsBoolean;
}
tag = this.rootTag.find("IsMovable");
if (tag) {
this.isMovable = tag.valueAsBoolean;
}
}
}
exports.default = SignBlockActor;