From e9a0983ab2b8622a6bf77da2a405639ec6fca303 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Fri, 11 Apr 2025 06:54:52 +0700 Subject: [PATCH] Add relative side and direction nullable codecs --- src/main/kotlin/ru/dbotthepony/mc/otm/network/StreamCodecs.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/network/StreamCodecs.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/network/StreamCodecs.kt index 62ce5522a..0402e7a67 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/network/StreamCodecs.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/network/StreamCodecs.kt @@ -39,6 +39,8 @@ object StreamCodecs { val BLOCK_TYPE = MatteryStreamCodec.Of(FriendlyByteBuf::writeBlockType, FriendlyByteBuf::readBlockType) val RELATIVE_SIDE = MatteryStreamCodec.Enum(RelativeSide::class.java) val DIRECTION = MatteryStreamCodec.Enum(Direction::class.java) + val RELATIVE_SIDE_NULLABLE = RELATIVE_SIDE.nullable() + val DIRECTION_NULLABLE = DIRECTION.nullable() val RGBA: MatteryStreamCodec = StreamCodec.of( { s, v -> s.writeFloat(v.red); s.writeFloat(v.green); s.writeFloat(v.blue); s.writeFloat(v.alpha) },