packages

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseGameVersion

type BaseGameVersion struct {
	SemVersion
}

type ManifestJSON

type ManifestJSON struct {
	FormatVersion int `json:"format_version"`
	Header        struct {
		Name             string `json:"name"`
		Description      string `json:"description"`
		UUID             string `json:"uuid"`
		Version          []int  `json:"version"`
		MinEngineVersion []int  `json:"min_engine_version"`
	} `json:"header"`
	Modules []struct {
		Type    string `json:"type"`
		UUID    string `json:"uuid"`
		Version []int  `json:"version"`
	} `json:"modules"`
}

type MinEngineVersion

type MinEngineVersion struct {
	SemVersion
}

type Pack

type Pack struct {
	Manifest PackManifest `json:"manifest"`
	Path     string       `json:"path"`
}

type PackIdVersion

type PackIdVersion struct {
	UUID     string     `json:"uuid"`
	Version  SemVersion `json:"version"`
	PackType PackType   `json:"pack_type"`
}

type PackManager

type PackManager struct {
	// contains filtered or unexported fields
}

func NewPackManager

func NewPackManager() *PackManager

func (*PackManager) LoadPacksForVersion

func (pm *PackManager) LoadPacksForVersion(versionName string, resourcePacksDir, behaviorPacksDir string, skinPacksDirs ...string) ([]Pack, error)

type PackManifest

type PackManifest struct {
	Identity                PackIdVersion    `json:"identity"`
	PackType                PackType         `json:"pack_type"`
	RequiredBaseGameVersion BaseGameVersion  `json:"required_base_game_version"`
	MinEngineVersion        MinEngineVersion `json:"min_engine_version"`
	Name                    string           `json:"name"`
	Description             string           `json:"description"`
	Location                string           `json:"location"`
	PackIconLocation        string           `json:"pack_icon_location"`
}

type PackType

type PackType int
const (
	PackTypeInvalid       PackType = 0
	PackTypeAddon         PackType = 1
	PackTypeCached        PackType = 2
	PackTypeCopyProtected PackType = 3
	PackTypeBehavior      PackType = 4
	PackTypePersonaPiece  PackType = 5
	PackTypeResources     PackType = 6
	PackTypeSkins         PackType = 7
	PackTypeWorldTemplate PackType = 8
)

type ResourceLocation

type ResourceLocation string

func (ResourceLocation) String

func (r ResourceLocation) String() string

type SemVersion

type SemVersion struct {
	Major int `json:"major"`
	Minor int `json:"minor"`
	Patch int `json:"patch"`
}

func (SemVersion) String

func (v SemVersion) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL