I'm trying to set command blocks to test for the time persay and then activate based on a certain time being reached (night time).
How would I set a weather event based on it becoming night time?
Minecraft – How to schedule events based on game time
minecraft-bedrock-edition
Related Topic
- Minecraft – How to remove torches upon death
- Minecraft Bedrock Edition – How to Send a Message to Everyone at a Certain In-Game Time
- Minecraft – How to get barrier blocks in bedrock edition
- Minecraft Commands Bedrock Edition – How to Execute a Fill Command Based on a User-Selected Block
- Minecraft – How to invert the /testfor command’s result
- Minecraft – Teleport command issues
Best Answer
You can use a daylight sensor connected to a command block. However, as daylight sensors measure skylight, the daylight sensor can't have an opaque block over it.
Since in your case you want to change the weather when it is night time, you would use an inverted daylight sensor which emits redstone output when it is dark. Using 4 redstone connecting the daylight sensor to the command block should be enough for the command block to only activate once the sun has set.
Here are the daylight detector power levels from the wiki:
The wiki says this about inverted daylight sensors: