summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Pioch <lukas@zgow.de>2015-10-29 14:28:19 +0100
committerLukas Pioch <lukas@zgow.de>2015-10-29 14:28:19 +0100
commit0ab0a2f1460fbce17e173a9a605f2f0e832cd9db (patch)
treeed028be3ec6447d62f7c247d0964a63fb5fa1e14
parentMerge pull request #2578 from cuberite/revert-2574-pressure-plate-fix (diff)
parentAdded cave spider to MobSpawner (diff)
downloadcuberite-0ab0a2f1460fbce17e173a9a605f2f0e832cd9db.tar
cuberite-0ab0a2f1460fbce17e173a9a605f2f0e832cd9db.tar.gz
cuberite-0ab0a2f1460fbce17e173a9a605f2f0e832cd9db.tar.bz2
cuberite-0ab0a2f1460fbce17e173a9a605f2f0e832cd9db.tar.lz
cuberite-0ab0a2f1460fbce17e173a9a605f2f0e832cd9db.tar.xz
cuberite-0ab0a2f1460fbce17e173a9a605f2f0e832cd9db.tar.zst
cuberite-0ab0a2f1460fbce17e173a9a605f2f0e832cd9db.zip
Diffstat (limited to '')
-rw-r--r--src/MobSpawner.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/MobSpawner.cpp b/src/MobSpawner.cpp
index 27dc5a877..7deb9764e 100644
--- a/src/MobSpawner.cpp
+++ b/src/MobSpawner.cpp
@@ -236,6 +236,17 @@ bool cMobSpawner::CanSpawnHere(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_R
}
return CanSpawn && HasFloor && (SkyLight <= 7) && (BlockLight <= 7);
}
+
+ case mtCaveSpider:
+ {
+ return (
+ (TargetBlock == E_BLOCK_AIR) &&
+ (!cBlockInfo::IsTransparent(BlockBelow)) &&
+ (SkyLight <= 7) &&
+ (BlockLight <= 7) &&
+ (Random.NextInt(2) == 0)
+ );
+ }
case mtCreeper:
case mtSkeleton: