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

actually send Event::ReceiveChunk

This commit is contained in:
mat 2025-06-02 15:55:39 -03:00
parent c5ddae58a1
commit cee64cece3
3 changed files with 12 additions and 1 deletions

View file

@ -147,6 +147,7 @@ impl Plugin for EventsPlugin {
keepalive_listener, keepalive_listener,
death_listener, death_listener,
disconnect_listener, disconnect_listener,
receive_chunk_listener,
), ),
) )
.add_systems( .add_systems(

View file

@ -241,7 +241,6 @@ fn handle_mining_queued(
mut current_mining_pos, mut current_mining_pos,
) in query ) in query
{ {
info!("mining_queued: {mining_queued:?}");
commands.entity(entity).remove::<MiningQueued>(); commands.entity(entity).remove::<MiningQueued>();
let instance = instance_holder.instance.read(); let instance = instance_holder.instance.read();

View file

@ -444,6 +444,17 @@ impl Add<ChunkPos> for ChunkPos {
} }
} }
} }
impl Add<ChunkBlockPos> for ChunkPos {
type Output = BlockPos;
fn add(self, rhs: ChunkBlockPos) -> Self::Output {
BlockPos {
x: self.x * 16 + rhs.x as i32,
y: rhs.y,
z: self.z * 16 + rhs.z as i32,
}
}
}
// reading ChunkPos is done in reverse, so z first and then x // reading ChunkPos is done in reverse, so z first and then x
// ........ // ........