java.lang.Object
net.minecraft.world.level.material.Fluid
net.minecraft.world.level.material.FlowingFluid
net.minecraftforge.fluids.ForgeFlowingFluid
All Implemented Interfaces:
IBehaviorable, net.minecraftforge.common.extensions.IForgeFluid
Direct Known Subclasses:
FlowingGas.Flowing, FlowingGas.Source

@ParametersAreNonnullByDefault public abstract class FlowingGas extends BehaviorableFluid

Flowing gas

Since:
1.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Default flowing gas implementation
    static class 
    Default gas source implementation

    Nested classes/interfaces inherited from class net.minecraftforge.fluids.ForgeFlowingFluid

    net.minecraftforge.fluids.ForgeFlowingFluid.Properties
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.world.level.block.state.properties.IntegerProperty
     
    static final Map<net.minecraft.world.level.LevelAccessor,Map<net.minecraft.core.BlockPos,net.minecraft.core.Direction>>
     
    static final int
     

    Fields inherited from class net.minecraft.world.level.material.FlowingFluid

    FALLING, LEVEL

    Fields inherited from class net.minecraft.world.level.material.Fluid

    FLUID_STATE_REGISTRY, stateDefinition
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    FlowingGas(net.minecraftforge.fluids.ForgeFlowingFluid.Properties properties)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    animateTick(net.minecraft.world.level.Level p_76116_, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.material.FluidState state, net.minecraft.util.RandomSource p_76119_)
     
    boolean
    canHydrate(net.minecraft.world.level.material.FluidState state, net.minecraft.world.level.BlockGetter getter, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState source, net.minecraft.core.BlockPos sourcePos)
     
    protected boolean
    canSpreadTo(net.minecraft.world.level.LevelAccessor pLevel, net.minecraft.core.BlockPos pPos)
     
    protected void
    createFluidStateDefinition(net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.material.Fluid,net.minecraft.world.level.material.FluidState> builder)
     
    protected net.minecraft.world.level.block.state.BlockState
    createLegacyBlock(net.minecraft.world.level.material.FluidState state)
     
    protected boolean
    findAndMoveUp(net.minecraft.world.level.LevelAccessor pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.material.FluidState pState, boolean simulated)
     
    int
    getAmount(net.minecraft.world.level.material.FluidState pState)
     
    protected net.minecraft.core.Direction
     
    @NotNull net.minecraft.world.level.material.FluidState
    getFlowing(int p_75954_, boolean p_75955_)
     
    protected static Map<net.minecraft.core.BlockPos,net.minecraft.core.Direction>
    getGasMap(net.minecraft.world.level.LevelAccessor level)
     
    org.jgrapht.graph.SimpleWeightedGraph<net.minecraft.core.BlockPos,org.jgrapht.graph.DefaultWeightedEdge>
    getGraph(net.minecraft.world.level.LevelAccessor level)
     
    float
    getHeight(net.minecraft.world.level.material.FluidState p_76050_, net.minecraft.world.level.BlockGetter p_76051_, net.minecraft.core.BlockPos p_76052_)
     
    getMovementHandler(net.minecraft.world.level.LevelAccessor level)
     
    protected double
     
    @NotNull net.minecraft.world.phys.shapes.VoxelShape
    getShape(net.minecraft.world.level.material.FluidState p_76084_, net.minecraft.world.level.BlockGetter p_76085_, net.minecraft.core.BlockPos p_76086_)
     
     
    protected boolean
     
    protected boolean
    looped(net.minecraft.world.level.LevelAccessor pLevel, net.minecraft.core.BlockPos pPos)
     
    protected boolean
    moveInPath(net.minecraft.world.level.LevelAccessor pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.material.FluidState pState, boolean simulated)
     
    protected void
    randomTick(net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.material.FluidState pState, net.minecraft.util.RandomSource pRandom)
     
    void
    render(net.minecraft.world.level.BlockAndTintGetter pLevel, net.minecraft.core.BlockPos pPos, int amount, int time, net.minecraft.world.level.material.FluidState state)
     
    protected void
    spread(net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.material.FluidState pState)
     
    protected boolean
    spreadHorizontally(net.minecraft.world.level.LevelAccessor pLevel, net.minecraft.core.BlockPos pPos, boolean simulated)
     
    protected boolean
    spreadVertically(net.minecraft.world.level.LevelAccessor pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.material.FluidState pState, boolean simulate)
     
    void
    tick(net.minecraft.world.level.Level worldIn, net.minecraft.core.BlockPos pos, net.minecraft.world.level.material.FluidState state)
     

    Methods inherited from class com.forsteri.unlimitedfluidity.core.fluidbehaviors.BehaviorableFluid

    beforeDestroyingBlock, getBehaviors

    Methods inherited from class com.forsteri.unlimitedfluidity.core.SmartFluid

    isSource, isSource

    Methods inherited from class net.minecraftforge.fluids.ForgeFlowingFluid

    canBeReplacedWith, canConvertToSource, canConvertToSource, getBucket, getDropOff, getExplosionResistance, getFlowing, getFluidType, getPickupSound, getSlopeFindDistance, getSource, getTickDelay, isSame

    Methods inherited from class net.minecraft.world.level.material.FlowingFluid

    canSpreadTo, getFlow, getLegacyLevel, getNewLiquid, getOwnHeight, getSlopeDistance, getSource, getSpread, getSpreadDelay, isSolidFace, spreadTo

    Methods inherited from class net.minecraft.world.level.material.Fluid

    builtInRegistryHolder, defaultFluidState, getDripParticle, getStateDefinition, is, isEmpty, registerDefaultState

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.forsteri.unlimitedfluidity.core.fluidbehaviors.IBehaviorable

    getBehavior

    Methods inherited from interface net.minecraftforge.common.extensions.IForgeFluid

    canExtinguish, getAdjacentBlockPathType, getBlockPathType, getExplosionResistance, move, shouldUpdateWhileBoating, supportsBoating
  • Field Details

    • MAX_DENSITY

      public static final int MAX_DENSITY
      See Also:
    • DENSITY

      public static final net.minecraft.world.level.block.state.properties.IntegerProperty DENSITY
    • gasMovementMap

      public static final Map<net.minecraft.world.level.LevelAccessor,Map<net.minecraft.core.BlockPos,net.minecraft.core.Direction>> gasMovementMap
  • Constructor Details

    • FlowingGas

      protected FlowingGas(net.minecraftforge.fluids.ForgeFlowingFluid.Properties properties)
  • Method Details

    • tick

      public void tick(net.minecraft.world.level.Level worldIn, net.minecraft.core.BlockPos pos, net.minecraft.world.level.material.FluidState state)
      Overrides:
      tick in class BehaviorableFluid
    • getMovementHandler

      public GasMovementHandler getMovementHandler(net.minecraft.world.level.LevelAccessor level)
    • getGraph

      public org.jgrapht.graph.SimpleWeightedGraph<net.minecraft.core.BlockPos,org.jgrapht.graph.DefaultWeightedEdge> getGraph(net.minecraft.world.level.LevelAccessor level)
    • spread

      protected void spread(net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.material.FluidState pState)
      Overrides:
      spread in class net.minecraft.world.level.material.FlowingFluid
    • isRandomlyTicking

      protected boolean isRandomlyTicking()
      Overrides:
      isRandomlyTicking in class net.minecraft.world.level.material.Fluid
    • randomTick

      protected void randomTick(net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.material.FluidState pState, net.minecraft.util.RandomSource pRandom)
      Overrides:
      randomTick in class net.minecraft.world.level.material.Fluid
    • getGasMap

      protected static Map<net.minecraft.core.BlockPos,net.minecraft.core.Direction> getGasMap(net.minecraft.world.level.LevelAccessor level)
    • moveInPath

      protected boolean moveInPath(net.minecraft.world.level.LevelAccessor pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.material.FluidState pState, boolean simulated)
    • looped

      protected boolean looped(net.minecraft.world.level.LevelAccessor pLevel, net.minecraft.core.BlockPos pPos)
    • findAndMoveUp

      protected boolean findAndMoveUp(net.minecraft.world.level.LevelAccessor pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.material.FluidState pState, boolean simulated)
    • spreadVertically

      protected boolean spreadVertically(net.minecraft.world.level.LevelAccessor pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.material.FluidState pState, boolean simulate)
    • spreadHorizontally

      protected boolean spreadHorizontally(net.minecraft.world.level.LevelAccessor pLevel, net.minecraft.core.BlockPos pPos, boolean simulated)
    • createLegacyBlock

      protected net.minecraft.world.level.block.state.BlockState createLegacyBlock(net.minecraft.world.level.material.FluidState state)
      Overrides:
      createLegacyBlock in class net.minecraftforge.fluids.ForgeFlowingFluid
    • canSpreadTo

      protected boolean canSpreadTo(net.minecraft.world.level.LevelAccessor pLevel, net.minecraft.core.BlockPos pPos)
    • createFluidStateDefinition

      protected void createFluidStateDefinition(net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.material.Fluid,net.minecraft.world.level.material.FluidState> builder)
      Overrides:
      createFluidStateDefinition in class SmartFluid
    • getFlowing

      @NotNull public @NotNull net.minecraft.world.level.material.FluidState getFlowing(int p_75954_, boolean p_75955_)
      Overrides:
      getFlowing in class net.minecraft.world.level.material.FlowingFluid
    • getAmount

      public int getAmount(net.minecraft.world.level.material.FluidState pState)
      Overrides:
      getAmount in class BehaviorableFluid
    • animateTick

      protected void animateTick(net.minecraft.world.level.Level p_76116_, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.material.FluidState state, net.minecraft.util.RandomSource p_76119_)
      Overrides:
      animateTick in class net.minecraft.world.level.material.Fluid
    • render

      public void render(net.minecraft.world.level.BlockAndTintGetter pLevel, net.minecraft.core.BlockPos pPos, int amount, int time, net.minecraft.world.level.material.FluidState state)
    • getShape

      @NotNull public @NotNull net.minecraft.world.phys.shapes.VoxelShape getShape(net.minecraft.world.level.material.FluidState p_76084_, net.minecraft.world.level.BlockGetter p_76085_, net.minecraft.core.BlockPos p_76086_)
      Overrides:
      getShape in class net.minecraft.world.level.material.FlowingFluid
    • getFlowDirection

      protected net.minecraft.core.Direction getFlowDirection()
    • getRisePossibility

      protected double getRisePossibility()
    • canHydrate

      public boolean canHydrate(net.minecraft.world.level.material.FluidState state, net.minecraft.world.level.BlockGetter getter, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState source, net.minecraft.core.BlockPos sourcePos)
    • getUncheckedBehaviors

      public List<IFluidBehavior> getUncheckedBehaviors()
      Overrides:
      getUncheckedBehaviors in class BehaviorableFluid
      Returns:
      Returns the behaviors that this fluid has
    • getHeight

      public float getHeight(net.minecraft.world.level.material.FluidState p_76050_, net.minecraft.world.level.BlockGetter p_76051_, net.minecraft.core.BlockPos p_76052_)
      Overrides:
      getHeight in class net.minecraft.world.level.material.FlowingFluid