Minor refactoring/fix

This commit is contained in:
Stephen Seo 2024-10-23 13:36:37 +09:00
parent b4ce369c23
commit bea720f4be

View file

@ -15,7 +15,7 @@ public record PacketBattlePing(int battleID, int remainingSeconds) implements Cu
public static final CustomPacketPayload.Type<PacketBattlePing> TYPE = new CustomPacketPayload.Type<>(ResourceLocation.fromNamespaceAndPath(TurnBasedMinecraftMod.MODID, "network_packetbattleping")); public static final CustomPacketPayload.Type<PacketBattlePing> TYPE = new CustomPacketPayload.Type<>(ResourceLocation.fromNamespaceAndPath(TurnBasedMinecraftMod.MODID, "network_packetbattleping"));
public static final StreamCodec<ByteBuf, PacketBattlePing> STREAM_CODEC = StreamCodec.composite( public static final StreamCodec<ByteBuf, PacketBattlePing> STREAM_CODEC = StreamCodec.composite(
ByteBufCodecs.VAR_INT, ByteBufCodecs.INT,
PacketBattlePing::battleID, PacketBattlePing::battleID,
ByteBufCodecs.VAR_INT, ByteBufCodecs.VAR_INT,
PacketBattlePing::remainingSeconds, PacketBattlePing::remainingSeconds,