public class TankSimple extends java.lang.Object implements Tank, Storable, Syncable
Tank| Constructor and Description |
|---|
TankSimple() |
TankSimple(int maxCapacity) |
| Modifier and Type | Method and Description |
|---|---|
int |
addFluid(Fluid fluid,
boolean simulate)
Attempt to insert fluid into this consumer
|
java.util.Optional<Fluid> |
getFluid() |
int |
getFluidCapacity() |
void |
load(Data data)
Loads all the data for this object.
|
void |
read(Packet packet)
Reads a packet.
|
java.util.Optional<Fluid> |
removeFluid(int amount,
boolean simulate)
Attempt to extract fluid from this FluidProvider
|
void |
save(Data data)
Saves all the data of this object.
|
TankSimple |
setCapacity(int capacity) |
TankSimple |
setFluid(java.util.Optional<Fluid> fluid) |
void |
write(Packet packet)
Writes a packet based on the arguments.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFluidAmount, hasFluid, hasFluidType, hasFluidType, hasFluidTypeaddFluidremoveFluidpublic TankSimple setCapacity(int capacity)
public int addFluid(Fluid fluid, boolean simulate)
FluidConsumeraddFluid in interface FluidConsumerfluid - Fluid to insertsimulate - Whether to simulate the insertionpublic java.util.Optional<Fluid> removeFluid(int amount, boolean simulate)
FluidProviderremoveFluid in interface FluidProvideramount - Amount of fluid to extractsimulate - Whether to simulate the extractionFluidpublic int getFluidCapacity()
getFluidCapacity in interface Tankpublic java.util.Optional<Fluid> getFluid()
public TankSimple setFluid(java.util.Optional<Fluid> fluid)