
DEEP DIVESBLOCK OF THE MONTH: DAYLIGHT DETECTOR
本月方块:阳光探测器
A redstone signal that rises with the sun
有阳光的地方,就有红石信号
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.
2013 年 5 月发布的《红石更新》让探测阳光变为现实。这个版本加入了阳光探测器,但一年后发布的《缤纷更新》还为它带来了新的功能,让它可以在日间与夜间模式间切换。

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.
注意,我说的是天空亮度。阳光探测器经 Mojang 顶级光学家**,只会对阳光产生反应,哪怕周围有再多的火把、灯笼、红石灯,也照样无动于衷。信号强度全由阳光强度决定,阳光越强,信号越强。
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.
不过!阳光探测器还有另一种模式,可通过对着已放置到世界中的阳光探测器按下使用键来启用,颜色会从亮黄色变成亮蓝色。这会将输出值反转,在没有阳光时反而输出信号。实际上,信号值并非会完全反转,而要更复杂一些,但大部分情况下不必细究。

Image credit: H0dges // CC BY 3.0
图片来源: H0dges // 知识共享 署名 3.0
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.
在 Minecraft 世界外,光照传感器同样是许多电路的重要元件,种类也不一而足。有些可以在晚上自动打开屋里的灯,有些可以调节手机屏幕亮度,让屏幕在室内外都清晰易读,还有些用在高端激光研究应用中。
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?
在 Minecraft 中,阳光探测器一样能救命。比方说设计一个系统,在日落后自动关闭基地的门和活板门?做这套系统可能要花上一点石英,但总比醒来后发现储藏室里闯进一只苦力怕要好,对吧?
【橄榄Chan(aka Olvcpr423) 译自官网 2023 年 12 月 14 日发布的 Daylight Detector;原作者 Duncan Geere】
【本文排版借助了:SPXX v2.4.14】【欢迎将本帖收录至博文录,但请不要给予本帖任何宝石奖励】
Powered by SPXX 2.4.14 with love
Converted at 2023-12-16 00:22 +0800
来自群组: SPX Fellow