Versions in this module Expand all Collapse all v1 v1.0.1 Jul 30, 2026 Changes in this version + const TimeFull + const TimeSleep + const TimeSleepWithRain + const TimeWake + const TimeWakeWithRain + var DefaultBlockRegistry = &BasicBlockRegistry + var DifficultyEasy difficultyEasy + var DifficultyHard difficultyHard + var DifficultyNormal difficultyNormal + var DifficultyPeaceful difficultyPeaceful + var End end + var ErrEntityClosed = errors.New("world: entity closed") + var ErrEntityNotInWorld = errors.New("world: entity not in this world") + var ErrEntityType = errors.New("world: unexpected entity type") + var ErrTaskCancelled = errors.New("world: scheduled task cancelled") + var ErrTaskPanicked = errors.New("world: scheduled task panicked") + var ErrWorldClosed = errors.New("world: world closed") + var GameModeAdventure adventure + var GameModeCreative creative + var GameModeSpectator spectator + var GameModeSurvival survival + var Nether nether + var Overworld overworld + func BiomeDefinitions() ([]protocol.BiomeDefinition, []string) + func BlockHash(b Block) uint64 + func BlockRuntimeID(b Block) uint32 + func CallEntity[T any](ctx context.Context, h *EntityHandle, f func(tx *Tx, e Entity) (T, error)) (T, error) + func CallRef[T any, E Entity](ctx context.Context, ref EntityRef[E], f func(tx *Tx, e E) (T, error)) (T, error) + func Call[T any](ctx context.Context, w *World, f func(tx *Tx) (T, error)) (T, error) + func ClampRedstonePower(power int) int + func CustomBlocks() map[string]CustomBlock + func DifficultyID(diff Difficulty) (int, bool) + func DimensionID(dim Dimension) (int, bool) + func GameModeID(mode GameMode) (int, bool) + func ItemRuntimeID(i Item) (rid int32, meta int16, ok bool) + func RedstoneFullPowerConductor(pos cube.Pos, b Block, tx *Tx) bool + func RegisterBiome(b Biome) + func RegisterBlock(b Block) + func RegisterItem(item Item) + func RegisterSpawnEggHandler(name string, handler SpawnEggHandler) + type ArrowSpawnConfig struct + Critical bool + Damage float64 + DisablePickup bool + ObtainArrowOnPickup bool + Owner Entity + PiercingLevel int + PunchLevel int + Tip any + type BasicBlockRegistry struct + func (br *BasicBlockRegistry) Air() Block + func (br *BasicBlockRegistry) AirRuntimeID() uint32 + func (br *BasicBlockRegistry) BitSize() int + func (br *BasicBlockRegistry) BlockByName(name string, properties map[string]any) (Block, bool) + func (br *BasicBlockRegistry) BlockByRuntimeID(rid uint32) (Block, bool) + func (br *BasicBlockRegistry) BlockByRuntimeIDOrAir(rid uint32) Block + func (br *BasicBlockRegistry) BlockCount() int + func (br *BasicBlockRegistry) BlockHash(b Block) uint64 + func (br *BasicBlockRegistry) BlockRuntimeID(b Block) uint32 + func (br *BasicBlockRegistry) Blocks() []Block + func (br *BasicBlockRegistry) Clone() *BasicBlockRegistry + func (br *BasicBlockRegistry) CustomBlocks() map[string]CustomBlock + func (br *BasicBlockRegistry) FilteringBlock(rid uint32) uint8 + func (br *BasicBlockRegistry) Finalize() + func (br *BasicBlockRegistry) HashToRuntimeID(hash uint32) (rid uint32, ok bool) + func (br *BasicBlockRegistry) LightBlock(rid uint32) uint8 + func (br *BasicBlockRegistry) LiquidBlock(rid uint32) bool + func (br *BasicBlockRegistry) LiquidDisplacingBlock(rid uint32) bool + func (br *BasicBlockRegistry) NBTBlock(rid uint32) bool + func (br *BasicBlockRegistry) RandomTickBlock(rid uint32) bool + func (br *BasicBlockRegistry) RegisterBlock(b Block) + func (br *BasicBlockRegistry) RegisterBlockState(s BlockState) + func (br *BasicBlockRegistry) RuntimeIDToHash(runtimeID uint32) (hash uint32, ok bool) + func (br *BasicBlockRegistry) RuntimeIDToState(runtimeID uint32) (name string, properties map[string]any, found bool) + func (br *BasicBlockRegistry) StateToRuntimeID(name string, properties map[string]any) (runtimeID uint32, found bool) + type Biome interface + Depth func() float64 + EncodeBiome func() int + Rainfall func() float64 + Scale func() float64 + String func() string + Tags func() []string + Temperature func() float64 + WaterColour func() color.RGBA + func BiomeByID(id int) (Biome, bool) + func BiomeByName(name string) (Biome, bool) + func Biomes() []Biome + type Block interface + EncodeBlock func() (string, map[string]any) + Hash func() (uint64, uint64) + Model func() BlockModel + func BlockByName(name string, properties map[string]any) (Block, bool) + func BlockByRuntimeID(rid uint32) (Block, bool) + func Blocks() []Block + type BlockAction interface + BlockAction func() + type BlockModel interface + BBox func(pos cube.Pos, s BlockSource) []cube.BBox + FaceSolid func(pos cube.Pos, face cube.Face, s BlockSource) bool + type BlockRegistry interface + Air func() Block + BitSize func() int + BlockByName func(name string, properties map[string]any) (Block, bool) + BlockByRuntimeID func(rid uint32) (Block, bool) + BlockByRuntimeIDOrAir func(rid uint32) Block + BlockHash func(b Block) uint64 + BlockRuntimeID func(block Block) (rid uint32) + Blocks func() []Block + CustomBlocks func() map[string]CustomBlock + Finalize func() + RegisterBlock func(block Block) + RegisterBlockState func(blockState BlockState) + RuntimeIDToHash func(runtimeID uint32) (hash uint32, ok bool) + func NewBlockRegistry() BlockRegistry + type BlockSource interface + Block func(cube.Pos) Block + type BlockState struct + Name string + Properties map[string]any + Version int32 + type ChunkPos [2]int32 + func (p ChunkPos) String() string + func (p ChunkPos) X() int32 + func (p ChunkPos) Z() int32 + type Column struct + BlockEntities map[cube.Pos]Block + Entities []*EntityHandle + type Config struct + Blocks BlockRegistry + ChunkLoadWorkers int + ChunkUnloadInterval time.Duration + Dim Dimension + Entities EntityRegistry + Generator Generator + Log *slog.Logger + PortalDestination func(dim Dimension) *World + Provider Provider + RandSource rand.Source + RandomTickSpeed int + ReadOnly bool + SaveInterval time.Duration + Synchronous bool + func (conf Config) New() *World + type Context struct + func (ctx *Context) Cancel() + func (ctx *Context) Cancelled() bool + type CustomBlock interface + Properties func() customblock.Properties + type CustomBlockBuildable interface + Geometry func() []byte + Name func() string + Textures func() map[string]image.Image + type CustomItem interface + Category func() category.Category + Name func() string + Texture func() image.Image + func CustomItems() []CustomItem + type DamageSource interface + Fire func() bool + IgnoreTotem func() bool + ReducedByArmour func() bool + ReducedByResistance func() bool + type Difficulty interface + FireSpreadIncrease func() int + FoodRegenerates func() bool + StarvationHealthLimit func() float64 + func DifficultyByID(id int) (Difficulty, bool) + type Dimension interface + LavaSpreadDuration func() time.Duration + Range func() cube.Range + TimeCycle func() bool + WaterEvaporates func() bool + WeatherCycle func() bool + func DimensionByID(id int) (Dimension, bool) + type Entity interface + H func() *EntityHandle + Position func() mgl64.Vec3 + Rotation func() cube.Rotation + type EntityAction interface + EntityAction func() + type EntityAnimation struct + func NewEntityAnimation(name string) EntityAnimation + func (a EntityAnimation) Controller() string + func (a EntityAnimation) Name() string + func (a EntityAnimation) NextState() string + func (a EntityAnimation) StopCondition() string + func (a EntityAnimation) WithController(controller string) EntityAnimation + func (a EntityAnimation) WithNextState(state string) EntityAnimation + func (a EntityAnimation) WithStopCondition(condition string) EntityAnimation + type EntityConfig interface + Apply func(data *EntityData) + type EntityData struct + Age time.Duration + AlwaysShowNameTag bool + Data any + FireDuration time.Duration + Name string + Pos mgl64.Vec3 + Rot cube.Rotation + Vel mgl64.Vec3 + type EntityHandle struct + func NewEntity(t EntityType, conf EntityConfig) *EntityHandle + func (e *EntityHandle) Close() error + func (e *EntityHandle) Closed() bool + func (e *EntityHandle) Do(f func(tx *Tx, e Entity)) *Task + func (e *EntityHandle) DoAfter(delay time.Duration, f func(tx *Tx, e Entity)) *Task + func (e *EntityHandle) Entity(tx *Tx) (Entity, bool) + func (e *EntityHandle) Type() EntityType + func (e *EntityHandle) UUID() uuid.UUID + type EntityRef struct + func NewEntityRef[T Entity](h *EntityHandle) EntityRef[T] + func (r EntityRef[T]) Do(f func(tx *Tx, e T)) *Task + func (r EntityRef[T]) DoAfter(delay time.Duration, f func(tx *Tx, e T)) *Task + func (r EntityRef[T]) Handle() *EntityHandle + type EntityRegistry struct + func (reg EntityRegistry) Config() EntityRegistryConfig + func (reg EntityRegistry) Lookup(name string) (EntityType, bool) + func (reg EntityRegistry) Types() []EntityType + type EntityRegistryConfig struct + Arrow func(opts EntitySpawnOpts, conf ArrowSpawnConfig) *EntityHandle + BottleOfEnchanting func(opts EntitySpawnOpts, owner Entity) *EntityHandle + Egg func(opts EntitySpawnOpts, owner Entity) *EntityHandle + EnderPearl func(opts EntitySpawnOpts, owner Entity) *EntityHandle + FallingBlock func(opts EntitySpawnOpts, bl Block) *EntityHandle + Firework func(opts EntitySpawnOpts, firework Item, owner Entity, ...) *EntityHandle + Item func(opts EntitySpawnOpts, it any) *EntityHandle + Lightning func(opts EntitySpawnOpts) *EntityHandle + LingeringPotion func(opts EntitySpawnOpts, t any, owner Entity) *EntityHandle + Snowball func(opts EntitySpawnOpts, owner Entity) *EntityHandle + SplashPotion func(opts EntitySpawnOpts, t any, owner Entity) *EntityHandle + TNT func(opts EntitySpawnOpts, fuse time.Duration) *EntityHandle + func (conf EntityRegistryConfig) New(ent []EntityType) EntityRegistry + type EntitySpawnOpts struct + ID uuid.UUID + NameTag string + Position mgl64.Vec3 + Rotation cube.Rotation + Velocity mgl64.Vec3 + func (opts EntitySpawnOpts) New(t EntityType, conf EntityConfig) *EntityHandle + type EntityType interface + BBox func(e Entity) cube.BBox + DecodeNBT func(m map[string]any, data *EntityData) + EncodeEntity func() string + EncodeNBT func(data *EntityData) map[string]any + Open func(tx *Tx, handle *EntityHandle, data *EntityData) Entity + type GameMode interface + AllowsEditing func() bool + AllowsFlying func() bool + AllowsInteraction func() bool + AllowsTakingDamage func() bool + CreativeInventory func() bool + HasCollision func() bool + InstantPortalTravel func() bool + Visible func() bool + func GameModeByID(id int) (GameMode, bool) + type Generator interface + DefaultSpawn func(dim Dimension) cube.Pos + GenerateChunk func(pos ChunkPos, chunk *chunk.Chunk) + type Handler interface + HandleBlockBurn func(ctx *Context, pos cube.Pos) + HandleClose func(tx *Tx) + HandleCropTrample func(ctx *Context, pos cube.Pos) + HandleEntityDespawn func(tx *Tx, e Entity) + HandleEntitySpawn func(tx *Tx, e Entity) + HandleExplosion func(ctx *Context, position mgl64.Vec3, entities *[]Entity, blocks *[]cube.Pos, ...) + HandleFireSpread func(ctx *Context, from, to cube.Pos) + HandleLeavesDecay func(ctx *Context, pos cube.Pos) + HandleLiquidDecay func(ctx *Context, pos cube.Pos, before, after Liquid) + HandleLiquidFlow func(ctx *Context, from, into cube.Pos, liquid Liquid, replaced Block) + HandleLiquidHarden func(ctx *Context, hardenedPos cube.Pos, ...) + HandleRedstoneUpdate func(ctx *Context, update RedstoneUpdate) + HandleSound func(ctx *Context, s Sound, pos mgl64.Vec3) + type HealingSource interface + HealingSource func() + type Item interface + EncodeItem func() (name string, meta int16) + func ItemByName(name string, meta int16) (Item, bool) + func ItemByRuntimeID(rid int32, meta int16) (Item, bool) + func Items() []Item + type Liquid interface + BlastResistance func() float64 + Harden func(pos cube.Pos, tx *Tx, flownIntoBy *cube.Pos) bool + LiquidDepth func() int + LiquidFalling func() bool + LiquidRemoveBlock func(pos cube.Pos, tx *Tx, removed Block) + LiquidType func() string + SpreadDecay func() int + WithDepth func(depth int, falling bool) Liquid + type LiquidDisplacer interface + CanDisplace func(b Liquid) bool + SideClosed func(pos, side cube.Pos, tx *Tx) bool + type Loader struct + func NewLoader(chunkRadius int, world *World, v Viewer) *Loader + func (l *Loader) ChangeRadius(tx *Tx, new int) + func (l *Loader) ChangeWorld(tx *Tx, new *World) + func (l *Loader) Chunk(pos ChunkPos) (*Column, bool) + func (l *Loader) Close(tx *Tx) + func (l *Loader) Load(tx *Tx, n int) + func (l *Loader) Move(tx *Tx, pos mgl64.Vec3) + func (l *Loader) World() *World + type NBTer interface + DecodeNBT func(data map[string]any) any + EncodeNBT func() map[string]any + type NeighbourUpdateTicker interface + NeighbourUpdateTick func(pos, changedNeighbour cube.Pos, tx *Tx) + type NopGenerator struct + func (NopGenerator) DefaultSpawn(Dimension) cube.Pos + func (NopGenerator) GenerateChunk(ChunkPos, *chunk.Chunk) + type NopHandler struct + func (NopHandler) HandleBlockBurn(*Context, cube.Pos) + func (NopHandler) HandleClose(*Tx) + func (NopHandler) HandleCropTrample(*Context, cube.Pos) + func (NopHandler) HandleEntityDespawn(*Tx, Entity) + func (NopHandler) HandleEntitySpawn(*Tx, Entity) + func (NopHandler) HandleExplosion(*Context, mgl64.Vec3, *[]Entity, *[]cube.Pos, *float64, *bool) + func (NopHandler) HandleFireSpread(*Context, cube.Pos, cube.Pos) + func (NopHandler) HandleLeavesDecay(*Context, cube.Pos) + func (NopHandler) HandleLiquidDecay(*Context, cube.Pos, Liquid, Liquid) + func (NopHandler) HandleLiquidFlow(*Context, cube.Pos, cube.Pos, Liquid, Block) + func (NopHandler) HandleLiquidHarden(*Context, cube.Pos, Block, Block, Block) + func (NopHandler) HandleRedstoneUpdate(*Context, RedstoneUpdate) + func (NopHandler) HandleSound(*Context, Sound, mgl64.Vec3) + type NopProvider struct + Set *Settings + func (NopProvider) Close() error + func (NopProvider) LoadColumn(ChunkPos, Dimension) (*chunk.Column, error) + func (NopProvider) LoadPlayerSpawnPosition(uuid.UUID) (cube.Pos, bool, error) + func (NopProvider) SavePlayerSpawnPosition(uuid.UUID, cube.Pos) error + func (NopProvider) SaveSettings(*Settings) + func (NopProvider) StoreColumn(ChunkPos, Dimension, *chunk.Column) error + func (n NopProvider) Settings() *Settings + type NopViewer struct + func (NopViewer) HideEntity(Entity) + func (NopViewer) ViewBlockAction(cube.Pos, BlockAction) + func (NopViewer) ViewBlockUpdate(cube.Pos, Block, int) + func (NopViewer) ViewBrewingUpdate(time.Duration, time.Duration, int32, int32, int32, int32) + func (NopViewer) ViewChunk(ChunkPos, Dimension, map[cube.Pos]Block, *chunk.Chunk) + func (NopViewer) ViewEmote(Entity, uuid.UUID) + func (NopViewer) ViewEntity(Entity) + func (NopViewer) ViewEntityAction(Entity, EntityAction) + func (NopViewer) ViewEntityAnimation(Entity, EntityAnimation) + func (NopViewer) ViewEntityArmour(Entity) + func (NopViewer) ViewEntityDisplacement(Entity, mgl64.Vec3, cube.Rotation, bool) + func (NopViewer) ViewEntityGameMode(Entity) + func (NopViewer) ViewEntityItems(Entity) + func (NopViewer) ViewEntityMovement(Entity, mgl64.Vec3, cube.Rotation, bool) + func (NopViewer) ViewEntityState(Entity) + func (NopViewer) ViewEntityTeleport(Entity, mgl64.Vec3) + func (NopViewer) ViewEntityVelocity(Entity, mgl64.Vec3) + func (NopViewer) ViewEntityWake(Entity) + func (NopViewer) ViewFurnaceUpdate(time.Duration, time.Duration, time.Duration, time.Duration, time.Duration, ...) + func (NopViewer) ViewParticle(mgl64.Vec3, Particle) + func (NopViewer) ViewSkin(Entity) + func (NopViewer) ViewSound(mgl64.Vec3, Sound) + func (NopViewer) ViewTime(int) + func (NopViewer) ViewTimeCycle(bool) + func (NopViewer) ViewWeather(bool, bool) + func (NopViewer) ViewWorldSpawn(cube.Pos) + type PanicError struct + Stack []byte + Value any + func (e *PanicError) Error() string + func (e *PanicError) Unwrap() error + type Particle interface + Spawn func(w *World, pos mgl64.Vec3) + type Provider interface + LoadColumn func(pos ChunkPos, dim Dimension) (*chunk.Column, error) + LoadPlayerSpawnPosition func(uuid uuid.UUID) (pos cube.Pos, exists bool, err error) + SavePlayerSpawnPosition func(uuid uuid.UUID, pos cube.Pos) error + SaveSettings func(*Settings) + Settings func() *Settings + StoreColumn func(pos ChunkPos, dim Dimension, col *chunk.Column) error + type RandomTicker interface + RandomTick func(pos cube.Pos, tx *Tx, r *rand.Rand) + type RedstoneNonConductive interface + RedstoneNonConductive func() + type RedstonePowerAction interface + RedstonePowerAction func(pos cube.Pos, tx *Tx, oldPower, newPower int) + type RedstonePowerConsumer interface + RedstonePowerUpdate func(pos cube.Pos, tx *Tx, power int) (after Block, changed bool) + type RedstonePowerContextAction interface + RedstonePowerActionUpdate func(pos cube.Pos, tx *Tx, update RedstoneUpdate) + type RedstonePowerPostUpdater interface + RedstonePowerPostUpdate func(pos cube.Pos, tx *Tx, before, after Block, oldPower, newPower int) + type RedstonePowerRelayer interface + RedstoneSignalLoss func(pos cube.Pos, tx *Tx) int + type RedstonePowerRelayerNeighbourer interface + RedstoneRelayerNeighbours func(pos cube.Pos, tx *Tx) []cube.Pos + type RedstonePowerSource interface + RedstonePower func(pos cube.Pos, tx *Tx, face cube.Face) int + type RedstoneStrongPowerSource interface + RedstoneStrongPower func(pos cube.Pos, tx *Tx, face cube.Face) int + type RedstoneTorchTransaction struct + func (t RedstoneTorchTransaction) BurnoutStatus() (burnedOut, recoverable bool) + func (t RedstoneTorchTransaction) ClearBurnout() + func (t RedstoneTorchTransaction) ConsumeSelfTriggered() bool + func (t RedstoneTorchTransaction) MarkSelfTriggered() + func (t RedstoneTorchTransaction) RecordTurnOff() (burnsOut bool) + type RedstoneTransaction struct + func (r RedstoneTransaction) ScheduleUpdate(pos cube.Pos) + func (r RedstoneTransaction) Torch(pos cube.Pos) RedstoneTorchTransaction + type RedstoneUpdate struct + After Block + Before Block + Cause RedstoneUpdateCause + ChangedNeighbour cube.Pos + ChangedRedstoneRelevant bool + CurrentTick int64 + HasChangedNeighbour bool + HasSource bool + NewPower int + OldPower int + Pos cube.Pos + Source cube.Pos + type RedstoneUpdateCause uint8 + const RedstoneUpdateCauseBlockUpdate + const RedstoneUpdateCauseCompilerRebuild + const RedstoneUpdateCauseScheduledTick + type RedstoneWeakBlockPowerer interface + RedstoneWeaklyPowersBlocks func() bool + type ScheduledTicker interface + ScheduledTick func(pos cube.Pos, tx *Tx, r *rand.Rand) + type SetOpts struct + DisableBlockUpdates bool + DisableLiquidDisplacement bool + DisableRedstoneUpdates bool + type Settings struct + CurrentTick int64 + DefaultGameMode GameMode + Difficulty Difficulty + Name string + RainTime int64 + Raining bool + RequiredSleepTicks int64 + Spawn cube.Pos + ThunderTime int64 + Thundering bool + TickRange int32 + Time int64 + TimeCycle bool + WeatherCycle bool + type Sleeper interface + Messaget func(t chat.Translation, a ...any) + Name func() string + SendSleepingIndicator func(sleeping, max int) + Sleep func(pos cube.Pos) + Sleeping func() (cube.Pos, bool) + UUID func() uuid.UUID + Wake func() + type Sound interface + Play func(w *World, pos mgl64.Vec3) + type SpawnEggHandler func(tx *Tx, pos cube.Pos) bool + func SpawnEggHandlerByName(name string) (SpawnEggHandler, bool) + type Structure interface + At func(x, y, z int, blockAt func(x, y, z int) Block) (Block, Liquid) + Dimensions func() [3]int + type SubChunkPos [3]int32 + func (p SubChunkPos) String() string + func (p SubChunkPos) X() int32 + func (p SubChunkPos) Y() int32 + func (p SubChunkPos) Z() int32 + type Task struct + func NewFinishedTask(err error) *Task + func (t *Task) Cancel() bool + func (t *Task) Done() <-chan struct{} + func (t *Task) Err() error + func (t *Task) OnDone(f func(err error)) + func (t *Task) Wait(ctx context.Context) error + type TickerBlock interface + Tick func(currentTick int64, pos cube.Pos, tx *Tx) + type TickerEntity interface + Tick func(tx *Tx, current int64) + type Tx struct + func (tx *Tx) AddEntity(e *EntityHandle) Entity + func (tx *Tx) AddEntityAt(e *EntityHandle, pos mgl64.Vec3) Entity + func (tx *Tx) AddParticle(pos mgl64.Vec3, p Particle) + func (tx *Tx) Biome(pos cube.Pos) Biome + func (tx *Tx) Block(pos cube.Pos) Block + func (tx *Tx) BlockLoaded(pos cube.Pos) (Block, bool) + func (tx *Tx) BlocksWithin(pos cube.Pos, radius int, blocks ...Block) iter.Seq[cube.Pos] + func (tx *Tx) BroadcastSleepingIndicator() + func (tx *Tx) BroadcastSleepingReminder(sleeper Sleeper) + func (tx *Tx) BuildStructure(pos cube.Pos, s Structure) + func (tx *Tx) CurrentTick() int64 + func (tx *Tx) Defer(f func(tx *Tx)) *Task + func (tx *Tx) DeferErr(f func(tx *Tx) error) *Task + func (tx *Tx) Entities() iter.Seq[Entity] + func (tx *Tx) EntitiesWithin(box cube.BBox) iter.Seq[Entity] + func (tx *Tx) Event() *Context + func (tx *Tx) HighestBlock(x, z int) int + func (tx *Tx) HighestLightBlocker(x, z int) int + func (tx *Tx) Light(pos cube.Pos) uint8 + func (tx *Tx) Liquid(pos cube.Pos) (Liquid, bool) + func (tx *Tx) PlayEntityAnimation(e Entity, a EntityAnimation) + func (tx *Tx) PlaySound(pos mgl64.Vec3, s Sound) + func (tx *Tx) Players() iter.Seq[Entity] + func (tx *Tx) Raining() bool + func (tx *Tx) RainingAt(pos cube.Pos) bool + func (tx *Tx) Range() cube.Range + func (tx *Tx) Redstone() RedstoneTransaction + func (tx *Tx) RedstoneConductivePower(pos cube.Pos) int + func (tx *Tx) RedstoneDirectPower(pos cube.Pos) int + func (tx *Tx) RedstoneDirectPowerFrom(pos cube.Pos, face cube.Face) int + func (tx *Tx) RedstonePower(pos cube.Pos) int + func (tx *Tx) RedstonePowerFrom(pos cube.Pos, face cube.Face) int + func (tx *Tx) RedstoneStrongPower(pos cube.Pos) int + func (tx *Tx) RedstoneStrongPowerFrom(pos cube.Pos, face cube.Face) int + func (tx *Tx) RemoveEntity(e Entity) *EntityHandle + func (tx *Tx) ScheduleBlockUpdate(pos cube.Pos, b Block, delay time.Duration) + func (tx *Tx) SetBiome(pos cube.Pos, b Biome) + func (tx *Tx) SetBlock(pos cube.Pos, b Block, opts *SetOpts) + func (tx *Tx) SetBlockEntity(pos cube.Pos, b Block) + func (tx *Tx) SetLiquid(pos cube.Pos, b Liquid) + func (tx *Tx) SkyLight(pos cube.Pos) uint8 + func (tx *Tx) Sleepers() iter.Seq[Sleeper] + func (tx *Tx) SnowingAt(pos cube.Pos) bool + func (tx *Tx) Temperature(pos cube.Pos) float64 + func (tx *Tx) Thundering() bool + func (tx *Tx) ThunderingAt(pos cube.Pos) bool + func (tx *Tx) Viewers(pos mgl64.Vec3) []Viewer + func (tx *Tx) World() *World + type ViewLayer struct + func NewViewLayer(updater ViewLayerUpdater) *ViewLayer + func (v *ViewLayer) AlwaysShowNameTag(entity Entity) (bool, bool) + func (v *ViewLayer) Close() error + func (v *ViewLayer) Entities() []*EntityHandle + func (v *ViewLayer) NameTag(entity Entity) (string, bool) + func (v *ViewLayer) Remove(entity Entity) + func (v *ViewLayer) ScoreTag(entity Entity) (string, bool) + func (v *ViewLayer) ViewAlwaysShowNameTag(entity Entity, alwaysShow bool) + func (v *ViewLayer) ViewNameTag(entity Entity, nameTag string) + func (v *ViewLayer) ViewPublicAlwaysShowNameTag(entity Entity) + func (v *ViewLayer) ViewPublicNameTag(entity Entity) + func (v *ViewLayer) ViewPublicScoreTag(entity Entity) + func (v *ViewLayer) ViewScoreTag(entity Entity, scoreTag string) + func (v *ViewLayer) ViewVisibility(entity Entity, level VisibilityLevel) + func (v *ViewLayer) Visibility(entity Entity) VisibilityLevel + type ViewLayerUpdater interface + ViewLayerEntityChanged func(entity Entity) + type Viewer interface + HideEntity func(e Entity) + ViewBlockAction func(pos cube.Pos, a BlockAction) + ViewBlockUpdate func(pos cube.Pos, b Block, layer int) + ViewBrewingUpdate func(prevBrewTime, brewTime time.Duration, ...) + ViewChunk func(pos ChunkPos, dim Dimension, blockEntities map[cube.Pos]Block, c *chunk.Chunk) + ViewEmote func(e Entity, emote uuid.UUID) + ViewEntity func(e Entity) + ViewEntityAction func(e Entity, a EntityAction) + ViewEntityAnimation func(e Entity, a EntityAnimation) + ViewEntityArmour func(e Entity) + ViewEntityDisplacement func(e Entity, pos mgl64.Vec3, rot cube.Rotation, onGround bool) + ViewEntityGameMode func(e Entity) + ViewEntityItems func(e Entity) + ViewEntityMovement func(e Entity, pos mgl64.Vec3, rot cube.Rotation, onGround bool) + ViewEntityState func(e Entity) + ViewEntityTeleport func(e Entity, pos mgl64.Vec3) + ViewEntityVelocity func(e Entity, vel mgl64.Vec3) + ViewEntityWake func(e Entity) + ViewFurnaceUpdate func(...) + ViewParticle func(pos mgl64.Vec3, p Particle) + ViewSkin func(e Entity) + ViewSound func(pos mgl64.Vec3, s Sound) + ViewTime func(t int) + ViewTimeCycle func(doDayLightCycle bool) + ViewWeather func(raining, thunder bool) + ViewWorldSpawn func(pos cube.Pos) + type VisibilityLevel struct + func EnforceInvisible() VisibilityLevel + func EnforceVisible() VisibilityLevel + func PublicVisibility() VisibilityLevel + func (v VisibilityLevel) EnforceVisibility() bool + type World struct + func New() *World + func (w *World) AdvanceTick() + func (w *World) BlockRegistry() BlockRegistry + func (w *World) Close() error + func (w *World) DefaultGameMode() GameMode + func (w *World) Difficulty() Difficulty + func (w *World) Dimension() Dimension + func (w *World) Do(f func(tx *Tx)) *Task + func (w *World) DoAfter(delay time.Duration, f func(tx *Tx)) *Task + func (w *World) EntityRegistry() EntityRegistry + func (w *World) Handle(h Handler) + func (w *World) Handler() Handler + func (w *World) HighestLightBlocker(x, z int) int + func (w *World) Name() string + func (w *World) PlayerSpawn(id uuid.UUID) cube.Pos + func (w *World) PortalDestination(dim Dimension) *World + func (w *World) Raining() bool + func (w *World) Range() cube.Range + func (w *World) Save() + func (w *World) SetDefaultGameMode(mode GameMode) + func (w *World) SetDifficulty(d Difficulty) + func (w *World) SetPlayerSpawn(id uuid.UUID, pos cube.Pos) + func (w *World) SetRequiredSleepDuration(duration time.Duration) + func (w *World) SetSpawn(pos cube.Pos) + func (w *World) SetTickRange(v int) + func (w *World) SetTime(new int) + func (w *World) Spawn() cube.Pos + func (w *World) StartTime() + func (w *World) StopTime() + func (w *World) Thundering() bool + func (w *World) Time() int + func (w *World) TimeCycle() bool + func (w World) StartRaining(dur time.Duration) + func (w World) StartThundering(dur time.Duration) + func (w World) StartWeatherCycle() + func (w World) StopRaining() + func (w World) StopThundering() + func (w World) StopWeatherCycle()