What is the best way to keep NPCs from opening the doors at night? I read about making double doors but zombies still got into my house.
The old tried and true methods are double doors, or just putting something in front of a door, however, I have a more creative method.
Use the switches and active/inactive stone blocks.
I just put trapdoors outside the doors, and a deep pit, preferably with a small pool of lava at the bottom. Just leave the trapdoors open when you want to protect the building. Put a switch somewhere outside the building that you can conveniently reach, along w/ a switch inside, to trigger the trapdoor.
I think you can also just use the "put something in front of door method", but just make the "something" an active/inactive block attached to a switch. I've never tried, and I only just thought of that. I just prefer trapdoor lava pits.