Package top.girlkisser.lazuli.api.block
Interface ISingleTankBE
- All Known Implementing Classes:
AbstractSingleTankAndInventoryBE,AbstractSingleTankBE
A basic interface for block entities with a single tank.
-
Method Summary
Modifier and TypeMethodDescriptiondefault intGets the maximum fluid extractable per tick for the block entity.default intGets the maximum fluid receivable per tick for the block entity.net.neoforged.neoforge.fluids.capability.templates.FluidTankgetTank()Get the block entity's tank.default intGets the tank capacity for the block entity.default voidAttempts 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.**
-