@minecraft/creator-tools
Version:
Minecraft Creator Tools command line and libraries.
21 lines (20 loc) • 946 B
TypeScript
import { NbtTagType } from "./NbtBinaryTag";
import { BlockPropertyType } from "./IBlockTypePropertyData";
import Block from "./Block";
import IProperty from "../dataform/IProperty";
export default class BlockProperty implements IProperty {
private _value?;
private _nbtType;
id: string | undefined;
private _block;
constructor(block: Block);
static getBlockPropertyTypeByName(name: string): BlockPropertyType.int | BlockPropertyType.stringEnum;
get type(): BlockPropertyType.int | BlockPropertyType.boolean | BlockPropertyType.string;
get nbtType(): NbtTagType;
set nbtType(newType: NbtTagType);
get value(): string | number | number[] | bigint | bigint[] | boolean | undefined;
asBoolean(defaultVal: boolean): boolean;
asString(defaultVal: string): string;
asNumber(defaultVal: number): number;
set value(newValue: string | number | number[] | bigint | bigint[] | boolean | undefined);
}