summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2017-09-12 22:47:09 +0200
committerAlexander Harkness <me@bearbin.net>2017-09-21 14:01:00 +0200
commitab4f0df5b9eebc101623bef46cf46709e4fc6c63 (patch)
tree3ab5337f5da5368f892259f4b067f16fd3171d81 /src
parentAdded working directory for x64 builds (#4037) (diff)
downloadcuberite-ab4f0df5b9eebc101623bef46cf46709e4fc6c63.tar
cuberite-ab4f0df5b9eebc101623bef46cf46709e4fc6c63.tar.gz
cuberite-ab4f0df5b9eebc101623bef46cf46709e4fc6c63.tar.bz2
cuberite-ab4f0df5b9eebc101623bef46cf46709e4fc6c63.tar.lz
cuberite-ab4f0df5b9eebc101623bef46cf46709e4fc6c63.tar.xz
cuberite-ab4f0df5b9eebc101623bef46cf46709e4fc6c63.tar.zst
cuberite-ab4f0df5b9eebc101623bef46cf46709e4fc6c63.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockRail.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Blocks/BlockRail.h b/src/Blocks/BlockRail.h
index 07483c9b3..9ee891830 100644
--- a/src/Blocks/BlockRail.h
+++ b/src/Blocks/BlockRail.h
@@ -36,7 +36,14 @@ public:
{
a_BlockType = m_BlockType;
a_BlockMeta = FindMeta(a_ChunkInterface, a_BlockX, a_BlockY, a_BlockZ);
- return true;
+ Vector3i Pos{ a_BlockX, a_BlockY, a_BlockZ };
+ return a_Player.GetWorld()->DoWithChunkAt(Pos,
+ [this, Pos, &a_ChunkInterface](cChunk & a_Chunk)
+ {
+ auto RelPos = cChunkDef::AbsoluteToRelative(Pos);
+ return CanBeAt(a_ChunkInterface, RelPos.x, RelPos.y, RelPos.z, a_Chunk);
+ }
+ );
}
virtual void OnPlaced(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) override