Skip to content

API reference / @jsprismarine/prismarine / content/world/fluidReplacement

content/world/fluidReplacement ​

Type Aliases ​

FluidReplacement ​

FluidReplacement = "java" | "bedrock"

Defined in: packages/prismarine/src/content/world/fluidReplacement.ts:21

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

Variables ​

DEFAULT_FLUID_REPLACEMENT ​

const DEFAULT_FLUID_REPLACEMENT: FluidReplacement = 'java'

Defined in: packages/prismarine/src/content/world/fluidReplacement.ts:24

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

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

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, "identifier" | "states">

Returns ​

boolean


javaLiquidReactionOf() ​

javaLiquidReactionOf(content, block): LiquidReaction | undefined

Defined in: packages/prismarine/src/content/world/fluidReplacement.ts:56

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

block ​

HookBlock

Returns ​

LiquidReaction | undefined


liquidReactionOf() ​

liquidReactionOf(content, block, rule): LiquidReaction | undefined

Defined in: packages/prismarine/src/content/world/fluidReplacement.ts:74

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

The content whose tags Java's rule reads.

block ​

HookBlock

The block the fluid reaches.

rule ​

FluidReplacement

The edition to follow.

Returns ​

LiquidReaction | undefined