mcworld

package
v0.0.0-...-f8d8a15 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2012 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ChunkNotFoundError = errors.New("Chunk Missing")
)

Functions

This section is empty.

Types

type AllChunksMask

type AllChunksMask struct{}

func (*AllChunksMask) IsMasked

func (m *AllChunksMask) IsMasked(x, z int) bool

type AlphaChunkPool

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

func (*AlphaChunkPool) BoundingBox

func (p *AlphaChunkPool) BoundingBox() *BoundingBox

func (*AlphaChunkPool) Pop

func (p *AlphaChunkPool) Pop(x, z int) bool

func (*AlphaChunkPool) Remaining

func (p *AlphaChunkPool) Remaining() int

type AlphaWorld

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

func (*AlphaWorld) ChunkPool

func (w *AlphaWorld) ChunkPool(mask ChunkMask) (ChunkPool, error)

func (*AlphaWorld) OpenChunk

func (w *AlphaWorld) OpenChunk(x, z int) (io.ReadCloser, error)

type BetaChunkPool

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

func (*BetaChunkPool) BoundingBox

func (p *BetaChunkPool) BoundingBox() *BoundingBox

func (*BetaChunkPool) Pop

func (p *BetaChunkPool) Pop(x, z int) bool

func (*BetaChunkPool) Remaining

func (p *BetaChunkPool) Remaining() int

type BetaWorld

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

func (*BetaWorld) ChunkPool

func (w *BetaWorld) ChunkPool(mask ChunkMask) (ChunkPool, error)

func (*BetaWorld) OpenChunk

func (w *BetaWorld) OpenChunk(x, z int) (io.ReadCloser, error)

type BoundingBox

type BoundingBox struct {
	X0, Z0, X1, Z1 int
}

func EmptyBoundingBox

func EmptyBoundingBox() *BoundingBox

func (*BoundingBox) Union

func (b *BoundingBox) Union(x, z int)

type ChunkLocation

type ChunkLocation uint32

func (ChunkLocation) Offset

func (cl ChunkLocation) Offset() int

func (ChunkLocation) Sectors

func (cl ChunkLocation) Sectors() int

type ChunkMask

type ChunkMask interface {
	IsMasked(x, z int) bool
}

type ChunkOpener

type ChunkOpener interface {
	OpenChunk(x, z int) (io.ReadCloser, error)
}

type ChunkPool

type ChunkPool interface {
	Pop(x, z int) bool
	Remaining() int
	BoundingBox() *BoundingBox
}

type ChunkPooler

type ChunkPooler interface {
	ChunkPool(mask ChunkMask) (ChunkPool, error)
}

type McrFile

type McrFile struct {
	*os.File
}

func (McrFile) ReadLocation

func (r McrFile) ReadLocation(x, z int) (ChunkLocation, error)

type ReadCloserPair

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

func (*ReadCloserPair) Close

func (r *ReadCloserPair) Close() error

func (*ReadCloserPair) Read

func (r *ReadCloserPair) Read(p []byte) (int, error)

type RectangleChunkMask

type RectangleChunkMask struct {
	X0, Z0, X1, Z1 int
}

func (*RectangleChunkMask) IsMasked

func (m *RectangleChunkMask) IsMasked(x, z int) bool

type World

type World interface {
	ChunkOpener
	ChunkPooler
}

func OpenWorld

func OpenWorld(worldDir string) World

Jump to

Keyboard shortcuts

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