import { PolusBuffer } from "../../../util/polusBuffer" ; import { PacketHandler } from "../../packet" ; import { GameDataPacketType } from "../gameData" ; export interface DespawnPacket { type : GameDataPacketType . Despawn ; NetID : number ; } export const Despawn = { parse ( buffer ) { return { type : GameDataPacketType . Despawn , NetID : buffer . readVarInt ( ) , } ; } , serialize ( packet ) { var pb = new PolusBuffer ( ) ; pb . writeVarInt ( packet . NetID ) ; return pb ; } , } ;