ItemStack oxygenItemStack = this.getStackInSlot(2);
if (oxygenItemStack != null && oxygenItemStack.getItem() instanceof IItemOxygenSupply)
{
IItemOxygenSupply oxygenItem = (IItemOxygenSupply) oxygenItemStack.getItem();
float oxygenDraw = Math.min(this.oxygenPerTick * 2.5F, this.maxOxygen - this.storedOxygen);
this.storedOxygen += oxygenItem.discharge(oxygenItemStack, oxygenDraw);
if (this.storedOxygen > this.maxOxygen) this.storedOxygen = this.maxOxygen;
}
}
super.updateEntity();