Bedrock

Bedrock is a block that is indestructible in survival, but destructible in creative.

Obaitaining:

Bedrock cannot be broken in survival mode without glitches. In Bedrock Edition, certain glitches can be used to obtain bedrock in Survival

natural generation:
Bedrock comprises the five bottom-most layers of the Overworld in a rough pattern, although the first to fourth layers are predominantly flat bedrock with only rare gaps, rendering the lowest, completely flat fifth layer (at y=0) mostly inaccessible. In Java Edition, the patterns of bedrock are consistent in all worlds regardless of world seed (except Superflat). In Bedrock Edition, the patterns are dependent on the seed in the Overworld.

In the Nether, bedrock comprises both the top and bottom four layers in a rough pattern. In Bedrock Edition, the patterns of bedrock are consistent in the Nether. At the top of the Nether, bedrock prevents the player from going past y=127.

In the End, individual bedrock blocks make up the natural end crystal structure and the bedrock remains after the destruction of the crystal. Bedrock additionally forms as part of the exit portal that generates at the center of the central End island. In Bedrock Edition, if one manages to break the bedrock in the exit portal, the bedrock reappears when the portal regenerates.

End gateway portals are also generated upon killing the ender dragon. However, only 20 of these portals generate, in set positions, with one appearing per dragon kill. Additional end gateways are also generated in the outer End regions after activating end gateways at the main island.