Add mixins for blocks that rotate based on player yaw at placement
Also add observer block handler.
This commit is contained in:
@@ -47,22 +47,6 @@ void cBlockPistonHandler::OnBroken(
|
||||
|
||||
|
||||
|
||||
bool cBlockPistonHandler::GetPlacementBlockTypeMeta(
|
||||
cChunkInterface & a_ChunkInterface, cPlayer & a_Player,
|
||||
int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
|
||||
int a_CursorX, int a_CursorY, int a_CursorZ,
|
||||
BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
|
||||
)
|
||||
{
|
||||
a_BlockType = m_BlockType;
|
||||
a_BlockMeta = RotationPitchToMetaData(a_Player.GetYaw(), a_Player.GetPitch());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Vector3i cBlockPistonHandler::MetadataToOffset(NIBBLETYPE a_PistonMeta)
|
||||
{
|
||||
switch (a_PistonMeta & 0x07)
|
||||
|
||||
Reference in New Issue
Block a user