{{Infobox version
|title=Minecraft 21w40a
|image=21w40a.jpg
|image2=Java Edition 21w40a.png
|edition=Java
|type=Snapshot
|date=October 7, 2021
|jsonhash=bcc36c0cf4cb0c8e9d6b34a62376ad7485556fe1
|clienthash=b88eecb40a4b522aaebe5b10dc44d235f2aef944
|clientmap=3d8e14cfa4589def945e615dfc3f8f4ede71d31c
|serverhash=84496ec4beeeae34a448b99f3e3d890066f6807f
|servermap=6b5b0e3ab19b97cfd0df9743e3b0205dbd8ebe20
|parent=1.18
|prevparent=1.17.1
|prev=21w39a
|next=21w41a
|nextparent=1.18
}}
'''21w40a''' is the fourth [[snapshot]] for [[Java Edition 1.18]], released on October 7, 2021,[{{snap|21w40a|October 7, 2021}}] that merges and renames some [[biome]]s, tweaks world generation, mob spawning, and fixes bugs.
== Changes ==
=== Blocks ===
; [[Copper ore]]
* Now drop 2-5 [[raw copper]] when mining instead of 2-3.
; [[Stonecutter]]
* [[Block of copper]] can be converted to 4 [[cut copper]] using stonecutter.
=== Mobs ===
; [[Axolotl]]s
* Now only spawn in water above [[clay]] blocks in [[lush caves]].
; [[Cod]], [[salmon]], [[pufferfish]], [[tropical fish]], [[squid]], and [[dolphin]]s
* Now only spawn in water from Y=50 to Y=64.
* Additionally, tropical fishes now also spawn in lush caves at any height.
; [[Glow squid]]s
* Now only spawn in water blocks under Y=30.
; [[Goat]]s
* No longer spawn in [[stony peaks]].
; [[Zombie]]s
* Now also spawn in [[dripstone caves]] again.
=== World generation ===
; Biomes
* The unused height variation sub-biomes have been removed from the code and merged with their default biome variants, as following:
:{| class="wikitable collapsible collapsed"
! Removed biomes
|-
| {{BiomeLink|Badlands Plateau}}
|-
| {{BiomeLink|Bamboo Jungle Hills}}
|-
| {{BiomeLink|Birch Forest Hills}}
|-
| {{BiomeLink|Dark Forest Hills}}
|-
| {{BiomeLink|Desert Hills}}
|-
| {{BiomeLink|Desert Lakes}}
|-
| {{BiomeLink|Giant Spruce Taiga Hills}}
|-
| {{BiomeLink|Giant Tree Taiga Hills}}
|-
| {{BiomeLink|id=Modified Gravelly Mountains|Gravelly Mountains+}}
|-
| {{BiomeLink|Jungle Hills}}
|-
| {{BiomeLink|Modified Badlands Plateau}}
|-
| {{BiomeLink|Modified Jungle}}
|-
| {{BiomeLink|Modified Jungle Edge}}
|-
| {{BiomeLink|Modified Wooded Badlands Plateau}}
|-
| {{BiomeLink|Mountain Edge}}
|-
| {{BiomeLink|Mushroom Field Shore}}
|-
| {{BiomeLink|Shattered Savanna Plateau}}
|-
| {{BiomeLink|Snowy Mountains}}
|-
| {{BiomeLink|Snowy Taiga Hills}}
|-
| {{BiomeLink|Snowy Taiga Mountains}}
|-
| {{BiomeLink|Swamp Hills}}
|-
| {{BiomeLink|Taiga Hills}}
|-
| {{BiomeLink|Taiga Mountains}}
|-
| {{BiomeLink|Tall Birch Hills}}
|-
| {{BiomeLink|Wooded Hills}}
|}
* Some biomes have been renamed:
:{| class="wikitable collapsible collapsed"
! Old name !! New name
|-
| Mountains || {{BiomeLink|Windswept Hills}}
|-
| Giant Spruce Taiga || {{BiomeLink|Old Growth Spruce Taiga}}
|-
| Giant Tree Taiga || {{BiomeLink|Old Growth Pine Taiga}}
|-
| Gravelly Hills || {{BiomeLink|Windswept Gravelly Hills}}
|-
| Jungle Edge || {{BiomeLink|Sparse Jungle}}
|-
| Lofty Peaks || {{BiomeLink|Jagged Peaks}}
|-
| Shattered Savanna || {{BiomeLink|Windswept Savanna}}
|-
| Snowcapped Peaks || {{BiomeLink|Frozen Peaks}}
|-
| Snowy Tundra || {{BiomeLink|Snowy Plains}}
|-
| Stone Shore || {{BiomeLink|Stony Shore}}
|-
| Tall Birch Forest || {{BiomeLink|Old Growth Birch Forest}}
|-
| Wooded Badlands Plateau || {{BiomeLink|Wooded Badlands}}
|-
| Wooded Mountains || {{BiomeLink|Windswept Forest}}
|}
* Non-cave biomes (e.g. [[savanna]]s) no longer change with height.
* Tweaked the relative size of some biomes, to match 1.17 a bit closer.
* Increased the average size of most biomes.
[[File:21w40a approximate ore distribution.jpg|thumb|450px|Ore distribution changes.]]
; [[Ore]] distribution
* [[Copper ore]] now generates between Y=-16 and Y=112, generating the most at Y=48, and increased the number of [[ore blob]]s.
* Added more unexposed [[diamond]]s.
* Decreased minimum generation height of [[emerald ore]] from Y=32 to Y=-16, and increased the number of blobs.
** This allows deepslate emerald ore to generate again.
* Extra gold generates below Y=-48.
* Decreased minimum generation height of the upper range of [[iron ore]] from Y=112 to Y=80, and increased the number of blobs.
; [[Monster room]]s
* Increased the amount of monster rooms, especially below Y=0.
; [[Gravel]]
* Now generates below Y=0, and increased the number of blobs.
; [[Lake]]s
* Water lakes were removed, because [[aquifer]]s could provide local water levels.
; [[Magma block]]s
* Slightly increased the frequency of underwater magma.
; [[Village]]s
* Now slightly more spread out.
; General
* [[Bedrock]] layers generate dependent on the world seed now.
=== Gameplay ===
; [[Advancement]]s
* Due to the removal or merging of sub-biomes, the number of biomes required to visit for the "Adventuring Time" advancement has been reduced from 42 to 31, with the following biomes now being required:
:{| class="wikitable collapsed collapsible"
! Required biomes
|-
| {{BiomeLink|Badlands}}
|-
| {{BiomeLink|Bamboo Jungle}}
|-
| {{BiomeLink|Beach}}
|-
| {{BiomeLink|Birch Forest}}
|-
| {{BiomeLink|Cold Ocean}}
|-
| {{BiomeLink|Dark Forest}}
|-
| {{BiomeLink|Deep Cold Ocean}}
|-
| {{BiomeLink|Deep Frozen Ocean}}
|-
| {{BiomeLink|Deep Lukewarm Ocean}}
|-
| {{BiomeLink|Desert}}
|-
| {{BiomeLink|Forest}}
|-
| {{BiomeLink|Frozen River}}
|-
| {{BiomeLink|Jungle}}
|-
| {{BiomeLink|Lukewarm Ocean}}
|-
| {{BiomeLink|Mushroom Fields}}
|-
| {{BiomeLink|Old Growth Pine Taiga}}
|-
| {{BiomeLink|Plains}}
|-
| {{BiomeLink|River}}
|-
| {{BiomeLink|Savanna}}
|-
| {{BiomeLink|Savanna Plateau}}
|-
| {{BiomeLink|Snowy Beach}}
|-
| {{BiomeLink|Snowy Taiga}}
|-
| {{BiomeLink|Snowy Plains}}
|-
| {{BiomeLink|Sparse Jungle}}
|-
| {{BiomeLink|Stony Shore}}
|-
| {{BiomeLink|Swamp}}
|-
| {{BiomeLink|Taiga}}
|-
| {{BiomeLink|Warm Ocean}}
|-
| {{BiomeLink|Windswept Forest}}
|-
| {{BiomeLink|Windswept Hills}}
|-
| {{BiomeLink|Wooded Badlands}}
|}
=== General ===
; AI
* Optimized AI for axolotls, goats, [[hoglin]]s, [[zoglin]]s, [[piglin]]s, [[piglin brute]]s and [[villager]]s.
== Fixes ==
{{fixes|fixedin=21w40a
|;old
|128770|Woodland mansions still generate in dark forest hills.
|132306|Snowy grass without snow near lakes in snowy biome.
|133582|Dolphins try to catch up with boat on land.
|137140|Llamas cannot spawn in shattered savanna plateau.
|137956|Lakes still generate in superflat preset "Overworld" after removing its tag.
|138734|Spawn point for seed 0, world type Buffet with badlands plateau biome is under surface, ⇒ player dies.
|138782|Stranded dolphin tries to catch the boat on the water and stops beating.
|138939|Fish and dolphins spawn in water above sea level.
|152966|Increase in villages generating in versions after 1.10.
|169523|As of 18w06a, the sand, clay and gravel blocks no longer generate around small lakes.
|177016|Some lakes in frozen biomes generate unfrozen.
|190724|Spawning in solid blocks in single biome "Badlands Plateau" world.
|197688|Mountain edge never generates.
|200640|Despite being a coastal biome, mushroom field shores don't have a warm/unique water color.
|200803|Gravelly mountains+/modified gravelly mountains placed incorrectly in the biome selection.
|217906|Large amounts of axolotls cause performance issues.
|224494|Regular dirt can generate naturally on the surface near pools.
|225030|Dungeons are extremely rare compared to in the past.
|225506|Grass blocks can generate naturally in underground pools.
|225842|Flowers can generate on large plants near lakes.
|225858|Seeds and flowers appear in ponds.
|226000|Pointed dripstone items in underground pools.
|226437|Water lakes generating in snowy tundra's can sometimes contain dark spots.
|226682|World can fail to render/load causing visual issues.
|227064|Floating grass can still generate above water lakes.
|229365|Large amounts of goats cause performance issues.
|231400|Modified badlands plateau and mountain edge don't generate and gives out invalid biome data in single biome worlds.
|233661|In some cases, sand blocks generating over lakes do not cause light updates, resulting in large dark spots.
|238006|Emerald ore and infested blocks do not generate in snowy mountain biomes.
|;dev
|236609|New mountain biomes use translations strings in biome selection.
|236614|Adventuring Time advancement still accepts non generating biomes.
|236617|Mountains and gravelly mountains use their 1.17.1 biome ID name.
|236632|Banners without patterns do not render properly.
|236663|Command blocks do not display command in their UI.
|236736|No relief on treasure map or explorer maps.
|236894|Foliage from specific biomes can generate in biomes they aren't meant for.
|236896|Strange mini broken aquifer walls generating commonly on the surface.
|237490|The bottom parts of aquifers aren't always surrounded by blocks which can occasionally cause them to spill into caves in ways that appear bizarre.
|237586|Entities that die outside of simulation distance remain frozen in the death animation.
|237666|Unused biomes still present in game files.
|;previous
|237925|Opening world from 1.12.2 (or older) in latest snapshot regenerates random chunks.
|237933|Sweet berries generate much too often.
|237950|Cave vines can generate without tip because prioritize_tip
option is negated.
|237951|Cave vines can generate into water.
|237962|Entities bob their head up and down when targeting towards the player.
|238104|Blue orchid generation has decreased.
|238265|version.json contains internal revision ID instead of game version ID.
}}
== Gallery ==
Worldgen Tuning Visualization.jpg
3D Noise Comparison.jpg
Biome Size Comparison.jpg
Windswept Savanna Debug.jpg
== Video ==
{{Slicedlime|gPPzm2uTB3U|RQWVvTnxIco}}
== References ==
{{Reflist}}
== Navigation ==
{{Navbox Java Edition versions|1.1x}}
[[de:21w40a]]
[[es:Java Edition 21w40a]]
[[fr:Édition Java 21w40a]]
[[it:Java Edition 21w40a]]
[[ja:Java Edition 21w40a]]
[[pt:Edição Java 21w40a]]
[[ru:21w40a (Java Edition)]]
[[th:รุ่น Java 21w40a]]
[[zh:21w40a]]