summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemDoor.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-06-21 19:49:22 +0200
committerMattes D <github@xoft.cz>2015-06-21 19:49:22 +0200
commit3889b2cac26410650d7ec6f296e0bb19c3debb4b (patch)
tree53fbbb941c11e39190c094b3ebea82d66d61deb0 /src/Items/ItemDoor.h
parentMerge pull request #2267 from cuberite/InfoDumpFix (diff)
downloadcuberite-3889b2cac26410650d7ec6f296e0bb19c3debb4b.tar
cuberite-3889b2cac26410650d7ec6f296e0bb19c3debb4b.tar.gz
cuberite-3889b2cac26410650d7ec6f296e0bb19c3debb4b.tar.bz2
cuberite-3889b2cac26410650d7ec6f296e0bb19c3debb4b.tar.lz
cuberite-3889b2cac26410650d7ec6f296e0bb19c3debb4b.tar.xz
cuberite-3889b2cac26410650d7ec6f296e0bb19c3debb4b.tar.zst
cuberite-3889b2cac26410650d7ec6f296e0bb19c3debb4b.zip
Diffstat (limited to 'src/Items/ItemDoor.h')
-rw-r--r--src/Items/ItemDoor.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Items/ItemDoor.h b/src/Items/ItemDoor.h
index ddd3d4e20..2e4767349 100644
--- a/src/Items/ItemDoor.h
+++ b/src/Items/ItemDoor.h
@@ -20,10 +20,11 @@ public:
}
- virtual bool OnPlayerPlace(
+ virtual bool GetBlocksToPlace(
cWorld & a_World, cPlayer & a_Player, const cItem & a_EquippedItem,
int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
- int a_CursorX, int a_CursorY, int a_CursorZ
+ int a_CursorX, int a_CursorY, int a_CursorZ,
+ sSetBlockVector & a_BlocksToSet
) override
{
// Vanilla only allows door placement while clicking on the top face of the block below the door:
@@ -107,10 +108,9 @@ public:
}
// Set the blocks:
- sSetBlockVector blks;
- blks.emplace_back(a_BlockX, a_BlockY, a_BlockZ, BlockType, LowerBlockMeta);
- blks.emplace_back(a_BlockX, a_BlockY + 1, a_BlockZ, BlockType, UpperBlockMeta);
- return a_Player.PlaceBlocks(blks);
+ a_BlocksToSet.emplace_back(a_BlockX, a_BlockY, a_BlockZ, BlockType, LowerBlockMeta);
+ a_BlocksToSet.emplace_back(a_BlockX, a_BlockY + 1, a_BlockZ, BlockType, UpperBlockMeta);
+ return true;
}