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:
parent
c5ddae58a1
commit
cee64cece3
3 changed files with 12 additions and 1 deletions
|
@ -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(
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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
|
||||||
// ........
|
// ........
|
||||||
|
|
Loading…
Add table
Reference in a new issue