コード例 #1
0
ファイル: SpawnPainting.cs プロジェクト: mctraveler/MineSharp
 protected override void Parse(EndianBinaryReader r)
 {
     EID           = ReadVarInt(r);
     Title         = ReadString8(r);
     Position      = CoordInt.Read(r);
     FaceDirection = (Face)r.ReadByte();
 }
コード例 #2
0
        protected override void Parse(EndianBinaryReader r)
        {
            Pos    = CoordInt.Read(r);
            Action = (Actions)r.ReadByte();
            Data   = NBT.Tag.ReadTag(r);

            #if DEBUGPACKET
            if (Action == Actions.Unknown2)
            {
                Console.WriteLine(this);
            }
            if (Action == Actions.Unknown3)
            {
                Console.WriteLine(this);
            }
            if (Action == Actions.Unknown4)
            {
                Console.WriteLine(this);
            }

            if (Action.ToString() == ((int)Action).ToString())
            {
                throw new NotImplementedException(Action.ToString());
            }
            #endif
        }
コード例 #3
0
        protected override void Parse(EndianBinaryReader r)
        {
            Pos    = CoordInt.Read(r);
            Action = (Actions)r.ReadByte();
            int length = r.ReadInt16(); //Changes: compressed length

            if (length >= 0)
            {
                Data = r.ReadBytesOrThrow(length);
            }

#if DEBUG
            if (Action == Actions.Unknown2)
            {
                Console.WriteLine(this);
            }
            if (Action == Actions.Unknown3)
            {
                Console.WriteLine(this);
            }
            if (Action == Actions.Unknown4)
            {
                Console.WriteLine(this);
            }

            if (Action.ToString() == ((int)Action).ToString())
            {
                throw new NotImplementedException(Action.ToString());
            }
#endif
        }
コード例 #4
0
 protected override void Parse(EndianBinaryReader r)
 {
     Command = ReadString8(r);
     if (r.ReadBoolean())
     {
         Position = CoordInt.Read(r);
     }
 }
コード例 #5
0
 protected override void Parse(EndianBinaryReader r)
 {
     BlockPosition = CoordInt.Read(r);
     FaceDirection = (Face)r.ReadByte();
     Item          = SlotItem.Read(r);
     CursorX       = r.ReadByte();
     CursorY       = r.ReadByte();
     CursorZ       = r.ReadByte();
 }
コード例 #6
0
ファイル: BlockChange.cs プロジェクト: Comner-git/MineSharp
        protected override void Parse(EndianBinaryReader r)
        {
            Position  = CoordInt.Read(r);
            BlockType = (BlockID)ReadVarInt(r);
            Metadata  = r.ReadByte();
#if DEBUG
            if (BlockType.ToString() == ((int)BlockType).ToString())
            {
                throw new NotImplementedException(BlockType.ToString());
            }
#endif
        }
コード例 #7
0
ファイル: BlockChange.cs プロジェクト: mctraveler/MineSharp
        protected override void Parse(EndianBinaryReader r)
        {
            Position = CoordInt.Read(r);
            int val = ReadVarInt(r);

            BlockType = (BlockID)(val >> 4);
            Metadata  = (byte)(val & 0x0F);
            #if DEBUGPACKET
            if (BlockType.ToString() == ((int)BlockType).ToString())
            {
                throw new NotImplementedException(BlockType.ToString());
            }
            #endif
        }
コード例 #8
0
ファイル: Effect.cs プロジェクト: mctraveler/MineSharp
 protected override void Parse(EndianBinaryReader r)
 {
     EffectID  = (SoundEffects)r.ReadInt32();
     Position  = CoordInt.Read(r);
     SoundData = r.ReadInt32();
     SoundByte = r.ReadByte();
     //Debug.WriteLine(DebugPacket.Read(r));
     #if DEBUGPACKET
     if (EffectID.ToString() == ((int)EffectID).ToString())
     {
         throw new NotImplementedException(EffectID.ToString());
     }
     #endif
 }
コード例 #9
0
        protected override void Parse(EndianBinaryReader r)
        {
            Status   = (StatusEnum)r.ReadByte();
            Position = CoordInt.Read(r);
            Face     = (Face)r.ReadByte();

            #if DEBUGPACKET
            if (Status.ToString() == ((int)Status).ToString())
            {
                throw new NotImplementedException(Status.ToString());
            }
            if (Face.ToString() == ((int)Face).ToString())
            {
                throw new NotImplementedException(Face.ToString());
            }
            #endif
        }
コード例 #10
0
 protected override void Parse(EndianBinaryReader r)
 {
     Position = CoordInt.Read(r);
     try
     {
         Text1 = ChatJson.Parse(ReadString8(r));
         Text2 = ChatJson.Parse(ReadString8(r));
         Text3 = ChatJson.Parse(ReadString8(r));
         Text4 = ChatJson.Parse(ReadString8(r));
     }
     #if !DEBUG
     catch (Exception ex)
     {
         Log.WriteServer(ex);
     }
     #endif
     finally
     {
     }
 }
コード例 #11
0
 protected override void Parse(EndianBinaryReader r)
 {
     Position = CoordInt.Read(r);
 }
コード例 #12
0
 protected override void Parse(EndianBinaryReader r)
 {
     EID          = ReadVarInt(r);
     Position     = CoordInt.Read(r);
     DestroyStage = r.ReadByte();
 }