public class BasicAirHandler extends java.lang.Object implements IAirHandler, net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundNBT>
| Constructor and Description |
|---|
BasicAirHandler(int volume) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAir(int amount)
Adds air to this handler.
|
void |
deserializeNBT(net.minecraft.nbt.CompoundNBT nbt) |
int |
getAir()
Returns the amount of air in this handler.
|
int |
getBaseVolume()
Gets the base volume of this handler, before any Volume Upgrades are taken into account.
|
float |
getPressure()
Get the current pressure for this handler.
|
int |
getVolume()
Get the effective volume of this air handler.
|
float |
maxPressure()
Get the maximum pressure this handler can take.
|
net.minecraft.nbt.CompoundNBT |
serializeNBT() |
void |
setBaseVolume(int baseVolume)
Set the base volume of this air handler.
|
public float getPressure()
IAirHandlergetPressure in interface IAirHandlerpublic int getAir()
IAirHandlergetAir in interface IAirHandlerpublic void addAir(int amount)
IAirHandleraddAir in interface IAirHandleramount - amount of air to add in mL, may be negative.public int getBaseVolume()
IAirHandlergetBaseVolume in interface IAirHandlerpublic void setBaseVolume(int baseVolume)
IAirHandlersetBaseVolume in interface IAirHandlerbaseVolume - the new base volumepublic int getVolume()
IAirHandlerIItemRegistry.registerPneumaticVolumeModifier(ItemVolumeModifier)).getVolume in interface IAirHandlerpublic float maxPressure()
IAirHandlermaxPressure in interface IAirHandlerpublic net.minecraft.nbt.CompoundNBT serializeNBT()
serializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundNBT>public void deserializeNBT(net.minecraft.nbt.CompoundNBT nbt)
deserializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundNBT>