diff options
| author | mat <git@matdoes.dev> | 2025-02-23 17:39:17 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-02-23 17:39:17 +0000 |
| commit | 6a5ab34a2db56c22e1051dfaabf98322c50f53bd (patch) | |
| tree | bf0e13174c5bbb2bc6885ea357683a030aff5465 /azalea-world/src/heightmap.rs | |
| parent | 2be4f0f2b66eb7181badec0134c3c3565e3cbd7f (diff) | |
| download | azalea-drasl-6a5ab34a2db56c22e1051dfaabf98322c50f53bd.tar.xz | |
azalea-language now does a binary search instead of a hashmap lookup
Diffstat (limited to 'azalea-world/src/heightmap.rs')
| -rw-r--r-- | azalea-world/src/heightmap.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/azalea-world/src/heightmap.rs b/azalea-world/src/heightmap.rs index 35142cf2..f1ef30d2 100644 --- a/azalea-world/src/heightmap.rs +++ b/azalea-world/src/heightmap.rs @@ -56,7 +56,7 @@ impl HeightmapKind { } impl Heightmap { - pub fn new(kind: HeightmapKind, dimension_height: u32, min_y: i32, data: Vec<u64>) -> Self { + pub fn new(kind: HeightmapKind, dimension_height: u32, min_y: i32, data: Box<[u64]>) -> Self { let bits = math::ceil_log2(dimension_height + 1); let data = BitStorage::new(bits as usize, 16 * 16, Some(data)).unwrap(); Self { kind, data, min_y } |
