How to put a door programmatically?

Hello!

Update: I tried to use Keys.PORTION_TYPE, but it’s not compatible with the door’s block state (both empirically and according to lists of applicable keys by block type).

I tried to use different directions (SOUTH, WEST, EAST, NORTH, NORTHWEST), but it didn’t help.

I also tried to set the direction of the upper half of the door to Direction.DOWN and that of the lower half to Direction.UP, without any change.

Is this functionality implemente in Sponge at all? If not and if I wanted to contribute it, where should I start?

Thanks

Dmitri