world

package
v0.0.0-...-771882a Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type World

type World struct {
	Name   string
	Uuid   uuid.UUID
	Chunks map[uint64]chunks.Chunk
}

func (*World) GetAllChunks

func (w *World) GetAllChunks() []chunks.Chunk

func (*World) GetChunk

func (w *World) GetChunk(chunkX int32, chunkZ int32) chunks.Chunk

func (*World) SetChunk

func (w *World) SetChunk(chunkX int32, chunkZ int32, chunk chunks.Chunk)

func (*World) UnloadChunk

func (w *World) UnloadChunk(chunkX int32, chunkZ int32)

type WorldManager

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

func NewWorldManager

func NewWorldManager(defaultWorld string) *WorldManager

func (*WorldManager) Compress

func (w *WorldManager) Compress(chunkX int32, chunkZ int32) uint64

func (*WorldManager) GetDefaultWorld

func (w *WorldManager) GetDefaultWorld() world.World

func (*WorldManager) GetWorld

func (w *WorldManager) GetWorld(name string) world.World

func (*WorldManager) LoadWorld

func (w *WorldManager) LoadWorld(filePath string)

func (*WorldManager) SetDefaultWorld

func (w *WorldManager) SetDefaultWorld(world world.World)

func (*WorldManager) UnloadWorld

func (w *WorldManager) UnloadWorld(name string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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