<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sasgaming.net/index.php?action=history&amp;feed=atom&amp;title=Minecraft%3ASurface_rule</id>
	<title>Minecraft:Surface rule - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sasgaming.net/index.php?action=history&amp;feed=atom&amp;title=Minecraft%3ASurface_rule"/>
	<link rel="alternate" type="text/html" href="https://wiki.sasgaming.net/index.php?title=Minecraft:Surface_rule&amp;action=history"/>
	<updated>2026-05-13T20:42:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.sasgaming.net/index.php?title=Minecraft:Surface_rule&amp;diff=107294&amp;oldid=prev</id>
		<title>SyncBot: Sync: new page from Minecraft</title>
		<link rel="alternate" type="text/html" href="https://wiki.sasgaming.net/index.php?title=Minecraft:Surface_rule&amp;diff=107294&amp;oldid=prev"/>
		<updated>2026-05-07T11:17:30Z</updated>

		<summary type="html">&lt;p&gt;Sync: new page from Minecraft&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Exclusive|java}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Surface rules&amp;#039;&amp;#039;&amp;#039; are used to determine the block for each solid position of the terrain. They are responsible for [[Minecraft:Grass Block|grass]] and [[Minecraft:dirt]] layers, creating different bands of [[Minecraft:terracotta]] in badlands, for [[Minecraft:deepslate]], [[Minecraft:bedrock]], and more.&lt;br /&gt;
&lt;br /&gt;
Surface rules are used in the [[Minecraft:Custom noise settings|noise settings]] of a [[Minecraft:data pack]].&lt;br /&gt;
&lt;br /&gt;
== JSON format ==&lt;br /&gt;
A surface rule is a type of [[Minecraft:wikipedia:Decision_tree|decision tree]]. Using a combination of sequences and conditions, it can implement checks to place the right blocks in the right places.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;treeview&amp;quot;&amp;gt;&lt;br /&gt;
* {{nbt|compound}} The root object.&lt;br /&gt;
** {{nbt|string|type}}: Type of the surface rule as a [[Minecraft:resource location]].&lt;br /&gt;
** Extra fields of the surface rule, described below.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The possible values for {{nbt|string|type}} and associated extra fields:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;treeview&amp;quot; id=&amp;quot;bandlands&amp;quot; style=&amp;quot;margin-block-end: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;bandlands&amp;#039;&amp;#039;&amp;#039;{{sic}} &amp;amp;mdash; Used in [[Minecraft:badlands]] to place [[Minecraft:terracotta]]. This rule has no extra fields.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;treeview&amp;quot; id=&amp;quot;block&amp;quot; style=&amp;quot;margin-block-end: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;block&amp;#039;&amp;#039;&amp;#039; &amp;amp;mdash; Places a specified block.&lt;br /&gt;
** {{nbt|compound|result_state}}: The block state to place.&lt;br /&gt;
*** {{nbt inherit/block state}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;treeview&amp;quot; id=&amp;quot;condition&amp;quot; style=&amp;quot;margin-block-end: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;condition&amp;#039;&amp;#039;&amp;#039; &amp;amp;mdash; Checks a condition&lt;br /&gt;
** {{nbt|compound|if_true}}: The &amp;#039;&amp;#039;&amp;#039;[[#Surface conditions|surface condition]]&amp;#039;&amp;#039;&amp;#039; (see below) to check.&lt;br /&gt;
** {{nbt|compound|then_run}}: The &amp;#039;&amp;#039;&amp;#039;surface rule&amp;#039;&amp;#039;&amp;#039; to run if the condition matches.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;treeview&amp;quot; id=&amp;quot;sequence&amp;quot; style=&amp;quot;margin-block-end: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;sequence&amp;#039;&amp;#039;&amp;#039; &amp;amp;mdash; Tries surface rules in order, only the first that matches is applied.&lt;br /&gt;
** {{nbt|list|sequence}}: A list of surface rules to try.&lt;br /&gt;
*** {{nbt|compound}} A &amp;#039;&amp;#039;&amp;#039;surface rule&amp;#039;&amp;#039;&amp;#039; object.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Surface conditions ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;treeview&amp;quot;&amp;gt;&lt;br /&gt;
* {{nbt|compound}} The root object.&lt;br /&gt;
** {{nbt|string|type}}: Type of the surface condition as a [[Minecraft:resource location]].&lt;br /&gt;
** Extra fields of the surface condition, described below.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The possible values for {{nbt|string|type}} and associated extra fields:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;treeview&amp;quot; id=&amp;quot;above_preliminary_surface&amp;quot; style=&amp;quot;margin-block-end: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;above_preliminary_surface&amp;#039;&amp;#039;&amp;#039; &amp;amp;mdash; Checks if the current position is above the preliminary surface level, which is a Y-level usually a few blocks below the main surface, ignoring noise caves. This is used to prevent grass blocks from being placed in noise caves. This condition has no extra fields. The preliminary surface level is calculated from the {{cd|initial_density_without_jaggedness}} noise router density function.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;treeview&amp;quot; id=&amp;quot;biome&amp;quot; style=&amp;quot;margin-block-end: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;biome&amp;#039;&amp;#039;&amp;#039; &amp;amp;mdash; Checks the biome at the current position.&lt;br /&gt;
** {{nbt|list|biome_is}}: A list of biomes where this condition matches.&lt;br /&gt;
*** {{nbt|string}} A resource location of a [[Minecraft:biome]].&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;treeview&amp;quot; id=&amp;quot;hole&amp;quot; style=&amp;quot;margin-block-end: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;hole&amp;#039;&amp;#039;&amp;#039; &amp;amp;mdash; Passes for columns where the [[#Surface depth|surface depth]] is 0. This condition has no extra fields.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;treeview&amp;quot; id=&amp;quot;noise_threshold&amp;quot; style=&amp;quot;margin-block-end: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;noise_threshold&amp;#039;&amp;#039;&amp;#039; &amp;amp;mdash; Computes the noise value of the current column using a specified [[Minecraft:noise]] and checks if it is between the min and max threshold.&lt;br /&gt;
** {{nbt|string|noise}}: {{json ref|noise}}.&lt;br /&gt;
** {{nbt|double|min_threshold}}: The minimum noise value where the condition passes.&lt;br /&gt;
** {{nbt|double|max_threshold}}: The maximum noise value where the condition passes.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;treeview&amp;quot; id=&amp;quot;not&amp;quot; style=&amp;quot;margin-block-end: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; &amp;amp;mdash; Inverts a surface conditions, passing when the nested condition fails.&lt;br /&gt;
** {{nbt|compound|invert}}: The &amp;#039;&amp;#039;&amp;#039;surface condition&amp;#039;&amp;#039;&amp;#039; object to invert.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;treeview&amp;quot; id=&amp;quot;steep&amp;quot; style=&amp;quot;margin-block-end: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;steep&amp;#039;&amp;#039;&amp;#039; &amp;amp;mdash; Checks if the current position is a steep face on the north or east sides of a mountain. This condition has no extra fields.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;treeview&amp;quot; id=&amp;quot;stone_depth&amp;quot; style=&amp;quot;margin-block-end: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;stone_depth&amp;#039;&amp;#039;&amp;#039; &amp;amp;mdash; Checks if the current position is within a specified distance from the surface, either upward or downward, using [[#Terrain depth|terrain depth]]. This is used in vanilla to place grass blocks and dirt layers on the surface in the [[Minecraft:overworld]], and [[Minecraft:soul sand]], [[Minecraft:soul soil]], [[Minecraft:gravel]] and [[Minecraft:basalt]] floors and ceilings in the [[Minecraft:nether]].&lt;br /&gt;
** {{nbt|string|surface_type}}: Either &amp;lt;code&amp;gt;floor&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ceiling&amp;lt;/code&amp;gt;. If &amp;lt;code&amp;gt;floor&amp;lt;/code&amp;gt;, the blocks will be placed based on the distance to the surface above, if &amp;lt;code&amp;gt;ceiling&amp;lt;/code&amp;gt;, the distance to the surface below will be used instead.&lt;br /&gt;
** {{nbt|int|offset}}: The vertical offset.&lt;br /&gt;
** {{nbt|boolean|add_surface_depth}}: If true, adds the [[#Surface depth|surface depth]] to the offset. Note: this is &amp;#039;&amp;#039;not&amp;#039;&amp;#039; {{cd|add_stone_depth}}!&lt;br /&gt;
** {{nbt|int|secondary_depth_range}}: Adds a mapped value of the [[#Secondary surface depth|secondary surface depth]] to the offset, calculated using the formula: {{cd|map(surface_secondary(X,0,Z), -1, 1, 0, secondary_depth_range)}}.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;treeview&amp;quot; id=&amp;quot;temperature&amp;quot; style=&amp;quot;margin-block-end: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;temperature&amp;#039;&amp;#039;&amp;#039; &amp;amp;mdash; Checks if the current block is in a biome that is cold enough for [[Minecraft:snowfall]]. This condition has no extra fields.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;treeview&amp;quot; id=&amp;quot;vertical_gradient&amp;quot; style=&amp;quot;margin-block-end: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;vertical_gradient&amp;#039;&amp;#039;&amp;#039; &amp;amp;mdash; Compares the current Y position, with a messy transition, just like the deepslate and bedrock transitions.&lt;br /&gt;
** {{nbt|string|random_name}}: Used as a seed to randomize the gradient.&lt;br /&gt;
** {{nbt|compound|true_at_and_below}}: The lower vertical anchor. Positions at and below this always pass.&lt;br /&gt;
*** {{nbt inherit/vertical_anchor}}&lt;br /&gt;
** {{nbt|compound|false_at_and_above}}: The upper vertical anchor. Positions at and above this always fail. The Y-coords between the two vertical anchors produces a gradient where the probability of success is {{cd|(false_at_and_above - Y) / (false_at_and_above - true_at_and_below)}}.&lt;br /&gt;
*** {{nbt inherit/vertical_anchor}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;treeview&amp;quot; id=&amp;quot;water&amp;quot; style=&amp;quot;margin-block-end: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;water&amp;#039;&amp;#039;&amp;#039; &amp;amp;mdash; Checks if the current position is above water, based on [[#Terrain depth|terrain depth]]. Note that if there is no water above this block, the condition always passes, regardless of the values of the fields.&lt;br /&gt;
** {{nbt|int|offset}}: The value added to the water depth before the comparison is done. This value can be negative to match blocks at a specific depth relative to water surface.&lt;br /&gt;
** {{nbt|int|surface_depth_multiplier}}: Value between -20 and 20. How much it is affected by the [[#Surface depth|surface depth]]. {{cd|surface_depth(X,Z) * surface_depth_multiplier}} is added to offset before comparing.&lt;br /&gt;
** {{nbt|boolean|add_stone_depth}}: If true, adds the distance to the surface to the offset, effectively checking if the surface block above this one is above water.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;treeview&amp;quot; id=&amp;quot;y_above&amp;quot; style=&amp;quot;margin-block-end: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;y_above&amp;#039;&amp;#039;&amp;#039; &amp;amp;mdash; Checks if the current position is above a specified height (exclusive).&lt;br /&gt;
** {{nbt|compound|anchor}}: The vertical anchor to compare the height with.&lt;br /&gt;
*** {{nbt inherit/vertical_anchor}}&lt;br /&gt;
** {{nbt|int|surface_depth_multiplier}}: Value between -20 and 20. How much it is affected by the [[#Surface depth|surface depth]]. {{cd|surface_depth(X,Z) * surface_depth_multiplier}} is added to anchor before comparing.&lt;br /&gt;
** {{nbt|boolean|add_stone_depth}}: If true, adds the [[#Terrain depth|distance to the surface above]] to the offset.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Surface depth ==&lt;br /&gt;
The surface depth is an integer value computed for each column, which is used by various [[#Surface conditions|conditions]]. It uses the {{cd|minecraft:surface}} [[Minecraft:noise]]. The calculation is as follows: {{cd|floor(surface(X,0,Z) × 2.75 + 3.0 + positional_noise(X,0,Z) × 0.25)}} where {{cd|surface}} returns the noise value of the {{cd|minecraft:surface}} noise and {{cd|positional_noise}} returns a random value between 0 and 1.&lt;br /&gt;
&lt;br /&gt;
== Secondary surface depth ==&lt;br /&gt;
The secondary surface depth is a value  between -1 and 1 computed for each column, which can be used by the [[#stone_depth|stone_depth condition]]. It uses the {{cd|minecraft:surface_secondary}} [[Minecraft:noise]].&lt;br /&gt;
&lt;br /&gt;
== Terrain depth ==&lt;br /&gt;
The generator tracks the vertical distance to the surface above (internally &amp;lt;code&amp;gt;stoneDepthAbove&amp;lt;/code&amp;gt;) and the cavity below (internally &amp;lt;code&amp;gt;stoneDepthBelow&amp;lt;/code&amp;gt;), as well as how deep underwater each block is (if there is any water above it at all; &amp;lt;code&amp;gt;waterHeight&amp;lt;/code&amp;gt;). These values are used in the [[#stone_depth|stone_depth]], [[#water|water]] and [[#y_above|y_above]] conditions.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== &amp;#039;&amp;#039;Java Edition&amp;#039;&amp;#039; ===&lt;br /&gt;
{{HistoryTable&lt;br /&gt;
|{{HistoryLine|java upcoming}}&lt;br /&gt;
|{{HistoryLine||26.2|dev=snap6|Changed the {{cd|noise_threshold}} surface rule condition.|Removed the {{cd|noise_gradient}} surface rule.}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Navigation ==&lt;br /&gt;
{{Navbox Java Edition technical|datapack}}&lt;br /&gt;
&lt;br /&gt;
[[Minecraft:de:Oberflächenregel]]&lt;br /&gt;
[[Minecraft:fr:Règle de surface]]&lt;/div&gt;</summary>
		<author><name>SyncBot</name></author>
	</entry>
</feed>