diff options
author | Mattes D <github@xoft.cz> | 2014-12-17 08:38:23 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-12-17 08:38:23 +0100 |
commit | 4947880a5d75d827b23f2ea359d9219043a32fcd (patch) | |
tree | 7167c17bec4ce486238575f7c158384e5776aa20 /src/Blocks | |
parent | Updated Core. (diff) | |
parent | NULL -> nullptr (diff) | |
download | cuberite-4947880a5d75d827b23f2ea359d9219043a32fcd.tar cuberite-4947880a5d75d827b23f2ea359d9219043a32fcd.tar.gz cuberite-4947880a5d75d827b23f2ea359d9219043a32fcd.tar.bz2 cuberite-4947880a5d75d827b23f2ea359d9219043a32fcd.tar.lz cuberite-4947880a5d75d827b23f2ea359d9219043a32fcd.tar.xz cuberite-4947880a5d75d827b23f2ea359d9219043a32fcd.tar.zst cuberite-4947880a5d75d827b23f2ea359d9219043a32fcd.zip |
Diffstat (limited to 'src/Blocks')
-rw-r--r-- | src/Blocks/BlockPressurePlate.h | 3 | ||||
-rw-r--r-- | src/Blocks/BlockRail.h | 4 | ||||
-rw-r--r-- | src/Blocks/BlockTallGrass.h | 2 | ||||
-rw-r--r-- | src/Blocks/BlockTorch.h | 1 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/Blocks/BlockPressurePlate.h b/src/Blocks/BlockPressurePlate.h index a5c34a776..bd2f283a2 100644 --- a/src/Blocks/BlockPressurePlate.h +++ b/src/Blocks/BlockPressurePlate.h @@ -28,8 +28,7 @@ public: return false; } - BLOCKTYPE BlockBelow = a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ); - return (cBlockInfo::IsSolid(BlockBelow)); + return (cBlockInfo::FullyOccupiesVoxel(a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ))); } } ; diff --git a/src/Blocks/BlockRail.h b/src/Blocks/BlockRail.h index 21a34d8ce..02fe3aa95 100644 --- a/src/Blocks/BlockRail.h +++ b/src/Blocks/BlockRail.h @@ -98,7 +98,7 @@ public: { return false; } - if (!cBlockInfo::IsSolid(a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ))) + if (!cBlockInfo::FullyOccupiesVoxel(a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ))) { return false; } @@ -130,7 +130,7 @@ public: // Too close to the edge, cannot simulate return true; } - return cBlockInfo::IsSolid(BlockType); + return cBlockInfo::FullyOccupiesVoxel(BlockType); } } return true; diff --git a/src/Blocks/BlockTallGrass.h b/src/Blocks/BlockTallGrass.h index 8e821b899..4134a01f8 100644 --- a/src/Blocks/BlockTallGrass.h +++ b/src/Blocks/BlockTallGrass.h @@ -38,7 +38,7 @@ public: virtual void DropBlock(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_BlockPluginInterface, cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ, bool a_CanDrop) override { - if (a_CanDrop && (a_Digger != NULL) && (a_Digger->GetEquippedWeapon().m_ItemType == E_ITEM_SHEARS)) + if (a_CanDrop && (a_Digger != nullptr) && (a_Digger->GetEquippedWeapon().m_ItemType == E_ITEM_SHEARS)) { NIBBLETYPE Meta = a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ); cItems Drops; diff --git a/src/Blocks/BlockTorch.h b/src/Blocks/BlockTorch.h index e77bbd1b8..d63df94cf 100644 --- a/src/Blocks/BlockTorch.h +++ b/src/Blocks/BlockTorch.h @@ -2,6 +2,7 @@ #include "BlockHandler.h" #include "../Chunk.h" +#include "ChunkInterface.h" #include "MetaRotator.h" |