コード例 #1
0
 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);
     }
 }
コード例 #2
0
        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);
        }