data

package
v0.0.0-...-82b4563 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BiomesCache = make(map[string][]Biome)
View Source
var BlocksCache = make(map[string][]Block)
View Source
var MinecraftData embed.FS
View Source
var Paths struct {
	Data map[string]map[string]string `json:"pc"`
}
View Source
var ProtocolVersions []VersionInfo
View Source
var UnknownMinecraftVersionError = errors.New("unknown minecraft version")

Functions

func LoadJson

func LoadJson(path string, data any) (err error)

func LoadVersionedJson

func LoadVersionedJson(version, dataName string, data any) (err error)

Types

type Biome

type Biome struct {
	Id               int
	Name             string
	Category         string
	Temperature      float64
	HasPrecipitation bool
	Dimension        string
	DisplayName      string
	Color            int
}

func BiomesForVersion

func BiomesForVersion(v string) (ret []Biome)

func LookupBiomeById

func LookupBiomeById(version string, id int32) (biome Biome, ok bool)

type Block

type Block struct {
	Id           int
	Name         string
	DisplayName  string
	Hardness     float64
	Resistance   float64
	StackSize    int
	Diggable     bool
	Material     string
	Transparent  bool
	EmitLight    int
	FilterLight  int
	DefaultState int32
	MinStateId   int32
	MaxStateId   int32
	States       []struct {
		Name      string
		Type      string
		NumValues int
	}
	Drops       []int
	BoundingBox string
}

func BlocksForVersion

func BlocksForVersion(v string) (ret []Block)

func LookupBlockByStateId

func LookupBlockByStateId(version string, stateId int32) (block Block, ok bool)

type VersionInfo

type VersionInfo struct {
	MinecraftVersion string
	Version          int32
	DataVersion      int
	UsesNetty        bool
	MajorVersion     string
	ReleaseType      string
}

func LookUpVersionByName

func LookUpVersionByName(name string) (ret VersionInfo, err error)

func LookUpVersionByProtocolVersion

func LookUpVersionByProtocolVersion(version int32) (ret VersionInfo, err error)

Jump to

Keyboard shortcuts

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