示例#1
0
        public void Boolean()
        {
            SequenceWriter writer = CreateSequenceWriter();

            writer.WriteBoolean(true);
            writer.WriteBoolean(false);

            SequenceReader reader = new SequenceReader(writer.BuildSequence());

            Assert.True(reader.ReadBoolean());
            Assert.False(reader.ReadBoolean());
        }
示例#2
0
        public override void Read(ref SequenceReader <byte> reader)
        {
            var client = Client as MinecraftClient;

            client.Player.Yaw      = reader.ReadFloat();
            client.Player.Pitch    = reader.ReadFloat();
            client.Player.OnGround = reader.ReadBoolean();
        }
示例#3
0
        public override void Read(ref SequenceReader <byte> reader)
        {
            var client = Client as MinecraftClient;

            client.Player.X        = reader.ReadDouble();
            client.Player.Y        = reader.ReadDouble();
            client.Player.Z        = reader.ReadDouble();
            client.Player.OnGround = reader.ReadBoolean();
        }
示例#4
0
 public override void Read(ref SequenceReader <byte> reader)
 {
     Locale             = reader.ReadString();
     ViewDistance       = reader.ReadByte();
     ChatMode           = reader.ReadVarInt();
     ChatColors         = reader.ReadBoolean();
     DisplayedSkinParts = reader.ReadByte();
     MainHand           = reader.ReadVarInt();
 }