Add relative side and direction nullable codecs
This commit is contained in:
parent
77443ee801
commit
e9a0983ab2
@ -39,6 +39,8 @@ object StreamCodecs {
|
||||
val BLOCK_TYPE = MatteryStreamCodec.Of(FriendlyByteBuf::writeBlockType, FriendlyByteBuf::readBlockType)
|
||||
val RELATIVE_SIDE = MatteryStreamCodec.Enum<FriendlyByteBuf, RelativeSide>(RelativeSide::class.java)
|
||||
val DIRECTION = MatteryStreamCodec.Enum<FriendlyByteBuf, Direction>(Direction::class.java)
|
||||
val RELATIVE_SIDE_NULLABLE = RELATIVE_SIDE.nullable()
|
||||
val DIRECTION_NULLABLE = DIRECTION.nullable()
|
||||
|
||||
val RGBA: MatteryStreamCodec<ByteBuf, RGBAColor> = StreamCodec.of<ByteBuf, RGBAColor>(
|
||||
{ s, v -> s.writeFloat(v.red); s.writeFloat(v.green); s.writeFloat(v.blue); s.writeFloat(v.alpha) },
|
||||
|
Loading…
Reference in New Issue
Block a user