Commit graph

295 commits

Author SHA1 Message Date
921a218d56
types: split BlockCoords into SectionBlockCoords and LayerBlockCoords 2023-02-15 00:35:18 +01:00
339e0b6a05
resource: add BlockType::is() method to check for flags 2023-02-15 00:34:59 +01:00
2a941e5283
resource: add BlockTypeMap type for convenience 2023-02-15 00:34:59 +01:00
db289bc077
resource: rename BlockFlags to BlockFlag
The enum only holds a single flag at a time.
2023-02-15 00:34:59 +01:00
102baa9197
types: add iter() associated function to coordinate newtypes 2023-02-15 00:34:53 +01:00
9f8446885e
treewide: remove get_ prefix from function names
Follow the conventions of the std library.
2023-02-12 23:36:58 +01:00
96736bd7ed
Replace DivRem trait with num-integer crate 2023-02-12 23:08:53 +01:00
1049aad03d
Update dependencies 2023-02-12 23:03:58 +01:00
9146c06bec
treewide: rename "old" data structures to "v0"
"v0" doesn't refer to a specific version of Minecraft; it is just the
oldest data format supported by MinedMap.
2023-02-12 23:03:58 +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
c34f531546
world/section: temporarily rename PaletteSectionBiomes fields
These fields are unused for now. Add an underscore to supress linter
warnings.
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
b918ff6106
world/section: add method to get block ID at coordinate 2023-02-12 23:03:58 +01:00
3cee4a4247
resource: port legacy block type mapping from old implementation 2023-02-12 23:03:57 +01:00
8add7679a3
types: add Eq to coordinate types 2023-02-12 23:03:57 +01:00
c130f3cdae
world: add section iterator
An (empty for now) trait is introduced to abstract over the two section
types.
2023-02-12 23:03:57 +01:00
2d782f25b1
world: add types to wrap common parts of section data 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
a174d627cd
Cargo.toml: change license to MIT
The copy of the license text in the repository is dropped.
2023-02-12 23:03:12 +01:00
718ecf5909
resource: update block type code generator for Rust 2023-02-07 22:18:44 +01:00
6379472282
world/de: new module for deserialization data structures
The new structures contain only the fields that MinedMap needs.
2023-02-07 18:32:01 +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
5a364e2434 Add new regiondump implemention 2023-01-25 21:41:34 +01:00
ddd78079dc Add new nbtdump util 2023-01-25 03:00:07 +01:00
40105aaccd Initial Rust setup 2023-01-25 00:06:27 +01:00
4b83f6376f Remove C++ implementation 2023-01-25 00:06:27 +01:00
c7e04649ff
Resource: Biome: add 1.19 biomes
Add the new biome temperature and rainfall values, as found in
decompiled Minecraft code:

- Deep Dark uses the same the values as plains
- Mangrove Swamp has the same temperature/rainfall as regular Swamp, but a
  different water color
2022-10-16 13:14:31 +02:00
4ce08a7d5d
workflows: replace deprecated set-output 2022-10-16 12:49:13 +02:00
c43c185d9b
workflows: update checkout/upload actions 2022-10-16 12:44:05 +02:00
6605483b4d
workflows: force tag update to get version
When building from a tag, Github will create a lightweight tag in place
of the proper one when fetching, breaking `git describe`. Force an update
of all tags to avoid this.
2022-10-16 12:24:48 +02:00
6125b1b027
README.md: add 1.19 support 2022-10-16 11:11:09 +02:00
Andrew Cox
600a20cde6
Update to compile on Mac OS (#26) 2022-07-01 23:27:58 +02:00
71fb865112
Merge pull request #24 from saadbruno/1.19
Add Minecraft 1.19 support
2022-06-25 21:20:21 +02:00
a6a1deaff5
Merge pull request #25 from saadbruno/gitignore-update
Quality of life updates to Gitignore
2022-06-25 16:29:34 +02:00
Bruno Saad
74bd6205b0 updates the gitignore to include common used directories in the documentation 2022-06-07 22:43:02 +00:00
Bruno Saad
7bba6d0863 Adding new blocks for 1.19 2022-06-07 16:48:43 +00:00
fbef307c90
UniqueCPtr: add doc comment
Explain what a UniqueCPtr is.
2022-02-09 21:26:12 +01:00