yoni-mcscripts-lib
Version:
为 Minecraft Script API 中的部分接口创建了 wrapper,并提供简单的事件管理器和任务管理器,另附有一些便于代码编写的一些小工具。
14 lines (12 loc) • 445 B
text/typescript
import { LegacyEvent as Event } from "../../legacy_event.js";
import { EntityUtils as EntityBase } from "../../index.js";
import { EntityValue } from "../../types";
export class EntityEvent extends Event {
readonly entity;
readonly entityType;
constructor(entity: EntityValue, ...args: any[]){
super(...args);
this.entity = EntityBase.getYoniEntity(entity);
this.entityType = this.entity.entityType;
}
}