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
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BooleanPropertystatic final IntegerPropertyprivate static final ThreadLocal<it.unimi.dsi.fastutil.objects.Object2ByteLinkedOpenHashMap<Block.RenderSideCacheKey>>private final Map<FluidState,VoxelShape> Fields inherited from class net.minecraft.fluid.Fluid
FLUID_STATE_REGISTRY, stateDefinitionFields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanaffectsFlow(FluidState p_212189_1_) protected abstract voidbeforeDestroyingBlock(IWorld p_205580_1_, BlockPos p_205580_2_, BlockState p_205580_3_) protected abstract booleanprivate booleancanHoldFluid(IBlockReader p_211761_1_, BlockPos p_211761_2_, BlockState p_211761_3_, Fluid p_211761_4_) private booleancanPassThrough(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 booleancanPassThroughWall(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 booleancanSpreadTo(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 voidcreateFluidStateDefinition(StateContainer.Builder<Fluid, FluidState> p_207184_1_) private static shortgetCacheKey(BlockPos p_212752_0_, BlockPos p_212752_1_) protected abstract intgetDropOff(IWorldReader p_204528_1_) getFlow(IBlockReader p_215663_1_, BlockPos p_215663_2_, FluidState p_215663_3_) abstract FluidgetFlowing(int p_207207_1_, boolean p_207207_2_) floatgetHeight(FluidState p_215662_1_, IBlockReader p_215662_2_, BlockPos p_215662_3_) protected static intgetLegacyLevel(FluidState p_207205_0_) protected FluidStategetNewLiquid(IWorldReader p_205576_1_, BlockPos p_205576_2_, BlockState p_205576_3_) floatgetOwnHeight(FluidState p_223407_1_) getShape(FluidState p_215664_1_, IBlockReader p_215664_2_, BlockPos p_215664_3_) protected intgetSlopeDistance(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 intgetSlopeFindDistance(IWorldReader p_185698_1_) abstract FluidgetSource(boolean p_207204_1_) protected Map<Direction,FluidState> getSpread(IWorldReader p_205572_1_, BlockPos p_205572_2_, BlockState p_205572_3_) protected intgetSpreadDelay(World p_215667_1_, BlockPos p_215667_2_, FluidState p_215667_3_, FluidState p_215667_4_) private static booleanhasSameAbove(FluidState p_215666_0_, IBlockReader p_215666_1_, BlockPos p_215666_2_) protected booleanisSolidFace(IBlockReader p_205573_1_, BlockPos p_205573_2_, Direction p_205573_3_) private booleanisSourceBlockOfThisType(FluidState p_211758_1_) private booleanisWaterHole(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 intsourceNeighborCount(IWorldReader p_207936_1_, BlockPos p_207936_2_) protected voidspread(IWorld p_205575_1_, BlockPos p_205575_2_, FluidState p_205575_3_) protected voidspreadTo(IWorld p_205574_1_, BlockPos p_205574_2_, BlockState p_205574_3_, Direction p_205574_4_, FluidState p_205574_5_) private voidspreadToSides(IWorld p_207937_1_, BlockPos p_207937_2_, FluidState p_207937_3_, BlockState p_207937_4_) voidtick(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, registerDefaultStateMethods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraftforge.common.extensions.IForgeFluid
getExplosionResistance, getFluid, isAABBInsideLiquid, isAABBInsideMaterial, isEntityInside
-
Field Details
-
FALLING
-
LEVEL
-
OCCLUSION_CACHE
private static final ThreadLocal<it.unimi.dsi.fastutil.objects.Object2ByteLinkedOpenHashMap<Block.RenderSideCacheKey>> OCCLUSION_CACHE -
shapes
-
-
Constructor Details
-
FlowingFluid
public FlowingFluid()
-
-
Method Details
-
createFluidStateDefinition
- Overrides:
createFluidStateDefinitionin classFluid
-
getFlow
-
affectsFlow
-
isSolidFace
protected boolean isSolidFace(IBlockReader p_205573_1_, BlockPos p_205573_2_, Direction p_205573_3_) -
spread
-
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
-
getFlowing
-
getSource
-
getSource
-
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_) -
getCacheKey
-
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
-
getSlopeFindDistance
-
sourceNeighborCount
-
getSpread
protected 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
-
getSpreadDelay
protected int getSpreadDelay(World p_215667_1_, BlockPos p_215667_2_, FluidState p_215667_3_, FluidState p_215667_4_) -
tick
-
getLegacyLevel
-
hasSameAbove
private static boolean hasSameAbove(FluidState p_215666_0_, IBlockReader p_215666_1_, BlockPos p_215666_2_) -
getHeight
-
getOwnHeight
- Specified by:
getOwnHeightin classFluid
-
getShape
-