summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2020-04-09 23:49:10 +0200
committerAlexander Harkness <me@bearbin.net>2020-04-10 15:07:16 +0200
commite5cc698ee75eb07732d79f67cf766edf23196da0 (patch)
tree274b1af1b128a2a18dfb3cdfb46d558ca1a9cae1 /src/Blocks
parentAdd doxy-comments to new functions (diff)
downloadcuberite-e5cc698ee75eb07732d79f67cf766edf23196da0.tar
cuberite-e5cc698ee75eb07732d79f67cf766edf23196da0.tar.gz
cuberite-e5cc698ee75eb07732d79f67cf766edf23196da0.tar.bz2
cuberite-e5cc698ee75eb07732d79f67cf766edf23196da0.tar.lz
cuberite-e5cc698ee75eb07732d79f67cf766edf23196da0.tar.xz
cuberite-e5cc698ee75eb07732d79f67cf766edf23196da0.tar.zst
cuberite-e5cc698ee75eb07732d79f67cf766edf23196da0.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/Mixins.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Blocks/Mixins.h b/src/Blocks/Mixins.h
index 73e30a71a..7c3e16c42 100644
--- a/src/Blocks/Mixins.h
+++ b/src/Blocks/Mixins.h
@@ -167,6 +167,9 @@ public:
};
+
+
+
/** Mixin for blocks whose meta on placement depends on the yaw of the player placing the block. BitMask
selects the direction bits from the block's meta values. */
template <class Base, NIBBLETYPE BitMask = 0x7, NIBBLETYPE North = 0x2, NIBBLETYPE East = 0x5, NIBBLETYPE South = 0x3, NIBBLETYPE West = 0x4, bool AssertIfNotMatched = false>
@@ -201,6 +204,7 @@ public:
+
/** Converts the rotation value as returned by cPlayer::GetYaw() to the appropriate metadata
value for a block placed by a player facing that way */
static NIBBLETYPE YawToMetaData(double a_Rotation)
@@ -230,6 +234,10 @@ public:
}
};
+
+
+
+
/** Mixin for blocks whose meta on placement depends on the pitch and yaw of the player placing the block. BitMask
selects the direction bits from the block's meta values. */
template <class Base, NIBBLETYPE BitMask = 0x7, NIBBLETYPE North = 0x2, NIBBLETYPE East = 0x5, NIBBLETYPE South = 0x3, NIBBLETYPE West = 0x4, NIBBLETYPE Up = 0x1, NIBBLETYPE Down = 0x0>
@@ -280,6 +288,7 @@ public:
+
/** Converts the rotation and pitch values as returned by cPlayer::GetYaw() and cPlayer::GetPitch()
respectively to the appropriate metadata value for a block placed by a player facing that way */
static NIBBLETYPE PitchYawToMetaData(double a_Rotation, double a_Pitch)