Simple Voice Chat

Simple Voice Chat

31M Downloads

force_voice_chat = false users still get kicked

iceyrazor opened this issue ยท 10 comments

commented

Bug description
when you set force_voice_chat = false in the mod version listed below. users still get kicked

Steps to reproduce the issue
-download and setup a basic forge server.
-put the mod on the server and not the client
-make sure force_voice_chat = false
-join the server with the client
-get disconnected

Expected behavior
-to be able to join without the mod on client

Log files
server side will only be provided

main error "mismatched mod channel list"

log
[07:02:40] [Server thread/INFO] [minecraft/DedicatedServer]: Done (6.098s)! For help, type "help"
[07:02:40] [Server thread/INFO] [ne.mi.se.pe.PermissionAPI/]: Successfully initialized permission handler forge:default_handler
[07:02:40] [Server thread/INFO] [voicechat/]: Using default voicechat socket implementation
[07:02:40] [VoiceChatServerThread/INFO] [voicechat/]: Server started at port 24454
[07:02:45] [User Authenticator #1/INFO] [minecraft/ServerLoginPacketListenerImpl]: UUID of player iceyrazor is [redacted]
[07:02:45] [Netty Server IO #2/ERROR] [ne.mi.ne.NetworkRegistry/NETREGISTRY]: Channels
[voicechat:player_state,voicechat:secret,voicechat:leave_group,voicechat:create_group,voicechat:request_secret,voicechat:set_group,voicechat:joined_group,voicechat:update_state,voicechat:player_states] rejected their client side version number
[07:02:45] [Netty Server IO #2/ERROR] [ne.mi.ne.HandshakeHandler/FMLHANDSHAKE]: Terminating connection with client, mismatched mod list
[07:02:45] [Server thread/INFO] [minecraft/ServerLoginPacketListenerImpl]: com.mojang.authlib.GameProfile@6254e5e7[id=4bc39b6f-c150-4136-8327-60239abf607a,name=iceyrazor,properties={textures=[com.mojang.authlib.properties.Property@2efaafd1]},legacy=false] (/127.0.0.1:59882) lost connection: Connection closed - mismatched mod channel list

Versions

  • Minecraft version:: 1.18.2
  • Forge/Fabric/Bukkit/Spigot/Paper version:: forge-1.18.2-40.0.18-server
  • Mod/Plugin version:: [FORGE][1.18.2] Simple Voice Chat 1.18.2-2.2.31

Other mods
none

new info
-just tested this with forge server forge-1.18.2-40.0.32. still occurring

commented

Because world edit is a server only mod. Voice chat is client + server

commented

This only happens if the server has forge + voicechat and the client has forge without voicechat.
This is a forge limitation we can't prevent. If you would join with a fabric client or a vanilla client, this won't happen.

commented

This only happens if the server has forge + voicechat and the client has forge without voicechat. This is a forge limitation we can't prevent. If you would join with a fabric client or a vanilla client, this won't happen.

how come does this not happen for say, world edit? that can be on the server with forge clients. and clients dont need to download the mod

commented

Because world edit is a server only mod. Voice chat is client + server

ah ok. thanks for the info :). hope this helps other people too

commented

Hy I believe I actually found a simple fix for this.

In the ForgeNetManager.java you have:

            EventNetworkChannel channel = NetworkRegistry.newEventChannel(
                    dummyPacket.getIdentifier(),
                    () -> NetworkRegistry.ACCEPTVANILLA,
                    NetworkRegistry.ACCEPTVANILLA::equals,
                    NetworkRegistry.ACCEPTVANILLA::equals
            );

After seeing this I tried to attempt to connect to a server with simple-voice-chat server with vanilla minecraft and low and behold that worked.

Then came the idea to change the code to:

            EventNetworkChannel channel = NetworkRegistry.newEventChannel(
                    dummyPacket.getIdentifier(),
                    () -> NetworkRegistry.ACCEPTVANILLA,
                    NetworkRegistry.acceptMissingOr(NetworkRegistry.ACCEPTVANILLA),
                    NetworkRegistry.acceptMissingOr(NetworkRegistry.ACCEPTVANILLA)
            );

Which made it work for a forged modded client without simple-voice-chat as well.

I don't know if there are other implications from this code change because I only checked if I could connect to the server and did no further testing.

I hope this information is useful to you and if it's not the right solution don't worry about it c:

commented

Hey, @wezel
thanks for that information. I will test it and add it to the mod if it works.

commented

Works perfectly, thanks again @wezel
It will be available in the next release

commented

Works perfectly, thanks again @wezel It will be available in the next release

think you could update it on 1.16.5 as well?
or will it not work on that version?

commented

As always, all updates get to every supported version.

commented

As always, all updates get to every supported version.

oh nice! most mod devs just work on the latest and give up on older