public void writeToNBT(NBTTagCompound nbtRoot) {
super.writeToNBT(nbtRoot);
GasStack gt = getGasType();
if(GasUtil.isGasValid(gt)) {
updateTank();
gt = gt.copy();
gt.amount = tank.getStored();
nbtRoot.setTag("tank", gt.write(new NBTTagCompound()));
}
}