Minecraft wiki entry for Generated_structures, associated text: These structures can only generate underground in normal worlds, although in Superflat they can generate above ground in Java Edition and in custom worlds mineshafts can generate aboveground in the void in Java Edition.