From ca0ad4a7acd958a6a2fdb37563348eccb92bc6a1 Mon Sep 17 00:00:00 2001 From: Thomas <1688389+Rakambda@users.noreply.github.com> Date: Sun, 1 Sep 2024 11:58:35 +0200 Subject: [PATCH] Make config channel optional on NeoForge (#749) --- .../fallingtree/neoforge/network/NeoForgePacketHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neoforge/src/main/java/fr/rakambda/fallingtree/neoforge/network/NeoForgePacketHandler.java b/neoforge/src/main/java/fr/rakambda/fallingtree/neoforge/network/NeoForgePacketHandler.java index 9f114313..db3e99af 100644 --- a/neoforge/src/main/java/fr/rakambda/fallingtree/neoforge/network/NeoForgePacketHandler.java +++ b/neoforge/src/main/java/fr/rakambda/fallingtree/neoforge/network/NeoForgePacketHandler.java @@ -13,7 +13,7 @@ public class NeoForgePacketHandler implements ClientPacketHandler, ServerPacketHandler{ @SubscribeEvent public void register(@NotNull RegisterPayloadHandlersEvent event){ - var registrar = event.registrar(FallingTree.MOD_ID); + var registrar = event.registrar(FallingTree.MOD_ID).optional(); registrar.configurationToClient(FallingTreeConfigPacket.TYPE, FallingTreeConfigPacket.CODEC, (packet, sender) -> mod.getPacketUtils().onClientConfigurationPacket(packet.getPacket()));