Documentation ¶
Index ¶
- type DummyBlock
- func (d *DummyBlock) BaseHash() uint64
- func (d *DummyBlock) Color() color.RGBA
- func (d *DummyBlock) DecodeNBT(data map[string]any) any
- func (d *DummyBlock) EncodeBlock() (string, map[string]any)
- func (d *DummyBlock) EncodeNBT() map[string]any
- func (d *DummyBlock) Hash() uint64
- func (d *DummyBlock) Model() world.BlockModel
- type EntityRuntimeID
- type EntityState
- type EntityUniqueID
- type Map
- type World
- func (w *World) AddEntityLink(el protocol.EntityLink)
- func (w *World) AddPlayer(pk *packet.AddPlayer)
- func (w *World) Dimension() world.Dimension
- func (w *World) EntityCount() int
- func (w *World) Finish(playerData map[string]any, excludedMobs []string, withPlayers bool, ...) error
- func (w *World) GetEntity(id EntityRuntimeID) *EntityState
- func (w *World) IsPaused() bool
- func (w *World) LoadChunk(pos world.ChunkPos) (*chunk.Chunk, bool, error)
- func (w *World) Open(name string, folder string, deferred bool)
- func (w *World) PauseCapture()
- func (w *World) ProcessAddActor(pk *packet.AddActor, ignoreCB func(*EntityState) bool, ...)
- func (w *World) Range() cube.Range
- func (w *World) Rename(name, folder string) error
- func (w *World) SetBlockNBT(pos cube.Pos, nbt map[string]any, merge bool)
- func (w *World) SetDimension(dim world.Dimension)
- func (w *World) SetTime(real time.Time, ingame int)
- func (w *World) StoreChunk(pos world.ChunkPos, ch *chunk.Chunk, blockNBT map[cube.Pos]DummyBlock) (err error)
- func (w *World) StoreEntity(id EntityRuntimeID, es *EntityState)
- func (w *World) StoreMap(m *packet.ClientBoundMapItemData)
- func (w *World) UnpauseCapture(around cube.Pos, radius int32, cf func(world.ChunkPos, *chunk.Chunk))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DummyBlock ¶
func (*DummyBlock) BaseHash ¶ added in v1.33.1
func (d *DummyBlock) BaseHash() uint64
func (*DummyBlock) Color ¶
func (d *DummyBlock) Color() color.RGBA
func (*DummyBlock) EncodeBlock ¶
func (d *DummyBlock) EncodeBlock() (string, map[string]any)
func (*DummyBlock) EncodeNBT ¶
func (d *DummyBlock) EncodeNBT() map[string]any
func (*DummyBlock) Hash ¶
func (d *DummyBlock) Hash() uint64
func (*DummyBlock) Model ¶
func (d *DummyBlock) Model() world.BlockModel
type EntityRuntimeID ¶
type EntityRuntimeID = uint64
type EntityState ¶
type EntityState struct { RuntimeID EntityRuntimeID UniqueID EntityUniqueID EntityType string Position mgl32.Vec3 Pitch, Yaw, HeadYaw float32 Velocity mgl32.Vec3 HasMoved bool Metadata protocol.EntityMetadata Inventory map[byte]map[byte]protocol.ItemInstance Helmet *protocol.ItemInstance Chestplate *protocol.ItemInstance Leggings *protocol.ItemInstance Boots *protocol.ItemInstance }
func (*EntityState) ToServerEntity ¶
func (s *EntityState) ToServerEntity(links []int64) serverEntity
type EntityUniqueID ¶
type EntityUniqueID = int64
type Map ¶ added in v1.37.0
type Map struct { Decorations []any `nbt:"decorations"` Dimension uint8 `nbt:"dimension"` Height int16 `nbt:"height"` Width int16 `nbt:"width"` MapID int64 `nbt:"mapId"` Scale uint8 `nbt:"scale"` UnlimitedTracking bool `nbt:"unlimitedTracking"` ZCenter int32 `nbt:"zCenter"` XCenter int32 `nbt:"xCenter"` FullyExplored bool `nbt:"fullyExplored"` ParentMapId int64 `nbt:"parentMapId"` Colors [0xffff + 1]byte `nbt:"colors"` MapLocked bool `nbt:"mapLocked"` }
type World ¶
type World struct { // called when a chunk is added ChunkFunc func(world.ChunkPos, *chunk.Chunk) StoredChunks map[world.ChunkPos]bool VoidGen bool Name string Folder string // contains filtered or unexported fields }
func (*World) AddEntityLink ¶
func (w *World) AddEntityLink(el protocol.EntityLink)
func (*World) EntityCount ¶ added in v1.33.0
func (*World) GetEntity ¶
func (w *World) GetEntity(id EntityRuntimeID) *EntityState
func (*World) PauseCapture ¶
func (w *World) PauseCapture()
func (*World) ProcessAddActor ¶
func (w *World) ProcessAddActor(pk *packet.AddActor, ignoreCB func(*EntityState) bool, bpCB func(behaviourpack.EntityIn))
func (*World) SetBlockNBT ¶
func (*World) SetDimension ¶
func (*World) StoreChunk ¶
func (*World) StoreEntity ¶
func (w *World) StoreEntity(id EntityRuntimeID, es *EntityState)
func (*World) StoreMap ¶ added in v1.37.0
func (w *World) StoreMap(m *packet.ClientBoundMapItemData)
Click to show internal directories.
Click to hide internal directories.