Fix comment text
This commit is contained in:
parent
f40aba941e
commit
2b77b67197
@ -167,9 +167,8 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/** Mixin for rotations and reflections following the standard pattern of "apply mask, then use a switch".
|
/** Mixin for blocks whose meta on placement depends on the yaw of the player placing the block. BitMask
|
||||||
Inherit from this class providing your base class as Base, the BitMask for the direction bits in bitmask and the masked value for the directions in North, East, South, West.
|
selects the direction bits from the block's meta values. */
|
||||||
There is also an aptional parameter AssertIfNotMatched, set this if it is invalid for a block to exist in any other state. */
|
|
||||||
template <class Base, NIBBLETYPE BitMask = 0x7, NIBBLETYPE North = 0x2, NIBBLETYPE East = 0x5, NIBBLETYPE South = 0x3, NIBBLETYPE West = 0x4, bool AssertIfNotMatched = false>
|
template <class Base, NIBBLETYPE BitMask = 0x7, NIBBLETYPE North = 0x2, NIBBLETYPE East = 0x5, NIBBLETYPE South = 0x3, NIBBLETYPE West = 0x4, bool AssertIfNotMatched = false>
|
||||||
class cYawRotator:
|
class cYawRotator:
|
||||||
public cMetaRotator<Base, BitMask, North, East, South, West, AssertIfNotMatched>
|
public cMetaRotator<Base, BitMask, North, East, South, West, AssertIfNotMatched>
|
||||||
@ -230,9 +229,8 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Mixin for rotations and reflections following the standard pattern of "apply mask, then use a switch".
|
/** Mixin for blocks whose meta on placement depends on the pitch and yaw of the player placing the block. BitMask
|
||||||
Inherit from this class providing your base class as Base, the BitMask for the direction bits in bitmask and the masked value for the directions in North, East, South, West.
|
selects the direction bits from the block's meta values. */
|
||||||
There is also an aptional parameter AssertIfNotMatched, set this if it is invalid for a block to exist in any other state. */
|
|
||||||
template <class Base, NIBBLETYPE BitMask = 0x7, NIBBLETYPE North = 0x2, NIBBLETYPE East = 0x5, NIBBLETYPE South = 0x3, NIBBLETYPE West = 0x4, NIBBLETYPE Up = 0x1, NIBBLETYPE Down = 0x0>
|
template <class Base, NIBBLETYPE BitMask = 0x7, NIBBLETYPE North = 0x2, NIBBLETYPE East = 0x5, NIBBLETYPE South = 0x3, NIBBLETYPE West = 0x4, NIBBLETYPE Up = 0x1, NIBBLETYPE Down = 0x0>
|
||||||
class cPitchYawRotator:
|
class cPitchYawRotator:
|
||||||
public cYawRotator<Base, BitMask, North, East, South, West>
|
public cYawRotator<Base, BitMask, North, East, South, West>
|
||||||
@ -268,9 +266,7 @@ public:
|
|||||||
|
|
||||||
virtual NIBBLETYPE MetaMirrorXZ(NIBBLETYPE a_Meta) override
|
virtual NIBBLETYPE MetaMirrorXZ(NIBBLETYPE a_Meta) override
|
||||||
{
|
{
|
||||||
// Bit 0x08 is a flag. Lowest three bits are position.
|
|
||||||
NIBBLETYPE OtherMeta = a_Meta & (~BitMask);
|
NIBBLETYPE OtherMeta = a_Meta & (~BitMask);
|
||||||
// Mirrors defined by a table. (Source, minecraft.gamepedia.com)
|
|
||||||
switch (a_Meta & BitMask)
|
switch (a_Meta & BitMask)
|
||||||
{
|
{
|
||||||
case Down: return Up | OtherMeta; // Down -> Up
|
case Down: return Up | OtherMeta; // Down -> Up
|
||||||
|
Loading…
Reference in New Issue
Block a user