worlds

package
v1.37.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: GPL-3.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

View Source
const ViewMapID = 0x424242

Variables

This section is empty.

Functions

func NewWorldsHandler

func NewWorldsHandler(uiHandler messages.Handler, settings WorldSettings) *proxy.Handler

Types

type MapUI

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

func NewMapUI

func NewMapUI(w *worldsHandler) *MapUI

func (*MapUI) ChangeZoom

func (m *MapUI) ChangeZoom()

ChangeZoom adds to the zoom value and goes around to 32 once it hits 128

func (*MapUI) GetBounds

func (m *MapUI) GetBounds() (Min, Max protocol.ChunkPos)

GetBounds returns the outer bounds of what chunks are in this map

func (*MapUI) Reset

func (m *MapUI) Reset()

Reset resets the map to inital state

func (*MapUI) SchedRedraw

func (m *MapUI) SchedRedraw()

SchedRedraw tells the map to redraw the next time its sent

func (*MapUI) SetChunk

func (m *MapUI) SetChunk(pos world.ChunkPos, ch *chunk.Chunk, isDeferredState bool)

func (*MapUI) Start

func (m *MapUI) Start(ctx context.Context)

func (*MapUI) Stop

func (m *MapUI) Stop()

func (*MapUI) ToImage

func (m *MapUI) ToImage() *image.RGBA

type WorldSettings

type WorldSettings struct {
	VoidGen         bool
	WithPacks       bool
	SaveImage       bool
	SaveEntities    bool
	SaveInventories bool
	ExcludedMobs    []string
	StartPaused     bool
	PreloadReplay   string
	ChunkRadius     int32
	Script          string
	Players         bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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