diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2025-12-12 01:29:49 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-12 01:29:49 -0600 |
| commit | f4a3c53eee7d29bade0c074f402c4a45aa98eca8 (patch) | |
| tree | f25ec1d1390c5e96aba858141206a05812135b95 /azalea-client/src/plugins | |
| parent | 7f761df3e7b72ce75be21ab9b3a533d0a5a938a5 (diff) | |
| download | azalea-drasl-f4a3c53eee7d29bade0c074f402c4a45aa98eca8.tar.xz | |
Delete `StartError` and `JoinError` (#296)
* delete StartError and JoinError
* update changelog
Diffstat (limited to 'azalea-client/src/plugins')
| -rw-r--r-- | azalea-client/src/plugins/join.rs | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/azalea-client/src/plugins/join.rs b/azalea-client/src/plugins/join.rs index 538369b0..f1e27165 100644 --- a/azalea-client/src/plugins/join.rs +++ b/azalea-client/src/plugins/join.rs @@ -1,8 +1,8 @@ -use std::{net::SocketAddr, sync::Arc}; +use std::sync::Arc; use azalea_entity::{LocalEntity, indexing::EntityUuidIndex}; use azalea_protocol::{ - ServerAddress, + address::ResolvedAddr, common::client_information::ClientInformation, connect::{Connection, ConnectionError, Proxy}, packets::{ @@ -59,16 +59,11 @@ pub struct StartJoinServerEvent { /// Options for how the connection to the server will be made. /// -/// These are persisted on reconnects. -/// -/// This is inserted as a component on clients to make auto-reconnecting work. +/// These are persisted on reconnects. This is inserted as a component on +/// clients to make auto-reconnecting work. #[derive(Debug, Clone, Component)] pub struct ConnectOpts { - /// The unresolved address that we're going to tell the server that we used - /// to connect. - pub address: ServerAddress, - /// The actual IP and port that we're going to make a connection to. - pub resolved_address: SocketAddr, + pub address: ResolvedAddr, /// The SOCKS5 proxy used for connecting to the Minecraft server. pub server_proxy: Option<Proxy>, /// The SOCKS5 proxy that will be used when authenticating our server join @@ -172,15 +167,15 @@ async fn create_conn_and_send_intention_packet( opts: ConnectOpts, ) -> Result<LoginConn, ConnectionError> { let mut conn = if let Some(proxy) = opts.server_proxy { - Connection::new_with_proxy(&opts.resolved_address, proxy).await? + Connection::new_with_proxy(&opts.address.socket, proxy).await? } else { - Connection::new(&opts.resolved_address).await? + Connection::new(&opts.address.socket).await? }; conn.write(ServerboundIntention { protocol_version: PROTOCOL_VERSION, - hostname: opts.address.host.clone(), - port: opts.address.port, + hostname: opts.address.server.host.clone(), + port: opts.address.server.port, intention: ClientIntention::Login, }) .await?; |
