Muirfield / pmimporter

PocketMine-MP map importer
27 stars 11 forks source link

pmimporter

Overview

Description

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.

Command Usage

In general, the command usage is:

Sub-commands

CONVERT

convert [-c rules.txt ] [-t count] [-f format] srcpath dstpath

Converts maps.

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:

PMCHECK

check worldpath [--all|[rX,rZ[:cX,cZ[+cX,cZ]]] ...]

Analyze the number of chunks, blocks, etc in a world map.

LEVEL

level worldpath [attr=value]

Displays and modifies certain level attributes.

The following attributes are supported:

NBTDUMP

nbtdump nbt_file

Dumps the contents of an NBT formatted file.

DUMPCHUNK

dumpchunk worldpath rX,rY:cX,cY

Arguments are simmilar to pmcheck.

Settings

Settings are configuration strings that can be used to tweak either the reading or the writing of maps. These are format specifc.

PMF1.3 Settings

McPe0.2.0 Settings

Installation

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.

Configure translation

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:

There is a default set of conversion rules, but you can tweak it by using rules.

PocketMine-MP Plugin

Basic Usage:

Runs pmimporter from within PocketMine-MP. See pmimporter for more information.

Command:

Show the version of the pmimporter framework.

Configuration

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:

Permission Nodes:

Hints

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.

Permission Nodes:

FAQ

References

Issues and Bugs

Todo

Changes

Copyright

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/>.