diff options
author | peterbell10 <peterbell10@live.co.uk> | 2017-07-07 16:37:53 +0200 |
---|---|---|
committer | Lukas Pioch <lukas@zgow.de> | 2017-07-07 16:37:53 +0200 |
commit | bbf5bec817c6c9824155c15d34806db152d5ed43 (patch) | |
tree | 80f9532ae5814da4c168dbf7138ea9a289fc4a8c /src/Items/ItemChest.h | |
parent | Added bed entity (#3823) (diff) | |
download | cuberite-bbf5bec817c6c9824155c15d34806db152d5ed43.tar cuberite-bbf5bec817c6c9824155c15d34806db152d5ed43.tar.gz cuberite-bbf5bec817c6c9824155c15d34806db152d5ed43.tar.bz2 cuberite-bbf5bec817c6c9824155c15d34806db152d5ed43.tar.lz cuberite-bbf5bec817c6c9824155c15d34806db152d5ed43.tar.xz cuberite-bbf5bec817c6c9824155c15d34806db152d5ed43.tar.zst cuberite-bbf5bec817c6c9824155c15d34806db152d5ed43.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Items/ItemChest.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/Items/ItemChest.h b/src/Items/ItemChest.h index d8cde2ae2..9f1a3f0d2 100644 --- a/src/Items/ItemChest.h +++ b/src/Items/ItemChest.h @@ -51,12 +51,9 @@ public: BLOCKTYPE ClickedBlock; NIBBLETYPE ClickedBlockMeta; a_World.GetBlockTypeMeta(a_BlockX, a_BlockY, a_BlockZ, ClickedBlock, ClickedBlockMeta); - if ( - BlockHandler(ClickedBlock)->DoesIgnoreBuildCollision() || - BlockHandler(ClickedBlock)->DoesIgnoreBuildCollision(&a_Player, ClickedBlockMeta) - ) + cChunkInterface ChunkInterface(a_World.GetChunkMap()); + if (BlockHandler(ClickedBlock)->DoesIgnoreBuildCollision(ChunkInterface, { a_BlockX, a_BlockY, a_BlockZ }, a_Player, ClickedBlockMeta)) { - cChunkInterface ChunkInterface(a_World.GetChunkMap()); BlockHandler(ClickedBlock)->OnDestroyedByPlayer(ChunkInterface, a_World, &a_Player, a_BlockX, a_BlockY, a_BlockZ); } else @@ -75,10 +72,7 @@ public: // Clicked on side of block, make sure that placement won't be cancelled if there is a slab able to be double slabbed. // No need to do combinability (dblslab) checks, client will do that here. - if ( - !BlockHandler(PlaceBlock)->DoesIgnoreBuildCollision() && - !BlockHandler(PlaceBlock)->DoesIgnoreBuildCollision(&a_Player, PlaceMeta) - ) + if (BlockHandler(ClickedBlock)->DoesIgnoreBuildCollision(ChunkInterface, { a_BlockX, a_BlockY, a_BlockZ }, a_Player, ClickedBlockMeta)) { // Tried to place a block into another? // Happens when you place a block aiming at side of block with a torch on it or stem beside it |