areasparser

package module
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: MIT Imports: 3 Imported by: 0

README

Minetest areas parser

Coverage Status

Docs: https://pkg.go.dev/github.com/minetest-go/areasparser

Features

  • Parses the areas.json file from the areas mod

License

Code: MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Area

type Area struct {
	Owner  string      `json:"owner"`
	Name   string      `json:"name"`
	Parent int         `json:"parent"`
	Pos1   *GenericPos `json:"pos1"`
	Pos2   *GenericPos `json:"pos2"`
}

func Parse

func Parse(data []byte) ([]*Area, error)

func ParseFile

func ParseFile(filename string) ([]*Area, error)

type GenericPos

type GenericPos struct {
	X int `json:"x"`
	Y int `json:"y"`
	Z int `json:"z"`
}

func (*GenericPos) UnmarshalJSON

func (pos *GenericPos) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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