mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Fixed Walkie Talkies
This commit is contained in:
1 parent
f0d3848f8a
commit
bda4f8cfe5
2 files changed
+7
-5
No files matched your search
@@ -1,6 +1,6 @@
|
||||
package mekanism.client;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
|
||||
import mekanism.client.voice.VoiceClient;
|
||||
import mekanism.common.Mekanism;
|
||||
@@ -19,21 +19,23 @@ public class ClientConnectionHandler
|
||||
{
|
||||
if(event.isLocal)
|
||||
{
|
||||
//If the client is connecting to its own corresponding integrated server.
|
||||
try {
|
||||
MekanismClient.voiceClient = new VoiceClient(InetAddress.getLocalHost().getHostAddress());
|
||||
MekanismClient.voiceClient = new VoiceClient("127.0.0.1");
|
||||
//Will probably not work when multiple integrateds are running on one computer
|
||||
} catch(Exception e) {
|
||||
Mekanism.logger.error("Unable to establish VoiceClient on local connection.");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
else {
|
||||
//If the client is connecting to a foreign integrated or dedicated server.
|
||||
try {
|
||||
MekanismClient.voiceClient = new VoiceClient(event.manager.getSocketAddress().toString());
|
||||
MekanismClient.voiceClient = new VoiceClient(((InetSocketAddress)event.manager.getSocketAddress()).getHostString());
|
||||
} catch(Exception e) {
|
||||
Mekanism.logger.error("Unable to establish VoiceClient on remote connection.");
|
||||
e.printStackTrace();
|
||||
}
|
||||
//TODO this is probably wrong
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user