import { PolusBuffer } from "../../../util/polusBuffer" ; import { PacketHandler } from "../../packet" ; import { GameDataPacketType } from "../gameData" ; export interface SceneChangePacket { type : GameDataPacketType . SceneChange ; ClientID : number ; Scene : string ; } export const SceneChange = { parse ( packet ) { return { type : GameDataPacketType . SceneChange , ClientID : packet . readVarInt ( ) , Scene : packet . readString ( ) , } ; } , serialize ( packet ) { var buf = new PolusBuffer ( ) ; buf . writeVarInt ( packet . ClientID ) ; buf . writeString ( packet . Scene ) ; return buf ; } , } ;