public void WriteCommandOriginData(CommandOriginData commandOriginData) { this.WriteUVarInt(commandOriginData.Type); this.WriteUUID(commandOriginData.Uuid); this.WriteString(commandOriginData.RequestId); if (commandOriginData.Type == CommandOriginData.ORIGIN_DEV_CONSOLE || commandOriginData.Type == CommandOriginData.ORIGIN_TEST) { this.WriteVarLong(commandOriginData.VarLong1); } }
public CommandOriginData ReadCommandOriginData() { CommandOriginData commandOriginData = new CommandOriginData(); commandOriginData.Type = this.ReadUVarInt(); commandOriginData.Uuid = this.ReadUUID(); commandOriginData.RequestId = this.ReadString(); if (commandOriginData.Type == CommandOriginData.ORIGIN_DEV_CONSOLE || commandOriginData.Type == CommandOriginData.ORIGIN_TEST) { commandOriginData.Unknown = this.ReadVarLong(); } return(commandOriginData); }