minecraft.wiki-mirror/wiki_backup/fluid.txt
2024-12-20 08:07:18 -05:00

179 lines
15 KiB
Text

{{See also|Solid block}}
[[File:LiquidsComparison.png|thumb|right|300px|Flowing water and lava.]]
[[File:Coral reef at night.png|thumb|right|Many animals, such as the [[coral]] and [[tropical fish]] in this picture, rely on fluids such as water to survive.]]
'''Fluids''' (also known by players as '''liquids''') are [[block]]s that are able to flow over the terrain, forming rivers or falls. There are two blocks of this type in the main versions of ''[[Minecraft]]'': [[water]] and [[lava]].
{| style="margin:auto;text-align:center" data-description="Fluids"
|-
| scope="col" style="width:68px" | [[File:Water.gif|150px|link=Water]]
| scope="col" style="width:68px" | [[File:Lava.gif|150px|link=Lava]]
|-
| '''[[Water]]'''
| '''[[Lava]]'''
|}
There are other in-game substances that show fluid properties but cannot be placed as fluid blocks, mainly [[potion]]s, dyed water{{only|bedrock}}, [[milk]], and [[Honey Bottle|honey]].
== Properties ==
Fluids can be placed as source blocks, but can be picked up only with an empty [[bucket]]. It is possible to use a [[glass bottle]] from a water source to fill it, but the source is not removed.
When placed fluid blocks that are completely confined by the blocks around them render as '''still'''. Otherwise they are become the source of a [[#Spread|liquid flow]], spreading according to the [[wikipedia:Fluid dynamics|fluid]] rules, and being rendered with the direction of flow shown by animated lines
[[File:Water and lava still.png|right|thumb|Water and lava as still blocks.]][[File:Lava flowing one side.png|thumb|Lava block open to flow on one side]]
A source block appears as being "full" nearly to the top of its containing blocks (if any) while flowing fluid blocks appear to be "emptier" the further they are from their source.
Fluids can interact [[#Mixing|with each other]], and with other [[block]]s they are placed next to or flow over or past, according to the properties of the affected block.
Flowing fluids exert pressure on [[entities]] pushing them in the direction of the flow. Items that are thrown or dropped into flowing water are carried along until they get caught in an eddy or the flow reaches its maximum extent. Being carried in a flow does not prevent de-spawning. [[Mob]]s that are able to float in fluids do not drown, but cannot swim upstream. The minority of mobs that swim (such as [[fish]] and [[axolotl]]) can also swim upstream.
Flowing lava transports netherite items ( scraps, ingots, blocks, or made items ''only'' ) in the same way, but all other items burn up before they can be carried any distance and are thus lost.
Fluid blocks are replaceable in the same way that [[air]] is, so placing a ''solid'' block into a liquid source replaces it.
Placing most blocks that can be [[waterlogging|waterlogged]] into a water source block does not destroy the source block, or stop water from flowing from the source block. Full blocks that can be waterlogged, such as [[leaves]], [[mangrove roots]], and [[copper grate]]s, do stop water from flowing from a source block. Other waterlogged blocks with a full square surface, such as [[stairs]] and [[trapdoors]], block water flow in the direction of the square surface. No block can occupy the same space as a lava source block; placing any block into a lava source block destroys the source block.
Placing any type of block into any flow blocks it, redirecting or stopping it.
Water cannot be placed in the Nether, in both [[survival]] mode and [[creative]] mode. The only way to get water into the Nether is by using the {{cmd|setblock}} or {{cmd|fill}} [[command]]s.
==== Self Generation of Water Sources ====
When an air block has at least two water sources on any of its horizontal faces (and, {{IN|je}}, has a solid block under it) a water source is created from it. This is true even when the sources are in waterlogged blocks, with the exception of waterlogged leaf blocks. The effect also operates when the "air block" has a waterlog-able block placed in it, again, with the exception of leaf blocks. This effect is controlled by the [[game rule|game rules]] for <code>waterSourceConversion</code> (set to <code>true</code> by default) and <code>lavaSourceConversion</code> (set to <code>false</code> by default).
=== Mechanics ===
[[File:WaterSpread.gif|thumb|right|Water flowing down a cliff, demonstrating flowing mechanics.]]
==== Depth ====
Fluid blocks have a depth value that measures how "empty" it is. A source block is "full" with a depth value of 0. Flowing fluids have a depth value equal to their source's depth + 1, with a maximum possible "emptiness" value where the flow stops. Thus, a flowing block next to a source has depth value 1, the next further away 2, and so on until the flow stops. If the flow travels down in elevation, the depth resets to 0 at the new elevation.
The maximum emptiness depth for water is 7. Lava in the [[Overworld]] or [[the End]] has a maximum depth of 3, but in [[the Nether]] its maximum depth value is 7. The maximum distance a fluid can flow from its original source block is a [[taxicab distance]] corresponding to the maximum depth of that fluid.
The rendering of fluids is controlled by their depth values both in the height of fluid level and the direction of flow displayed.
==== Spread ====
<gallery>
File:Water spread v1-13.png| Water spreading from source
File:Lava spread v1-13.png| Lava spreading from a source
File:Water flow around fence.png| Water flowing around fence posts already placed
</gallery>
Once a source block is placed, the fluid spreading procedure begins. Sources in waterlogged blocks, with the exception of leaf blocks, work the same way.
This block is the first of a list of blocks involved in the spreading procedure.
The fluid spreading procedure may need the source to receive a block update signal if it was created without being placed.
First, each open side of a fluid block starts a flow. A water block in a flat plain spreads out in all four directions until it reaches the depth limit, forming a diamond shape spanning fifteen blocks point-to-point. A water source floating in midair flows out to each of its four sides and then down{{only|be}}. {{in|java}} a suspended source first starts a flow downwards, and then, 5 ticks later, starts flows out to its four sides. Each flowing block created is added to a list of blocks to be considered for further spreading.
Now the blocks directly below each source or flowing blocks on the "spreading list" are checked:
# If that block is [[air]], it is replaced by a flowing fluid block with a depth value of 0. This new block is also added to the "spreading list".
#* Because of this, a fluid can flow much farther if it flows downward occasionally than if it remains on a flat surface.
# If the block below is a waterlogged, [[Solid block#List of non-solid blocks|non-solid]]{{only|be}} block, and exposes its liquid phase on its top{{only|je}}, then checking stops as the waterlogged source block has its own "spreading list".
# If the block below is a type of [[Solid block#List of non-solid blocks|non-solid block]] that is affected by the fluid, [[cobweb]]{{only|je}} or a [[bamboo shoot]]{{only|je}} then it may be converted into a dropped [[item]]. The block is then replaced by a flowing block with depth value 1 greater that the block above and is added to the spreading list. The block above is removed from the "spreading list".
# If the block below is a [[solid block]], or one of a few non-solid blocks (e.g. [[ladder]]s) that are unaffected by fluids, flow spreads out to all open sides. These additional flowing blocks are added to the list.
#* If all four of the surrounding blocks are also solid or fluid sources{{only|je}}, the spreading procedure stops. This is how a lava or water column that does not spread over the ground can be created.
# If the block below is a fluid block of another type, the rules for mixing fluids are considered. If new flowing blocks are created they are added to the list.
# If the block below is a source block of the same fluid, then flowing stops.
Flowing fluid has a speed value that governs how fast the spreading effect takes place. Water in the [[Overworld]] moves at 1 block every 5 [[tick]]s, or 4 blocks per second. Lava in [[the Nether]] moves at 1 block every 10 [[tick]]s, or 2 blocks per second. However, lava in the Overworld is much slower, and moves at only 1 block every 30 game ticks, or 2 blocks every 3 seconds.
==== Flow direction ====
[[File:FlowingWaterCliffEdge.png|thumb|right|Fluids consider the shortest distance to the edge of a cliff, and prioritize flowing in that direction.]]
The shape of the ground around a flow is considered when evaluating its spread, giving preference to the creation of water or lava falls, for aesthetic purposes. During the evaluation of horizontal spread, the 5-block area around source and flowing blocks is checked for air, fluids{{only|je}} (a waterlogged block is considered only if it exposes its liquid phase on its top and the spreading fluid is water) or flushable blocks one block below the fluid block. These air blocks, and the blocks preceding them, are all converted to fluid blocks with depth level of 1 greater than the current block to establish a simple flow, but are not added to the collection for later consideration.
For example, the flow of water from a single source placed within 7 blocks of an edge is only one block wide to the edge, and then falls as a one block wide stream, as demonstrated in the image to the right.
==== Directional flow ====
[[File:Normal spread waterlogged fence.png|thumb|right|Normal water spreading]]
Water normally spreads equally in all directions from a waterlogged block, as seen to the right. Banners and Stairs are exceptions in that for them flow is one-directional.<gallery>
File:Waterlogged spread stair.png|Water flowing from a [[waterlogging|waterlogged]] [[stair]].
</gallery>
=== Dripping ===
[[File:LavaParticles.png|thumb|right|Lava seeping through one layer of [[dirt]]]]
If [[particles]] are fully enabled in the [[options]] menu, solid blocks that have air below and fluid above [[particles#dripWater|drip]], as a visual indication that only one layer of blocks separates the player from the fluid above. Dripping [[lava]] does not cause damage or start fires. It can take several seconds before dripping starts.
=== Block updates ===
{{IN|be}} these actions cause a fluid block to update:
* Another block is placed into its space
* Fluid starts to flow in from an adjacent block
* An established incoming flow stops
{{IN|je}} [[block update#Post placement update|post placement updates]] affect fluid sources including waterlogged blocks as well as flowing fluids only if the updates generate from the same fluid, and [[block update#Neighbor changed update|neighbor changed updates]] affect all fluids excluding waterlogged blocks.
[[Generated structures]] never cause block updates to adjacent fluids when they generate. For example, a cave entrance that is created partly below water level at the edge of a body of water or lava does not cause the fluid to flow until it receives a block update. On the other hand, fluids created as ''part'' of a structure flow immediately if not completely confined; this includes holes in the bottom of an ocean that open into a [[Cavern#Ravine|ravine]] below.
=== Mixing ===
When the two fluids interact, the results vary depending on the position of the fluid source.
* If lava flows vertically into a water source block, the water source block turns into {{BlockLink|stone}}.
* If lava flows vertically into flowing water, the flowing water turns into {{BlockLink|stone}}.
* If lava flows horizontally into water, the lava turns into {{BlockLink|cobblestone}}.
* If water flows horizontally into flowing lava, the lava turns into {{BlockLink|cobblestone}}.
* If water flows vertically into flowing lava, either {{BlockLink|cobblestone}} or nothing may result.
* If water flows into a lava source block, the lava source block turns into {{BlockLink|obsidian}}.
* If water falling vertically touches a lava source block on any side, the lava turns into {{BlockLink|obsidian}}&mdash;even if the water would not otherwise run into the lava.
* If lava flows over [[soul soil]] next to [[blue ice]], the lava turns into {{BlockLink|basalt}}.
== Videos ==
<div style="text-align:center">
{{yt|x80vGiSJ7Uo|align=inline}}
{{yt|Of2yfwTtmTY|align=inline}}
</div>
== History ==
{{HistoryTable
|{{HistoryLine|java classic}}
|{{HistoryLine||0.0.12a|Added [[water]] and [[lava]].}}
|{{HistoryLine|java}}
|{{HistoryLine||1.0.0|dev=Beta 1.9 Prerelease|Fluid that is suspended above an open area by one block thick of material seeps through the material and has drip particles fall to the floor.
|Lava that falls onto water produces [[stone]] instead of replacing the water.}}
|{{HistoryLine|||dev=Beta 1.9 Prerelease 5|A lava block could be converted into a source block if the following conditions were met:
*it is bordered by 4 lava sources in a cross-like arrangement
*the 4 sources are on the same horizontal level as it
*there is a solid, opaque block underneath it
}}
|{{HistoryLine|||dev=Beta 1.9 Prerelease 6|Lava source blocks can no longer be created.}}
|{{HistoryLine||1.13|dev=18w10c|Changed water physics.}}
|{{HistoryLine|||dev=18w10d|Water no longer flows through the rearside of stairs.}}
|{{HistoryLine|||dev=18w19a|Separated some of the logic for blocks and fluids.}}
|{{HistoryLine||1.16|dev=20w09a|Lava now pushes [[entities]].}}
|{{HistoryLine|||dev=20w13a|Basalt can now be formed when [[lava]] flows over [[soul soil]] next to [[blue ice]] and water flowing horizontally into lava now turns the lava into [[cobblestone]].}}
|{{HistoryLine|pocket alpha}}
|{{HistoryLine||v0.1.0|Added [[water]] and [[lava]].}}
|{{HistoryLine||v0.8.0|dev=build 1|Fluids no longer attempt to spread upon receiving a [[random tick]].}}
|{{HistoryLine|||dev=build 5|Lava that falls onto water produces [[stone]] instead of replacing the water.}}
|{{HistoryLine||v0.9.0|dev=build 1|Fluid that is suspended above an open area by one block thick of non-[[transparent]] material seeps through the material and has drip particles fall to the floor.}}
|{{HistoryLine||v0.11.0|dev=build 14|Fluids once attempt to spread upon receiving a random tick.}}
}}
== Issues ==
{{Issue list}}
== Gallery ==
=== Screenshots ===
<gallery>
File:Watersb.png|A water source. Click [[Water#Source Blocks|here]] for more designs
File:Waterfl.png|Flowing water.
File:Lavasb.png|Lava.
File:Lavafl.png|Flowing lava.
File:SolidLiquid.png|Water and [[stone]].
</gallery>
== Navigation ==
{{Navbox blocks|natural}}
{{Navbox environment}}
[[Category:Fluids| ]]
[[cs:Kapalina]]
[[de:Flüssigkeit (Begriffsklärung)]]
[[es:Fluido]]
[[fr:Liquide]]
[[hu:Folyadékok]]
[[ja:液体]]
[[ko:액체]]
[[nl:Vloeistoffen]]
[[pl:Ciecze]]
[[pt:Fluido]]
[[ru:Жидкости]]
[[uk:Рідини]]
[[zh:液体]]