Interface IFluidBehavior

All Known Subinterfaces:
IFlammableBehavior, IFluidFogBehavior, IInteractionBehavior, IInteractionWithNeighborBlockUpdateBehavior, IPushlessFluidBehavior, ISwimmingFluidBehavior, IViscosityFluidBehavior
All Known Implementing Classes:
FlammableBehavior, FluidFogBehavior, PushlessFluidBehavior, SwimmingFluidBehavior, ViscosityFluidBehavior

public interface IFluidBehavior

Fluid behavior interface

  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    beforeDestroyingBlock(net.minecraft.world.level.LevelAccessor worldIn, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
    Called before the fluid destroying block
    default int
    getFlammability(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction direction)
    Getting the object's flammability,
    default void
    neighborChange(@NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.core.BlockPos thisPos, @NotNull net.minecraft.world.level.block.Block block, @NotNull net.minecraft.core.BlockPos neighborPos, boolean idkRandomParameter)
    Called when the block's neighbor changed
    default boolean
     
    default boolean
    tick(net.minecraft.world.level.Level p_76113_, net.minecraft.core.BlockPos p_76114_, net.minecraft.world.level.material.FluidState p_76115_)
    Called when the fluid ticks
  • Method Details

    • tick

      default boolean tick(net.minecraft.world.level.Level p_76113_, net.minecraft.core.BlockPos p_76114_, net.minecraft.world.level.material.FluidState p_76115_)

      Called when the fluid ticks

      Returns:
      true if stop FlowingFluid.tick(Level, BlockPos, FluidState)
      Since:
      2.0
    • beforeDestroyingBlock

      default boolean beforeDestroyingBlock(net.minecraft.world.level.LevelAccessor worldIn, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)

      Called before the fluid destroying block

      Returns:
      true if stop ForgeFlowingFluid.beforeDestroyingBlock(LevelAccessor, BlockPos, BlockState)
      Since:
      2.0
    • neighborChange

      default void neighborChange(@NotNull @NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull @NotNull net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.core.BlockPos thisPos, @NotNull @NotNull net.minecraft.world.level.block.Block block, @NotNull @NotNull net.minecraft.core.BlockPos neighborPos, boolean idkRandomParameter)

      Called when the block's neighbor changed

      require requireBlockBeBehaviorable() to be true

      Since:
      2.0
    • getFlammability

      default int getFlammability(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction direction)

      Getting the object's flammability,

      require requireBlockBeBehaviorable() to be true

      Returns:
      Chance that fire will spread and consume this block, 300 being a 100% chance, 0, being a 0% chance.
      Since:
      2.0
    • requireBlockBeBehaviorable

      default boolean requireBlockBeBehaviorable()