23 lines
365 B
JavaScript
23 lines
365 B
JavaScript
import {Packet} from '@avocado/net';
|
|
|
|
export class EntityPacket extends Packet {
|
|
|
|
constructor(data, entity) {
|
|
if ('undefined' !== typeof entity) {
|
|
data.uuid = entity.numericUid;
|
|
}
|
|
super(data);
|
|
this.entity = entity;
|
|
}
|
|
|
|
static get schema() {
|
|
return {
|
|
...super.schema,
|
|
data: {
|
|
uuid: 'uint32',
|
|
},
|
|
};
|
|
}
|
|
|
|
}
|