[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/prismarine](https://jsprismarine.dev/api/@jsprismarine/prismarine/index.md) / content/world/fluidReplacement

# content/world/fluidReplacement

## Type Aliases

### FluidReplacement

> **FluidReplacement** = `"java"` \| `"bedrock"`

Defined in: [packages/prismarine/src/content/world/fluidReplacement.ts:21](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/fluidReplacement.ts#L21)

Which edition decides what a flowing fluid destroys: the `fluid-replacement` setting.

## Variables

### DEFAULT\_FLUID\_REPLACEMENT

> `const` **DEFAULT\_FLUID\_REPLACEMENT**: [`FluidReplacement`](#fluidreplacement) = `'java'`

Defined in: [packages/prismarine/src/content/world/fluidReplacement.ts:24](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/fluidReplacement.ts#L24)

The edition the server follows when nothing says otherwise.

***

### WASHED\_AWAY\_BY\_FLUIDS

> `const` **WASHED\_AWAY\_BY\_FLUIDS**: `"minecraft:washed_away_by_fluids"` = `'minecraft:washed_away_by_fluids'`

Defined in: [packages/prismarine/src/content/world/fluidReplacement.ts:30](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/fluidReplacement.ts#L30)

The Java tag a fluid may wash a block out of, `BlockTags.WASHED_AWAY_BY_FLUIDS`.

## Functions

### isJavaLiquidContainer()

> **isJavaLiquidContainer**(`block`): `boolean`

Defined in: [packages/prismarine/src/content/world/fluidReplacement.ts:44](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/fluidReplacement.ts#L44)

Whether the Java block a Bedrock state comes from is a `LiquidBlockContainer`, which no flowing
fluid enters: a block with a `waterlogged` property, or one that always holds water.

#### Parameters

##### block

`Pick`\<[`HookBlock`](https://jsprismarine.dev/api/@jsprismarine/blocks/index.md#hookblock), `"identifier"` \| `"states"`\>

#### Returns

`boolean`

***

### javaLiquidReactionOf()

> **javaLiquidReactionOf**(`content`, `block`): [`LiquidReaction`](https://jsprismarine.dev/api/@jsprismarine/blocks/index.md#liquidreaction) \| `undefined`

Defined in: [packages/prismarine/src/content/world/fluidReplacement.ts:56](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/fluidReplacement.ts#L56)

What a flowing fluid does to a block by Java 26.3's rule, or undefined when the content declares
no `#minecraft:washed_away_by_fluids` to read it from.

#### Parameters

##### content

[`ServerContent`](https://jsprismarine.dev/api/@jsprismarine/prismarine/content/ServerContent/index.md#servercontent)

##### block

[`HookBlock`](https://jsprismarine.dev/api/@jsprismarine/blocks/index.md#hookblock)

#### Returns

[`LiquidReaction`](https://jsprismarine.dev/api/@jsprismarine/blocks/index.md#liquidreaction) \| `undefined`

***

### liquidReactionOf()

> **liquidReactionOf**(`content`, `block`, `rule`): [`LiquidReaction`](https://jsprismarine.dev/api/@jsprismarine/blocks/index.md#liquidreaction) \| `undefined`

Defined in: [packages/prismarine/src/content/world/fluidReplacement.ts:74](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/fluidReplacement.ts#L74)

What a flowing fluid does to a block by the configured edition.

Air and the fluids themselves answer Bedrock's `none` under either rule: a fluid shares their
cell rather than destroying them. Java's rule falls back to Bedrock's for a block when the
content cannot answer it, so a stack without the vanilla tags behaves as before.

#### Parameters

##### content

[`ServerContent`](https://jsprismarine.dev/api/@jsprismarine/prismarine/content/ServerContent/index.md#servercontent)

The content whose tags Java's rule reads.

##### block

[`HookBlock`](https://jsprismarine.dev/api/@jsprismarine/blocks/index.md#hookblock)

The block the fluid reaches.

##### rule

[`FluidReplacement`](#fluidreplacement)

The edition to follow.

#### Returns

[`LiquidReaction`](https://jsprismarine.dev/api/@jsprismarine/blocks/index.md#liquidreaction) \| `undefined`
