Minecraft Version
1.21.11
Mod Loader
NeoForge
Describe the Issue
Version
Tested with:
- Minecraft
1.21.11
- NeoForge
21.11.38-beta
- Balm
21.11.7
Summary
It looks like InternalsClientModule is never registered from CommonBalmClientRuntime.initializeRuntime().
Because of that, the client-side ConnectedToServer handler in InternalsClientModule.initialize() never runs, so ServerboundModListMessage is never sent to the server.
On NeoForge this breaks optional client/server networking, because sendTo(...) later depends on RemotePlayerModList.wasModAnnouncedToServer(...).
Actual behavior
For optional client/server mods that rely on Balm networking:
- both client and server can load the mod successfully
- the player can join successfully
- but the server never records that the client announced support for that mod
CommonBalmNetworking.isMessageSupported(...) stays false
- NeoForge
sendTo(...) silently skips the clientbound payload
In my case this showed up with TrashSlot: both sides had the mod installed, but the client still behaved as if the server did not support it because the initial clientbound sync packet was skipped.
Expected behavior
InternalsClientModule should be registered during client runtime initialization, so the client always sends its Balm mod-list announcement after connecting to a server.
Likely cause
CommonBalmClientRuntime.initializeRuntime() currently registers ConfigSyncClient, but not InternalsClientModule.
That means this code never becomes active on the client:
InternalsClientModule.initialize()
ClientLifecycleCallback.ConnectedToServer.EVENT.register(...)
Balm.networking().sendToServer(new ServerboundModListMessage(...))
Relevant code paths
common/src/main/java/net/blay09/mods/balm/client/platform/runtime/internal/CommonBalmClientRuntime.java
common/src/main/java/net/blay09/mods/balm/client/platform/module/internal/InternalsClientModule.java
common/src/main/java/net/blay09/mods/balm/network/internal/CommonBalmNetworking.java
common/src/main/java/net/blay09/mods/balm/network/internal/RemotePlayerModList.java
neoforge/src/main/java/net/blay09/mods/balm/neoforge/network/internal/NeoForgeBalmNetworking.java
Local confirmation
I locally added this registration to CommonBalmClientRuntime.initializeRuntime():
registerModule(new BalmClientRegistrars(this, "balm"), new InternalsClientModule());
After that:
- the client immediately started sending
ServerboundModListMessage
- the server received and stored the client mod list correctly
- optional clientbound payloads started working again on NeoForge
So this looks like the missing client-module registration is the root cause on the Balm side.
Suggested fix
Register InternalsClientModule from CommonBalmClientRuntime.initializeRuntime() alongside ConfigSyncClient.
Logs
.
Minecraft Version
1.21.11
Mod Loader
NeoForge
Describe the Issue
Version
Tested with:
1.21.1121.11.38-beta21.11.7Summary
It looks like
InternalsClientModuleis never registered fromCommonBalmClientRuntime.initializeRuntime().Because of that, the client-side
ConnectedToServerhandler inInternalsClientModule.initialize()never runs, soServerboundModListMessageis never sent to the server.On NeoForge this breaks optional client/server networking, because
sendTo(...)later depends onRemotePlayerModList.wasModAnnouncedToServer(...).Actual behavior
For optional client/server mods that rely on Balm networking:
CommonBalmNetworking.isMessageSupported(...)staysfalsesendTo(...)silently skips the clientbound payloadIn my case this showed up with
TrashSlot: both sides had the mod installed, but the client still behaved as if the server did not support it because the initial clientbound sync packet was skipped.Expected behavior
InternalsClientModuleshould be registered during client runtime initialization, so the client always sends its Balm mod-list announcement after connecting to a server.Likely cause
CommonBalmClientRuntime.initializeRuntime()currently registersConfigSyncClient, but notInternalsClientModule.That means this code never becomes active on the client:
InternalsClientModule.initialize()ClientLifecycleCallback.ConnectedToServer.EVENT.register(...)Balm.networking().sendToServer(new ServerboundModListMessage(...))Relevant code paths
common/src/main/java/net/blay09/mods/balm/client/platform/runtime/internal/CommonBalmClientRuntime.javacommon/src/main/java/net/blay09/mods/balm/client/platform/module/internal/InternalsClientModule.javacommon/src/main/java/net/blay09/mods/balm/network/internal/CommonBalmNetworking.javacommon/src/main/java/net/blay09/mods/balm/network/internal/RemotePlayerModList.javaneoforge/src/main/java/net/blay09/mods/balm/neoforge/network/internal/NeoForgeBalmNetworking.javaLocal confirmation
I locally added this registration to
CommonBalmClientRuntime.initializeRuntime():After that:
ServerboundModListMessageSo this looks like the missing client-module registration is the root cause on the Balm side.
Suggested fix
Register
InternalsClientModulefromCommonBalmClientRuntime.initializeRuntime()alongsideConfigSyncClient.Logs
.