block

package
v1.1.43 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinPlainCoord = -34351347711
)

https://bitbucket.org/s_l_teichmann/mtsatellite/src/e1bf980a2b278c570b3f44f9452c9c087558acb3/common/coords.go?at=default&fileviewer=file-view-default

Variables

This section is empty.

Functions

func CoordToPlain

func CoordToPlain(x, y, z int) int64

func MigrateBlockDB

func MigrateBlockDB(db *sql.DB, dbtype types.DatabaseType) error

func PlainToCoord

func PlainToCoord(i int64) (x, y, z int)

Types

type Block

type Block struct {
	PosX int    `json:"x"`
	PosY int    `json:"y"`
	PosZ int    `json:"z"`
	Data []byte `json:"data"`
}

type BlockRepository

type BlockRepository interface {
	types.Backup
	GetByPos(x, y, z int) (*Block, error)
	Update(block *Block) error
	Delete(x, y, z int) error
	DeleteAll() error
	Vacuum() error
	Count() (int64, error)
}

func NewBlockRepository

func NewBlockRepository(db *sql.DB, dbtype types.DatabaseType) BlockRepository

Jump to

Keyboard shortcuts

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