Skip to content

Commit

Permalink
register 'handshake_off' payload type (fixes #229)
Browse files Browse the repository at this point in the history
  • Loading branch information
gliscowo committed Apr 29, 2024
1 parent 9985648 commit 791b594
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/io/wispforest/owo/network/OwoHandshake.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) -> {});
}

Expand Down

0 comments on commit 791b594

Please sign in to comment.