diff options
author | Mattes D <github@xoft.cz> | 2015-06-02 14:50:31 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-06-02 14:50:31 +0200 |
commit | 94dc3e19fe36d8256c67716a6cac2fbf369320c8 (patch) | |
tree | 060d1b7203b9454eb4c6fbfe086724f383ec6899 /src/Blocks | |
parent | Merge pull request #2172 from mc-server/LightingCallbacks (diff) | |
parent | Fixed warnings in MSVC. (diff) | |
download | cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.tar cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.tar.gz cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.tar.bz2 cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.tar.lz cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.tar.xz cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.tar.zst cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Blocks/BlockButton.h | 6 | ||||
-rw-r--r-- | src/Blocks/BlockCocoaPod.h | 4 | ||||
-rw-r--r-- | src/Blocks/BlockLadder.h | 4 | ||||
-rw-r--r-- | src/Blocks/BlockLever.h | 4 | ||||
-rw-r--r-- | src/Blocks/BlockQuartz.h | 5 | ||||
-rw-r--r-- | src/Blocks/BlockSideways.h | 4 | ||||
-rw-r--r-- | src/Blocks/BlockTrapdoor.h | 7 | ||||
-rw-r--r-- | src/Blocks/BlockTripwireHook.h | 8 |
8 files changed, 42 insertions, 0 deletions
diff --git a/src/Blocks/BlockButton.h b/src/Blocks/BlockButton.h index d65d9722d..154cd610e 100644 --- a/src/Blocks/BlockButton.h +++ b/src/Blocks/BlockButton.h @@ -73,8 +73,13 @@ public: return 0x0; } } + #if !defined(__clang__) + ASSERT(!"Unknown BLOCK_FACE"); + return 0; + #endif } + inline static eBlockFace BlockMetaDataToBlockFace(NIBBLETYPE a_Meta) { switch (a_Meta & 0x7) @@ -93,6 +98,7 @@ public: } } + virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override { NIBBLETYPE Meta; diff --git a/src/Blocks/BlockCocoaPod.h b/src/Blocks/BlockCocoaPod.h index 50552c788..4d16d2552 100644 --- a/src/Blocks/BlockCocoaPod.h +++ b/src/Blocks/BlockCocoaPod.h @@ -89,6 +89,10 @@ public: return 0; } } + #if !defined(__clang__) + ASSERT(!"Unknown BLOCK_FACE"); + return 0; + #endif } } ; diff --git a/src/Blocks/BlockLadder.h b/src/Blocks/BlockLadder.h index f49f1adc7..d727f8f8e 100644 --- a/src/Blocks/BlockLadder.h +++ b/src/Blocks/BlockLadder.h @@ -64,6 +64,10 @@ public: return 0x2; } } + #if !defined(__clang__) + ASSERT(!"Unknown BLOCK_FACE"); + return 0; + #endif } diff --git a/src/Blocks/BlockLever.h b/src/Blocks/BlockLever.h index 5792d280b..8d676b56f 100644 --- a/src/Blocks/BlockLever.h +++ b/src/Blocks/BlockLever.h @@ -67,6 +67,10 @@ public: case BLOCK_FACE_YM: return 0x0; case BLOCK_FACE_NONE: return 0x6; } + #if !defined(__clang__) + ASSERT(!"Unknown BLOCK_FACE"); + return 0; + #endif } diff --git a/src/Blocks/BlockQuartz.h b/src/Blocks/BlockQuartz.h index 6f5c23902..b936a7e4a 100644 --- a/src/Blocks/BlockQuartz.h +++ b/src/Blocks/BlockQuartz.h @@ -36,6 +36,7 @@ public: return true; } + inline static NIBBLETYPE BlockFaceToMetaData(eBlockFace a_BlockFace, NIBBLETYPE a_QuartzMeta) { switch (a_BlockFace) @@ -64,5 +65,9 @@ public: return a_QuartzMeta; // No idea, give a special meta (all sides the same) } } + #if !defined(__clang__) + ASSERT(!"Unknown BLOCK_FACE"); + return 0; + #endif } } ; diff --git a/src/Blocks/BlockSideways.h b/src/Blocks/BlockSideways.h index 74b05e33c..e52fbaa2f 100644 --- a/src/Blocks/BlockSideways.h +++ b/src/Blocks/BlockSideways.h @@ -64,6 +64,10 @@ public: return a_Meta | 0xC; // No idea, give a special meta } } + #if !defined(__clang__) + ASSERT(!"Unknown BLOCK_FACE"); + return 0; + #endif } } ; diff --git a/src/Blocks/BlockTrapdoor.h b/src/Blocks/BlockTrapdoor.h index 2841e3e08..a1d2dff6f 100644 --- a/src/Blocks/BlockTrapdoor.h +++ b/src/Blocks/BlockTrapdoor.h @@ -66,6 +66,7 @@ public: return true; } + inline static NIBBLETYPE BlockFaceToMetaData(eBlockFace a_BlockFace) { switch (a_BlockFace) @@ -82,8 +83,13 @@ public: return 0; } } + #if !defined(__clang__) + ASSERT(!"Unknown BLOCK_FACE"); + return 0; + #endif } + inline static eBlockFace BlockMetaDataToBlockFace(NIBBLETYPE a_Meta) { switch (a_Meta & 0x3) @@ -100,6 +106,7 @@ public: } } + virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override { NIBBLETYPE Meta; diff --git a/src/Blocks/BlockTripwireHook.h b/src/Blocks/BlockTripwireHook.h index c7a96d393..39892af5a 100644 --- a/src/Blocks/BlockTripwireHook.h +++ b/src/Blocks/BlockTripwireHook.h @@ -16,6 +16,7 @@ public: { } + virtual bool GetPlacementBlockTypeMeta( cChunkInterface & a_ChunkInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, @@ -29,6 +30,7 @@ public: return true; } + inline static NIBBLETYPE DirectionToMetadata(eBlockFace a_Direction) { switch (a_Direction) @@ -45,8 +47,13 @@ public: return 0x0; } } + #if !defined(__clang__) + ASSERT(!"Unknown BLOCK_FACE"); + return 0; + #endif } + inline static eBlockFace MetadataToDirection(NIBBLETYPE a_Meta) { switch (a_Meta & 0x03) @@ -59,6 +66,7 @@ public: } } + virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override { // Reset meta to zero |