diff --git a/Cargo.lock b/Cargo.lock index db39c4816..429b21002 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1169,6 +1169,7 @@ dependencies = [ "aes", "bytes", "cfb8", + "fastnbt", "flate2", "itertools", "log", diff --git a/pumpkin-protocol/Cargo.toml b/pumpkin-protocol/Cargo.toml index e1c80d2d1..bb48e06da 100644 --- a/pumpkin-protocol/Cargo.toml +++ b/pumpkin-protocol/Cargo.toml @@ -28,4 +28,4 @@ aes = "0.8.4" cfb8 = "0.8.1" take_mut = "0.2.2" itertools = "0.13.0" -fastnbt = "2.5.0" +fastnbt = { git = "https://github.com/owengage/fastnbt.git" } diff --git a/pumpkin/src/server.rs b/pumpkin/src/server.rs index fdbf32d02..aa6876bb7 100644 --- a/pumpkin/src/server.rs +++ b/pumpkin/src/server.rs @@ -16,15 +16,13 @@ use pumpkin_protocol::{ bytebuf::ByteBuffer, client::{ config::CPluginMessage, play::{ - CCenterChunk, CChunkData, CChunkDataUpdateLight, CGameEvent, CLogin, CPlayerAbilities, - CPlayerInfoUpdate, CRemoveEntities, CSpawnEntity, PlayerAction, + CCenterChunk, CChunkData, CChunkDataUpdateLight, CGameEvent, CLogin, CPlayerAbilities, CPlayerInfoUpdate, CRemoveEntities, CRemovePlayerInfo, CSetEntityMetadata, CSpawnEntity, Metadata, PlayerAction }, - }, BitSet, ClientPacket, Players, Sample, StatusResponse, VarInt, Version, CURRENT_MC_PROTOCOL + }, uuid::UUID, BitSet, ClientPacket, Players, Sample, StatusResponse, VarInt, Version, CURRENT_MC_PROTOCOL }; use pumpkin_world::dimension::Dimension; use pumpkin_registry::Registry; -use pumpkin_world::chunk::TestChunk; use rsa::{traits::PublicKeyParts, RsaPrivateKey, RsaPublicKey}; use serde::{Deserialize, Serialize}; @@ -337,7 +335,7 @@ impl Server { .read_chunks(wanted_chunks) .await; - client.send_packet(CCenterChunk { + client.send_packet(&CCenterChunk { chunk_x: 0.into(), chunk_z: 0.into(), }); @@ -354,7 +352,7 @@ impl Server { "Chunk loading failed for chunk ({},{}): {}", chunk.0 .0, chunk.0 .1, err ), - Ok(data) => client.send_packet(CChunkData(data)), + Ok(data) => client.send_packet(&CChunkData(data)), }});