From ca6ef58b1ee8521e4b940ee4883dee714960e413 Mon Sep 17 00:00:00 2001 From: LogicParrot Date: Fri, 5 Feb 2016 23:45:45 +0200 Subject: Bulk clearing of whitespace --- src/Blocks/BlockChest.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/Blocks/BlockChest.h') diff --git a/src/Blocks/BlockChest.h b/src/Blocks/BlockChest.h index df87ca4c7..2c34beeeb 100644 --- a/src/Blocks/BlockChest.h +++ b/src/Blocks/BlockChest.h @@ -18,7 +18,7 @@ public: : cMetaRotator(a_BlockType) { } - + virtual bool GetPlacementBlockTypeMeta( cChunkInterface & a_ChunkInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, @@ -27,14 +27,14 @@ public: ) override { a_BlockType = m_BlockType; - + // Is there a doublechest already next to this block? if (!CanBeAt(a_ChunkInterface, a_BlockX, a_BlockY, a_BlockZ)) { // Yup, cannot form a triple-chest, refuse: return false; } - + // Check if this forms a doublechest, if so, need to adjust the meta: cBlockArea Area; if (!Area.Read(&a_ChunkInterface, a_BlockX - 1, a_BlockX + 1, a_BlockY, a_BlockY, a_BlockZ - 1, a_BlockZ + 1)) @@ -59,7 +59,7 @@ public: a_BlockMeta = (yaw < 0) ? 4 : 5; return true; } - + // Single chest, get meta from rotation only a_BlockMeta = PlayerYawToMetaData(yaw); return true; @@ -71,7 +71,7 @@ public: int BlockZ = a_RelZ + a_Chunk.GetPosZ() * cChunkDef::Width; return CanBeAt(a_ChunkInterface, BlockX, a_RelY, BlockZ); } - + virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_BlockX, int a_BlockY, int a_BlockZ) { cBlockArea Area; @@ -80,7 +80,7 @@ public: // Cannot read the surroundings, probably at the edge of loaded chunks. Disallow. return false; } - + int NumChestNeighbors = 0; if (Area.GetRelBlockType(1, 0, 2) == m_BlockType) { @@ -136,7 +136,7 @@ public: } return (NumChestNeighbors < 2); } - + /** Translates player yaw when placing a chest into the chest block metadata. Valid for single chests only */ static NIBBLETYPE PlayerYawToMetaData(double a_Yaw) { @@ -163,7 +163,7 @@ public: return 0x03; } } - + /** If there's a chest in the a_Area in the specified coords, modifies its meta to a_NewMeta and returns true. */ bool CheckAndAdjustNeighbor(cChunkInterface & a_ChunkInterface, const cBlockArea & a_Area, int a_RelX, int a_RelZ, NIBBLETYPE a_NewMeta) { -- cgit v1.2.3