diff --git a/ClassicalSharp.csproj b/ClassicalSharp.csproj index 7bdf3b605..c62c9d436 100644 --- a/ClassicalSharp.csproj +++ b/ClassicalSharp.csproj @@ -209,7 +209,7 @@ Always - + Always diff --git a/Game/Game.cs b/Game/Game.cs index 1fa8faeb6..073ab9a47 100644 --- a/Game/Game.cs +++ b/Game/Game.cs @@ -163,7 +163,7 @@ namespace ClassicalSharp { Picking = new PickingRenderer( this ); string connectString = "Connecting to " + IPAddress + ":" + Port + ".."; SetNewScreen( new LoadingMapScreen( this, connectString, "Reticulating splines" ) ); - Network.Connect(); + Network.Connect( IPAddress, Port ); } public void SetViewDistance( int distance ) { diff --git a/Network/NetworkProcessor.cs b/Network/NetworkProcessor.cs index 302c38e44..41be7e2e3 100644 --- a/Network/NetworkProcessor.cs +++ b/Network/NetworkProcessor.cs @@ -30,15 +30,15 @@ namespace ClassicalSharp { bool useBlockPermissions = false; bool receivedFirstPosition = false; public bool UsingExtPlayerList = false; + public bool UsingPlayerClick = false; - public void Connect() { - IPAddress address = Window.IPAddress; + public void Connect( IPAddress address, int port ) { socket = new Socket( address.AddressFamily, SocketType.Stream, ProtocolType.Tcp ); try { - socket.Connect( address, Window.Port ); + socket.Connect( address, port ); } catch( SocketException ex ) { Utils.LogError( "Error while trying to connect: {0}{1}", Environment.NewLine, ex ); - Window.Disconnect( "&eUnable to reach " + Window.IPAddress + ":" + Window.Port, + Window.Disconnect( "&eUnable to reach " + address + ":" + port, "Unable to establish an underlying connection" ); Dispose(); return; @@ -440,6 +440,8 @@ namespace ClassicalSharp { UsingExtPlayerList = true; } else if( extensionName == "BlockPermissions" ) { useBlockPermissions = true; + } else if( extensionName == "PlayerClick" ) { + UsingPlayerClick = true; } cpeServerExtensionsCount--; if( cpeServerExtensionsCount == 0 ) { diff --git a/readme.md b/readme.md index 3c8491d86..77341d85d 100644 --- a/readme.md +++ b/readme.md @@ -23,7 +23,7 @@ define `__MonoCS__` when building, otherwise you will get runtime errors when de #### Instructions The simple way to use ClassicalSharp is to use the launcher application. You can connect to LAN/locally hosted servers, minecraft.net servers, and classicube.net servers through the launcher. -Note that the first time you run the launcher, a dialog box will pop up saying: "Some required resources weren't found. Would you like to download them now?" Just click OK. +Note that the first time you run the launcher, a dialog box will pop up saying: *"Some required resources weren't found. Would you like to download them now?"* Just click OK. (This is necessary because I cannot legally redistribute the assets of Minecraft Classic with the application) *Alternatively, you can pass command line arguments directly to the client. The client expects these arguments to be in the form: ` `, where skin server is optional.*