public NBTTagCompound writeToNBT(NBTTagCompound nbtTagCompound) { nbtTagCompound.setFloat("energyValue", energyValue); nbtTagCompound.setInteger("energyType", energyType.ordinal()); return nbtTagCompound; }