Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrReachRateLimit = errors.New("reach rate limit")
View Source
var NetworkCodec registry.NetworkCodec
Functions ¶
func NewEntityID ¶
func NewEntityID() int32
Types ¶
type ChunkProvider ¶
type ChunkProvider struct {
// contains filtered or unexported fields
}
ChunkProvider implements chunk storage
func NewProvider ¶
func NewProvider(dir string, limiter *rate.Limiter) ChunkProvider
type ChunkViewer ¶
type EntityViewer ¶
type EntityViewer interface { ViewAddPlayer(p *Player) ViewRemoveEntities(entityIDs []int32) ViewMoveEntityPos(id int32, delta maths.Vec3s, onGround bool) ViewMoveEntityPosAndRot(id int32, delta maths.Vec3s, rot maths.Vec2b, onGround bool) ViewMoveEntityRot(id int32, rot maths.Vec2b, onGround bool) ViewRotateHead(id int32, yaw int8) ViewTeleportEntity(id int32, pos maths.Vec3d, rot maths.Vec2b, onGround bool) }
type LoadedChunk ¶
func (*LoadedChunk) AddViewer ¶
func (lc *LoadedChunk) AddViewer(v ChunkViewer)
func (*LoadedChunk) RemoveViewer ¶
func (lc *LoadedChunk) RemoveViewer(v ChunkViewer) bool
type Player ¶
type PlayerProvider ¶
type PlayerProvider struct {
// contains filtered or unexported fields
}
func NewPlayerProvider ¶
func NewPlayerProvider(dir string) *PlayerProvider
type World ¶
type World struct { Name string // contains filtered or unexported fields }
func (*World) HashedSeed ¶
func (*World) RemovePlayer ¶
func (*World) SpawnPositionAndAngle ¶
Click to show internal directories.
Click to hide internal directories.