mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
add doc comment about d=
This commit is contained in:
parent
1347f35492
commit
5ea1271145
3 changed files with 14 additions and 4 deletions
|
@ -140,6 +140,9 @@ pub async fn auth(email: &str, opts: AuthOpts) -> Result<AuthResult, AuthError>
|
||||||
///
|
///
|
||||||
/// If you don't have a Microsoft auth token, you can get it from
|
/// If you don't have a Microsoft auth token, you can get it from
|
||||||
/// [`get_ms_link_code`] and then [`get_ms_auth_token`].
|
/// [`get_ms_link_code`] and then [`get_ms_auth_token`].
|
||||||
|
///
|
||||||
|
/// If you got the MSA token from your own app (as opposed to the default
|
||||||
|
/// Nintendo Switch one), you may have to prepend "d=" to the token.
|
||||||
pub async fn get_minecraft_token(
|
pub async fn get_minecraft_token(
|
||||||
client: &reqwest::Client,
|
client: &reqwest::Client,
|
||||||
msa: &str,
|
msa: &str,
|
||||||
|
@ -418,9 +421,9 @@ async fn auth_with_xbox_live(
|
||||||
"Properties": {
|
"Properties": {
|
||||||
"AuthMethod": "RPS",
|
"AuthMethod": "RPS",
|
||||||
"SiteName": "user.auth.xboxlive.com",
|
"SiteName": "user.auth.xboxlive.com",
|
||||||
// i thought this was supposed to be d={} but it doesn't work for
|
// this value should have "d=" prepended if you're using your own app (as opposed to
|
||||||
// me when i add it ??????
|
// the default nintendo switch one)
|
||||||
"RpsTicket": format!("{access_token}")
|
"RpsTicket": access_token
|
||||||
},
|
},
|
||||||
"RelyingParty": "http://auth.xboxlive.com",
|
"RelyingParty": "http://auth.xboxlive.com",
|
||||||
"TokenType": "JWT"
|
"TokenType": "JWT"
|
||||||
|
|
|
@ -5380,4 +5380,3 @@ make_block_states! {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,14 @@ impl ItemSlot {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Convert this slot into an [`ItemSlotData`], if it's present.
|
||||||
|
pub fn as_present(&self) -> Option<&ItemSlotData> {
|
||||||
|
match self {
|
||||||
|
ItemSlot::Empty => None,
|
||||||
|
ItemSlot::Present(i) => Some(i),
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An item in an inventory, with a count and NBT. Usually you want [`ItemSlot`]
|
/// An item in an inventory, with a count and NBT. Usually you want [`ItemSlot`]
|
||||||
|
|
Loading…
Add table
Reference in a new issue