1
0
Fork 0

Renamed cBlockArea Offset to WEOffset.

Even in getters / setters.
This commit is contained in:
madmaxoft 2014-03-12 07:46:14 +01:00
parent 3e9f265a36
commit 950614da7e
3 changed files with 9 additions and 8 deletions

View File

@ -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);
}

View File

@ -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;

View File

@ -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: