From 268fc22d1ee02676585c3abface90ef24e9843f4 Mon Sep 17 00:00:00 2001 From: Alejandro Liu Date: Thu, 16 Apr 2015 22:12:26 +0200 Subject: [PATCH] Bug fixes, and doc updates --- README.md | 22 ++++++++++--------- build.php | 23 ++++++++++++-------- classlib/pmimporter/blocks.txt | 3 +++ classlib/pmimporter/generic/RegionLoader.php | 1 - main.php | 20 ++++++++++++++++- scripts/pmconvert.php | 2 -- version.txt | 2 +- 7 files changed, 49 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 00b0093..8eebb8a 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,10 @@ pmimporter Overview -------- -* pmconvert - main conversion tool -* pmcheck - read world maps and analyze the block, object composition -* pmentities - dump entity information -* pmlevel - manipulate some level.dat settings +* convert - main conversion tool +* check - read world maps and analyze the block, object composition +* entities - dump entity information +* level - manipulate some level.dat settings * nbtdump - Dump the contents of NBT files * dumpchunk - Extract an specific chunk from a map so it can be processed by nbtdump. @@ -52,9 +52,9 @@ In general, the command usage is: ### Sub-commands -#### PMCONVERT +#### CONVERT - pmconvert [-c rules.txt ] [-t count] [-f format] srcpath dstpath + convert [-c rules.txt ] [-t count] [-f format] srcpath dstpath Converts maps. @@ -68,7 +68,7 @@ Converts maps. * `srcpath` : Directory path to the source world. * `dstpath` : Directory path to create the new world. -Also, `pmconvert` allows you to specify special settings to tweak the +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: @@ -79,7 +79,7 @@ format reader/writer code. These settings are specifc to each #### PMCHECK - pmcheck worldpath [--all|[rX,rZ[:cX,cZ[+cX,cZ]]] ...] + check worldpath [--all|[rX,rZ[:cX,cZ[+cX,cZ]]] ...] Analyze the number of chunks, blocks, etc in a world map. @@ -90,9 +90,9 @@ Analyze the number of chunks, blocks, etc in a world map. 31) to analyze. * `+cX,cZ` : Additional chunks to add to totals. -#### PMLEVEL +#### LEVEL - pmlevel worldpath [attr=value] + level worldpath [attr=value] Displays and modifies certain level attributes. @@ -328,6 +328,8 @@ Changes * 1.5: Bugfix * BugFixes in MCPE0.2.0 format. + * BugFixes with region offsests on negative values + * Tweaked builds and subcommand names * 1.4: Maintenance release * pmentities fix typos * minor text info tweaks diff --git a/build.php b/build.php index 221a88a..f79610d 100644 --- a/build.php +++ b/build.php @@ -42,20 +42,25 @@ $p[$f] = file_get_contents($f); } +$scripts= ["version","plugin","man"]; + $help = "Available sub-commands:\n"; -foreach (glob('scripts/*.php') as $f) { - $f = preg_replace('/^scripts\//','',$f); +foreach (glob('scripts/*.php') as $fp) { + $f = preg_replace('/^scripts\//','',$fp); $f = preg_replace('/\.php$/','',$f); - $help .= "\t$f\n"; + $f = preg_replace('/^pm/','',$f); + $scripts[] = $f; + echo "$fp as $f\n"; + $p["scripts/$f.php"] = file_get_contents($fp); } -$help .= "\tversion\n"; -$help .= "\tplugin\n"; -$help .= "\treadme\n"; -$p['scripts/help.php'] = $help; +sort($scripts); +$p['scripts/help.php'] = "Available sub-commands:\n\t". + implode("\n\t",$scripts)."\n"; + $p['scripts/version.php'] = "getRegions(); if (!count($regions)) die("No regions found in $srcpath\n"); diff --git a/version.txt b/version.txt index 93f5e18..b2b8c35 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -pmimporter 1.4rel +pmimporter 1.5pre