NetworkedFluidContainer

A container that stores fluids.

Inheritors

Properties

Link copied to clipboard
abstract val allowedTypes: Set<FluidType>

The allowed fluid types that can be stored in this NetworkedFluidContainer.

Link copied to clipboard
abstract val amount: Long

The amount of fluid currently in this NetworkedFluidContainer.

Link copied to clipboard
abstract val capacity: Long

The amount of fluid that can fit in this NetworkedFluidContainer.

Link copied to clipboard
abstract val type: FluidType?

The current FluidType of this NetworkedFluidContainer or null if the container does not contain any fluid.

Link copied to clipboard
abstract val uuid: UUID

The unique identifier of this EndPointContainer.

Functions

Link copied to clipboard
open fun accepts(type: FluidType): Boolean

Whether this NetworkedFluidContainer can accept type.

open fun accepts(type: FluidType, amount: Long): Boolean

Whether this NetworkedFluidContainer can accept amount of type.

Link copied to clipboard
abstract fun addFluid(type: FluidType, amount: Long): Long

Tries to add amount of type to this NetworkedFluidContainer, then returns the amount that was actually added.

Link copied to clipboard
open fun isEmpty(): Boolean

Whether this NetworkedFluidContainer is empty.

Link copied to clipboard
open fun isFull(): Boolean

Whether this NetworkedFluidContainer can accept any more fluid.

Link copied to clipboard
abstract fun takeFluid(amount: Long): Long

Tries to take amount of fluid from this NetworkedFluidContainer, then returns the amount that was actually taken.