diff --git a/common/src/main/kotlin/quaedam/projection/swarm/SwarmProjectionEffect.kt b/common/src/main/kotlin/quaedam/projection/swarm/SwarmProjectionEffect.kt index ec3b66d..2296ac4 100644 --- a/common/src/main/kotlin/quaedam/projection/swarm/SwarmProjectionEffect.kt +++ b/common/src/main/kotlin/quaedam/projection/swarm/SwarmProjectionEffect.kt @@ -40,6 +40,10 @@ data class SwarmProjectionEffect( level.random.nextInt(area.minZ(), area.maxZ()), ) spawnPos = spawnPos.atY(level.getHeight(Heightmap.Types.WORLD_SURFACE, spawnPos.x, spawnPos.z)) + if (level.getBlockState(spawnPos.below()).isAir) + return + if (!level.getBlockState(spawnPos).isAir) + return ProjectedPersonEntity.entity.get().spawn(level, spawnPos, MobSpawnType.TRIGGERED) } }