Commit graph

383 commits

Author SHA1 Message Date
8a1a26c13c
core: add support for sign text transformations
Add support for regexp replacement patterns, which can be useful when
the text matched by --sign-filter or --sign-prefix should not be
displayed.
2024-01-26 22:40:19 +01:00
625f2a13a3
core/metadata_writer: add enabled features to metadata
Only consider sign support enabled when at least one pattern is
configured.
2024-01-10 22:56:32 +01:00
87d4371922
core/metadata_writer: implement filtering for signs 2024-01-10 22:56:30 +01:00
a1dd77c8fd
world/sign: implement Display for SignText 2024-01-10 22:56:30 +01:00
9fd5689ebb
core: add sign pattern command line argument handling 2024-01-10 22:56:30 +01:00
6da921cca3
core: wrap long help texts 2024-01-10 22:56:30 +01:00
fb361145eb
world: add sign position and material information to block entities 2024-01-10 22:56:29 +01:00
9aacd9cc2b
resource: make regular signs transparent
For consistency with other sign types. Signs will be shown on a separate
layer.
2024-01-10 22:56:29 +01:00
8814dcff89
resource: split BlockType in Copy and !Copy parts
Preparation for actually adding !Copy fields to BlockType.

Only the Copy parts are added to the processed data, avoiding .clone()
for the most part.
2024-01-10 22:56:29 +01:00
d29c0df25d
core/metadata_writer: write entity list for viewer 2024-01-10 22:56:28 +01:00
cde6a4b6e6
core: merge entity data for all regions into one file
Introduce the EntityCollector, using the TileCollector and TileMerger
traits.
2024-01-10 22:56:28 +01:00
1143396068
core: use debug format for logging errors
Show the full cause stack.
2024-01-10 22:56:28 +01:00
0f308788ef
core: split TileMerger out of TileMipmapper
Reusable mipmap-style tile merging
2024-01-10 22:56:28 +01:00
7740ce0522
core/region_processor: sort processed block entities
Make the block entity list more reproducible when the stored chunk order
changes.
2024-01-10 22:56:27 +01:00
e36ae4601d
world: add Eq + Ord to all block entity types 2024-01-10 22:56:27 +01:00
825cf70e51
core: split TileCollector trait out of TileMipmapper
Make mipmap-style recursive processing of tiles reusable.
2024-01-10 22:56:27 +01:00
7297c03567
core/region_processor: store processed block entities for each region 2024-01-10 22:56:27 +01:00
c44f6ab859
io/storage: add JSON support
Bincode can't deal with a number of serde's features that would be
desirable if we're using the same Serialize impls for generating JSON
data for the viewer.
2024-01-10 22:56:27 +01:00
5d40d061a4
io/storage: split out inner part of read/write
Allow reusing the read/write logic without requiring control over the file
open.
2024-01-10 22:56:26 +01:00
f0e0db63d3
world: process sign data, prepare for serialization 2024-01-10 22:56:26 +01:00
638d5046c9
world/chunk: change Chunk into a struct
The version-specific part is extracted as an enum ChunkInner.
2024-01-10 22:56:26 +01:00
61d456846a
world: implement decoding raw JSON text into a linear list of formatted strings 2024-01-10 22:56:26 +01:00
f78dd795ca
world/de: add deserialization of sign block entities 2024-01-10 22:56:26 +01:00
0988ebe095
core/tile_mipmapper: fix file meta version for mipmap tiles
The meta version should only change when the outputs must be regenerated
even if the inputs stay the same. This should never be the case for
mipmap tiles, so we separate the meta version from map/lightmap tiles.
2024-01-10 22:56:26 +01:00
f79edb462c
core/common: add better explanation to file meta version definitions 2024-01-10 22:56:25 +01:00
e8165aa47d
world: hide unknown block/biome type warnings by default
While using MinedMap with modded Minecraft version is not officially
supported, it should still work reasonably well if you're okay with
custom block types being invisible and custom biomes using default
grass/color/foliage colors.

Avoid spamming the log with messages for each section in this case
without --verbose, and instead just print a single warning at the end of
processing.
2024-01-10 13:02:29 +01:00
1e41e1bc6a
world/chunk: move SectionIter structs to impl 2024-01-10 13:02:29 +01:00
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