summaryrefslogtreecommitdiffstats
path: root/src/Blocks/Mixins.h
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2020-04-11 01:20:51 +0200
committerAlexander Harkness <me@bearbin.net>2020-04-11 21:00:05 +0200
commit89143558958e68ac524a36548d58b6fc29029b5c (patch)
tree1430a9c46ee44ec4ab789b4849a9a0049bae1cdc /src/Blocks/Mixins.h
parentadded me as contributor (diff)
downloadcuberite-89143558958e68ac524a36548d58b6fc29029b5c.tar
cuberite-89143558958e68ac524a36548d58b6fc29029b5c.tar.gz
cuberite-89143558958e68ac524a36548d58b6fc29029b5c.tar.bz2
cuberite-89143558958e68ac524a36548d58b6fc29029b5c.tar.lz
cuberite-89143558958e68ac524a36548d58b6fc29029b5c.tar.xz
cuberite-89143558958e68ac524a36548d58b6fc29029b5c.tar.zst
cuberite-89143558958e68ac524a36548d58b6fc29029b5c.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/Mixins.h14
1 files changed, 10 insertions, 4 deletions
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<Base, BitMask, North, East, South, West>
@@ -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;