mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
Remove some resolved todo comments
This commit is contained in:
parent
dedcd0de8f
commit
34058b2528
4 changed files with 3 additions and 13 deletions
|
@ -1,4 +1,4 @@
|
||||||
// TODO: have an azalea-inventory crate and put this there
|
// TODO: have an azalea-inventory or azalea-container crate and put this there
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub enum Slot {
|
pub enum Slot {
|
||||||
|
@ -9,8 +9,6 @@ pub enum Slot {
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct SlotData {
|
pub struct SlotData {
|
||||||
pub id: i32,
|
pub id: i32,
|
||||||
// TODO: is this really a u8? is it a i8? is it a varint?
|
|
||||||
// wiki.vg says it's a "byte"
|
|
||||||
pub count: u8,
|
pub count: u8,
|
||||||
pub nbt: azalea_nbt::Tag,
|
pub nbt: azalea_nbt::Tag,
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,6 @@ pub fn encrypt(public_key: &[u8], nonce: &[u8]) -> Result<EncryptResult, String>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: update the aes and cfb8 crates
|
|
||||||
pub type Aes128CfbEnc = cfb8::Encryptor<Aes128>;
|
pub type Aes128CfbEnc = cfb8::Encryptor<Aes128>;
|
||||||
pub type Aes128CfbDec = cfb8::Decryptor<Aes128>;
|
pub type Aes128CfbDec = cfb8::Decryptor<Aes128>;
|
||||||
|
|
||||||
|
|
|
@ -168,8 +168,6 @@ impl McBufWritable for UnsizedByteArray {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: use specialization when that gets stabilized into rust
|
|
||||||
// to optimize for Vec<u8> byte arrays
|
|
||||||
impl<T: McBufWritable> McBufWritable for Vec<T> {
|
impl<T: McBufWritable> McBufWritable for Vec<T> {
|
||||||
default fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> {
|
default fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> {
|
||||||
buf.write_list(self, |buf, i| T::write_into(i, buf))
|
buf.write_list(self, |buf, i| T::write_into(i, buf))
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use std::io::{Read, Write};
|
use std::io::{Read, Write};
|
||||||
|
|
||||||
use super::LoginPacket;
|
use super::LoginPacket;
|
||||||
|
use crate::mc_buf::McBufReadable;
|
||||||
use crate::mc_buf::{Readable, Writable};
|
use crate::mc_buf::{Readable, Writable};
|
||||||
use azalea_auth::game_profile::GameProfile;
|
use azalea_auth::game_profile::GameProfile;
|
||||||
use azalea_core::serializable_uuid::SerializableUuid;
|
use azalea_core::serializable_uuid::SerializableUuid;
|
||||||
|
@ -26,13 +27,7 @@ impl ClientboundGameProfilePacket {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn read(buf: &mut impl Read) -> Result<LoginPacket, String> {
|
pub fn read(buf: &mut impl Read) -> Result<LoginPacket, String> {
|
||||||
// TODO: we have a thing to read from the uuid now
|
let uuid = Uuid::read_into(buf)?;
|
||||||
let uuid = Uuid::from_int_array([
|
|
||||||
buf.read_int()? as u32,
|
|
||||||
buf.read_int()? as u32,
|
|
||||||
buf.read_int()? as u32,
|
|
||||||
buf.read_int()? as u32,
|
|
||||||
]);
|
|
||||||
let name = buf.read_utf_with_len(16)?;
|
let name = buf.read_utf_with_len(16)?;
|
||||||
Ok(ClientboundGameProfilePacket {
|
Ok(ClientboundGameProfilePacket {
|
||||||
game_profile: GameProfile::new(uuid, name),
|
game_profile: GameProfile::new(uuid, name),
|
||||||
|
|
Loading…
Add table
Reference in a new issue