public class AirHandlerItemStack extends IAirHandlerItem.Provider
IAirHandlerItem.Provider| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
AIR_NBT_KEY |
| Constructor and Description |
|---|
AirHandlerItemStack(net.minecraft.item.ItemStack container,
float maxPressure) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAir(int amount)
Adds air to this handler.
|
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.
|
<T> net.minecraftforge.common.util.LazyOptional<T> |
getCapability(net.minecraftforge.common.capabilities.Capability<T> cap,
net.minecraft.util.Direction side) |
net.minecraft.item.ItemStack |
getContainer()
Get the itemstack container currently acted on by this air handler.
|
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.
|
void |
setBaseVolume(int newBaseVolume)
Set the base volume of this air handler.
|
public static final java.lang.String AIR_NBT_KEY
public AirHandlerItemStack(net.minecraft.item.ItemStack container,
float maxPressure)
@Nonnull public net.minecraft.item.ItemStack getContainer()
IAirHandlerItempublic float getPressure()
IAirHandlerpublic int getAir()
IAirHandlerpublic void addAir(int amount)
IAirHandleramount - amount of air to add in mL, may be negative.public int getBaseVolume()
IAirHandlerpublic void setBaseVolume(int newBaseVolume)
IAirHandlernewBaseVolume - the new base volumepublic int getVolume()
IAirHandlerIItemRegistry.registerPneumaticVolumeModifier(ItemVolumeModifier)).public float maxPressure()
IAirHandler@Nonnull
public <T> net.minecraftforge.common.util.LazyOptional<T> getCapability(@Nonnull
net.minecraftforge.common.capabilities.Capability<T> cap,
@Nullable
net.minecraft.util.Direction side)