Class FlowingFluid
java.lang.Object
net.minecraftforge.registries.ForgeRegistryEntry<Fluid>
net.minecraft.world.level.material.Fluid
net.minecraft.world.level.material.FlowingFluid
- All Implemented Interfaces:
IForgeFluid
,IForgeRegistryEntry<Fluid>
- Direct Known Subclasses:
ForgeFlowingFluid
,LavaFluid
,WaterFluid
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
Field Summary
Modifier and TypeFieldDescriptionprivate static int
static BooleanProperty
static IntegerProperty
private static ThreadLocal<it.unimi.dsi.fastutil.objects.Object2ByteLinkedOpenHashMap<Block.BlockStatePairKey>>
private Map<FluidState,VoxelShape>
Fields inherited from class net.minecraft.world.level.material.Fluid
FLUID_STATE_REGISTRY, stateDefinition
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
affectsFlow(FluidState p_76095_)
protected abstract void
beforeDestroyingBlock(LevelAccessor p_76002_, BlockPos p_76003_, BlockState p_76004_)
protected abstract boolean
private boolean
canHoldFluid(BlockGetter p_75973_, BlockPos p_75974_, BlockState p_75975_, Fluid p_75976_)
private 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_)
private boolean
canPassThroughWall(Direction p_76062_, BlockGetter p_76063_, BlockPos p_76064_, BlockState p_76065_, BlockPos p_76066_, BlockState p_76067_)
protected 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_)
protected void
createFluidStateDefinition(StateDefinition.Builder<Fluid,FluidState> p_76046_)
abstract int
getAmount(FluidState p_164509_)
private static short
getCacheKey(BlockPos p_76059_, BlockPos p_76060_)
protected abstract int
getDropOff(LevelReader p_76087_)
getFlow(BlockGetter p_75987_, BlockPos p_75988_, FluidState p_75989_)
abstract Fluid
getFlowing(int p_75954_, boolean p_75955_)
float
getHeight(FluidState p_76050_, BlockGetter p_76051_, BlockPos p_76052_)
protected static int
getLegacyLevel(FluidState p_76093_)
protected FluidState
getNewLiquid(LevelReader p_76036_, BlockPos p_76037_, BlockState p_76038_)
float
getOwnHeight(FluidState p_76048_)
getShape(FluidState p_76084_, BlockGetter p_76085_, BlockPos p_76086_)
protected 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_)
protected abstract int
getSlopeFindDistance(LevelReader p_76074_)
abstract Fluid
getSource(boolean p_76069_)
protected Map<Direction,FluidState>
getSpread(LevelReader p_76080_, BlockPos p_76081_, BlockState p_76082_)
protected int
getSpreadDelay(Level p_75998_, BlockPos p_75999_, FluidState p_76000_, FluidState p_76001_)
private static boolean
hasSameAbove(FluidState p_76089_, BlockGetter p_76090_, BlockPos p_76091_)
protected boolean
isSolidFace(BlockGetter p_75991_, BlockPos p_75992_, Direction p_75993_)
private boolean
isSourceBlockOfThisType(FluidState p_76097_)
private boolean
isWaterHole(BlockGetter p_75957_, Fluid p_75958_, BlockPos p_75959_, BlockState p_75960_, BlockPos p_75961_, BlockState p_75962_)
private int
sourceNeighborCount(LevelReader p_76020_, BlockPos p_76021_)
protected void
spread(LevelAccessor p_76011_, BlockPos p_76012_, FluidState p_76013_)
protected void
spreadTo(LevelAccessor p_76005_, BlockPos p_76006_, BlockState p_76007_, Direction p_76008_, FluidState p_76009_)
private void
spreadToSides(LevelAccessor p_76015_, BlockPos p_76016_, FluidState p_76017_, BlockState p_76018_)
void
tick(Level p_75995_, BlockPos p_75996_, FluidState p_75997_)
Methods inherited from class net.minecraft.world.level.material.Fluid
animateTick, canBeReplacedWith, createAttributes, createLegacyBlock, defaultFluidState, getAttributes, getBucket, getDripParticle, getExplosionResistance, getPickupSound, getStateDefinition, getTags, getTickDelay, is, isEmpty, isRandomlyTicking, isSame, isSource, randomTick, registerDefaultState
Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.extensions.IForgeFluid
getExplosionResistance, isAABBInsideLiquid, isAABBInsideMaterial, isEntityInside
-
Field Details
-
FALLING
-
LEVEL
-
CACHE_SIZE
private static final int CACHE_SIZE- See Also:
- Constant Field Values
-
OCCLUSION_CACHE
private static final ThreadLocal<it.unimi.dsi.fastutil.objects.Object2ByteLinkedOpenHashMap<Block.BlockStatePairKey>> OCCLUSION_CACHE -
shapes
-
-
Constructor Details
-
FlowingFluid
public FlowingFluid()
-
-
Method Details
-
createFluidStateDefinition
- Overrides:
createFluidStateDefinition
in classFluid
-
getFlow
-
affectsFlow
-
isSolidFace
-
spread
-
spreadToSides
private void spreadToSides(LevelAccessor p_76015_, BlockPos p_76016_, FluidState p_76017_, BlockState p_76018_) -
getNewLiquid
-
canPassThroughWall
private boolean canPassThroughWall(Direction p_76062_, BlockGetter p_76063_, BlockPos p_76064_, BlockState p_76065_, BlockPos p_76066_, BlockState p_76067_) -
getFlowing
-
getFlowing
-
getSource
-
getSource
-
canConvertToSource
protected abstract boolean canConvertToSource() -
spreadTo
protected void spreadTo(LevelAccessor p_76005_, BlockPos p_76006_, BlockState p_76007_, Direction p_76008_, FluidState p_76009_) -
beforeDestroyingBlock
protected abstract void beforeDestroyingBlock(LevelAccessor p_76002_, BlockPos p_76003_, BlockState p_76004_) -
getCacheKey
-
getSlopeDistance
protected 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_) -
isWaterHole
private boolean isWaterHole(BlockGetter p_75957_, Fluid p_75958_, BlockPos p_75959_, BlockState p_75960_, BlockPos p_75961_, BlockState p_75962_) -
canPassThrough
private 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
-
getSpread
protected Map<Direction,FluidState> getSpread(LevelReader p_76080_, BlockPos p_76081_, BlockState p_76082_) -
canHoldFluid
private boolean canHoldFluid(BlockGetter p_75973_, BlockPos p_75974_, BlockState p_75975_, Fluid p_75976_) -
canSpreadTo
protected 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
-
getSpreadDelay
protected int getSpreadDelay(Level p_75998_, BlockPos p_75999_, FluidState p_76000_, FluidState p_76001_) -
tick
-
getLegacyLevel
-
hasSameAbove
-
getHeight
-
getOwnHeight
- Specified by:
getOwnHeight
in classFluid
-
getAmount
-
getShape
-