import {EntityPacket} from '@avocado/entity'; export class DamagePacket extends EntityPacket { static get schema() { const superSchema = super.schema; superSchema.data[0].damages = [ { amount: 'varuint', damageSpec: { affinity: 'uint8', }, from: 'string', isDamage: 'bool', }, ]; return superSchema; } mergeWith(other) { this.data[0].damages.push(...other.data[0].damages); } }