Package net.minecraft.fluid
Class FlowingFluid
- java.lang.Object
-
- net.minecraftforge.registries.ForgeRegistryEntry<Fluid>
-
- net.minecraft.fluid.Fluid
-
- net.minecraft.fluid.FlowingFluid
-
- All Implemented Interfaces:
IForgeFluid
,IForgeRegistryEntry<Fluid>
- Direct Known Subclasses:
ForgeFlowingFluid
,LavaFluid
,WaterFluid
public abstract class FlowingFluid extends Fluid
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
-
Field Summary
Fields Modifier and Type Field Description static BooleanProperty
FALLING
static IntegerProperty
LEVEL
private static java.lang.ThreadLocal<it.unimi.dsi.fastutil.objects.Object2ByteLinkedOpenHashMap<Block.RenderSideCacheKey>>
OCCLUSION_CACHE
private java.util.Map<FluidState,VoxelShape>
shapes
-
Fields inherited from class net.minecraft.fluid.Fluid
FLUID_STATE_REGISTRY, stateDefinition
-
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
-
Constructor Summary
Constructors Constructor Description FlowingFluid()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private boolean
affectsFlow(FluidState p_212189_1_)
protected abstract void
beforeDestroyingBlock(IWorld p_205580_1_, BlockPos p_205580_2_, BlockState p_205580_3_)
protected abstract boolean
canConvertToSource()
private boolean
canHoldFluid(IBlockReader p_211761_1_, BlockPos p_211761_2_, BlockState p_211761_3_, Fluid p_211761_4_)
private boolean
canPassThrough(IBlockReader p_211760_1_, Fluid p_211760_2_, BlockPos p_211760_3_, BlockState p_211760_4_, Direction p_211760_5_, BlockPos p_211760_6_, BlockState p_211760_7_, FluidState p_211760_8_)
private boolean
canPassThroughWall(Direction p_212751_1_, IBlockReader p_212751_2_, BlockPos p_212751_3_, BlockState p_212751_4_, BlockPos p_212751_5_, BlockState p_212751_6_)
protected boolean
canSpreadTo(IBlockReader p_205570_1_, BlockPos p_205570_2_, BlockState p_205570_3_, Direction p_205570_4_, BlockPos p_205570_5_, BlockState p_205570_6_, FluidState p_205570_7_, Fluid p_205570_8_)
protected void
createFluidStateDefinition(StateContainer.Builder<Fluid,FluidState> p_207184_1_)
private static short
getCacheKey(BlockPos p_212752_0_, BlockPos p_212752_1_)
protected abstract int
getDropOff(IWorldReader p_204528_1_)
Vector3d
getFlow(IBlockReader p_215663_1_, BlockPos p_215663_2_, FluidState p_215663_3_)
abstract Fluid
getFlowing()
FluidState
getFlowing(int p_207207_1_, boolean p_207207_2_)
float
getHeight(FluidState p_215662_1_, IBlockReader p_215662_2_, BlockPos p_215662_3_)
protected static int
getLegacyLevel(FluidState p_207205_0_)
protected FluidState
getNewLiquid(IWorldReader p_205576_1_, BlockPos p_205576_2_, BlockState p_205576_3_)
float
getOwnHeight(FluidState p_223407_1_)
VoxelShape
getShape(FluidState p_215664_1_, IBlockReader p_215664_2_, BlockPos p_215664_3_)
protected int
getSlopeDistance(IWorldReader p_205571_1_, BlockPos p_205571_2_, int p_205571_3_, Direction p_205571_4_, BlockState p_205571_5_, BlockPos p_205571_6_, it.unimi.dsi.fastutil.shorts.Short2ObjectMap<com.mojang.datafixers.util.Pair<BlockState,FluidState>> p_205571_7_, it.unimi.dsi.fastutil.shorts.Short2BooleanMap p_205571_8_)
protected abstract int
getSlopeFindDistance(IWorldReader p_185698_1_)
abstract Fluid
getSource()
FluidState
getSource(boolean p_207204_1_)
protected java.util.Map<Direction,FluidState>
getSpread(IWorldReader p_205572_1_, BlockPos p_205572_2_, BlockState p_205572_3_)
protected int
getSpreadDelay(World p_215667_1_, BlockPos p_215667_2_, FluidState p_215667_3_, FluidState p_215667_4_)
private static boolean
hasSameAbove(FluidState p_215666_0_, IBlockReader p_215666_1_, BlockPos p_215666_2_)
protected boolean
isSolidFace(IBlockReader p_205573_1_, BlockPos p_205573_2_, Direction p_205573_3_)
private boolean
isSourceBlockOfThisType(FluidState p_211758_1_)
private boolean
isWaterHole(IBlockReader p_211759_1_, Fluid p_211759_2_, BlockPos p_211759_3_, BlockState p_211759_4_, BlockPos p_211759_5_, BlockState p_211759_6_)
private int
sourceNeighborCount(IWorldReader p_207936_1_, BlockPos p_207936_2_)
protected void
spread(IWorld p_205575_1_, BlockPos p_205575_2_, FluidState p_205575_3_)
protected void
spreadTo(IWorld p_205574_1_, BlockPos p_205574_2_, BlockState p_205574_3_, Direction p_205574_4_, FluidState p_205574_5_)
private void
spreadToSides(IWorld p_207937_1_, BlockPos p_207937_2_, FluidState p_207937_3_, BlockState p_207937_4_)
void
tick(World p_207191_1_, BlockPos p_207191_2_, FluidState p_207191_3_)
-
Methods inherited from class net.minecraft.fluid.Fluid
animateTick, canBeReplacedWith, createAttributes, createLegacyBlock, defaultFluidState, getAmount, getAttributes, getBucket, getDripParticle, getExplosionResistance, 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, getFluid, isAABBInsideLiquid, isAABBInsideMaterial, isEntityInside
-
-
-
-
Field Detail
-
FALLING
public static final BooleanProperty FALLING
-
LEVEL
public static final IntegerProperty LEVEL
-
OCCLUSION_CACHE
private static final java.lang.ThreadLocal<it.unimi.dsi.fastutil.objects.Object2ByteLinkedOpenHashMap<Block.RenderSideCacheKey>> OCCLUSION_CACHE
-
shapes
private final java.util.Map<FluidState,VoxelShape> shapes
-
-
Method Detail
-
createFluidStateDefinition
protected void createFluidStateDefinition(StateContainer.Builder<Fluid,FluidState> p_207184_1_)
- Overrides:
createFluidStateDefinition
in classFluid
-
getFlow
public Vector3d getFlow(IBlockReader p_215663_1_, BlockPos p_215663_2_, FluidState p_215663_3_)
-
affectsFlow
private boolean affectsFlow(FluidState p_212189_1_)
-
isSolidFace
protected boolean isSolidFace(IBlockReader p_205573_1_, BlockPos p_205573_2_, Direction p_205573_3_)
-
spread
protected void spread(IWorld p_205575_1_, BlockPos p_205575_2_, FluidState p_205575_3_)
-
spreadToSides
private void spreadToSides(IWorld p_207937_1_, BlockPos p_207937_2_, FluidState p_207937_3_, BlockState p_207937_4_)
-
getNewLiquid
protected FluidState getNewLiquid(IWorldReader p_205576_1_, BlockPos p_205576_2_, BlockState p_205576_3_)
-
canPassThroughWall
private boolean canPassThroughWall(Direction p_212751_1_, IBlockReader p_212751_2_, BlockPos p_212751_3_, BlockState p_212751_4_, BlockPos p_212751_5_, BlockState p_212751_6_)
-
getFlowing
public abstract Fluid getFlowing()
-
getFlowing
public FluidState getFlowing(int p_207207_1_, boolean p_207207_2_)
-
getSource
public abstract Fluid getSource()
-
getSource
public FluidState getSource(boolean p_207204_1_)
-
canConvertToSource
protected abstract boolean canConvertToSource()
-
spreadTo
protected void spreadTo(IWorld p_205574_1_, BlockPos p_205574_2_, BlockState p_205574_3_, Direction p_205574_4_, FluidState p_205574_5_)
-
beforeDestroyingBlock
protected abstract void beforeDestroyingBlock(IWorld p_205580_1_, BlockPos p_205580_2_, BlockState p_205580_3_)
-
getSlopeDistance
protected int getSlopeDistance(IWorldReader p_205571_1_, BlockPos p_205571_2_, int p_205571_3_, Direction p_205571_4_, BlockState p_205571_5_, BlockPos p_205571_6_, it.unimi.dsi.fastutil.shorts.Short2ObjectMap<com.mojang.datafixers.util.Pair<BlockState,FluidState>> p_205571_7_, it.unimi.dsi.fastutil.shorts.Short2BooleanMap p_205571_8_)
-
isWaterHole
private boolean isWaterHole(IBlockReader p_211759_1_, Fluid p_211759_2_, BlockPos p_211759_3_, BlockState p_211759_4_, BlockPos p_211759_5_, BlockState p_211759_6_)
-
canPassThrough
private boolean canPassThrough(IBlockReader p_211760_1_, Fluid p_211760_2_, BlockPos p_211760_3_, BlockState p_211760_4_, Direction p_211760_5_, BlockPos p_211760_6_, BlockState p_211760_7_, FluidState p_211760_8_)
-
isSourceBlockOfThisType
private boolean isSourceBlockOfThisType(FluidState p_211758_1_)
-
getSlopeFindDistance
protected abstract int getSlopeFindDistance(IWorldReader p_185698_1_)
-
sourceNeighborCount
private int sourceNeighborCount(IWorldReader p_207936_1_, BlockPos p_207936_2_)
-
getSpread
protected java.util.Map<Direction,FluidState> getSpread(IWorldReader p_205572_1_, BlockPos p_205572_2_, BlockState p_205572_3_)
-
canHoldFluid
private boolean canHoldFluid(IBlockReader p_211761_1_, BlockPos p_211761_2_, BlockState p_211761_3_, Fluid p_211761_4_)
-
canSpreadTo
protected boolean canSpreadTo(IBlockReader p_205570_1_, BlockPos p_205570_2_, BlockState p_205570_3_, Direction p_205570_4_, BlockPos p_205570_5_, BlockState p_205570_6_, FluidState p_205570_7_, Fluid p_205570_8_)
-
getDropOff
protected abstract int getDropOff(IWorldReader p_204528_1_)
-
getSpreadDelay
protected int getSpreadDelay(World p_215667_1_, BlockPos p_215667_2_, FluidState p_215667_3_, FluidState p_215667_4_)
-
tick
public void tick(World p_207191_1_, BlockPos p_207191_2_, FluidState p_207191_3_)
-
getLegacyLevel
protected static int getLegacyLevel(FluidState p_207205_0_)
-
hasSameAbove
private static boolean hasSameAbove(FluidState p_215666_0_, IBlockReader p_215666_1_, BlockPos p_215666_2_)
-
getHeight
public float getHeight(FluidState p_215662_1_, IBlockReader p_215662_2_, BlockPos p_215662_3_)
-
getOwnHeight
public float getOwnHeight(FluidState p_223407_1_)
- Specified by:
getOwnHeight
in classFluid
-
getShape
public VoxelShape getShape(FluidState p_215664_1_, IBlockReader p_215664_2_, BlockPos p_215664_3_)
-
-