Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

pmimporter: Map conversion tool

Comments in 'Tools' started by aliuly, Mar 17, 2015.

  1. RileyCraft
    Offline

    RileyCraft New Member

    Joined:
    Aug 9, 2015
    Posts:
    1
    Minecraft User:
    GreenFolly
    How do you launch it? I downloaded it but I don't see an application in it. I'm not good with computers.
    AndriassY likes this.
  2. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,084
    Plugins:
    17
    For those that are interested, I have a pre-release version of pmimporter v2.0 available for download/testing. Click here for download link.

    Please read THIS, as lots of things have changed.

    Highlights for this release:

    • A lot of the code has been re-factored for improved performance.
    • Preliminary compatibility with PHP7 (for more performance).
    • PocketMine-MP plugin has been discontinued.
    • Some sub-commands removed, and others have their syntax changed.
    • Imports individual chunks into existing maps (instead of always requiring a new map)
    • LevelDB support, requires a PHP that supports the php-leveldb extension.
    • Only LINUX is supported
  3. vertx
    Offline

    vertx Active Member

    Joined:
    Dec 4, 2014
    Posts:
    61
    Minecraft User:
    Vertx

    I've a request... Actually I already did a lot of map conversions using your tool, and not just yours but a lot of another tools like mcedit and map cutters/trimmers

    So well, I'm owner of a minigames network, and I wrote a lot of scripts that did the dirty work for me, but for newbie server owners, that doesn't know how to run java applets or write scripts, it'll be good that your tool have too a option for deleting useless chunks on minigames maps, like if you built a arena on a normal minecraft world, the entire world will be useless... So, why not deleting everything? the sintax would be like this:

    - put some blocks to "skip" on the command, chunks that doesn't have the id's especified here will be deleted

    - put a optional chunk radius to be skipped arround the blocks if found.

    - and optionally, this could be done also by especifing a coordinate and radius, everyting outside the radius will be deleted.

    On another hand /\ this is need because, when you load a world on pm, never mind you can load this world in any software again... I don't know what @shoghicp did here but that is... In MCPC softwares or this world will be recreated, or will load only invisible chunks, MCPC tools for converting worlds, like "MCRegion to Anvil converters" also doesn't work anymore, so, who haven't a pc to build and trim everything need on the world before converting it, never mind will be able to do this... so a tool that do it on pocketmine-level like your tool will be good for a lot of server owners...

    /\ or maybe just a MCRegion to Anvil converter that works for worlds "lost" by pocketmine will solve that, this way, servers can also try another servers softwares like bukkit or mcedit without having to rebuild the whole world...
    Last edited: Oct 9, 2015
  4. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,084
    Plugins:
    17
    Actually it already kinda does that. You can:

    • convert --x=xval --z=zval srcrmap dstmap
      Will only copy the chunk xval,zval. dstmap can be a new map or an existing map.
    • convert --min-x=x1 --min-z=z1 --max-x=x2 --max-z=z2 srcmap dstmap
      Will only copy the chunks between chunks x1,z1 and x2,z2 (inclusive). Again dstmap can be a new map or can merge to an existing map.
    So rather than telling it what not to copy, you tell it what to copy.
  5. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,084
    Plugins:
    17
    So I did a few benchmarks overnight of the new code base. So on average I get a 6x speed improvement. So yes, by default, my code sucks. (I write for programmer's efficiency not for system performance). The PMF reading code is not optimized so that brings the numbers down, otherwise I would average an 8x speed improvement.

    What is more interesting is that the same code on PHP7 is twice as fast. With PHP5.6 my basic Multi-Thread test took 337secs, with PHP7, it only took 146 seconds. With the old code base with PHP5.6 the same test 4,000 seconds (PHP7 was 27 times faster). So PHP7 is a major performance improvement.

    Overall I am happy on how this rewrite is turning out...
  6. vertx
    Offline

    vertx Active Member

    Joined:
    Dec 4, 2014
    Posts:
    61
    Minecraft User:
    Vertx
    Well, i got it, but in the oposide way, especifing what to not copy, allow us to automate the converting process, for example who put a bunch of maps to convert at the same time, because it's ineficient making individual commands line by line for each single map, right, this is only my perspective and probably 95 % of server owners will use it on the casual way for converting few maps, so, by the way, your method will work as well for then.

    Also, just for reporting, convertions changing the level offset break all the level's light population, and there's no way to recover (as far I tried), torchs, light hacks, whatever, the same behavior that happens on pm world editors, I don't know if there's a way to solve that, restoring the light population in every chunk converted, and if have a way, probably is hard to do and will slow down your code when doing this kind of convertion... but there's just my redundant report about this terrible issue on that very important feature for mcregion maps....

    thank you for your enforts on doing it better, cheers.
  7. Kailameth
    Offline

    Kailameth New Member

    Joined:
    Jan 19, 2016
    Posts:
    5
    Minecraft User:
    Kailameth
    Hey, the plugin is awesome, however, I have a question.
    How can you use it on Linux? What's the actual file path there?

    /root/.... seems not to work.

    Edit:

    Nevermind, I fixed that.
    However, I have a question.
    How much time does it take to convert a 13mb map? Hours?
    Last edited: Jan 31, 2016
  8. freshkitty
    Offline

    freshkitty Active Member

    Joined:
    Feb 13, 2016
    Posts:
    40
    Minecraft User:
    freshkitty
    I know its been almost a year since the last reply, but does anyone have one that works for API 2.0.0/PHP7
  9. KITTSS07
    Offline

    KITTSS07 New Member

    Joined:
    Jun 22, 2016
    Posts:
    2
    I'm getting this error when running the command

    Notice: Constant BL_BROWN_MUSHROOM already defined in phar://C:/MCPE/PocketMine/plugins/pmimporter.phar/classlib/pmimporter/Blocks.php on line 46
    Notice: Constant BL_RED_MUSHROOM already defined in phar://C:/MCPE/PocketMine/plugins/pmimporter.phar/classlib/pmimporter/Blocks.php on line 46
  10. KITTSS07
    Offline

    KITTSS07 New Member

    Joined:
    Jun 22, 2016
    Posts:
    2

Share This Page

Advertisement