WorldEdit is one of the most important features of Old Minetest. It's a world editor that lets admins or builders with privileges rapidly create or modify structures or regions.
CoderEdit is the new generation of WorldEdit. It adds features that WorldEdit can only dream of.
* CoderEdit can handle larger regions, with LuaJit enabled, than WorldEdit can handle.
If a Final Minetest server is built using one of the official build kits — not from git — CoderEdit plus the special LuaJit provided outperform WorldEdit plus Old LuaJit even more.
* For some commands, CoderEdit mapgens target regions and/or sets them to air before proceeding. This largely corrects problems where WorldEdit punches holes in some areas and fills other areas with dark shadows.
In some cases, CoderEdit breaks large regions up into chunks of reasonable size. This reduces the crashes that are typical for Old WorldEdit when large regions are processed.
* If you do a //copy or //move that shifts a building just a short distance, CoderEdit is smart about it. In this case, the mod mapgens the target region, but doesn't set it to air.
* The Old WorldEdit //move command doesn't work at all if you move a building to a non-genned region. It just destroys your building. CoderEdit takes care of that.
* Old WorldEdit is unable to save and restore large regions with meta included. The MTS format doesn't support meta. The WE format does support meta, but crashes if you try to save large regions.
How to save meta? Simple: Use CoderEdit. CoderEdit provides commands //saveboth and //loadboth that save large regions plus meta without even blinking.
* CoderEdit respects your time. So, you can spell most two-word commands using the two words in either order. No need to remember exact order.
The rest of this page elaborates on the new features.
Large MTS schems:
You can now create MTS schems of up to 180 million nodes even with LuaJit running.
Note: For best results, use the LuaJit that comes with the Final Minetest build kits.
To give you an idea of how big that is, that’s the entirety of Bucket City in a single schematic. Higher end computers will be able to handle even larger areas.
Limits will depend on memory and your operating system’s ability to manage memory.
On a Core i5 with 16GB ram running Fedora Linux, Slopsbucket has saved and loaded 180M nodes. It takes quite a while though, so patience is required. The same machine, running Windows 7, chokes on 120M nodes.
Fixing dark shadows and random holes:
You no longer have to explore an area and force mapgen before importing a large schem. //mtschemplace now does this for you before placement. It also sets the entire region to air.
These steps help to ensure that you don’t get random holes or dark shadows in the loaded region.
//copy, //move, and //set all mapgen target regions as well. This prevents random holes from appearing.
This has fixed, as a related note, a long-standing bug in WorldEdit where if you moved a building to an unexplored region of the map, the building would simply be deleted instead of being moved to the new location.
//copy and //move set target regions to air as well except for a special case.
The special case is source and target regions overlapping. In this case, the set-to-air operation isn't done.
The set-to-air operation prevents unwanted dark shadows from appearing in target regions.
I learned a new trick. You still get black shadows on some builds, but instead of [redacted] around with mapfix all the time, you just mark positions to cover the entire area and replace air with air.
It works like a dream. Max area is 180 million nodes.
More about size limits:
//set can handle large regions now even if LuaJit is used. It's reasonable to expect to be able to //set regions of 180M nodes.
If problems occur, try the new LuaJit that comes with the official Final Minetest build kits.
//copy and //move are limited to about 1.2M nodes per operation. It sounds restrictive, but it's more than could be copied or moved previously in one go.
Large regions with meta:
Meta information is something that some nodes such as chests and Technic machines use.
The MTS format doesn't support meta. The WE format does support meta, but Minetest crashes if you try to save large regions in the WE format.
CoderEdit provides new save and load commands that support large regions with meta regardless. The commands involved are of the form:
Replace “trantor” with the desired schem name.
//saveboth creates a pair of schematic files, one in WE format and the other in MTS format.
The WE file contains meta nodes for a selected region and the MTS file contains non-meta nodes. Together, the two files hold a complete snapshot of a region.
//loadboth loads a specified pair and restores both meta and non-meta nodes.
Schem pairs of this type may or may not work with Old Minetest. You can try doing an //mtschemplace of the ".mts" file in a schem pair followed by a //load of the corresponding ".we" file. If that crashes, try it in the other order.