diff options
author | Anthony Zhang <azhang9@gmail.com> | 2013-03-20 17:12:48 -0400 |
---|---|---|
committer | Anthony Zhang <azhang9@gmail.com> | 2013-03-20 17:12:48 -0400 |
commit | 9209d81d2022146ff53aea42dc66739b97b9138b (patch) | |
tree | f27d595bea5093c0f9371b6e71b5b8f337172689 /WorldEdit API.md | |
parent | 34c4475d066336b6b629195fcecd7551f82cf974 (diff) |
//metasave and //metaload are now superceded by //save and //load's new functionality. worldedit.deserialize now supports every version of the WorldEdit format that has ever existed, and the new worldedit.valueversion uses file characteristics to determine which type of file format a given file uses. The new WorldEdit file format is the same as the one used by MineTest for serializing data, and is capable of storing arbitrary data, as well as leaving fields for future improvements. In other words, this is the last forward-compatibility breaking change that will be made to the file format.
Diffstat (limited to 'WorldEdit API.md')
-rw-r--r-- | WorldEdit API.md | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/WorldEdit API.md b/WorldEdit API.md index e033150..464a719 100644 --- a/WorldEdit API.md +++ b/WorldEdit API.md @@ -152,6 +152,12 @@ Serialization -------------
Contained in serialization.lua, this module allows regions of nodes to be serialized and deserialized to formats suitable for use outside MineTest.
+### version = worldedit.valueversion(value)
+
+Determines the version of serialized data `value`.
+
+Returns the version as a positive integer or 0 for unknown versions.
+
### data, count = worldedit.serialize(pos1, pos2)
Converts the region defined by positions `pos1` and `pos2` into a single string.
@@ -170,26 +176,6 @@ Loads the nodes represented by string `value` at position `originpos`. Returns the number of nodes deserialized.
-### count = worldedit.deserialize_old(originpos, value)
-
-Loads the nodes represented by string `value` at position `originpos`, using the older table-based WorldEdit format.
-
-This function is deprecated, and should not be used unless there is a need to support legacy WorldEdit save files.
-
-Returns the number of nodes deserialized.
-
-### count = worldedit.metasave(pos1, pos2, file)
-
-Saves the nodes and meta defined by positions `pos1` and `pos2` into a file.
-
-Returns the number of nodes saved.
-
-### count = worldedit.metaload(pos1, file)
-
-Loads the nodes and meta from `file` to position `pos1`.
-
-Returns the number of nodes loaded.
-
Code
----
Contained in code.lua, this module allows arbitrary Lua code to be used with WorldEdit.
|