Fix crash when TE item is placed in battery slot. Remove old TE API.