Commit graph

356 commits

Author SHA1 Message Date
1812e5c6d6
Add type alias for f32 colors to minedmap-resource
Allow removing the dependency on a specific glam version from the main
crate.
2023-12-29 20:13:03 +01:00
93c1ce9437
core/region_processor: further split up SingleRegionProcessor::run() 2023-11-25 23:17:04 +01:00
25f675bd3b
core/region_processor: make logic for skipping updates more fine-grained
Allow skipping parts of the processing separately for processed region
and lightmap files.
2023-11-25 22:59:12 +01:00
a5ad057e0c
core/region_processor: refactor RegionProcessor::process_region() 2023-11-25 22:54:08 +01:00
fa15a4e6e5
core/common: separate FileMetaVersion for different outputs 2023-11-25 22:13:02 +01:00
4574c06f5d
core/common: remove Clone from ProcessedChunk/ProcessedRegion
These can be rather large, and there is no reason to ever clone them.
2023-11-25 22:11:56 +01:00
74a4fc93d0
world/de: rename Variants enums to Variant 2023-11-25 19:01:36 +01:00
fba9b6cb55
core/region_processor: reenable stat output 2023-10-12 21:49:42 +02:00
506631a18f
core/region_processor: only return available regions
Ignore regions that failed to process and have no old processed data.
2023-10-12 21:49:42 +02:00
fd48f94f16
core/region_processor: make regular processing errors non-fatal again
Never fail because of invalid save files.
2023-10-12 21:49:42 +02:00
09374d755e
core/region_processor: introduce RegionProcessorStatus enum 2023-10-12 20:10:28 +02:00
284892cea6
core/region_processor: make all process_region() error fatal
Less severe errors will be changed not to be passed up to run().
2023-10-12 20:10:28 +02:00
46c04e632f
core/region_processor: temporarily disable stat output 2023-10-12 20:10:28 +02:00
38da1616d5
core/region_processor: rename path to input_path in process_region()
Make the variable names more consistent.
2023-10-12 20:10:28 +02:00
920547f64a
core/tile_mipmapper: use mpsc channels for counters
Make the code a bit easier to understand.
2023-10-12 20:10:28 +02:00
7d37f6a5d0
Add summary messages 2023-09-20 00:38:19 +02:00
a8eb2da95d
Use tracing for configurable logging 2023-09-19 23:29:05 +02:00
4ef0200804
core: display version number based on git-describe 2023-08-27 14:27:40 +02:00
c010ee9194
Prepare for crates.io release 2023-08-21 21:51:01 +02:00
810a05ab36
Move nbtdump and regiondump commands to examples
Do not install the development utilities with minedmap
2023-08-21 13:21:18 +02:00
1616f3b2e2
Add --version command line argument 2023-08-21 13:19:00 +02:00
003b48951b
world: fix deserialize of unpopulated 1.18+ sections 2023-08-20 19:11:12 +02:00
5fc296fc44
Fix binary usage comments 2023-08-20 17:04:55 +02:00
228f31c568
Move resource module to a separate crate
The resource module does not depend on any other part of MinedMap.
2023-08-20 17:00:10 +02:00
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
3cb65ec70e
resource/block_types: update for Minecraft 1.20 2023-08-20 13:42:06 +02:00
204d0d06d5
resource/biomes: add Minecraft 1.20 support
Add the new Cherry Grove biome.
2023-08-20 13:42:04 +02:00
05a8056cbf
Add documentation comments for all items 2023-08-20 11:21:29 +02:00
ba86dc8c06
resource: use serde feature of enumflags2 crate 2023-08-19 16:01:51 +02:00
0842cb4ec2
Rename library crate to minedmap-core
Rustdoc can't deal with a bin and lib crate with the same name.
2023-08-18 19:20:21 +02:00
427a992897
minedmap/tile_renderer: keep HashSet of populated regions
Rather than attemping to read the file metadata, it's more elegant to
check whether a tile is supposed to be available first.
2023-08-15 20:48:41 +02:00
722fe00d77
minedmap: move inputs to processing steps from run() to new() 2023-08-15 18:45:38 +02:00
6a82fcc9b4
minedmap/tile_renderer: terminate on errors
Only the processing step may fail for individual tiles (when a region is
currently being saved when attempting to process it), the other steps
should never fail.
2023-08-15 18:31:53 +02:00
155171803d
minedmap/tile_renderer: parallel processing 2023-08-15 17:43:58 +02:00
b5980b82af
minedmap/tile_renderer: async region cache
Prepare for sharing the region cache between multiple threads by making
lookup/load async.
2023-08-15 17:42:27 +02:00
dcc9e6e794
minedmap/region_group: add async map functions 2023-08-15 17:39:42 +02:00
78fe1ec50e
minedmap: add support for parallel processing
For now, only RegionProcessor and TileMipmapper are run in parallel.
2023-08-14 22:38:21 +02:00
c1260a63b5
minedmap: separate collection for region list from preprocessing
Preparation for parallel processing, as well as a fix for regions
missing from later steps when the initial processing failed (rather than
using the processed data from a previous run).
2023-08-14 14:27:52 +02:00
d5ac38ed9b
util: split to_flat_coord() and from_flat_coord() out of coord_offset() 2023-08-13 23:01:45 +02:00
9c4161f688
util: turn range check into debug_assert!()
More performance optimization.
2023-08-06 12:33:29 +02:00
21035a1f7f
Move coord offset to new util module, make more efficient
div_floor_mod() generates inefficient code. For power-of-2 divisors,
shift and mask can be used instead.
2023-08-06 11:26:08 +02:00
b80d9ee420
minedmap/tile_renderer: make biome HashMap more efficient
Using a u32 instead of a tuple makes the hash calculation faster,
because the fields don't have to be hashed separately.
2023-08-06 00:07:46 +02:00
84bee6d6d9
minedmap: add region cache
Cache the last loaded processed regions.
2023-08-05 20:26:59 +02:00
521e799d4b
minedmap/region_group: make indexing into the neighbor array more uniform
Add a 9th element, so the 3x3 entries can always be indexed the same way,
leading to a slight performance improvement.

The center element is always None.
2023-08-05 18:21:07 +02:00
7b46adf6e7
minedmap: split up big types by adding Boxes
Make these values faster to move around, and optimize their size when
used in Options.
2023-08-05 18:11:39 +02:00
cd1a5e869d
minedmap/region_group: optimize get() implementation 2023-08-05 14:07:55 +02:00
7d231b92ea
Format let-else blocks
Use nightly rustfmt to format let-else.
2023-08-05 10:46:47 +02:00
dc68e67a23
minedmap/region_group: clippy fixes 2023-08-04 00:46:58 +02:00
deb33814ee
minedmap/tile_renderer: avoid calling block_color() more often than necessary
Collect all biome indices/weights for a chunk and deduplicate using a
hash map.
2023-08-03 23:07:16 +02:00
fb712cd2f5
Store per-region biome list in IndexSet
Index into the biome list instead of duplicating the biome data for each
coordinate. This reduces the size of the processed data and speeds up
encoding/decoding.
2023-08-03 23:07:16 +02:00