From 0cce0478d846114f49c4b8fe201aee7a1bb06b22 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Mon, 10 Mar 2014 17:07:46 +0100 Subject: This allows a blockarea to have an Offset. --- src/BlockArea.cpp | 19 +++++++++++++++++++ src/BlockArea.h | 5 +++++ src/WorldStorage/SchematicFileSerializer.cpp | 23 +++++++++++++++++++++++ 3 files changed, 47 insertions(+) diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp index d07ef747a..986b2ee25 100644 --- a/src/BlockArea.cpp +++ b/src/BlockArea.cpp @@ -168,6 +168,7 @@ cBlockArea::cBlockArea(void) : m_SizeX(0), m_SizeY(0), m_SizeZ(0), + m_Offset(0,0,0), m_BlockTypes(NULL), m_BlockMetas(NULL), m_BlockLight(NULL), @@ -254,6 +255,24 @@ void cBlockArea::Create(int a_SizeX, int a_SizeY, int a_SizeZ, int a_DataTypes) +void cBlockArea::SetOffset(int a_OffsetX, int a_OffsetY, int a_OffsetZ) +{ + m_Offset.Set(a_OffsetX, a_OffsetY, a_OffsetZ); +} + + + + + +void cBlockArea::SetOffset(Vector3i a_Offset) +{ + m_Offset.Set(a_Offset.x, a_Offset.y, a_Offset.z); +} + + + + + void cBlockArea::SetOrigin(int a_OriginX, int a_OriginY, int a_OriginZ) { m_OriginX = a_OriginX; diff --git a/src/BlockArea.h b/src/BlockArea.h index 0703f195e..d89c9b372 100644 --- a/src/BlockArea.h +++ b/src/BlockArea.h @@ -209,6 +209,8 @@ public: void SetBlockLight (int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_BlockLight); void SetRelBlockSkyLight(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE a_BlockSkyLight); void SetBlockSkyLight (int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_BlockSkyLight); + void SetOffset (int a_OffsetX, int a_OffsetY, int a_OffsetZ); + void SetOffset (Vector3i a_Offset); // Getters: BLOCKTYPE GetRelBlockType (int a_RelX, int a_RelY, int a_RelZ) const; @@ -219,6 +221,7 @@ public: NIBBLETYPE GetBlockLight (int a_BlockX, int a_BlockY, int a_BlockZ) const; NIBBLETYPE GetRelBlockSkyLight(int a_RelX, int a_RelY, int a_RelZ) const; NIBBLETYPE GetBlockSkyLight (int a_BlockX, int a_BlockY, int a_BlockZ) const; + Vector3i GetOffset (void) const {return m_Offset;} void SetBlockTypeMeta (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); void SetRelBlockTypeMeta(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); @@ -299,6 +302,8 @@ protected: int m_SizeY; int m_SizeZ; + Vector3i m_Offset; + BLOCKTYPE * m_BlockTypes; NIBBLETYPE * m_BlockMetas; // Each meta is stored as a separate byte for faster access NIBBLETYPE * m_BlockLight; // Each light value is stored as a separate byte for faster access diff --git a/src/WorldStorage/SchematicFileSerializer.cpp b/src/WorldStorage/SchematicFileSerializer.cpp index b021aeb0c..0aea931eb 100644 --- a/src/WorldStorage/SchematicFileSerializer.cpp +++ b/src/WorldStorage/SchematicFileSerializer.cpp @@ -177,6 +177,25 @@ bool cSchematicFileSerializer::LoadFromSchematicNBT(cBlockArea & a_BlockArea, cP a_BlockArea.Clear(); a_BlockArea.SetSize(SizeX, SizeY, SizeZ, AreMetasPresent ? (cBlockArea::baTypes | cBlockArea::baMetas) : cBlockArea::baTypes); + int TOffsetX = a_NBT.FindChildByName(a_NBT.GetRoot(), "WEOffsetX"); + int TOffsetY = a_NBT.FindChildByName(a_NBT.GetRoot(), "WEOffsetY"); + int TOffsetZ = a_NBT.FindChildByName(a_NBT.GetRoot(), "WEOffsetZ"); + + if ( + (TOffsetX < 0) || (TOffsetY < 0) || (TOffsetZ < 0) || + (a_NBT.GetType(TOffsetX) != TAG_Int) || + (a_NBT.GetType(TOffsetY) != TAG_Int) || + (a_NBT.GetType(TOffsetZ) != TAG_Int) + ) + { + // Not every schematic file has an offset, so we shoudn't give a warn message. + a_BlockArea.SetOffset(0, 0, 0); + } + else + { + a_BlockArea.SetOffset(a_NBT.GetInt(TOffsetX), a_NBT.GetInt(TOffsetY), a_NBT.GetInt(TOffsetZ)); + } + // Copy the block types and metas: int NumBytes = a_BlockArea.m_SizeX * a_BlockArea.m_SizeY * a_BlockArea.m_SizeZ; if (a_NBT.GetDataLength(TBlockTypes) < NumBytes) @@ -234,6 +253,10 @@ AString cSchematicFileSerializer::SaveToSchematicNBT(const cBlockArea & a_BlockA Writer.AddByteArray("Data", Dummy.data(), Dummy.size()); } + Writer.AddInt("WEOffsetX", a_BlockArea.m_Offset.x); + Writer.AddInt("WEOffsetY", a_BlockArea.m_Offset.y); + Writer.AddInt("WEOffsetZ", a_BlockArea.m_Offset.z); + // TODO: Save entities and block entities Writer.BeginList("Entities", TAG_Compound); Writer.EndList(); -- cgit v1.2.3 From 541175d8a08515568d75a8d6b57bc4841e273c4a Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Tue, 11 Mar 2014 14:44:21 +0100 Subject: Using ```const Vector3i &``` --- src/BlockArea.cpp | 2 +- src/BlockArea.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp index 986b2ee25..dfdf998df 100644 --- a/src/BlockArea.cpp +++ b/src/BlockArea.cpp @@ -264,7 +264,7 @@ void cBlockArea::SetOffset(int a_OffsetX, int a_OffsetY, int a_OffsetZ) -void cBlockArea::SetOffset(Vector3i a_Offset) +void cBlockArea::SetOffset(const Vector3i & a_Offset) { m_Offset.Set(a_Offset.x, a_Offset.y, a_Offset.z); } diff --git a/src/BlockArea.h b/src/BlockArea.h index d89c9b372..75b8db3a6 100644 --- a/src/BlockArea.h +++ b/src/BlockArea.h @@ -210,7 +210,7 @@ public: void SetRelBlockSkyLight(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE a_BlockSkyLight); void SetBlockSkyLight (int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_BlockSkyLight); void SetOffset (int a_OffsetX, int a_OffsetY, int a_OffsetZ); - void SetOffset (Vector3i a_Offset); + void SetOffset (const Vector3i & a_Offset); // Getters: BLOCKTYPE GetRelBlockType (int a_RelX, int a_RelY, int a_RelZ) const; @@ -221,7 +221,7 @@ public: NIBBLETYPE GetBlockLight (int a_BlockX, int a_BlockY, int a_BlockZ) const; NIBBLETYPE GetRelBlockSkyLight(int a_RelX, int a_RelY, int a_RelZ) const; NIBBLETYPE GetBlockSkyLight (int a_BlockX, int a_BlockY, int a_BlockZ) const; - Vector3i GetOffset (void) const {return m_Offset;} + const Vector3i & GetOffset (void) const {return m_Offset;} void SetBlockTypeMeta (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); void SetRelBlockTypeMeta(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); -- cgit v1.2.3 From e213e5f9fcb3681a5f383546e17b9800d4a4804a Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Tue, 11 Mar 2014 18:23:21 +0100 Subject: Renamed m_Offset to m_WEOffset --- src/BlockArea.cpp | 6 +++--- src/BlockArea.h | 5 +++-- src/WorldStorage/SchematicFileSerializer.cpp | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp index dfdf998df..983dbe46b 100644 --- a/src/BlockArea.cpp +++ b/src/BlockArea.cpp @@ -168,7 +168,7 @@ cBlockArea::cBlockArea(void) : m_SizeX(0), m_SizeY(0), m_SizeZ(0), - m_Offset(0,0,0), + m_WEOffset(0, 0, 0), m_BlockTypes(NULL), m_BlockMetas(NULL), m_BlockLight(NULL), @@ -257,7 +257,7 @@ void cBlockArea::Create(int a_SizeX, int a_SizeY, int a_SizeZ, int a_DataTypes) void cBlockArea::SetOffset(int a_OffsetX, int a_OffsetY, int a_OffsetZ) { - m_Offset.Set(a_OffsetX, a_OffsetY, a_OffsetZ); + m_WEOffset.Set(a_OffsetX, a_OffsetY, a_OffsetZ); } @@ -266,7 +266,7 @@ void cBlockArea::SetOffset(int a_OffsetX, int a_OffsetY, int a_OffsetZ) void cBlockArea::SetOffset(const Vector3i & a_Offset) { - m_Offset.Set(a_Offset.x, a_Offset.y, a_Offset.z); + m_WEOffset.Set(a_Offset.x, a_Offset.y, a_Offset.z); } diff --git a/src/BlockArea.h b/src/BlockArea.h index 75b8db3a6..76424d02f 100644 --- a/src/BlockArea.h +++ b/src/BlockArea.h @@ -221,7 +221,7 @@ public: NIBBLETYPE GetBlockLight (int a_BlockX, int a_BlockY, int a_BlockZ) const; NIBBLETYPE GetRelBlockSkyLight(int a_RelX, int a_RelY, int a_RelZ) const; NIBBLETYPE GetBlockSkyLight (int a_BlockX, int a_BlockY, int a_BlockZ) const; - const Vector3i & GetOffset (void) const {return m_Offset;} + const Vector3i & GetOffset (void) const {return m_WEOffset;} void SetBlockTypeMeta (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); void SetRelBlockTypeMeta(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); @@ -302,7 +302,8 @@ protected: int m_SizeY; int m_SizeZ; - Vector3i m_Offset; + // Used for schematics that are created by the WorldEdit plugin. The offset is used for player-relative pasting. + Vector3i m_WEOffset; BLOCKTYPE * m_BlockTypes; NIBBLETYPE * m_BlockMetas; // Each meta is stored as a separate byte for faster access diff --git a/src/WorldStorage/SchematicFileSerializer.cpp b/src/WorldStorage/SchematicFileSerializer.cpp index 0aea931eb..b899540df 100644 --- a/src/WorldStorage/SchematicFileSerializer.cpp +++ b/src/WorldStorage/SchematicFileSerializer.cpp @@ -253,9 +253,9 @@ AString cSchematicFileSerializer::SaveToSchematicNBT(const cBlockArea & a_BlockA Writer.AddByteArray("Data", Dummy.data(), Dummy.size()); } - Writer.AddInt("WEOffsetX", a_BlockArea.m_Offset.x); - Writer.AddInt("WEOffsetY", a_BlockArea.m_Offset.y); - Writer.AddInt("WEOffsetZ", a_BlockArea.m_Offset.z); + Writer.AddInt("WEOffsetX", a_BlockArea.m_WEOffset.x); + Writer.AddInt("WEOffsetY", a_BlockArea.m_WEOffset.y); + Writer.AddInt("WEOffsetZ", a_BlockArea.m_WEOffset.z); // TODO: Save entities and block entities Writer.BeginList("Entities", TAG_Compound); -- cgit v1.2.3 From fa4ff28bc04f73a2af98a0f00e536e2b5293cbf1 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Tue, 11 Mar 2014 19:38:56 +0100 Subject: Documented the functions. --- MCServer/Plugins/APIDump/APIDesc.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index 1e572492b..54b2372f8 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -115,6 +115,7 @@ g_APIDesc = GetBlockType = { Params = "BlockX, BlockY, BlockZ", Return = "BLOCKTYPE", Notes = "Returns the block type at the specified absolute coords" }, GetBlockTypeMeta = { Params = "BlockX, BlockY, BlockZ", Return = "BLOCKTYPE, NIBBLETYPE", Notes = "Returns the block type and meta at the specified absolute coords" }, GetDataTypes = { Params = "", Return = "number", Notes = "Returns the mask of datatypes that the objectis currently holding" }, + GetOffset = { Params = "", Returns = "Vector3i", Notes = "Returns the offset wich are sometimes saved in schematic files if created by WorldEdit (Bukkit) for player-relative pasting. The default is 0, 0, 0"}, GetOrigin = { Params = "", Return = "OriginX, OriginY, OriginZ", Notes = "Returns the origin coords of where the area was read from." }, GetOriginX = { Params = "", Return = "number", Notes = "Returns the origin x-coord" }, GetOriginY = { Params = "", Return = "number", Notes = "Returns the origin y-coord" }, @@ -168,6 +169,11 @@ g_APIDesc = SetBlockSkyLight = { Params = "BlockX, BlockY, BlockZ, SkyLight", Return = "", Notes = "Sets the skylight at the specified absolute coords" }, SetBlockType = { Params = "BlockX, BlockY, BlockZ, BlockType", Return = "", Notes = "Sets the block type at the specified absolute coords" }, SetBlockTypeMeta = { Params = "BlockX, BlockY, BlockZ, BlockType, BlockMeta", Return = "", Notes = "Sets the block type and meta at the specified absolute coords" }, + SetOffset = + { + { Params = "{{Vector3i|Offset}}", Return = "", Notes = "Sets the offset of the cBlockArea. Mostly used for WorldEdit." }, + { Params = "OffsetX, OffsetY, OffsetZ", Return = "", Notes = "Sets the offset of the cBlockArea. Mostly used for WorldEdit." }, + } SetOrigin = { { Params = "{{Vector3i|Origin}}", Return = "", Notes = "Resets the origin for the absolute coords. Only affects how absolute coords are translated into relative coords." }, -- cgit v1.2.3 From 7d1e32a28b167faa6b17235283822da0cc7b2c13 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Tue, 11 Mar 2014 19:45:16 +0100 Subject: Fixed APIDump --- MCServer/Plugins/APIDump/APIDesc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index 54b2372f8..5d4b89425 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -173,7 +173,7 @@ g_APIDesc = { { Params = "{{Vector3i|Offset}}", Return = "", Notes = "Sets the offset of the cBlockArea. Mostly used for WorldEdit." }, { Params = "OffsetX, OffsetY, OffsetZ", Return = "", Notes = "Sets the offset of the cBlockArea. Mostly used for WorldEdit." }, - } + }, SetOrigin = { { Params = "{{Vector3i|Origin}}", Return = "", Notes = "Resets the origin for the absolute coords. Only affects how absolute coords are translated into relative coords." }, -- cgit v1.2.3 From 950614da7e700b8847f0dcc0bac9d76367801a3f Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 12 Mar 2014 07:46:14 +0100 Subject: Renamed cBlockArea Offset to WEOffset. Even in getters / setters. --- src/BlockArea.cpp | 4 ++-- src/BlockArea.h | 9 +++++---- src/WorldStorage/SchematicFileSerializer.cpp | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp index 983dbe46b..406e18a3b 100644 --- a/src/BlockArea.cpp +++ b/src/BlockArea.cpp @@ -255,7 +255,7 @@ void cBlockArea::Create(int a_SizeX, int a_SizeY, int a_SizeZ, int a_DataTypes) -void cBlockArea::SetOffset(int a_OffsetX, int a_OffsetY, int a_OffsetZ) +void cBlockArea::SetWEOffset(int a_OffsetX, int a_OffsetY, int a_OffsetZ) { m_WEOffset.Set(a_OffsetX, a_OffsetY, a_OffsetZ); } @@ -264,7 +264,7 @@ void cBlockArea::SetOffset(int a_OffsetX, int a_OffsetY, int a_OffsetZ) -void cBlockArea::SetOffset(const Vector3i & a_Offset) +void cBlockArea::SetWEOffset(const Vector3i & a_Offset) { m_WEOffset.Set(a_Offset.x, a_Offset.y, a_Offset.z); } diff --git a/src/BlockArea.h b/src/BlockArea.h index 76424d02f..31918ce8c 100644 --- a/src/BlockArea.h +++ b/src/BlockArea.h @@ -209,8 +209,8 @@ public: void SetBlockLight (int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_BlockLight); void SetRelBlockSkyLight(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE a_BlockSkyLight); void SetBlockSkyLight (int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_BlockSkyLight); - void SetOffset (int a_OffsetX, int a_OffsetY, int a_OffsetZ); - void SetOffset (const Vector3i & a_Offset); + void SetWEOffset (int a_OffsetX, int a_OffsetY, int a_OffsetZ); + void SetWEOffset (const Vector3i & a_Offset); // Getters: BLOCKTYPE GetRelBlockType (int a_RelX, int a_RelY, int a_RelZ) const; @@ -221,7 +221,7 @@ public: NIBBLETYPE GetBlockLight (int a_BlockX, int a_BlockY, int a_BlockZ) const; NIBBLETYPE GetRelBlockSkyLight(int a_RelX, int a_RelY, int a_RelZ) const; NIBBLETYPE GetBlockSkyLight (int a_BlockX, int a_BlockY, int a_BlockZ) const; - const Vector3i & GetOffset (void) const {return m_WEOffset;} + const Vector3i & GetWEOffset (void) const {return m_WEOffset;} void SetBlockTypeMeta (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); void SetRelBlockTypeMeta(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); @@ -302,7 +302,8 @@ protected: int m_SizeY; int m_SizeZ; - // Used for schematics that are created by the WorldEdit plugin. The offset is used for player-relative pasting. + /** An extra data value sometimes stored in the .schematic file. Used mainly by the WorldEdit plugin. + cBlockArea doesn't use this value in any way. */ Vector3i m_WEOffset; BLOCKTYPE * m_BlockTypes; diff --git a/src/WorldStorage/SchematicFileSerializer.cpp b/src/WorldStorage/SchematicFileSerializer.cpp index b899540df..ef67fdb13 100644 --- a/src/WorldStorage/SchematicFileSerializer.cpp +++ b/src/WorldStorage/SchematicFileSerializer.cpp @@ -189,11 +189,11 @@ bool cSchematicFileSerializer::LoadFromSchematicNBT(cBlockArea & a_BlockArea, cP ) { // Not every schematic file has an offset, so we shoudn't give a warn message. - a_BlockArea.SetOffset(0, 0, 0); + a_BlockArea.SetWEOffset(0, 0, 0); } else { - a_BlockArea.SetOffset(a_NBT.GetInt(TOffsetX), a_NBT.GetInt(TOffsetY), a_NBT.GetInt(TOffsetZ)); + a_BlockArea.SetWEOffset(a_NBT.GetInt(TOffsetX), a_NBT.GetInt(TOffsetY), a_NBT.GetInt(TOffsetZ)); } // Copy the block types and metas: -- cgit v1.2.3 From 15c70a1f68ac176993b647cb0860cd190b7631d0 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 12 Mar 2014 07:53:25 +0100 Subject: APIDump: Updated WEOffset-related docs. --- MCServer/Plugins/APIDump/APIDesc.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index 086791006..18b90adbf 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -114,8 +114,7 @@ g_APIDesc = GetBlockSkyLight = { Params = "BlockX, BlockY, BlockZ", Return = "NIBBLETYPE", Notes = "Returns the skylight at the specified absolute coords" }, GetBlockType = { Params = "BlockX, BlockY, BlockZ", Return = "BLOCKTYPE", Notes = "Returns the block type at the specified absolute coords" }, GetBlockTypeMeta = { Params = "BlockX, BlockY, BlockZ", Return = "BLOCKTYPE, NIBBLETYPE", Notes = "Returns the block type and meta at the specified absolute coords" }, - GetDataTypes = { Params = "", Return = "number", Notes = "Returns the mask of datatypes that the objectis currently holding" }, - GetOffset = { Params = "", Returns = "Vector3i", Notes = "Returns the offset wich are sometimes saved in schematic files if created by WorldEdit (Bukkit) for player-relative pasting. The default is 0, 0, 0"}, + GetDataTypes = { Params = "", Return = "number", Notes = "Returns the mask of datatypes that the object is currently holding" }, GetOrigin = { Params = "", Return = "OriginX, OriginY, OriginZ", Notes = "Returns the origin coords of where the area was read from." }, GetOriginX = { Params = "", Return = "number", Notes = "Returns the origin x-coord" }, GetOriginY = { Params = "", Return = "number", Notes = "Returns the origin y-coord" }, @@ -130,6 +129,7 @@ g_APIDesc = GetSizeY = { Params = "", Return = "number", Notes = "Returns the size of the held data in the y-axis" }, GetSizeZ = { Params = "", Return = "number", Notes = "Returns the size of the held data in the z-axis" }, GetVolume = { Params = "", Return = "number", Notes = "Returns the volume of the area - the total number of blocks stored within." }, + GetWEOffset = { Params = "", Return = "{{Vector3i}}", Notes = "Returns the WE offset, a data value sometimes stored in the schematic files. MCServer doesn't use this value, but provides access to it using this method. The default is {0, 0, 0}."}, HasBlockLights = { Params = "", Return = "bool", Notes = "Returns true if current datatypes include blocklight" }, HasBlockMetas = { Params = "", Return = "bool", Notes = "Returns true if current datatypes include block metas" }, HasBlockSkyLights = { Params = "", Return = "bool", Notes = "Returns true if current datatypes include skylight" }, @@ -169,11 +169,6 @@ g_APIDesc = SetBlockSkyLight = { Params = "BlockX, BlockY, BlockZ, SkyLight", Return = "", Notes = "Sets the skylight at the specified absolute coords" }, SetBlockType = { Params = "BlockX, BlockY, BlockZ, BlockType", Return = "", Notes = "Sets the block type at the specified absolute coords" }, SetBlockTypeMeta = { Params = "BlockX, BlockY, BlockZ, BlockType, BlockMeta", Return = "", Notes = "Sets the block type and meta at the specified absolute coords" }, - SetOffset = - { - { Params = "{{Vector3i|Offset}}", Return = "", Notes = "Sets the offset of the cBlockArea. Mostly used for WorldEdit." }, - { Params = "OffsetX, OffsetY, OffsetZ", Return = "", Notes = "Sets the offset of the cBlockArea. Mostly used for WorldEdit." }, - }, SetOrigin = { { Params = "{{Vector3i|Origin}}", Return = "", Notes = "Resets the origin for the absolute coords. Only affects how absolute coords are translated into relative coords." }, @@ -184,6 +179,11 @@ g_APIDesc = SetRelBlockSkyLight = { Params = "RelBlockX, RelBlockY, RelBlockZ, SkyLight", Return = "", Notes = "Sets the skylight at the specified relative coords" }, SetRelBlockType = { Params = "RelBlockX, RelBlockY, RelBlockZ, BlockType", Return = "", Notes = "Sets the block type at the specified relative coords" }, SetRelBlockTypeMeta = { Params = "RelBlockX, RelBlockY, RelBlockZ, BlockType, BlockMeta", Return = "", Notes = "Sets the block type and meta at the specified relative coords" }, + SetWEOffset = + { + { Params = "{{Vector3i|Offset}}", Return = "", Notes = "Sets the WE offset, a data value sometimes stored in the schematic files. Mostly used for WorldEdit. MCServer doesn't use this value, but provides access to it using this method." }, + { Params = "OffsetX, OffsetY, OffsetZ", Return = "", Notes = "Sets the WE offset, a data value sometimes stored in the schematic files. Mostly used for WorldEdit. MCServer doesn't use this value, but provides access to it using this method." }, + }, Write = { { Params = "World, {{Vector3i|MinPoint}}, DataTypes", Return = "bool", Notes = "Writes the area into World at the specified coords, returns true if successful" }, -- cgit v1.2.3