248a641035
Restructure crates
...
Get rid of the arbitrary bin/lib split and instead move as much as
possible into the bin crate, which becomes the main crate again.
The types and NBT handling are moved into separate crates, so they can
be reused by nbtdump and regiondump.
2023-08-20 17:00:10 +02:00
05a8056cbf
Add documentation comments for all items
2023-08-20 11:21:29 +02:00
b2d849081d
io/region: allow stopping foreach_chunk early
...
Errors returned from the callback stop the loop early.
2023-02-26 01:01:37 +01:00
8c34f74952
io/region: return sorted Vec instead of HashMap from parse_header()
...
Instead of counting and looking up indices in the HashMap, we can just
iterate over all offsets in the returned Vec.
2023-01-30 19:08:51 +01:00
6186a0d916
io/region: accept incomplete block for final chunk
2023-01-30 00:45:05 +01:00
92a9bb3bb3
io/region: add chunk coords to error descriptions
2023-01-29 17:08:39 +01:00
1d126ba771
io/region: remove error handling for impossible cases from decode_chunk()
2023-01-29 17:04:28 +01:00
7c7e36f6be
io/region: avoid panic for invalid chunk lengths
2023-01-29 00:54:18 +01:00
da8ac506d9
io: remove a few unnecessary [..] for Vec -> slice deref
2023-01-28 01:15:00 +01:00
3cdafa7be9
Fix clippy warnings
2023-01-27 23:01:01 +01:00
daa188eb1d
io/region: use ChunkArray to parse region header
...
A layout of a ChunkArray::<u32> matches the binary format of the region
header.
2023-01-27 22:54:08 +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
0d8b989c10
io/region: remove count variable from Region::foreach_chunk()
2023-01-25 21:47:17 +01:00
5e96be3fda
Refactor logic from new dump tools into library crate
2023-01-25 21:42:16 +01:00