Mojang Minecraft Reader/Writer
Licensing options for this format begin with FME Desktop Professional Edition.
The Minecraft Reader/Writer allows FME to create Minecraft worlds. At its core, a Minecraft world is composed of an arbitrary number of Region files, and a “level” file. The level file defines the metadata for the world, while the region files define the blocks that shape the terrain. 1 2
Format Version and Information
FME supports Minecraft version 1.7.*, with NBT version 19133.
The format contains of binary data consisting of a level metadata file, and a number of region files defining a Minecraft world.
Note: FME does not currently support writing to the Minecraft Pocket Edition format. If you require this enhancement, please visit the FME Community and suggest an idea.
Reader Overview
The Minecraft Reader will takes as input dataset a Minecraft level.dat file. A Region folder should also be present in the same folder. The reader will create a point cloud using these region files. All region files in the folder will be parsed into the point cloud.
The reader will create points for each block found in each region, and will assign x, y, z, blockID, and blockData components from the data blocks. Air blocks (blockID =0) will not be included in the final point cloud.
The x component will be the block’s x value, the y-component will be -1 * the block’s z value, the z-component will be equal to the block’s y value. Entities, items, and player characters will not be stored.
The reader will also set feature attributes values on the point cloud feature, such as seed, world name, and generator options, taken from the level.dat file.
Each Region file is named after its location in the world represents 512 x 256 x 512 blocks in the Minecraft world. Minecraft continues to generate new Regions as the player continues to explore new ground. Regions are additionally split into 1024 (32 x 32), with 16 x 256 x 16 Chunks. Each chunk is then split into up to 16 individual sections.
Writer Overview
The Minecraft Writer takes in a Point Cloud as input and creates the corresponding world files in the chosen destination folder. Minecraft Region (*.mca) and any level files (level.dat) present in the folder will be deleted before writing the new data. Each point in the point cloud will be mapped to a block in the world. The blockID and blockData components define the type of block created at that location. 3 4
The value for the Writer dataset is the path of the output folder where the data will be written.
Coordinate System
Minecraft’s coordinate system is shown below:
The Y-axis represents vertical distance, and the Z-axis represents horizontal displacement in the North-South direction. Note that Z decreases as you move north.
In the input point cloud, the x-component will be mapped to the X-axis. The y-component will be mapped to the game’s Z-axis. To maintain correct spatial relationships, however, the y-component’s values will be scaled by -1. The z-component is mapped to the Y-axis. Because of the game engine limitations, the vertical axis is limited to size 0 – 255.
The writer options control the way that the world is created by modifying the way the world is generated outside the dataset, as well as how the dataset will be represented in the game world.
Game World Operating System Locations
Minecraft game worlds are stored in:
- Windows: %appdata%\.minecraft\saves\
- GNU/Linux: ~/.minecraft/saves/
- Mac: ~/Library/Application Support/minecraft/saves/
Each world is stored in a separate folder containing the level.dat file and the regions, as well as additional game data. Adding the folder generated to this location will make the world playable in Minecraft.
Note: It is not recommended to make this location the destination dataset, since changing game files while Minecraft is running can lead to instability.