public interface IPressurizableItem
IAirHandlerItem capability to access the item's air information.
You don't have to implement this interface in your air-handling items, but it will make things easier;
the alternative is to provide a custom implementation of IAirHandlerItem
for your capability, which is more work.
| Modifier and Type | Method and Description |
|---|---|
int |
getAir(net.minecraft.item.ItemStack stack)
Get the amount of air currently held in this ItemStack.
|
int |
getBaseVolume()
Get the base item volume before any volume upgrades are added.
|
default int |
getEffectiveVolume(net.minecraft.item.ItemStack stack)
The effective volume is the item's base volume, modified by both the volume upgrades installed in the item,
and any extra registered modifiers (e.g.
|
default float |
getPressure(net.minecraft.item.ItemStack stack)
Get the pressure for this item.
|
int |
getVolumeUpgrades(net.minecraft.item.ItemStack stack)
Get the number of volume upgrades currently in this ItemStack.
|
int getBaseVolume()
int getVolumeUpgrades(net.minecraft.item.ItemStack stack)
stack - the ItemStack to checkint getAir(net.minecraft.item.ItemStack stack)
stack - the ItemStack to checkdefault int getEffectiveVolume(net.minecraft.item.ItemStack stack)
stack - the ItemStack to checkdefault float getPressure(net.minecraft.item.ItemStack stack)
stack - the ItemStack to check