func (i *Instance) PackageCacheDir() string {
	return filepath.Join(i.CacheDir, "cache")
}
PackageCacheDir returns the path to the cache directory. contains downloaded packages (mods & modpacks)
package instances
import (
	"fmt"
	"io/ioutil"
	"os"
	"path/filepath"
	"strings"
	"github.com/jwalton/gchalk"
	"github.com/minepkg/minepkg/internals/commands"
	"github.com/minepkg/minepkg/internals/api"
	"github.com/minepkg/minepkg/internals/mojang"
	"github.com/minepkg/minepkg/pkg/manifest"
	"github.com/pelletier/go-toml"
)
var (
	PlatformVanilla uint8 = 1
	PlatformFabric uint8 = 2
	PlatformForge uint8 = 3
	ErrNoInstance = &commands.CliError{
		Text: "no minepkg.toml file was found in this directory",
		Suggestions: []string{
			fmt.Sprintf("Create it with %s", gchalk.Bold("minepkg init")),
			"Move into a folder containing a minepkg.toml file",
		},
	}
	ErrMissingRequirementMinecraft = &commands.CliError{
		Text: "the manifest is missing the required requirements.minecraft field",
		Suggestions: []string{
			"Add the field as documented here https://preview.minepkg.io/docs/manifest#requirements",
		},
	}
)
type Instance struct {
	GlobalDir string
	CacheDir string
	Directory         string
	Manifest          *manifest.Manifest
	Lockfile          *manifest.Lockfile
	MojangCredentials *mojang.AuthResponse
	MinepkgAPI        *api.MinepkgAPI
	isFromWd                     bool
	launchCmd                    string
	lockfileNeedsRenameMigration bool
}
func (i *Instance) LaunchCmd() string {
	return i.launchCmd
}
func (i *Instance) VersionsDir() string {
	return filepath.Join(i.CacheDir, "versions")
}
func (i *Instance) AssetsDir() string {
	return filepath.Join(i.CacheDir, "assets")
}
func (i *Instance) LibrariesDir() string {
	return filepath.Join(i.CacheDir, "libraries")
}
func (i *Instance) InstancesDir() string {
	return filepath.Join(i.GlobalDir, "instances")
}