Cuberite
A lightweight, fast and extensible game server for Minecraft
Static Public Member Functions | Protected Member Functions | Private Types | List of all members
cYawRotator< Base, BitMask, North, East, South, West, AssertIfNotMatched > Class Template Reference

Mixin for blocks whose meta on placement depends on the yaw of the player placing the block. More...

#include <Mixins.h>

Inheritance diagram for cYawRotator< Base, BitMask, North, East, South, West, AssertIfNotMatched >:
Inheritance graph
[legend]
Collaboration diagram for cYawRotator< Base, BitMask, North, East, South, West, AssertIfNotMatched >:
Collaboration graph
[legend]

Static Public Member Functions

static NIBBLETYPE YawToMetaData (double a_Rotation)
 Converts the rotation value as returned by cPlayer::GetYaw() to the appropriate metadata value for a block placed by a player facing that way. More...
 

Protected Member Functions

 ~cYawRotator ()=default
 
- Protected Member Functions inherited from cMetaRotator< Base, 0x07, 0x02, 0x05, 0x03, 0x04, false >
virtual NIBBLETYPE MetaMirrorXY (NIBBLETYPE a_Meta) const override
 
virtual NIBBLETYPE MetaMirrorYZ (NIBBLETYPE a_Meta) const override
 
virtual NIBBLETYPE MetaRotateCCW (NIBBLETYPE a_Meta) const override
 
virtual NIBBLETYPE MetaRotateCW (NIBBLETYPE a_Meta) const override
 
 ~cMetaRotator ()=default
 

Private Types

using Super = cMetaRotator< Base, BitMask, North, East, South, West, AssertIfNotMatched >
 

Additional Inherited Members

- Public Member Functions inherited from cMetaRotator< Base, 0x07, 0x02, 0x05, 0x03, 0x04, false >
constexpr cMetaRotator (BLOCKTYPE a_BlockType)
 

Detailed Description

template<class Base, NIBBLETYPE BitMask = 0x07, NIBBLETYPE North = 0x02, NIBBLETYPE East = 0x05, NIBBLETYPE South = 0x03, NIBBLETYPE West = 0x04, bool AssertIfNotMatched = false>
class cYawRotator< Base, BitMask, North, East, South, West, AssertIfNotMatched >

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.

Definition at line 160 of file Mixins.h.

Member Typedef Documentation

◆ Super

template<class Base , NIBBLETYPE BitMask = 0x07, NIBBLETYPE North = 0x02, NIBBLETYPE East = 0x05, NIBBLETYPE South = 0x03, NIBBLETYPE West = 0x04, bool AssertIfNotMatched = false>
using cYawRotator< Base, BitMask, North, East, South, West, AssertIfNotMatched >::Super = cMetaRotator<Base, BitMask, North, East, South, West, AssertIfNotMatched>
private

Definition at line 163 of file Mixins.h.

Constructor & Destructor Documentation

◆ ~cYawRotator()

template<class Base , NIBBLETYPE BitMask = 0x07, NIBBLETYPE North = 0x02, NIBBLETYPE East = 0x05, NIBBLETYPE South = 0x03, NIBBLETYPE West = 0x04, bool AssertIfNotMatched = false>
cYawRotator< Base, BitMask, North, East, South, West, AssertIfNotMatched >::~cYawRotator ( )
protecteddefault

Member Function Documentation

◆ YawToMetaData()

template<class Base , NIBBLETYPE BitMask = 0x07, NIBBLETYPE North = 0x02, NIBBLETYPE East = 0x05, NIBBLETYPE South = 0x03, NIBBLETYPE West = 0x04, bool AssertIfNotMatched = false>
static NIBBLETYPE cYawRotator< Base, BitMask, North, East, South, West, AssertIfNotMatched >::YawToMetaData ( double  a_Rotation)
inlinestatic

Converts the rotation value as returned by cPlayer::GetYaw() to the appropriate metadata value for a block placed by a player facing that way.

Definition at line 172 of file Mixins.h.


The documentation for this class was generated from the following file: