Class FlowingFluid
java.lang.Object
net.minecraft.world.level.material.Fluid
net.minecraft.world.level.material.FlowingFluid
- All Implemented Interfaces:
- IFluidExtension
- Direct Known Subclasses:
- BaseFlowingFluid,- LavaFluid,- WaterFluid
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final intstatic final BooleanPropertystatic final IntegerPropertyprivate static final ThreadLocal<it.unimi.dsi.fastutil.objects.Object2ByteLinkedOpenHashMap<Block.BlockStatePairKey>>private final Map<FluidState,VoxelShape> Fields inherited from class net.minecraft.world.level.material.FluidFLUID_STATE_REGISTRY, stateDefinition
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprivate booleanaffectsFlow(FluidState p_76095_) protected abstract voidbeforeDestroyingBlock(LevelAccessor p_76002_, BlockPos p_76003_, BlockState p_76004_) protected abstract booleancanConvertToSource(Level p_256009_) Deprecated.booleancanConvertToSource(FluidState state, Level level, BlockPos pos) Returns whether the fluid can create a source.private booleancanHoldFluid(BlockGetter p_75973_, BlockPos p_75974_, BlockState p_75975_, Fluid p_75976_) private booleancanPassThrough(BlockGetter p_75964_, Fluid p_75965_, BlockPos p_75966_, BlockState p_75967_, Direction p_75968_, BlockPos p_75969_, BlockState p_75970_, FluidState p_75971_) private booleancanPassThroughWall(Direction p_76062_, BlockGetter p_76063_, BlockPos p_76064_, BlockState p_76065_, BlockPos p_76066_, BlockState p_76067_) protected booleancanSpreadTo(BlockGetter p_75978_, BlockPos p_75979_, BlockState p_75980_, Direction p_75981_, BlockPos p_75982_, BlockState p_75983_, FluidState p_75984_, Fluid p_75985_) protected voidabstract intgetAmount(FluidState p_164509_) private static shortgetCacheKey(BlockPos p_76059_, BlockPos p_76060_) protected abstract intgetDropOff(LevelReader p_76087_) getFlow(BlockGetter p_75987_, BlockPos p_75988_, FluidState p_75989_) abstract FluidgetFlowing(int p_75954_, boolean p_75955_) floatgetHeight(FluidState p_76050_, BlockGetter p_76051_, BlockPos p_76052_) protected static intgetLegacyLevel(FluidState p_76093_) protected FluidStategetNewLiquid(Level p_256464_, BlockPos p_76037_, BlockState p_76038_) floatgetOwnHeight(FluidState p_76048_) getShape(FluidState p_76084_, BlockGetter p_76085_, BlockPos p_76086_) protected intgetSlopeDistance(LevelReader p_76027_, BlockPos p_76028_, int p_76029_, Direction p_76030_, BlockState p_76031_, BlockPos p_76032_, it.unimi.dsi.fastutil.shorts.Short2ObjectMap<com.mojang.datafixers.util.Pair<BlockState, FluidState>> p_76033_, it.unimi.dsi.fastutil.shorts.Short2BooleanMap p_76034_) protected abstract intgetSlopeFindDistance(LevelReader p_76074_) abstract FluidgetSource(boolean p_76069_) protected Map<Direction,FluidState> getSpread(Level p_256191_, BlockPos p_76081_, BlockState p_76082_) protected intgetSpreadDelay(Level p_75998_, BlockPos p_75999_, FluidState p_76000_, FluidState p_76001_) private static booleanhasSameAbove(FluidState p_76089_, BlockGetter p_76090_, BlockPos p_76091_) protected booleanisSolidFace(BlockGetter p_75991_, BlockPos p_75992_, Direction p_75993_) private booleanisSourceBlockOfThisType(FluidState p_76097_) private booleanisWaterHole(BlockGetter p_75957_, Fluid p_75958_, BlockPos p_75959_, BlockState p_75960_, BlockPos p_75961_, BlockState p_75962_) private intsourceNeighborCount(LevelReader p_76020_, BlockPos p_76021_) protected voidspread(Level p_255851_, BlockPos p_76012_, FluidState p_76013_) protected voidspreadTo(LevelAccessor p_76005_, BlockPos p_76006_, BlockState p_76007_, Direction p_76008_, FluidState p_76009_) private voidspreadToSides(Level p_256644_, BlockPos p_76016_, FluidState p_76017_, BlockState p_76018_) voidtick(Level p_75995_, BlockPos p_75996_, FluidState p_75997_) Methods inherited from class net.minecraft.world.level.material.FluidanimateTick, builtInRegistryHolder, canBeReplacedWith, createLegacyBlock, defaultFluidState, getBucket, getDripParticle, getExplosionResistance, getFluidType, getPickupSound, getStateDefinition, getTickDelay, is, isEmpty, isRandomlyTicking, isSame, isSource, randomTick, registerDefaultStateMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.common.extensions.IFluidExtensioncanExtinguish, canHydrate, getAdjacentBlockPathType, getBlockPathType, getExplosionResistance, move, supportsBoating
- 
Field Details- 
FALLING
- 
LEVEL
- 
CACHE_SIZEprivate static final int CACHE_SIZE- See Also:
 
- 
OCCLUSION_CACHEprivate static final ThreadLocal<it.unimi.dsi.fastutil.objects.Object2ByteLinkedOpenHashMap<Block.BlockStatePairKey>> OCCLUSION_CACHE
- 
shapes
 
- 
- 
Constructor Details- 
FlowingFluidpublic FlowingFluid()
 
- 
- 
Method Details- 
createFluidStateDefinition- Overrides:
- createFluidStateDefinitionin class- Fluid
 
- 
getFlow
- 
affectsFlow
- 
isSolidFace
- 
spread
- 
spreadToSidesprivate void spreadToSides(Level p_256644_, BlockPos p_76016_, FluidState p_76017_, BlockState p_76018_) 
- 
getNewLiquid
- 
canPassThroughWallprivate boolean canPassThroughWall(Direction p_76062_, BlockGetter p_76063_, BlockPos p_76064_, BlockState p_76065_, BlockPos p_76066_, BlockState p_76067_) 
- 
getFlowing
- 
getFlowing
- 
getSource
- 
getSource
- 
canConvertToSourceDescription copied from interface:IFluidExtensionReturns whether the fluid can create a source.- Parameters:
- state- the state of the fluid
- level- the level that can get the fluid
- pos- the location of the fluid
- Returns:
- trueif the fluid can create a source,- falseotherwise
 
- 
canConvertToSourceDeprecated.Forge: UsecanConvertToSource(FluidState, Level, BlockPos)instead.
- 
spreadToprotected void spreadTo(LevelAccessor p_76005_, BlockPos p_76006_, BlockState p_76007_, Direction p_76008_, FluidState p_76009_) 
- 
beforeDestroyingBlockprotected abstract void beforeDestroyingBlock(LevelAccessor p_76002_, BlockPos p_76003_, BlockState p_76004_) 
- 
getCacheKey
- 
getSlopeDistanceprotected int getSlopeDistance(LevelReader p_76027_, BlockPos p_76028_, int p_76029_, Direction p_76030_, BlockState p_76031_, BlockPos p_76032_, it.unimi.dsi.fastutil.shorts.Short2ObjectMap<com.mojang.datafixers.util.Pair<BlockState, FluidState>> p_76033_, it.unimi.dsi.fastutil.shorts.Short2BooleanMap p_76034_) 
- 
isWaterHoleprivate boolean isWaterHole(BlockGetter p_75957_, Fluid p_75958_, BlockPos p_75959_, BlockState p_75960_, BlockPos p_75961_, BlockState p_75962_) 
- 
canPassThroughprivate boolean canPassThrough(BlockGetter p_75964_, Fluid p_75965_, BlockPos p_75966_, BlockState p_75967_, Direction p_75968_, BlockPos p_75969_, BlockState p_75970_, FluidState p_75971_) 
- 
isSourceBlockOfThisType
- 
getSlopeFindDistance
- 
sourceNeighborCount
- 
getSpreadprotected Map<Direction,FluidState> getSpread(Level p_256191_, BlockPos p_76081_, BlockState p_76082_) 
- 
canHoldFluidprivate boolean canHoldFluid(BlockGetter p_75973_, BlockPos p_75974_, BlockState p_75975_, Fluid p_75976_) 
- 
canSpreadToprotected boolean canSpreadTo(BlockGetter p_75978_, BlockPos p_75979_, BlockState p_75980_, Direction p_75981_, BlockPos p_75982_, BlockState p_75983_, FluidState p_75984_, Fluid p_75985_) 
- 
getDropOff
- 
getSpreadDelayprotected int getSpreadDelay(Level p_75998_, BlockPos p_75999_, FluidState p_76000_, FluidState p_76001_) 
- 
tick
- 
getLegacyLevel
- 
hasSameAbove
- 
getHeight
- 
getOwnHeight- Specified by:
- getOwnHeightin class- Fluid
 
- 
getAmount
- 
getShape
 
- 
canConvertToSource(FluidState, Level, BlockPos)instead.