diff options
author | Mattes D <github@xoft.cz> | 2020-04-18 11:44:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-18 11:44:35 +0200 |
commit | a55f61548ef050f29aab96095b80af4c9f046281 (patch) | |
tree | 4c03607df6b5dd97af28f9748493a1bb26fd5d50 /src/Defines.h | |
parent | Fixing washing away of redstone mechanisms (#4665) (diff) | |
download | cuberite-a55f61548ef050f29aab96095b80af4c9f046281.tar cuberite-a55f61548ef050f29aab96095b80af4c9f046281.tar.gz cuberite-a55f61548ef050f29aab96095b80af4c9f046281.tar.bz2 cuberite-a55f61548ef050f29aab96095b80af4c9f046281.tar.lz cuberite-a55f61548ef050f29aab96095b80af4c9f046281.tar.xz cuberite-a55f61548ef050f29aab96095b80af4c9f046281.tar.zst cuberite-a55f61548ef050f29aab96095b80af4c9f046281.zip |
Diffstat (limited to 'src/Defines.h')
-rw-r--r-- | src/Defines.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Defines.h b/src/Defines.h index b7fd570b4..42978e740 100644 --- a/src/Defines.h +++ b/src/Defines.h @@ -425,6 +425,14 @@ extern eDamageType StringToDamageType(const AString & a_DamageString); If a_Inverse is true, the opposite direction is used instead. */ void AddFaceDirection(int & a_BlockX, int & a_BlockY, int & a_BlockZ, eBlockFace a_BlockFace, bool a_bInverse = false); +/** Returns the coords of a block that is neighboring the specified position through its specified face. +If a_IsInverse is true, the opposite direction is used instead. */ +inline Vector3i AddFaceDirection(Vector3i a_Pos, eBlockFace a_BlockFace, bool a_bInverse = false) +{ + AddFaceDirection(a_Pos.x, a_Pos.y, a_Pos.z, a_BlockFace, a_bInverse); + return a_Pos; +} + // tolua_end |