redstone[difficulty:beginner][version:26.3]

Automatic lights in Minecraft: daylight detector lamps that turn on at night

A daylight detector outputs a redstone signal that follows the sun. Flip it to inverted mode and it powers lamps at night instead. Here is how the detector works, the two-block street light, wiring a whole base, and why your lamps flicker at dawn.

David Riperson3 min read
Redstone lamps lighting up a Minecraft street at night, powered by an inverted daylight detector

Torches never turn off, and they look the same at noon as at midnight. Redstone lamps wired to a daylight detector switch themselves on at dusk and off at dawn, which makes streets, porches and farms feel alive. It is also the easiest useful redstone build in the game.

RateOne detector can run a whole street
XP levelNone
Build time5 minutes
DifficultyBeginner

How the daylight detector works

  • A daylight detector outputs a redstone signal from 0 to 15 depending on the sky light it sees: strongest at midday, falling to zero at night.
  • Right-click it to switch to inverted mode (the top turns blue). Inverted, it outputs a signal at night and nothing during the day.
  • It only measures sky light, so it must have open sky above it. A block, a leaf or glass with a roof above it changes the reading.
  • Rain and thunderstorms lower the light level, so lamps on an inverted detector can turn on during a storm. That is usually a feature.

Recipe: 3 glass on top, 3 nether quartz in the middle, 3 wooden slabs at the bottom.

Automatic light parts: daylight detector in day and inverted night mode, a redstone lamp off and on, a repeater and redstone dust Image: SyntaxMine, made from Minecraft's own textures.

The two-block street light

The smallest automatic light:

  1. Place a redstone lamp.
  2. Put an inverted daylight detector directly on top of it.

The detector powers the block it sits on, so the lamp lights up at night and turns off during the day. Two blocks, no dust. Put it on a fence post for a classic street light.

Wiring a whole base from one detector

For a street or a whole base, one detector can feed many lamps:

  1. Place one inverted daylight detector somewhere with open sky, such as a rooftop.
  2. Run redstone dust from it to your lamps. Dust carries the signal 15 blocks, so add a repeater every 15 blocks on long lines.
  3. Lamps light when dust next to them or a block they touch is powered. Running dust under a path and placing lamps along it is the tidy way.

Hide the wiring. Put the dust one block under your floor and place lamps flush with the ground. A signal passes up through a solid block into a lamp above it if the block is powered by a repeater pointing into it.

Why lamps flicker at dawn and dusk

As the sun sets, the detector's signal drops one step at a time. Lamps at the far end of a long dust line can see the signal fall below 1 before the ones near the detector, so a street does not switch on all at once.

Fixes:

  • Use repeaters along the line. A repeater always outputs a full signal of 15 as long as anything reaches it, so every lamp after it sees the same "on".
  • Use several detectors for a long street instead of one long dust line.

Beyond lamps

The same signal can drive anything redstone powers:

  • Doors and gates that lock at night (pair with a piston door).
  • Mob farms that switch on at night only.
  • A day counter or alarm, using the normal mode's output strength and a comparator to read it.

Frequently asked questions

How do you make lights turn on at night in Minecraft?

Place a redstone lamp, put a daylight detector on top, and right-click the detector to switch it to inverted mode. It will light the lamp at night.

Why is my daylight detector not working?

It needs open sky directly above. Under a roof or leaves it sees less light, and in normal mode it turns lamps on during the day instead of at night.

How far does a daylight detector signal reach?

Through redstone dust, 15 blocks. Use repeaters to go further.

Do daylight detectors work in the Nether or End?

No. There is no daylight there, so they never change output.

New to redstone? The complete redstone handbook covers dust, repeaters and comparators, and redstone clocks shows how to make signals that pulse on their own.

Comments

Loading...

Where to next

More on this