A collection of tools used for importing world maps for use with PocketMine-MP and Minecraft PE. It can be used from the Command-line and also as a plugin for PocketMine-MP.
It supports the following input formats:
Currently, it only support McRegion format for output.
When importing Minecraft PC Edition world maps (Anvil and McRegion formats) it
will analyze the used blocks to make sure that only blocks supported
by Minecraft PE are generated. It does this by either mapping these
blocks or removing them. This conversion/fitering can be tweaked with
an user provided rules
file.
Similarly, Tiles and Entities that are not supported by Minecraft PE are eliminated.
This is done because using these unsupported features on a Minecraft PE client would cause the game to crash.
In general, the command usage is:
convert [-c rules.txt ] [-t count] [-f format] srcpath dstpath
Converts maps.
-c rules
: Specify a rules conversion file.-t count
: Specifies the number of threads to run.-f format
: Specifies the output format. Defaults to mcregion
.-o offset
: Specifies the y-offset for the import. A value for
the number of blocks you want to move the world down. A negative
value will move the world up. Be careful when moving the world
down that you do not remove the ground.srcpath
: Directory path to the source world.dstpath
: Directory path to create the new world.Also, convert
allows you to specify special settings to tweak the
format reader/writer code. These settings are specifc to each
format
. To configure you must pass the option:
--in.setting=value
--out.setting-value
check worldpath [--all|[rX,rZ[:cX,cZ[+cX,cZ]]] ...]
Analyze the number of chunks, blocks, etc in a world map.
worldpath
: Directory path to world to analyze.--all
: If specified it will analyze all regions.rX,rZ
: Region X,Z coordinates.:cX,cZ
: Specify individual chunks (in Chunk offsets, from 0 to
31) to analyze.+cX,cZ
: Additional chunks to add to totals.level worldpath [attr=value]
Displays and modifies certain level attributes.
worldpath
: Directory path to world to display/modify.attr=value
: Modify the attr
setting to value
.The following attributes are supported:
spawn=x,y,z
: World spawn point.name=text
: Level name.seed=integer
: Random Seed.generator=name[,version]
: Terrain generator. PocketMine by
default only supports flat
and normal
.preset=preset
: Alias for generatorOptions
.generatorOptions=preset
: Terrain generator preset
string.
Ignored by the normal
generator. Used by flat
.nbtdump nbt_file
Dumps the contents of an NBT
formatted file.
dumpchunk worldpath rX,rY:cX,cY
Arguments are simmilar to pmcheck
.
worldpath
: Directory path to world to analyze.rX,rZ
: Region X,Z coordinates.:cX,cZ
: Specify individual chunks (in Chunk offsets, from 0 to
31) to dump.Settings are configuration strings that can be used to tweak either the reading or the writing of maps. These are format specifc.
Xoff
: offsets chunks in the X direction. Values can be from -15
to 15, however, unless the values are from 0 (value) to 8, parts of
the maps will be missing (as they will fall outside the region).Zoff
: offsets chunks in the Z direction. Values can be from -15
to 15, however, unless the values are from 0 (value) to 8, parts of
the maps will be missing (as they will fall outside the region).name
: Changes the reported name of the map.seed
: Changes the reported seed of the map.spawn
: Accepts 3 numbers separated by commas. For example:
128,64,128
. Changes the reported spawn location.generator
: Changes the reported map generator value.preset
: Changes the reported generator presets value.Xoff
: offsets chunks in the X direction. Values can be from -15
to 15, however, unless the values are from 0 (value) to 8, parts of
the maps will be missing (as they will fall outside the region).Zoff
: offsets chunks in the Z direction. Values can be from -15
to 15, however, unless the values are from 0 (value) to 8, parts of
the maps will be missing (as they will fall outside the region).name
: Changes the reported name of the map.seed
: Changes the reported seed of the map.spawn
: Accepts 3 numbers separated by commas. For example:
128,64,128
. Changes the reported spawn location.generator
: Changes the reported map generator value.preset
: Changes the reported generator presets value.Requirements:
Download pmimporter.phar
and use. It does not need to be
installed. If you want to use pmimporter
as a PocketMine-MP plugin,
copy the phar file to the PocketMine-MP plugins
directory.
You can configure the translation by providing a rules
file and
passing it to pmcovert
with the -c
option. The format of rules.txt
is as follows:
;
or #
.BLOCKS
- indicates the start of a blocks translation rules section.source-block = target-block
is a translation rule. Any block of
type source-block
is converted to target-block
.There is a default set of conversion rules, but you can tweak it by
using rules
.
Basic Usage:
Runs pmimporter
from within PocketMine-MP. See pmimporter
for
more information.
Show the version of the pmimporter
framework.
Because an import will use an AsyncTask
for quite a while, it is
recommended that you increase the async-workers
value to
something other than 1
. This setting is in pocketmine.yml
, in hte
settings
section.
You can configure the translation. This plugin will create a
rules.txt
in its data directory. The format of rules.txt
contains:
Importing maps is not something you would do while playing Minecraft.
If you are using the plugin version, you should only run it on an idle
server. Otherwise, it is better to use use pmimporter
directly from
the command line instead. You have more options available there.
Under Linux, pmimporter
can use multiple threads which can speed-up
things significantly.
-o
option. So if you use -o 40
that will move the
build down 40 blocks. BE CAREFUL NOT TO REMOVE THE GROUND.mcr
and .mca
files.
These confuses the File format recognizer. You need to delete the
.mcr
files so the world is recognized as in Anvil format.settings
capability to tweak conversion.Some of the code used in this program come from PocketMine-MP, licensed under GPL.
pmimporter
Copyright (C) 2015 Alejandro Liu
All Rights Reserved.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.