minecraft custom block directional proceedure

**Hey. Pls help, Ive been trying with this for a minute..

Im making a custom modded fluid.

I’m hoping someone who knows a lil about minecraft java code can guide me?

I want to write a statement that only happens when the direction its trying to flow is DOWN.

Ive searched and searched.. pls help!
Im kinda dummy with java code.. if you could show me how it should be? **

If you know java but not minecraft.. heres what im working with:

https://nekoyue.github.io/ForgeJavaDocs-NG/javadoc/1.14.4/net/minecraft/util/Direction.html#DOWN

@Override
protected boolean canSpreadTo(BlockGetter worldIn, BlockPos fromPos, BlockState blockstate, Direction direction, BlockPos toPos, BlockState intostate, FluidState toFluidState, Fluid fluidIn) {
boolean condition = true;
if (worldIn instanceof LevelAccessor world) {
int x = fromPos.getX();
int y = fromPos.getY();
int z = fromPos.getZ();
if (direction == DOWN ) {
condition = my_ConditionProcedure.execute(world, x, y, z);
}
}
return super.canSpreadTo(worldIn, fromPos, blockstate, direction, toPos, intostate, toFluidState, fluidIn) && condition;
}