@minecraft/creator-tools
Version:
Minecraft Creator Tools command line and libraries.
39 lines (37 loc) • 1.13 kB
JavaScript
;
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
Object.defineProperty(exports, "__esModule", { value: true });
const ComponentizedBase_1 = require("./ComponentizedBase");
const ste_events_1 = require("ste-events");
class ItemStack extends ComponentizedBase_1.default {
constructor() {
super(...arguments);
this._typeId = "";
this.tags = [];
this._onPropertyChanged = new ste_events_1.EventDispatcher();
}
get onPropertyChanged() {
return this._onPropertyChanged.asEvent();
}
get typeId() {
return this._typeId;
}
set typeId(newTypeId) {
this._typeId = newTypeId;
}
getProperty(name) {
return this.getComponentProperty(name);
}
ensureProperty(name) {
return this.addComponentProperty(name);
}
addProperty(name) {
return this.addComponentProperty(name);
}
notifyComponentPropertyChanged(property) {
this._onPropertyChanged.dispatch(this, property);
}
}
exports.default = ItemStack;
//# sourceMappingURL=../maps/minecraft/ItemStack.js.map