In this detect evil and good 5e spell you need to follow the particular aspects are mentioned here. Actually, for the specific duration, you do know if there was an aberration, celestial, elemental, fey, fiend or else the undead which is within the 30 feet of you, also as well as wherever the creature has been located.
So, similarly…you actually do know if there was a place or an object which is within 30 feet of you which has been magically consecrated or desecrated.
Also read zone of truth spell 5e
Normally, the dnd spell can be penetrate most of the barriers, but of course it has been blocked by a 1 foot of stone, 1 inch of common metal, a thin sheet of lead, or else the 3 feet of wood or the dirt.
Detect Evil And Good D&D 5E Attributes
You can check out the attributes of d&d 5e detect good and evil from the below mentioned table.
|Casting Time||1 action|
|Duration||Up to 10 minutes|
|Name||Detect Evil and Good|