From 11a752a99de2daf2869b899b51757d371532c4ac Mon Sep 17 00:00:00 2001 From: s809 <43530948+s809@users.noreply.github.com> Date: Mon, 23 Sep 2024 00:43:00 +0500 Subject: [PATCH] Fix dedicated server failing to send packets --- .../com/seibel/distanthorizons/fabric/FabricServerProxy.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricServerProxy.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricServerProxy.java index 49f2efbcb..ee04944e5 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricServerProxy.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricServerProxy.java @@ -178,6 +178,11 @@ public class FabricServerProxy implements AbstractModInitializer.IEventProxy #if MC_VER >= MC_1_20_6 PayloadTypeRegistry.playC2S().register(CommonPacketPayload.TYPE, new CommonPacketPayload.Codec()); + if (this.isDedicatedServer) + { + PayloadTypeRegistry.playS2C().register(CommonPacketPayload.TYPE, new CommonPacketPayload.Codec()); + } + ServerPlayNetworking.registerGlobalReceiver(CommonPacketPayload.TYPE, (payload, context) -> { if (payload.message() == null)