Water Block

## Wavelet

Water that isn't a block but that is generated by the main water block to which it is connected by some path, is called a wavelet, the reason for this is that undisturbed it will create a diamond-shaped wave.

### Elevations

The wavelets of water have eight possible elevations, with a block of water having the highest elevation.

## Movement

### Elevation descent

For each movement a wavelet makes by moving in some cardinal direction as explained below, it descends an elevation. If it reaches the bottommost elevation on top of a non-water block, it will stop moving.

###### Overwriting pre-existing wavelets

If in the direction of movement a wavelet meets a pre-existing adjacent wavelet of one elevation smaller, the same elevation or higher, then it won't overwrite it, otherwise it will (if the adjacent block has no water, then it is counted as the lowest possible elevation).

###### Examples

Demonstration of how a wavelet overwrites wavelets in its vicinity. (The numbers represent elevations and the cells block spaces)

First step: suppose this is the initial setup.

Second step: It will only replace the bottom and right wavelets.

### Direction of Movement

In normal conditions it will move in the four cardinal directions.

###### Obstacle distortion effects

If at one of the cardinal directions there is an obstacle, it will move only to those cardinal directions where no obstacles exist.

###### One-hole distortion effects

In the first place, if a wavelet has no block below (i.e. a hole at the bottom), it will create a wavelet of elevation 8 below and leave a wavelet of one elevation smaller than the previous one, on top. If it's a block of water, then it will move below without leaving a trace on top (i.e. it will fall down).

If a wavelet is at a distance of four in taxicab geometry and around non-water obstacles, from a hole or some other depression, then, if the hole is at one of the cardinal directions, the wavelet will make one movement towards that direction (and defer the process to next wavelet), if the hole is at two cardinal directions (like forward and left), then the wavelet will make a movement towards both directions, if there is no hole it will move in the four cardinal directions.

###### N-hole distortion effects

If there are multiple holes at a distance of four in taxicab geometry (and around obstacles) from a wavelet, then, it will move towards the nearest hole or holes (if many have the same distance), even if the hole is unreachable.

###### Water block obstacle effect

If a water block stands as an obstacle, blocking the path of a wavelet (or a water block) from its position to the hole, then only the wavelet that is adjacent (in some cardinal direction) to the water block will be influenced by the hole, the other wavelets will not be influenced by it. If the wavelet can reach the hole by other means, then it will take a path around the water block.

#### Water hole distortion effect

This can be in part seen as a special case of the water block distortion effect that occurs when a wavelet is on top of a water block that fills a hole, if that happens, then this wavelet will be stuck to the water block that is filling the hole (that is, it will be influenced by the hole), however, unlike the water block distortion effect, this only applies to adjacent wavelets, it does not apply to water blocks that are on top of the water block (for this won't be influenced by the hole).

## Recalculating wavelets

*See:* Block Recalculation

If a wavelet's adjacent block is destroyed or an adjacent wavelet replaced by another block or a wavelet of a different elevation, then the wavelet and the space of the block will be recalculated.

### Decreasing the number of wavelets

If a hole is dug after the wavelets have propagated, it won't cause the wavelets to decrease in number, rather it will just cause water to fall down in that place without changing the elevation of the wavelets on top of the neighbours of the block, which is merely a consequence of the already described rules. This implies then, that the only way to decrease the number of wavelets propagated is by blocking the parent wavelets.

###### Orphan wavelets

If a non-block wavelet is no longer connected to a parent of a higher level, then it will reduce in elevation by an amount of 3, with a negative elevation being equal to zero, except for a wavelet of elevation 3, where it will reduce by 2 instead. So that the numbers go like this: 7 to 4, 6 to 3, 5 to 2, 4 to 1, 3 to 1, 2 to 0, and 1 to 0. Such that if you were to place and remove a block of water it would produce the following pattern of elevations (in the four cardinal directions):

1. 8 7 6 5 4 3 2 1 (here the 8 is removed)
2. 0 7 6 5 4 3 2 1
3. 0 4 6 5 4 3 2 1
4. 0 4 3 5 4 3 2 1
5. 0 1 3 2 4 3 2 1
6. 0 1 1 2 1 3 2 1
7. 0 0 1 0 1 1 2 1
8. 0 0 0 0 0 1 0 1
9. 0 0 0 0 0 0 0 0 (here water disappears completely)

###### Order of decrease

When a parent of some wavelet becomes smaller than its adjacent wavelets, the adjacent wavelets will decrease in the following manner: first the western wavelet, second the eastern wavelet, third the northern wavelet, and fourth the southern wavelet.

### Creation of New Water Blocks

It seems that if a wavelet or block of space when recalculated is surrounded by blocks in the cardinal directions and below (including merely a water elevation of 8), and two of them being water in the cardinal directions, then it will become a new block of water.

Demonstration of the creation of new water blocks (B here means block and W means water block or an elevation 8 of water)

First step: The initial setup with a block surrounded by blocks and two water blocks
 W
 B

Second step: the block in the middle gets deleted so it causes to recalculate and thus a new water block appears
 W
 B

## Buoyancy

Objects at some point in the bottom of water, will move towards the top at a constant speed of approximately 0.04 (i.e. 1 block per second) and then float once they reach the surface of water, if the surface is at oblique angles it won't affect the object. Players in water will move upwards or downwards at a constant speed of 0.08, twice that of objects (i.e. 2 blocks per second), if they are pressing space they'll move upwards, whereas if they are not, they'll move downwards. If a player falls to water from any height in water, they won't lose health.

## Steps

Water changes in steps of 0.2 seconds each.

## Texture

See: Texture

Out of the texture file, the game takes either the top row of water textures for elevation 8 or water at an odd and equivalent distance between two water blocks, and the second row of textures for all wavelets, and cuts these textures into 16 slightly shifted tiles (less than a texture pixel) and iterates through them from left to right in the texture file every 0.3 seconds for the top row and every 0.1 seconds for the second row, though there are fifteen frames in total because the first, the sixteenth texture, and the edges of the textures below those get combined through z-fighting (and so for the second row sometimes it gets combined with lava and blinks red) that depends on rotation and distance. These textures are placed every such determined times, translucently on the faces of the blocks.

This happens in the client side, not the server side and when the game has a pretty high latency, the water block's texture changes very slowly. Every water block (and every wavelet) share the same frame with other water blocks (or wavelets with wavelets) across the whole world (changes are absolute, not relative), except for the combined tile, which is not clear how it works.

### Texture Gaps

Sometimes between the textures there appears to be some triangular gaps, that show what's behind the water, clearly. It is an open problem how this works exactly.

### Mysteries concerning orphan wavelets

#### Possible Theory That Solves the First Problem (needs more testing)

For a wavelet, it might either reduce in propagation distance and mark its neighbours in order of: West, East, North, and South if it has to, or if it doesn't have to, but it can move, then it will create wavelets of a smaller elevation around it, and mark those wavelets to be further calculated. One movement or reduction in propagation distance constitutes a single step (for all markings at that point).

#### Questions

Does water shrink if has to, before it decides to move? Probably Yes

Is water is influenced by a hole that is at the other side of a block? No

Does placing a water block cause neighbours to update? No

Do the shrinks of water and its movements are both combined in the west, east, north, south? Is it in the same order that the neighbours are marked? Probably Yes

Does it mark the neighbours of water at the same moment that it spreads, or first it spreads and until the next step, does it add them? It marks the neighbours at the moment it spreads, therefore water is able to act at a distance, and as such, water's maximum velocity is not 1.

Can wavelets make a source block? Probably not

Which neighbours of water recalculate, can it include empty space? At least it can include other blocks (like dirt or wood), for deletion, not for replacement by placing blocks, it is not known if it's the same order but an experiment done in battle royale (can also be done in capture the gems), demonstrated that other blocks are included as neighbours.

If there are multiple wavelets which neighbours require recalculation in which order are they calculated?

If water recalculates in the sequence: west, east, north, and south, where do up and down enter?

Does each step involve one water movement per one water shrink or is it multiple water movements per water shrink?

### Orientation

The texture repeats over a single face of a block, however generally only one tile of the texture is visible, however, when there's a rotation, five copies of the texture can be seen within the same face, as it rotates about the centre, and this rotation does not happen merely for the texture but for the structure of the face as well.

#### Interference between wavelets

if two blocks of water are separated at an odd distance then the water at the centre will have a flat texture.

#### Half Angle

Excluding those adjacent to the water block, wavelets of a higher elevation will have an angle between those of a smaller elevation.

The rest of how orientation works is unknown.

### The combined animation frame

How does the sixteenth, first tile and borders of those at the bottom of those tiles, get combined?

## Uses in Survival Mode

### Infinite well

Make an enclosure of at least, two by two, and you obtain an infinite well by the property of the creation of new water blocks, discussed in the section of recalculating wavelets.

### Elevator

By the property that water will move downwards if there is no block below, it follows that if you place some water block at a certain height, a resulting wavelet will fall from that height, creating wavelets of elevation eight, as it descends, that in turn can be used to ascend and slowly descend from that height. The elevator has a limited utility in modes other than survival mode, but it can still be used. (e.g. to ascend and descend a place underground.)

### Cushioning one's fall

Water can be used as a way to descend rapidly from some high structure without losing height nor having to make a staircase or an elevator. This is done by placing water at some point where one intends to descend to, so that when one jumps from that height one might fall on water, which cushions one's fall.

### Forming shapes

By the theory of the hole influence effects, one can mould water to make all sorts of shapes. That for a given y level, the shape of a single block of water is limited by a smallest distance of 15 between two points for non-loops, and by a distance of 7 for loops, that the wavelets must be connected to the water block by a taxicab geometry path, and that for any water below the highest level of water, there will always exist water above.

### Transporting goods

It can be used for transporting goods between two places without having to move, perhaps by sending objects from inside a fortress to outside, by a hole of size one, without the risk of getting killed, or when you have your inventory full and you're sending the mined objects to your partner.

1. ↑ It can also be seen as a distance of 5, if you take into account the wavelet that descends.
2. ↑ Notice that only water blocks behave in this way, this does not apply to wavelets of a higher elevation
3. ↑ Including a block above it, excluding blocks at the diagonals.
4. ↑ If on the contrary, a block or water elevation is placed without replacing or destroying a pre-existing block, nothing will happen.
5. ↑ Not exactly the surface, but at half-way when the object is bobbing up (an undulation that always happens independently of whether it's in water or it is not), such that half of the object will be above water and half below it.
6. ↑ The analyses were done by modifying the default texture pack.
7. ↑ You can also create an infinite well with three by one but for that you must make sure that you only take the water on the centre.