Interface ISingleTankBE

All Superinterfaces:
IBE, IFluidBE
All Known Implementing Classes:
AbstractSingleTankAndInventoryBE, AbstractSingleTankBE

public interface ISingleTankBE extends IFluidBE
A basic interface for block entities with a single tank.
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    Gets the maximum fluid extractable per tick for the block entity.
    default int
    Gets the maximum fluid receivable per tick for the block entity.
    net.neoforged.neoforge.fluids.capability.templates.FluidTank
    Get the block entity's tank.
    default int
    Gets the tank capacity for the block entity.
    default void
    Attempts to distribute fluid to neighbouring blocks.

    Methods inherited from interface top.girlkisser.lazuli.api.block.IBE

    getBlockPos, getBlockState, getLevel, setChanged
  • Method Details

    • getTank

      net.neoforged.neoforge.fluids.capability.templates.FluidTank getTank()
      Get the block entity's tank.
      Returns:
      The tank.
    • getTankCapacity

      default int getTankCapacity()
      Gets the tank capacity for the block entity.
      Returns:
      The capacity.
    • getMaxFluidExtract

      default int getMaxFluidExtract()
      Gets the maximum fluid extractable per tick for the block entity.
      Returns:
      The amount.
    • getMaxFluidReceive

      default int getMaxFluidReceive()
      Gets the maximum fluid receivable per tick for the block entity.
      Returns:
      The amount.
    • tryDistributeFluid

      default void tryDistributeFluid()
      Attempts to distribute fluid to neighbouring blocks.
      **This method will throw an exception the level is null.**