From 89143558958e68ac524a36548d58b6fc29029b5c Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sat, 11 Apr 2020 00:20:51 +0100 Subject: Fix rotation metas on blocks --- src/Blocks/Mixins.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/Blocks/Mixins.h') diff --git a/src/Blocks/Mixins.h b/src/Blocks/Mixins.h index 62eaeae5c..1ee2876d3 100644 --- a/src/Blocks/Mixins.h +++ b/src/Blocks/Mixins.h @@ -203,7 +203,10 @@ public: ) override { NIBBLETYPE BaseMeta; - super::GetPlacementBlockTypeMeta(a_ChunkInterface, a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, a_BlockType, BaseMeta); + if (!super::GetPlacementBlockTypeMeta(a_ChunkInterface, a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, a_BlockType, BaseMeta)) + { + return false; + } a_BlockMeta = (BaseMeta & ~BitMask) | YawToMetaData(a_Player.GetYaw()); return true; @@ -249,8 +252,8 @@ template < NIBBLETYPE East = 0x05, NIBBLETYPE South = 0x03, NIBBLETYPE West = 0x04, - NIBBLETYPE Up = 0x01, - NIBBLETYPE Down = 0x00 + NIBBLETYPE Up = 0x00, + NIBBLETYPE Down = 0x01 > class cPitchYawRotator: public cYawRotator @@ -274,7 +277,10 @@ public: ) override { NIBBLETYPE BaseMeta; - super::GetPlacementBlockTypeMeta(a_ChunkInterface, a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, a_BlockType, BaseMeta); + if (!super::GetPlacementBlockTypeMeta(a_ChunkInterface, a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, a_BlockType, BaseMeta)) + { + return false; + } a_BlockMeta = (BaseMeta & ~BitMask) | PitchYawToMetaData(a_Player.GetYaw(), a_Player.GetPitch()); return true; -- cgit v1.2.3