summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSafwatHalaby <SafwatHalaby@users.noreply.github.com>2015-05-30 11:48:30 +0200
committerSafwatHalaby <SafwatHalaby@users.noreply.github.com>2015-05-30 11:49:49 +0200
commit5f7455bc19eb81c98f1e1ceb65fa8e5acda57f8b (patch)
tree4e818a1a46b9102947f8c87fe351b255ef458a3e
parentFix Destroy() calling behaviour (diff)
downloadcuberite-5f7455bc19eb81c98f1e1ceb65fa8e5acda57f8b.tar
cuberite-5f7455bc19eb81c98f1e1ceb65fa8e5acda57f8b.tar.gz
cuberite-5f7455bc19eb81c98f1e1ceb65fa8e5acda57f8b.tar.bz2
cuberite-5f7455bc19eb81c98f1e1ceb65fa8e5acda57f8b.tar.lz
cuberite-5f7455bc19eb81c98f1e1ceb65fa8e5acda57f8b.tar.xz
cuberite-5f7455bc19eb81c98f1e1ceb65fa8e5acda57f8b.tar.zst
cuberite-5f7455bc19eb81c98f1e1ceb65fa8e5acda57f8b.zip
-rw-r--r--src/Mobs/Path.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Mobs/Path.cpp b/src/Mobs/Path.cpp
index 1848e144e..325e102b7 100644
--- a/src/Mobs/Path.cpp
+++ b/src/Mobs/Path.cpp
@@ -157,8 +157,14 @@ bool cPath::IsSolid(const Vector3i & a_Location)
int RelZ = a_Location.z - m_Chunk->GetPosZ() * cChunkDef::Width;
m_Chunk->GetBlockTypeMeta(RelX, a_Location.y, RelZ, BlockType, BlockMeta);
- if ((BlockType == E_BLOCK_FENCE) || (BlockType == E_BLOCK_FENCE_GATE))
+ if (
+ (BlockType == E_BLOCK_FENCE) ||
+ (BlockType == E_BLOCK_FENCE_GATE) ||
+ (BlockType == E_BLOCK_NETHER_BRICK_FENCE) ||
+ ((BlockType >= E_BLOCK_SPRUCE_FENCE_GATE) && (BlockType <= E_BLOCK_ACACIA_FENCE))
+ )
{
+ // TODO move this out of IsSolid to a proper place.
GetCell(a_Location + Vector3i(0, 1, 0))->m_IsSolid = true; // Mobs will always think that the fence is 2 blocks high and therefore won't jump over.
}
if (BlockType == E_BLOCK_STATIONARY_WATER)