Back to Articles

Block of the Month: Daylight Detector

Published: December 14, 2023 - View official source

After a long night hunkered down inside your home, avoiding marauding skeletons, zombies, and creepers, how do you know when it’s safe to venture forth once more?

You’ve got a few options. The simplest is to look out of a window. Is the sun up? You’re good to go. A reasonable alternative is to build yourself a clock out of gold and redstone, which shows the position of the sun. But the most complicated solution of all is to build a redstone contraption that lights up a series of lamps or triggers a note block when the sun rises. For that, you’ll need our block of the month – the Daylight Detector.

Daylight detection became possible following the Redstone Update, which was released in March 2013. The patch added the daylight sensor, but it got a new feature a year later in the Bountiful Update – allowing it to be switched between day and night mode.

First, though, it’s useful to know how to make one. You’ll need some glass, some nether quartz and some wood slabs. Put them in a crafting grid in three layers in that order, and you’ll get your detector. Once you’ve got it, you can plop it down on the ground and it’ll immediately start emitting a redstone pulse based on the brightness of the sky.

Note that I said the brightness of the sky. The daylight detector has been carefully tuned by Mojang’s top optical physicists so that it only responds to sunlight. You can wave a torch, or a lantern, or a redstone lamp around it as much as you like and it’ll have no effect. You only get a signal based on daylight, and the more daylight, the stronger the signal.

HOWEVER! There’s a secondary mode that you can activate by hitting the use button on a daylight detector that’s been placed into the world. You’ll see the color of the sensors change from light yellow to light blue. This inverts the output – so it outputs a signal when there’s no daylight instead. The signal isn’t an exact inversion, it’s a bit simpler than that. But it should do the job for most purposes.

A real-world human gadget that measures light.

Light sensors are important parts of many circuits outside of Minecraft too. There are various different kinds, some of which are used to automatically turn house lights on at night, some of which are used to adjust the brightness of your phone screen so you can read it both indoors and in daylight, and some of which are used in high-end laser research applications. 

An unexpected, but very common, place where you’ll find a light sensor is within a smoke detector. These work by shining a bright beam of light towards a light sensor and measuring the output. If that light is obscured by smoke, the output drops, and the alarm goes off. The low cost of this system makes it possible for almost every home to have a smoke detector, which saves countless lives.

In Minecraft, you might be able to save lives with a daylight detector too. How about a system that automatically closes the doors or gates to your base when the sun goes down? It’ll cost you a little quartz, but it’s got to be better than waking up to find a creeper in your storage room, right?