packages

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: GPL-3.0, LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseVersion added in v0.1.6

func ParseVersion(v interface{}) []int

func ReadPackTexts added in v0.1.6

func ReadPackTexts(root string) map[string]string

Types

type BaseGameVersion

type BaseGameVersion struct {
	SemVersion
}

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 RawManifest added in v0.1.6

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

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