summaryrefslogtreecommitdiffstats
path: root/src/MobSpawner.cpp
diff options
context:
space:
mode:
authorMat <mail@mathias.is>2020-03-26 18:54:40 +0100
committerGitHub <noreply@github.com>2020-03-26 18:54:40 +0100
commit84f86a467e7c289936571c738f9422868ecaaee6 (patch)
tree3145442b002ae6eb18589a3d9e6ebd0de27e4197 /src/MobSpawner.cpp
parentUpdate Core (diff)
downloadcuberite-84f86a467e7c289936571c738f9422868ecaaee6.tar
cuberite-84f86a467e7c289936571c738f9422868ecaaee6.tar.gz
cuberite-84f86a467e7c289936571c738f9422868ecaaee6.tar.bz2
cuberite-84f86a467e7c289936571c738f9422868ecaaee6.tar.lz
cuberite-84f86a467e7c289936571c738f9422868ecaaee6.tar.xz
cuberite-84f86a467e7c289936571c738f9422868ecaaee6.tar.zst
cuberite-84f86a467e7c289936571c738f9422868ecaaee6.zip
Diffstat (limited to 'src/MobSpawner.cpp')
-rw-r--r--src/MobSpawner.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/MobSpawner.cpp b/src/MobSpawner.cpp
index 5cb8f0d33..0869e7282 100644
--- a/src/MobSpawner.cpp
+++ b/src/MobSpawner.cpp
@@ -123,7 +123,6 @@ bool cMobSpawner::CanSpawnHere(cChunk * a_Chunk, Vector3i a_RelPos, eMonsterType
}
case mtBlaze:
- case mtGhast:
{
return (
(targetBlock == E_BLOCK_AIR) &&
@@ -194,6 +193,15 @@ bool cMobSpawner::CanSpawnHere(cChunk * a_Chunk, Vector3i a_RelPos, eMonsterType
break;
}
+ case mtGhast:
+ {
+ return (
+ (targetBlock == E_BLOCK_AIR) &&
+ (blockAbove == E_BLOCK_AIR) &&
+ (random.RandBool())
+ );
+ }
+
case mtGuardian:
{
return (