Commit graph

14 commits

Author SHA1 Message Date
3ef48783b7
types: introduce LayerBlockArray
A LayerBlockArray is a generic array of data stored for each block of a
chunk layer. It provides the same methods as a ChunkArray.
2023-02-15 00:49:07 +01:00
789a4002c7
types: add Clone + Debug to ChunkArray iterators
Added for consistency with LayerBlockArray.
2023-02-15 00:48:30 +01:00
921a218d56
types: split BlockCoords into SectionBlockCoords and LayerBlockCoords 2023-02-15 00:35:18 +01:00
102baa9197
types: add iter() associated function to coordinate newtypes 2023-02-15 00:34:53 +01:00
96736bd7ed
Replace DivRem trait with num-integer crate 2023-02-12 23:08:53 +01:00
493608ebc8
treewide: add more documentation 2023-02-12 23:03:58 +01:00
5ee114ed0a
types: slightly simplify DivRev trait 2023-02-12 23:03:58 +01:00
65c39ea153
types: make CHUNKS_PER_REGION and BLOCKS_PER_CHUNK usize
Having these as usize is more convenient.
2023-02-12 23:03:58 +01:00
8add7679a3
types: add Eq to coordinate types 2023-02-12 23:03:57 +01:00
b040a635ed
types: add types for block and section coordinates 2023-02-12 23:03:57 +01:00
357ef46731
types: add helper for division + remainder
We frequently require these operations together when converting between
bit and byte offsets, or similar purposes.
2023-02-12 23:03:57 +01:00
28b22ce423
Introduce ChunkArray type
A generic array for per-chunk data, indexed by ChunkCoords.
2023-01-27 22:05:49 +01:00
48e03aa266
Introduce ChunkCoords type 2023-01-27 22:01:41 +01:00
5e96be3fda
Refactor logic from new dump tools into library crate 2023-01-25 21:42:16 +01:00