What happens when a pre-hardmode altar is destroyed?

There is nothing on the wiki proper about it, but it is mentioned on the talk page:

If the blocks below the altar is sand and that you break the blocks below the sand blocks, it will destroy the altar.

There is no explicit mention of whether this will spawn hard mode ore or not, but the wording seems to imply that it will not. The only way to know for sure would be to check the decompiled game code.

EDIT: Brian Hansen has included code from the game in his answer which answers whether this spawns hard mode ore definitively.


What you experienced was the correct result. The source code for the destruction of Demon Altars has this in it, near the start of the method:

if (!Main.hardMode)
{
    return;
}

This means that if the world is not in hardmode, then the rest of the code for spawning the hardmode ores will not execute, resulting in the Demon Altar just disappearing.

Tags:

Terraria