Mineshafts are networks of abandoned mining tunnels. A mineshaft can intersect an open cave or canyon, exposing its wooden supports and rails. The standard underground layout and the badlands variant share the same basic kinds of rooms and passages.
Java's mineshaft structure set contains separate standard and badlands entries. The standard entry can start in many Overworld biomes, including Sulfur Caves. The badlands entry uses the Badlands biome group and a separate height calculation tied to the local surface.
Bedrock also has mineshafts in normal world generation. Mojang's biome data marks Badlands, Eroded Badlands, and Wooded Badlands with the surface_mineshaft tag. The Bedrock 26.0 notes document that this tag selects dark oak for surface mineshaft blocks.
Tunnels branch through crossings and stairs. Some corridors contain rails or cobwebs. Standard Java supports use oak, and the badlands variant uses dark oak. Chest minecarts can appear in corridors.
Some corridors generate with a cave spider spawner amid cobwebs. The spawner is part of the structure. Ordinary hostile mobs can spawn in dark passages under the surrounding biome's rules. Sulfur Caves also has a natural cave spider spawn rule, independent of the mineshaft spawner.
Mineshaft chest minecarts can contain supplies such as glow berries. They can also contain the music disc “Bounce” by fingerspit when the loot location is in Sulfur Caves. Java checks for the biome ID minecraft:sulfur_caves, while Bedrock checks for the sulfur_caves biome tag. That loot check is separate from the rule that allowed the structure to start.
Java registers the standard and badlands entries as minecraft:mineshaft and minecraft:mineshaft_mesa. Bedrock exposes mineshaft as its structure argument for /locate. Both editions have biome-dependent “Bounce” loot, with separate condition formats.