summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2015-05-30 12:13:59 +0200
committerAlexander Harkness <me@bearbin.net>2015-05-30 12:13:59 +0200
commit97ee861c20d7b24d6340187a8cbb577bb6cb1f30 (patch)
tree2fbd2dd6a8a549e8ac780e0fc84fa14f2bda0656
parentMerge pull request #2163 from mc-server/SimplifySpawn (diff)
parentPF - Handle all fencetypes (diff)
downloadcuberite-97ee861c20d7b24d6340187a8cbb577bb6cb1f30.tar
cuberite-97ee861c20d7b24d6340187a8cbb577bb6cb1f30.tar.gz
cuberite-97ee861c20d7b24d6340187a8cbb577bb6cb1f30.tar.bz2
cuberite-97ee861c20d7b24d6340187a8cbb577bb6cb1f30.tar.lz
cuberite-97ee861c20d7b24d6340187a8cbb577bb6cb1f30.tar.xz
cuberite-97ee861c20d7b24d6340187a8cbb577bb6cb1f30.tar.zst
cuberite-97ee861c20d7b24d6340187a8cbb577bb6cb1f30.zip
Diffstat (limited to '')
-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 c21eb597c..f6660907c 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)