We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2da144e commit 7e5f652Copy full SHA for 7e5f652
src/bin/src/systems/listeners/digging_system.rs
@@ -285,7 +285,7 @@ fn break_block(
285
.0
286
.clone()
287
.terrain_generator
288
- .generate_chunk(BlockPos::from(position.clone()).chunk())
+ .generate_chunk(pos.chunk())
289
.map_err(BinaryError::WorldGen)?
290
}
291
};
src/lib/world/src/pos.rs
@@ -154,7 +154,7 @@ impl ChunkPos {
154
155
156
pub fn pack(&self) -> u64 {
157
- (self.pos.y as u64) << (32 - 8) | self.pos.x as u64 >> 4
+ (((self.z() as u64) & ((1 << 22) - 1)) << 22) | ((self.x() as u64) & ((1 << 22) - 1))
158
159
160
0 commit comments