@minecraft/creator-tools
Version:
Minecraft Creator Tools command line and libraries.
33 lines (32 loc) • 1.74 kB
TypeScript
import IManagedComponentSetItem from "./IManagedComponentSetItem";
import IComponent from "./IComponent";
import ComponentProperty from "./ComponentProperty";
import NbtBinaryTag from "./NbtBinaryTag";
import IManagedComponent from "./IManagedComponent";
export default class ComponentizedBase implements IManagedComponentSetItem {
private _components;
private _managedComponents;
private _componentProperties;
private _onComponentAdded;
private _onComponentRemoved;
private _onComponentChanged;
get onComponentAdded(): import("ste-events").IEvent<ComponentizedBase, IManagedComponent>;
get onComponentRemoved(): import("ste-events").IEvent<ComponentizedBase, string>;
get onComponentChanged(): import("ste-events").IEvent<ComponentizedBase, IManagedComponent>;
id: string;
constructor();
getComponent(id: string): IManagedComponent;
notifyComponentUpdated(id: string): void;
getAllComponents(): IManagedComponent[];
getComponents(): IManagedComponent[];
ensureDataComponent(id: string, component: IComponent | string | number): IComponent | string | string[] | boolean | number[] | number | undefined;
ensureComponent(id: string, component: IManagedComponent): IManagedComponent;
addComponent(id: string, component: IManagedComponent): IManagedComponent;
removeComponent(id: string): void;
getComponentProperty(name: string): ComponentProperty;
ensureComponentProperty(name: string): ComponentProperty;
addComponentProperty(name: string): ComponentProperty;
notifyComponentPropertyChanged(property: ComponentProperty): void;
loadAttributeComponentsFromNbtTag(attributesTag: NbtBinaryTag): void;
_ensureComponentsInitialized(): void;
}