Package net.minecraft.fluid
Class FlowableFluid
java.lang.Object
net.minecraft.fluid.Fluid
net.minecraft.fluid.FlowableFluid
- Direct Known Subclasses:
LavaFluid,WaterFluid
public abstract class FlowableFluid extends Fluid
Represents a fluid which can flow.
-
Field Summary
Fields Modifier and Type Field Description static BooleanPropertyFALLINGprivate static ThreadLocal<Object2ByteLinkedOpenHashMap<Block.NeighborGroup>>field_15901static IntPropertyLEVELprivate Map<FluidState,VoxelShape>shapeCacheFields inherited from class net.minecraft.fluid.Fluid
STATE_IDS, stateManager -
Constructor Summary
Constructors Constructor Description FlowableFluid() -
Method Summary
Modifier and Type Method Description protected voidappendProperties(StateManager.Builder<Fluid,FluidState> builder)protected abstract voidbeforeBreakingBlock(WorldAccess world, BlockPos pos, BlockState state)private booleancanFill(BlockView world, BlockPos pos, BlockState state, Fluid fluid)protected booleancanFlow(BlockView world, BlockPos fluidPos, BlockState fluidBlockState, Direction flowDirection, BlockPos flowTo, BlockState flowToBlockState, FluidState fluidState, Fluid fluid)private booleancanFlowThrough(BlockView world, Fluid fluid, BlockPos pos, BlockState state, Direction face, BlockPos fromPos, BlockState fromState, FluidState fluidState)protected voidflow(WorldAccess world, BlockPos pos, BlockState state, Direction direction, FluidState fluidState)abstract FluidgetFlowing()FluidStategetFlowing(int level, boolean falling)protected abstract intgetFlowSpeed(WorldView world)floatgetHeight(FluidState state)floatgetHeight(FluidState state, BlockView world, BlockPos pos)protected abstract intgetLevelDecreasePerBlock(WorldView world)protected intgetNextTickDelay(World world, BlockPos pos, FluidState oldState, FluidState newState)VoxelShapegetShape(FluidState state, BlockView world, BlockPos pos)protected Map<Direction,FluidState>getSpread(WorldView world, BlockPos pos, BlockState state)abstract FluidgetStill()FluidStategetStill(boolean falling)protected FluidStategetUpdatedState(WorldView world, BlockPos pos, BlockState state)Vec3dgetVelocity(BlockView world, BlockPos pos, FluidState state)private static booleanisFluidAboveEqual(FluidState state, BlockView world, BlockPos pos)protected abstract booleanisInfinite()private booleanisMatchingAndStill(FluidState state)private booleanmethod_15736(BlockView world, Fluid fluid, BlockPos pos, BlockState state, BlockPos fromPos, BlockState fromState)private intmethod_15740(WorldView world, BlockPos pos)protected static intmethod_15741(FluidState state)protected intmethod_15742(WorldView world, BlockPos blockPos, int int2, Direction direction, BlockState blockState, BlockPos blockPos2, Short2ObjectMap<com.mojang.datafixers.util.Pair<BlockState,FluidState>> short2ObjectMap, Short2BooleanMap short2BooleanMap)private voidmethod_15744(WorldAccess world, BlockPos pos, FluidState fluidState, BlockState blockState)private static shortmethod_15747(BlockPos blockPos, BlockPos blockPos2)private booleanmethod_15748(FluidState state)protected booleanmethod_15749(BlockView world, BlockPos pos, Direction direction)voidonScheduledTick(World world, BlockPos pos, FluidState state)private booleanreceivesFlow(Direction face, BlockView world, BlockPos pos, BlockState state, BlockPos fromPos, BlockState fromState)protected voidtryFlow(WorldAccess world, BlockPos fluidPos, FluidState state)Methods inherited from class net.minecraft.fluid.Fluid
canBeReplacedWith, getBlastResistance, getBucketItem, getDefaultState, getFillSound, getLevel, getParticle, getStateManager, getTickRate, hasRandomTicks, isEmpty, isIn, isStill, matchesType, onRandomTick, randomDisplayTick, setDefaultState, toBlockState
-
Field Details
-
FALLING
-
LEVEL
-
field_15901
-
shapeCache
-
-
Constructor Details
-
FlowableFluid
public FlowableFluid()
-
-
Method Details
-
appendProperties
- Overrides:
appendPropertiesin classFluid
-
getVelocity
- Specified by:
getVelocityin classFluid
-
method_15748
-
method_15749
-
tryFlow
-
method_15744
private void method_15744(WorldAccess world, BlockPos pos, FluidState fluidState, BlockState blockState) -
getUpdatedState
-
receivesFlow
private boolean receivesFlow(Direction face, BlockView world, BlockPos pos, BlockState state, BlockPos fromPos, BlockState fromState) -
getFlowing
-
getFlowing
-
getStill
-
getStill
-
isInfinite
protected abstract boolean isInfinite() -
flow
protected void flow(WorldAccess world, BlockPos pos, BlockState state, Direction direction, FluidState fluidState) -
beforeBreakingBlock
-
method_15747
-
method_15742
protected int method_15742(WorldView world, BlockPos blockPos, int int2, Direction direction, BlockState blockState, BlockPos blockPos2, Short2ObjectMap<com.mojang.datafixers.util.Pair<BlockState,FluidState>> short2ObjectMap, Short2BooleanMap short2BooleanMap) -
method_15736
private boolean method_15736(BlockView world, Fluid fluid, BlockPos pos, BlockState state, BlockPos fromPos, BlockState fromState) -
canFlowThrough
private boolean canFlowThrough(BlockView world, Fluid fluid, BlockPos pos, BlockState state, Direction face, BlockPos fromPos, BlockState fromState, FluidState fluidState) -
isMatchingAndStill
-
getFlowSpeed
-
method_15740
-
getSpread
-
canFill
-
canFlow
protected boolean canFlow(BlockView world, BlockPos fluidPos, BlockState fluidBlockState, Direction flowDirection, BlockPos flowTo, BlockState flowToBlockState, FluidState fluidState, Fluid fluid) -
getLevelDecreasePerBlock
-
getNextTickDelay
protected int getNextTickDelay(World world, BlockPos pos, FluidState oldState, FluidState newState) -
onScheduledTick
- Overrides:
onScheduledTickin classFluid
-
method_15741
-
isFluidAboveEqual
-
getHeight
-
getHeight
-
getShape
-