Overview
TheWorldConverter class is the primary interface for converting Minecraft worlds between different formats. It provides comprehensive configuration options for controlling all aspects of the conversion process, including which game elements to process, dimension mapping, and pruning.
Class Definition
cli/src/main/java/com/hivemc/chunker/conversion/WorldConverter.java:44
Constructor
Unique identifier for the conversion session
Core Methods
convert()
Create and start the conversion task.The reader to use for reading the input world format
The writer to use for writing the output world format
A task that completes when the conversion finishes. Can be used for progress tracking.
WorldConverter.java:518
cancel()
Cancel the conversion task.An exception to use as the reason for cancellation (optional)
A future that completes when the environment has fully cancelled
WorldConverter.java:612
Configuration Methods
Processing Options
Control which game elements are converted:Advanced Options
setDimensionMapping()
Map input dimensions to output dimensions. Dimensions not in the map are discarded.Dimension mappings, or null to keep input dimensions as-is
WorldConverter.java:128
setPruningConfigs()
Set regions to include or exclude from the conversion.Pruning configurations per dimension, or null for no pruning
WorldConverter.java:118
setChangedSettings()
Apply custom settings to the output level.dat file.Key-value settings to override in the level.dat
WorldConverter.java:498
setBlockMappings()
Provide custom block and item mappings.Custom mappings to use, or null for default mappings
WorldConverter.java:420
setProcessColumnPreTransform()
Enable pre-transform processing for block connections and neighbor chunk fetching.Whether to enable pre-transform processing (default: true)
WorldConverter.java:245
setLevelDBCompaction()
Enable LevelDB compaction after writing (Bedrock only).Whether to compact LevelDB after conversion
WorldConverter.java:137
setPreventYBiomeBlending()
Prevent vertical biome blending (Java only).Whether to prevent Y-axis biome blending
WorldConverter.java:155
setAllowNBTCopying()
Allow copying NBT data from input to output when formats match.Whether to allow NBT copying for same-format conversions
WorldConverter.java:227
setDiscardEmptyChunks()
Remove empty chunks from the output.Whether to discard empty chunks
WorldConverter.java:236
setCustomIdentifiers()
Allow conversion of custom block/item identifiers.Whether to allow custom identifiers (default: true)
WorldConverter.java:254
Status Methods
isCancelled()
Check if the conversion was cancelled.true if the conversion was cancelled
Location: WorldConverter.java:323
isExceptions()
Check if any exceptions occurred during conversion.true if any exceptions were logged during conversion
Location: WorldConverter.java:332
getMissingIdentifiers()
Get all missing mappings found during conversion.WorldConverter.java:341
Usage Example
Constants
Signal name used to indicate compaction has started:
"signal_compaction"WorldConverter.java:48
See Also
- EncodingType - Available world formats
- LevelReader - Reader interface
- LevelWriter - Writer interface