Documentation
¶
Index ¶
Constants ¶
View Source
const FABRIC_PROFILES_URL = "https://meta.fabricmc.net/v2/versions/loader/%s/%s/profile/json"
View Source
const FABRIC_VERSIONS_URL = "https://meta.fabricmc.net/v2/versions/loader"
View Source
const MAVEN_REPO_URL = "https://repo.maven.apache.org/maven2/%s"
View Source
const MINECRAFT_RESOURCES_URL = "https://resources.download.minecraft.net/%s/%s"
View Source
const QUILT_PROFILES_URL = "https://meta.quiltmc.org/v3/versions/loader/%s/%s/profile/json"
View Source
const QUILT_VERSIONS_URL = "https://meta.quiltmc.org/v3/versions/loader"
View Source
const VERSION_MANIFEST_URL = "https://piston-meta.mojang.com/mc/game/version_manifest_v2.json"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetIndex ¶
type AssetIndex struct {
Objects map[string]AssetObject `json:"objects"`
}
type AssetObject ¶
type FabricLoader ¶
type FabricLoader string
FabricLoader represents a variant of the Fabric mod loader.
const ( FabricLoaderStandard FabricLoader = "fabric" // FabricMC - https://fabricmc.net FabricLoaderQuilt FabricLoader = "quilt" // Quilt - https://quiltmc.org )
func (FabricLoader) String ¶
func (fabricLoader FabricLoader) String() string
type FabricMeta ¶
type FabricMeta struct {
ID string `json:"id"`
InheritsFrom string `json:"inheritsFrom"`
ReleaseTime string `json:"releaseTime"`
Time string `json:"time"`
Type string `json:"type"`
MainClass string `json:"mainClass"`
Arguments struct {
Game []any `json:"game"`
Jvm []string `json:"jvm"`
} `json:"arguments"`
Libraries []Library
}
func GetFabricMeta ¶
func GetFabricMeta(gameVersion string, loaderVersion string, fabricLoader FabricLoader) (FabricMeta, error)
GetFabricMeta retrieves the launcher metadata for a loader version and game version of the specified Fabric variant.
type FabricVersionList ¶
type FabricVersionList []struct {
Separator string `json:"separator"`
Build int `json:"build"`
Maven string `json:"maven"`
Version string `json:"version"`
Stable bool `json:"stable"`
}
func GetFabricVersions ¶
func GetFabricVersions(fabricLoader FabricLoader) (FabricVersionList, error)
GetFabricVersions retrieves a list of all versions of the specified Fabric variant.
type Library ¶
type Library struct {
Downloads struct {
Artifact Artifact `json:"artifact"`
} `json:"downloads"`
Name string `json:"name"`
// these fields are present in Fabric libraries that don't contain a 'downloads' field
URL string `json:"url,omitempty"`
Sha1 string `json:"sha1,omitempty"`
Size int `json:"size,omitempty"`
Rules []struct {
Action string `json:"action"`
Os struct {
Name string `json:"name"`
} `json:"os"`
} `json:"rules,omitempty"`
}
func GetMavenLibrary ¶
GetMavenLibrary returns library metadata for the specified name and path in the Maven repository.
type VersionManifest ¶
type VersionManifest struct {
Latest struct {
Release string `json:"release"`
Snapshot string `json:"snapshot"`
} `json:"latest"`
Versions []struct {
ID string `json:"id"`
Type string `json:"type"`
URL string `json:"url"`
Time time.Time `json:"time"`
ReleaseTime time.Time `json:"releaseTime"`
Sha1 string `json:"sha1"`
ComplianceLevel int `json:"complianceLevel"`
} `json:"versions"`
}
func GetVersionManifest ¶
func GetVersionManifest() (VersionManifest, error)
GetVersionManifest retrieves the Mojang version manifest which lists all game versions.
type VersionMeta ¶
type VersionMeta struct {
Arguments struct {
Game []any `json:"game"`
Jvm []any `json:"jvm"`
} `json:"arguments"`
AssetIndex struct {
ID string `json:"id"`
Sha1 string `json:"sha1"`
Size int `json:"size"`
TotalSize int `json:"totalSize"`
URL string `json:"url"`
} `json:"assetIndex"`
Assets string `json:"assets"`
ComplianceLevel int `json:"complianceLevel"`
Downloads struct {
Client struct {
Sha1 string `json:"sha1"`
Size int `json:"size"`
URL string `json:"url"`
} `json:"client"`
ClientMappings struct {
Sha1 string `json:"sha1"`
Size int `json:"size"`
URL string `json:"url"`
} `json:"client_mappings"`
Server struct {
Sha1 string `json:"sha1"`
Size int `json:"size"`
URL string `json:"url"`
} `json:"server"`
ServerMappings struct {
Sha1 string `json:"sha1"`
Size int `json:"size"`
URL string `json:"url"`
} `json:"server_mappings"`
} `json:"downloads"`
ID string `json:"id"`
JavaVersion struct {
Component string `json:"component"`
MajorVersion int `json:"majorVersion"`
} `json:"javaVersion"`
Libraries []Library `json:"libraries"`
Logging struct {
Client struct {
Argument string `json:"argument"`
File struct {
ID string `json:"id"`
Sha1 string `json:"sha1"`
Size int `json:"size"`
URL string `json:"url"`
} `json:"file"`
Type string `json:"type"`
} `json:"client"`
} `json:"logging"`
MainClass string `json:"mainClass"`
MinimumLauncherVersion int `json:"minimumLauncherVersion"`
ReleaseTime time.Time `json:"releaseTime"`
Time time.Time `json:"time"`
Type string `json:"type"`
}
func GetVersionMeta ¶
func GetVersionMeta(id string) (VersionMeta, error)
GetVersionMeta retrieves the version metadata for a specified version from the version manifest.
Click to show internal directories.
Click to hide internal directories.