viewer

package
v0.0.0-...-8203687 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BlockEntityTypes = map[string]int32{
	"furnace":           0,
	"chest":             1,
	"trapped_chest":     2,
	"ender_chest":       3,
	"jukebox":           4,
	"dispenser":         5,
	"dropper":           6,
	"sign":              7,
	"mob_spawner":       8,
	"piston":            9,
	"brewing_stand":     10,
	"enchanting_table":  11,
	"end_portal":        12,
	"beacon":            13,
	"skull":             14,
	"daylight_detector": 15,
	"hopper":            16,
	"comparator":        17,
	"banner":            18,
	"structure_block":   19,
	"end_gateway":       20,
	"command_block":     21,
	"shulker_box":       22,
	"bed":               23,
	"conduit":           24,
	"barrel":            25,
	"smoker":            26,
	"blast_furnace":     27,
	"lectern":           28,
	"bell":              29,
	"jigsaw":            30,
	"campfire":          31,
	"beehive":           32,
}

Functions

func ActualChunkFromSave

func ActualChunkFromSave(c *save.Chunk, totalWorldHight int) *level.Chunk

func NewChunkLoader

func NewChunkLoader(s []chunkStorage.Storage, viewDistance int) *chunkLoader

func SendInfoMessage

func SendInfoMessage(p *server.Client, msg chat.Message)

func SendPlayerAbilities

func SendPlayerAbilities(p *server.Client, invulnerable, flying, allowFlying, instabreak bool, flyingSpeed pk.Float, fovModifier pk.Float)

func SendPlayerPositionAndLook

func SendPlayerPositionAndLook(p *server.Client, x, y, z float32, yaw, pitch float32, flags int8, teleportid int32, dismount bool)

func SendSetGamemode

func SendSetGamemode(p *server.Client, gamemode int)

func SendSystemMessage

func SendSystemMessage(p *server.Client, msg chat.Message)

func SendUnloadChunk

func SendUnloadChunk(p *server.Client, x, z int32)

func SendUpdateViewPosition

func SendUpdateViewPosition(p *server.Client, x, z int32)

func SetChunkBlock

func SetChunkBlock(c *level.Chunk, lx, ly, lz int, bs block.StateID)

considers lowest section is y -64

func StartReconstructor

func StartReconstructor(storage []chunkStorage.Storage, conf *ReconstructorConfig)

Types

type BlockPosParser

type BlockPosParser struct{}

func (BlockPosParser) Parse

func (p BlockPosParser) Parse(cmd string) (left string, value command.ParsedData, err error)

func (BlockPosParser) WriteTo

func (p BlockPosParser) WriteTo(w io.Writer) (int64, error)

type BlockPositionData

type BlockPositionData struct {
	X, Y, Z  int64
	Relative [3]bool
}

type IntegerParser

type IntegerParser struct {
	Flags pk.Byte
	Min   pk.Int
	Max   pk.Int
}

func NewIntegerParser

func NewIntegerParser(min, max int32) IntegerParser

func (IntegerParser) Parse

func (p IntegerParser) Parse(cmd string) (left string, value command.ParsedData, err error)

func (IntegerParser) WriteTo

func (p IntegerParser) WriteTo(w io.Writer) (int64, error)

type ReconstructorConfig

type ReconstructorConfig struct {
	MOTD                chat.Message `json:"motd"`
	MaxPlayers          int          `json:"maxplayers"`
	IconPath            string       `json:"icon"`
	Listen              string       `json:"listen"`
	DefaultViewDistance int          `json:"default_view_distance"`
	CompressThreshold   int          `json:"compress_threshold"`
	OnlineMode          bool         `json:"online_mode"`
}

Jump to

Keyboard shortcuts

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