Fabric Server mod communication with Forge Client mod possible? #1386
-
Hi, there are two very similar mods:
The fabric's server mod communicates which URL the client mod should use (to connect to Mumble). I'd like to expand the Forge Mod to be able to achive that the Forge client-side mod is able to communicate with the Fabric server-side mod. I am open to discussing also other scenarios like a constellations where the Forge mod is also server-sided and communication with the Fabric client-side mod would be requested. So basically no matter what is installed on the client or the server the mods would ideally still be able to communicate. Completely disregarding the other end's implementation. So I was wondering if it would be possible to do or already has been done. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Seems that in forge you need to create a event channel like https://github.com/MinecraftForge/MinecraftForge/blob/f47429717d7e41ff5465d86fd49416eee2c0bb6c/src/main/java/net/minecraftforge/fml/network/NetworkInitialization.java#L118-L124 Then in the network event of forge you can handle it more like the fabric way https://github.com/MinecraftForge/MinecraftForge/blob/f47429717d7e41ff5465d86fd49416eee2c0bb6c/src/main/java/net/minecraftforge/fml/network/FMLMCRegisterPacketHandler.java#L45 |
Beta Was this translation helpful? Give feedback.
Seems that in forge you need to create a event channel like https://github.com/MinecraftForge/MinecraftForge/blob/f47429717d7e41ff5465d86fd49416eee2c0bb6c/src/main/java/net/minecraftforge/fml/network/NetworkInitialization.java#L118-L124
Then in the network event of forge you can handle it more like the fabric way https://github.com/MinecraftForge/MinecraftForge/blob/f47429717d7e41ff5465d86fd49416eee2c0bb6c/src/main/java/net/minecraftforge/fml/network/FMLMCRegisterPacketHandler.java#L45