Class BehaviorableFluid

java.lang.Object
net.minecraft.world.level.material.Fluid
net.minecraft.world.level.material.FlowingFluid
net.minecraftforge.fluids.ForgeFlowingFluid
com.forsteri.unlimitedfluidity.core.SmartFluid
com.forsteri.unlimitedfluidity.core.fluidbehaviors.BehaviorableFluid
All Implemented Interfaces:
IBehaviorable, net.minecraftforge.common.extensions.IForgeFluid
Direct Known Subclasses:
FlowingGas

public abstract class BehaviorableFluid extends SmartFluid implements IBehaviorable

Fluid that can add behaviors

Since:
2.0
  • Nested Class Summary

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

    net.minecraftforge.fluids.ForgeFlowingFluid.Flowing, net.minecraftforge.fluids.ForgeFlowingFluid.Properties, net.minecraftforge.fluids.ForgeFlowingFluid.Source
  • Field Summary

    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
    BehaviorableFluid(net.minecraftforge.fluids.ForgeFlowingFluid.Properties properties)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    beforeDestroyingBlock(net.minecraft.world.level.LevelAccessor worldIn, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     
    int
    getAmount(net.minecraft.world.level.material.FluidState pState)
     
     
    protected List<IFluidBehavior>
     
    void
    tick(@NotNull net.minecraft.world.level.Level worldIn, @NotNull net.minecraft.core.BlockPos pos, @NotNull net.minecraft.world.level.material.FluidState state)
     

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

    createFluidStateDefinition, isSource, isSource

    Methods inherited from class net.minecraftforge.fluids.ForgeFlowingFluid

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

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

    canSpreadTo, getFlow, getFlowing, getHeight, getLegacyLevel, getNewLiquid, getOwnHeight, getShape, getSlopeDistance, getSource, getSpread, getSpreadDelay, isSolidFace, spread, spreadTo

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

    animateTick, builtInRegistryHolder, defaultFluidState, getDripParticle, getStateDefinition, is, isEmpty, isRandomlyTicking, randomTick, 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, canHydrate, getAdjacentBlockPathType, getBlockPathType, getExplosionResistance, move, shouldUpdateWhileBoating, supportsBoating
  • Constructor Details

    • BehaviorableFluid

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

    • tick

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

      public int getAmount(net.minecraft.world.level.material.FluidState pState)
      Specified by:
      getAmount in class net.minecraft.world.level.material.FlowingFluid
    • beforeDestroyingBlock

      protected void beforeDestroyingBlock(net.minecraft.world.level.LevelAccessor worldIn, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
      Overrides:
      beforeDestroyingBlock in class net.minecraftforge.fluids.ForgeFlowingFluid
    • getUncheckedBehaviors

      protected List<IFluidBehavior> getUncheckedBehaviors()
      Returns:
      Returns the behaviors that this fluid has
      Since:
      2.0
    • getBehaviors

      public List<IFluidBehavior> getBehaviors()
      Specified by:
      getBehaviors in interface IBehaviorable