1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00

actually send the ServerboundCustomPayloadPacket

This commit is contained in:
mat 2022-04-30 23:11:18 -05:00
parent 8313952541
commit 42ca37554c
2 changed files with 12 additions and 9 deletions

View file

@ -167,14 +167,17 @@ impl Client {
println!("Got login packet {:?}", p);
state.lock().await.player.entity.id = p.player_id;
conn.lock().await.write(
ServerboundCustomPayloadPacket {
identifier: ResourceLocation::new("brand").unwrap(),
// they don't have to know :)
data: "vanilla".into(),
}
.get(),
);
conn.lock()
.await
.write(
ServerboundCustomPayloadPacket {
identifier: ResourceLocation::new("brand").unwrap(),
// they don't have to know :)
data: "vanilla".into(),
}
.get(),
)
.await;
tx.send(Event::Login).unwrap();
}

View file

@ -130,7 +130,7 @@ fn as_packet_derive(input: TokenStream, state: proc_macro2::TokenStream) -> Toke
syn::Data::Struct(syn::DataStruct { fields, .. }) => fields,
_ => panic!("#[derive(*Packet)] can only be used on structs"),
};
let FieldsNamed { named, .. } = match fields {
let FieldsNamed { named: _, .. } = match fields {
syn::Fields::Named(f) => f,
_ => panic!("#[derive(*Packet)] can only be used on structs with named fields"),
};