Documentation
¶
Index ¶
- Constants
- func BackupWorld(worldDir string) string
- func BackupWorldWithVersion(worldDir string, versionName string) string
- func CanWriteToDir(path string) bool
- func CancelMsixvcDownload()
- func CancelMsixvcDownloadTask(dest string)
- func CopyVersionDataFromGDK(isPreview bool, targetName string) string
- func CopyVersionDataFromVersion(sourceName string, targetName string) string
- func CreateDesktopShortcut(name string) string
- func CreateFolder(parent string, name string) string
- func DeleteDownloadedMsixvc(version string, versionType string) string
- func DeleteVersionFolder(name string) string
- func FetchHistoricalVersions(preferCN bool) map[string]interface{}
- func FetchLeviLaminaVersionDB() (map[string][]string, error)
- func GetBaseRoot() string
- func GetContentRoots(name string) types.ContentRoots
- func GetDisableDiscordRPC() bool
- func GetDriveStats(root string) map[string]uint64
- func GetEnableBetaUpdates() bool
- func GetInstallerDir() string
- func GetPathModTime(path string) int64
- func GetPathSize(path string) int64
- func GetVersionLogoDataUrl(name string) string
- func GetVersionMeta(name string) versions.VersionMeta
- func GetVersionsDir() string
- func GetWorldIconDataUrl(worldDir string) string
- func GetWorldLevelName(worldDir string) string
- func ImportMcworld(name string, player string, fileName string, data []byte, overwrite bool) string
- func InstallExtractMsixvc(ctx context.Context, name string, folderName string, isPreview bool) string
- func InstallLeviLamina(ctx context.Context, mcVersion string, targetName string) string
- func IsProcessRunningAtPath(exePath string) bool
- func KillAllMinecraftProcesses() error
- func KillProcess(pid int) error
- func ListDir(path string) []types.FileEntry
- func ListDrives() []string
- func ListInheritableVersionNames(versionType string) []string
- func ListMinecraftProcesses() []types.ProcessInfo
- func ListServers(versionName string, player string) ([]types.Server, error)
- func ListVersionMetas() []versions.VersionMeta
- func OpenGameDataExplorer(isPreview bool)
- func OpenModsExplorer(name string)
- func OpenPathDir(dir string)
- func OpenWorldsExplorer(name string, isPreview bool)
- func ReadWorldLevelDatFields(worldDir string) map[string]any
- func ReadWorldLevelDatFieldsAt(worldDir string, path []string) map[string]any
- func ReconcileRegisteredFlags()
- func RemoveVersionLogo(name string) string
- func RenameVersionFolder(oldName string, newName string) string
- func ResetBaseRoot() string
- func ResolveDownloadedMsixvc(version string, versionType string) string
- func ResumeMsixvcDownload()
- func SaveVersionLogoDataUrl(name string, dataUrl string) string
- func SaveVersionLogoFromPath(name string, filePath string) string
- func SaveVersionMeta(name string, gameVersion string, typeStr string, enableIsolation bool, ...) string
- func SetBaseRoot(root string) string
- func SetDisableDiscordRPC(disable bool) string
- func SetEnableBetaUpdates(enable bool) string
- func SetWorldLevelName(worldDir string, name string) string
- func StartMsixvcDownload(ctx context.Context, url string, md5sum string) string
- func TestMirrorLatencies(urls []string, timeoutMs int) []map[string]interface{}
- func UninstallLeviLamina(ctx context.Context, targetName string) string
- func ValidateVersionFolderName(name string) string
- func WriteWorldLevelDatFields(worldDir string, args map[string]any) string
- func WriteWorldLevelDatFieldsAt(worldDir string, args map[string]any) string
- type ContentCounts
- type KnownFolder
- type LeviLaminaVersionDB
- type MotdBEInfo
- type SunTimes
- type VersionStatus
Constants ¶
View Source
const ( EventExtractError = "extract.error" EventExtractDone = "extract.done" EventExtractProgress = "extract.progress" )
Variables ¶
This section is empty.
Functions ¶
func BackupWorld ¶
func BackupWorldWithVersion ¶
func CanWriteToDir ¶
func CancelMsixvcDownload ¶
func CancelMsixvcDownload()
func CancelMsixvcDownloadTask ¶ added in v0.1.7
func CancelMsixvcDownloadTask(dest string)
func CopyVersionDataFromGDK ¶
func CreateDesktopShortcut ¶
func CreateFolder ¶
func DeleteDownloadedMsixvc ¶
func DeleteVersionFolder ¶
func FetchHistoricalVersions ¶
func FetchLeviLaminaVersionDB ¶ added in v0.1.6
func GetBaseRoot ¶
func GetBaseRoot() string
func GetContentRoots ¶
func GetContentRoots(name string) types.ContentRoots
func GetDisableDiscordRPC ¶ added in v0.0.24
func GetDisableDiscordRPC() bool
func GetDriveStats ¶
func GetEnableBetaUpdates ¶ added in v0.2.0
func GetEnableBetaUpdates() bool
func GetInstallerDir ¶
func GetInstallerDir() string
func GetPathModTime ¶
func GetPathSize ¶
func GetVersionLogoDataUrl ¶
func GetVersionMeta ¶ added in v0.0.20
func GetVersionMeta(name string) versions.VersionMeta
func GetVersionsDir ¶
func GetVersionsDir() string
func GetWorldIconDataUrl ¶
func GetWorldLevelName ¶
func ImportMcworld ¶
func InstallExtractMsixvc ¶
func InstallLeviLamina ¶ added in v0.1.6
func IsProcessRunningAtPath ¶
func KillAllMinecraftProcesses ¶ added in v0.1.6
func KillAllMinecraftProcesses() error
func KillProcess ¶ added in v0.1.6
func ListDrives ¶
func ListDrives() []string
func ListMinecraftProcesses ¶ added in v0.1.6
func ListMinecraftProcesses() []types.ProcessInfo
func ListServers ¶ added in v0.1.6
func ListVersionMetas ¶
func ListVersionMetas() []versions.VersionMeta
func OpenGameDataExplorer ¶
func OpenGameDataExplorer(isPreview bool)
func OpenModsExplorer ¶
func OpenModsExplorer(name string)
func OpenPathDir ¶
func OpenPathDir(dir string)
func OpenWorldsExplorer ¶
func ReadWorldLevelDatFields ¶
func ReconcileRegisteredFlags ¶ added in v0.0.20
func ReconcileRegisteredFlags()
func RemoveVersionLogo ¶
func RenameVersionFolder ¶
func ResetBaseRoot ¶
func ResetBaseRoot() string
func ResolveDownloadedMsixvc ¶
func ResumeMsixvcDownload ¶
func ResumeMsixvcDownload()
func SaveVersionLogoDataUrl ¶
func SaveVersionLogoFromPath ¶
func SaveVersionMeta ¶
func SetBaseRoot ¶
func SetDisableDiscordRPC ¶ added in v0.0.24
func SetEnableBetaUpdates ¶ added in v0.2.0
func SetWorldLevelName ¶
func StartMsixvcDownload ¶
func TestMirrorLatencies ¶
func UninstallLeviLamina ¶ added in v0.1.6
Types ¶
type ContentCounts ¶
type ContentCounts struct {
Worlds int `json:"worlds"`
ResourcePacks int `json:"resourcePacks"`
BehaviorPacks int `json:"behaviorPacks"`
}
func GetContentCounts ¶
func GetContentCounts(name string) ContentCounts
type KnownFolder ¶
func ListKnownFolders ¶
func ListKnownFolders() []KnownFolder
type LeviLaminaVersionDB ¶ added in v0.1.6
type MotdBEInfo ¶ added in v0.1.6
type MotdBEInfo struct {
Status string `json:"status"` // online/offline
Host string `json:"host"` // Server Host
Motd string `json:"motd"` // Motd message
Agreement int `json:"agreement"` // Protocol version
Version string `json:"version"` // Game version
Online int `json:"online"` // Online players
Max int `json:"max"` // Max players
LevelName string `json:"level_name"` // Level name
GameMode string `json:"gamemode"` // Game mode
ServerUniqueID string `json:"server_unique_id"` // Server Unique ID
Delay int64 `json:"delay"` // Latency in ms
}
MotdBEInfo represents the server status information
func MotdBE ¶ added in v0.1.6
func MotdBE(Host string) (*MotdBEInfo, error)
type SunTimes ¶ added in v0.3.0
type SunTimes struct {
Sunrise string `json:"sunrise"`
Sunset string `json:"sunset"`
IP string `json:"ip"`
}
func GetSunTimes ¶ added in v0.3.0
func GetSunTimes() SunTimes
type VersionStatus ¶
type VersionStatus struct {
Version string `json:"version"`
IsInstalled bool `json:"isInstalled"`
IsDownloaded bool `json:"isDownloaded"`
Type string `json:"type"`
}
func GetAllVersionsStatus ¶
func GetAllVersionsStatus(versionsList []map[string]interface{}) []VersionStatus
func GetVersionStatus ¶
func GetVersionStatus(version string, versionType string) VersionStatus
Click to show internal directories.
Click to hide internal directories.