Exemplo n.º 1
0
        public override void Read(PrimitiveReader reader)
        {
            Location = reader.ReadBlockPosProto();
            var facing = reader.ReadVarint();

            Facing = Facing.GetFromValue((byte)facing);
            if (Facing == null)
            {
                throw new InvalidPacketException(nameof(Facing), facing);
            }
            Hand = (Hand)reader.ReadVarint();
            if (!Hand.IsValid())
            {
                throw new InvalidPacketException(nameof(Hand), Hand);
            }
            CursorPosX = reader.ReadFloat();
            CursorPosY = reader.ReadFloat();
            CursorPosZ = reader.ReadFloat();
        }