How can I make night doors with command blocks?

How can I make night doors with command blocks? - A Building Exterior at Night

I want to make a door that gets closed each night. I have all the blocks except the mechanism that will activate the "door command blocks" every night.



Best Answer

I'm assuming by "have all the blocks" you mean that you already have the command set up and just need to activate it at night. In that case you could use a daylight sensor and invert the signal so that the command is activated every night, and then another daylight sensor that isn't inverted that will activate at the start of the day.




Pictures about "How can I make night doors with command blocks?"

How can I make night doors with command blocks? - Crop hacker silhouette typing on computer keyboard while hacking system
How can I make night doors with command blocks? - Red and Black Car Door
How can I make night doors with command blocks? - Red and White Unks Store Signage



How do you make a command block door?

Each type of door takes up 2 blocks in Minecraft, so you will need to use 2 /setblock commands - one command to add the bottom of the door and another command to add the top of the door....Minecraft DataValues for Doors.DescriptionData ValueTop of the door (hinge on left side)8Top of the door (hinge on right side)91 more row



How to make a simple command block door




More answers regarding how can I make night doors with command blocks?

Answer 2

By "Night doors" I'm guessing you mean ones that open only at day/ night.

If you want it to open at night, then put a daylight sensor somewhere and invert the charge with a r/s torch and connect it to a cmd block that has a /setblock command or /fill command to open/ close a door ( you need two command blocks: one has the inverted charge and one doesn't. The inverted one will have /fill x1 y1 z1 x2 y2 z2 air the other will have /fill x1 y1 z1 x2 y2 z2 ) switch the commands to make it day only

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Bas Geerlings, Anete Lusina, Ron Lach, Erik Mclean