mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
More fixes. Around 1000 errors now, going to have to leave it to you from here on in @aidancbrady.
This commit is contained in:
1 parent
31938e8b68
commit
3d8c5c8696
22 files changed
+241
-284
No files matched your search
@@ -4,31 +4,30 @@ import java.net.InetAddress;
|
||||
|
||||
import mekanism.client.voice.VoiceClient;
|
||||
import mekanism.common.Mekanism;
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.NetLoginHandler;
|
||||
import net.minecraft.network.packet.NetHandler;
|
||||
import net.minecraft.network.packet.Packet1Login;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import cpw.mods.fml.common.network.IConnectionHandler;
|
||||
import cpw.mods.fml.common.network.Player;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.network.FMLNetworkEvent.ClientConnectedToServerEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ClientConnectionHandler implements IConnectionHandler
|
||||
public class ClientConnectionHandler
|
||||
{
|
||||
@Override
|
||||
public void playerLoggedIn(Player player, NetHandler netHandler, INetworkManager manager) {}
|
||||
|
||||
@Override
|
||||
public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager)
|
||||
@SubscribeEvent
|
||||
public void onConnection(ClientConnectedToServerEvent event)
|
||||
{
|
||||
return null;
|
||||
if(event.isLocal)
|
||||
{
|
||||
connectionOpened();
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO this is probably wrong
|
||||
connectionOpened(event.manager.getSocketAddress().toString());
|
||||
}
|
||||
}
|
||||
|
||||
/* Remote */
|
||||
@Override
|
||||
public void connectionOpened(NetHandler netClientHandler, String server, int port, INetworkManager manager)
|
||||
public void connectionOpened(String server)
|
||||
{
|
||||
if(Mekanism.voiceServerEnabled)
|
||||
{
|
||||
@@ -39,8 +38,7 @@ public class ClientConnectionHandler implements IConnectionHandler
|
||||
}
|
||||
|
||||
/* Integrated */
|
||||
@Override
|
||||
public void connectionOpened(NetHandler netClientHandler, MinecraftServer server, INetworkManager manager)
|
||||
public void connectionOpened()
|
||||
{
|
||||
if(Mekanism.voiceServerEnabled)
|
||||
{
|
||||
@@ -50,9 +48,4 @@ public class ClientConnectionHandler implements IConnectionHandler
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void connectionClosed(INetworkManager manager) {}
|
||||
|
||||
@Override
|
||||
public void clientLoggedIn(NetHandler clientHandler, INetworkManager manager, Packet1Login login) {}
|
||||
}
|
||||
Reference in new issue
Block a user