I don't know if this is anything new but with the villager AI it is possible to make a simple day/night detector.
How it works:
Villagers go indoors at night. So a simple pressure plate inside a 1x1 house will be activated at night time. There are three different houses here for redundancy checking incase the villages go inside during daytime.
How it works:
Villagers go indoors at night. So a simple pressure plate inside a 1x1 house will be activated at night time. There are three different houses here for redundancy checking incase the villages go inside during daytime.