mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
actually send Event::ReceiveChunk
This commit is contained in:
parent
c5ddae58a1
commit
cee64cece3
3 changed files with 12 additions and 1 deletions
|
@ -147,6 +147,7 @@ impl Plugin for EventsPlugin {
|
|||
keepalive_listener,
|
||||
death_listener,
|
||||
disconnect_listener,
|
||||
receive_chunk_listener,
|
||||
),
|
||||
)
|
||||
.add_systems(
|
||||
|
|
|
@ -241,7 +241,6 @@ fn handle_mining_queued(
|
|||
mut current_mining_pos,
|
||||
) in query
|
||||
{
|
||||
info!("mining_queued: {mining_queued:?}");
|
||||
commands.entity(entity).remove::<MiningQueued>();
|
||||
|
||||
let instance = instance_holder.instance.read();
|
||||
|
|
|
@ -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
|
||||
// ........
|
||||
|
|
Loading…
Add table
Reference in a new issue