UNPKG

yoni-mcscripts-lib

Version:

为 Minecraft Script API 中的部分接口创建了 wrapper,并提供简单的事件管理器和任务管理器,另附有一些便于代码编写的一些小工具。

12 lines (11 loc) 364 B
import { LegacyEvent as Event } from "../../legacy_event.js"; import { EntityUtils as EntityBase } from "../../index.js"; export class EntityEvent extends Event { entity; entityType; constructor(entity, ...args) { super(...args); this.entity = EntityBase.getYoniEntity(entity); this.entityType = this.entity.entityType; } }