From 791b594f9f4a9ab835114c1cd7b096b633cbd0d5 Mon Sep 17 00:00:00 2001 From: glisco Date: Mon, 29 Apr 2024 23:08:41 +0200 Subject: [PATCH] register 'handshake_off' payload type (fixes #229) --- src/main/java/io/wispforest/owo/network/OwoHandshake.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/io/wispforest/owo/network/OwoHandshake.java b/src/main/java/io/wispforest/owo/network/OwoHandshake.java index faa04bea..0b8da0e4 100644 --- a/src/main/java/io/wispforest/owo/network/OwoHandshake.java +++ b/src/main/java/io/wispforest/owo/network/OwoHandshake.java @@ -21,6 +21,7 @@ import net.fabricmc.loader.api.FabricLoader; import net.minecraft.client.MinecraftClient; import net.minecraft.client.network.ClientConfigurationNetworkHandler; +import net.minecraft.network.codec.PacketCodec; import net.minecraft.network.packet.CustomPayload; import net.minecraft.server.MinecraftServer; import net.minecraft.server.network.ServerConfigurationNetworkHandler; @@ -81,6 +82,7 @@ public static void requireHandshake() { if (FabricLoader.getInstance().getEnvironmentType() == EnvType.CLIENT) { if (!ENABLED) { + PayloadTypeRegistry.configurationS2C().register(HandshakeOff.ID, PacketCodec.unit(new HandshakeOff())); ClientConfigurationNetworking.registerGlobalReceiver(HandshakeOff.ID, (payload, context) -> {}); }