Implement ChunkData_Biomes3D_bool
This commit is contained in:
parent
34d3202541
commit
94032279be
|
@ -1024,6 +1024,17 @@ state_packets!(
|
|||
}
|
||||
/// ChunkData sends or updates a single chunk on the client. If New is set
|
||||
/// then biome data should be sent too.
|
||||
packet ChunkData_Biomes3D_bool {
|
||||
field chunk_x: i32 =,
|
||||
field chunk_z: i32 =,
|
||||
field new: bool =,
|
||||
field ignore_old_data: bool =,
|
||||
field bitmask: VarInt =,
|
||||
field heightmaps: Option<nbt::NamedTag> =,
|
||||
field biomes: Biomes3D = when(|p: &ChunkData_Biomes3D_bool| p.new),
|
||||
field data: LenPrefixedBytes<VarInt> =,
|
||||
field block_entities: LenPrefixed<VarInt, Option<nbt::NamedTag>> =,
|
||||
}
|
||||
packet ChunkData_Biomes3D {
|
||||
field chunk_x: i32 =,
|
||||
field chunk_z: i32 =,
|
||||
|
|
|
@ -90,7 +90,7 @@ protocol_packet_ids!(
|
|||
0x1e => ChangeGameState
|
||||
0x1f => WindowOpenHorse
|
||||
0x20 => KeepAliveClientbound_i64
|
||||
0x21 => ChunkData_Biomes3D // TODO
|
||||
0x21 => ChunkData_Biomes3D_bool
|
||||
0x22 => Effect
|
||||
0x23 => Particle_f64
|
||||
0x24 => UpdateLight // TODO
|
||||
|
|
|
@ -519,6 +519,7 @@ impl Server {
|
|||
KeepAliveClientbound_i64 => on_keep_alive_i64,
|
||||
KeepAliveClientbound_VarInt => on_keep_alive_varint,
|
||||
KeepAliveClientbound_i32 => on_keep_alive_i32,
|
||||
ChunkData_Biomes3D_bool => on_chunk_data_biomes3d_bool,
|
||||
ChunkData => on_chunk_data,
|
||||
ChunkData_Biomes3D => on_chunk_data_biomes3d,
|
||||
ChunkData_HeightMap => on_chunk_data_heightmap,
|
||||
|
@ -1764,6 +1765,22 @@ impl Server {
|
|||
}
|
||||
}
|
||||
|
||||
fn on_chunk_data_biomes3d_bool(
|
||||
&mut self,
|
||||
chunk_data: packet::play::clientbound::ChunkData_Biomes3D_bool,
|
||||
) {
|
||||
self.world
|
||||
.load_chunk115(
|
||||
chunk_data.chunk_x,
|
||||
chunk_data.chunk_z,
|
||||
chunk_data.new,
|
||||
chunk_data.bitmask.0 as u16,
|
||||
chunk_data.data.data,
|
||||
)
|
||||
.unwrap();
|
||||
self.load_block_entities(chunk_data.block_entities.data);
|
||||
}
|
||||
|
||||
fn on_chunk_data_biomes3d(
|
||||
&mut self,
|
||||
chunk_data: packet::play::clientbound::ChunkData_Biomes3D,
|
||||
|
|
Loading…
Reference in New Issue