Tutorials Daylight sensor


Info

As a night time detector

By connecting the sensor to a NOT Gate (inverter), it will output a signal when the light level is LESS than 3.99, so you can, for instance, make lights that turn on at night, or gates that automatically close.

You can also detect moonlight by blocking off the detector so it cannot see light, then pointing a comparator away from it.

Another way to detect nighttime is by right clicking the daylight detector, that will turn it into an inverted daylight sensor. Using the inverted daylight detector instead of a not gate to turn on lamps will make the lights only turn on at late evening, night, and early morning.

Videos

As a clock

Because you can measure exactly what light level it is, you can make a clock. For instance, for every light level it is, 1 light goes on a board. When it is night, the word "Night" is illuminated on the board displaying light level or time. This can be useful for servers, especially if you do not have the ability to create one using piston memory, or do not wish for one as it can be complicated or laggy.

As a timebomb

The daylight sensor can be placed atop TNT unlike most redstone devices. If planted at about midnight, this can make for an excellent timebomb, as the TNT will be ignited when the sun rises. Since the skylight is measured, which is shadowed out by blocks above, the sensor on TNT can be used in traps for players breaking the (e.g. ore or cake) blocks above the sensor. The Daylight sensor bomb can be rigged to go off at different times. If you want it to go off during the day, wire redstone to the TNT from the daylight sensor. While you can just place the sensor on top of the TNT, the TNT will glitch, and you will see the TNT go above the daylight sensor. For a bomb to go off during the night, a NOT Gate is needed. Other than that, it is the same. For a bomb to go off at noon, you will need a redstone comparator Redstone Comparator Transparency Yes Luminance No (7 when powered, in Pocket Edition) Blast resistance 0 Tool Any tool Renewable No Stackable Yes (64) Flammable No Drops Redstone Comparator (1) Data values See Data values Name minecraft . The daylight sensor will go through the TNT, but since the lever is always full power, and the daylight sensor gets best power at noon, the bomb will go off at noon.

Timed jingle

Using some note blocks and redstone circuitry, you could make a set jingle that plays at certain times of the day, such as a device that warns you that nighttime is over, or is beginning. This could be used as a sort of morning alarm if you do not use a bed.

As a signal

The daylight sensor can easily be used to signal things at different times of day. With command blocks Command Block Type Block Entity Physics No Transparency No Luminance No Blast resistance 18,000,000 Hardness -1 Tool None Renewable No Stackable Yes (64) Flammable No First appearances See history Drops None Block entity id command_block minecraft in the game, it can do many more things, like broadcast messages or change everyone`s gamemodes (For whatever reason). Below are different methods for it.

Mining signal

If you are mining "Punch" redirects here. For the enchantment, see Enchanting#Punch. The Player punches trees and gets wood (click to view animation). Breaking, digging, punching, or mining is one of the most fundamental activities in Minecraft, performed (by minecraft and you want to come up at a time of day, you can connect the daylight sensor and make it either send a redstone pulse down your mine or broadcast a command block message.

Command block command for message:

/say

NOTE: On servers this will broadcast a message to the entire server See the multiplayer software in Minecraft. For the multiplayer experience, see Multiplayer. For the official Mojang paid-for servers, see Realms. For other unofficial Minecraft server software, see custom servers. Minecraft servers allow .

So instead use this command to tell only yourself:

/tell

Message

You can send out a message to the entire server at a certain point of day. The command block command for this is:
/say

OR

/tell
First broadcasts a message to the server, second one tells a message to a player The Player Health points 20 () Armor points Varies Attack strength Fist: 1 () Items: Varies Size Height: 1.8 Blocks Width: 0.6 Blocks While sneaking: Height: 1.65 Blocks Width: 0.6 Blocks While gliding: Height: 0.6 minecraft .

As a Weather Monitoring Station

Using a redstone clock that is synchronized with the Minecraft day that is broken up into segments according to the daylight sensor power output schedule, it is possible to use many daylight sensors to build a rainstorm and thunderstorm detector. Use a comparator to reduce the redstone clock`s signal strength to below that of the daylight sensor`s clear day output. Wire this into the side of another comparator that has a daylight detector wired to the back. The wire coming out of the end of the comparator will deactivate whenever there is a storm. Using this you can detect both rain and thunderstorms using two lines with adequate comparator sensitivity. Using this you can signal an alarm whenever there is a storm, count the number of storms, count the duration of the storms using another clock and some type of memory, and even all three. Note, be that as it may, that if the chunk is unloaded for any length of time, the redstone clock will no longer be in sync with the daylight sensors.