{{about|controlling world generation using data packs|the vanilla world generation|World generation}}
{{for|the world type between Java Editions 1.16 and 1.19.3|Custom}}
{{for|the world type before Java Edition 1.13|Old Customized}}
{{see also|Tutorials/Custom world generation}}
{{Exclusive|java}}
'''Custom world generation''' allows [[data pack]]s to change how the world generates.
== World preset and dimension ==
{{main|World preset definition|Dimension definition}}
A '''world preset''' controls what dimensions a world has. Before [[Java Edition 1.19|1.19]] ([[22w11a]]), dimensions were defined in the dimension folder rather than in the world preset. Although in the current version the world preset is recommended, the dimension folder is still supported.
A world preset or dimension define what generator (noise, debug or superflat) is used in a dimension. If it is noise, they define what noise settings and biomes are used and how the biomes are placed.
== Noise settings ==
{{main|Noise settings}}
'''Noise settings''' are for generating the shape of the terrain and noise caves, and what blocks the terrain is generated with. They are used by the {{cd|minecraft:noise}} generator in a dimension.
== Density function ==
{{main|Density function}}
A '''density function''' provides position-dependent values for the noise router.
== Noise ==
{{main|Noise}}
A '''noise''' can be referenced by a density function and surface rule.
== Biome ==
{{Main|Biome definition}}
A '''biome''' is a region in a dimension with distinct features, carvers, climates, spawned mobs, ambient sound and music, and sky, water, grass and foliage colors.
== Carver ==
{{Main|Carver definition}}
'''Carvers''' are used to add carver caves and canyons. Note that noise caves are generated by noise settings.
== Features ==
{{Main|Configured feature|Placed feature}}
'''Features''' are small decorations that can at most write to a 3×3 chunk area centered on the placement chunk. They're locally placed per chunk and cannot be searched for using commands. Examples are [[tree]]s, [[flower]]s, ore, etc.
== Structure ==
{{Main|Structure definition|Structure set|Template pool|Processor list}}
'''Structures''' are large decorations that can at most write to a 256×256×256 block area centered on the structure start. They're placed globally and spaced out in a randomized grid (or in concentric rings for [[stronghold]]s), and can be scanned for and found using {{command|locate}}. Structures can affect terrain shaping by adding or removing terrain around structure pieces.
== History ==
{{HistoryTable
|{{HistoryLine|java}}
|{{HistoryLine||1.16.2|dev=20w28a|Added support for custom world generation.
|Added template for custom world generation on GitHub.}}
|{{HistoryLine||1.16.2|dev=20w29a|Noise settings can also be changed in worldgen.}}
|{{HistoryLine||1.18.2|dev=22w06a|Added tag field to structure noise settings.}}
|{{HistoryLine|||dev=1.18.2 Pre-release 1|Added noise_router
to noise settings.
|Moved structure generation settings to separate files from noise settings.}}
|{{HistoryLine||1.19|dev=22w11a|Added spawn_target
field in noise settings, which is a list of climate target points.
|Removed the terrain_shaper
field in the noise
field in noise settings. The terrain shaper splines have been moved to density functions.}}
|{{HistoryLine|||dev=22w12a|Removed the top_slide
, bottom_slide
and sampling
fields in the noise
field in noise settings. Instead, these configurations are moved to density functions.}}
|{{HistoryLine||1.19.3|dev=22w42a|World generation data now stored in data/minecraft/worldgen in client.jar.
|Template for custom world generation on GitHub no longer updates.}}
}}
== Navigation ==
{{Navbox Java Edition technical|datapack}}
[[de:Angepasste Weltgenerierung]]
[[fr:Génération du monde personnalisée]]
[[ja:ワールド生成のカスタマイズ]]
[[pt:Geração de mundo personalizado]]
[[zh:自定义世界生成]]