Versions in this module Expand all Collapse all v1 v1.0.1 Jul 30, 2026 v1.0.0 Jul 30, 2026 Changes in this version + var Nop = &Session + func BuildAvailableCommands(commands map[string]cmd.Command, src cmd.Source, softEnums map[string]struct{}) (*packet.AvailableCommands, map[string]map[int]cmd.Runnable) + type BlockActorDataHandler struct + func (b BlockActorDataHandler) Handle(p packet.Packet, s *Session, tx *world.Tx, c Controllable) error + type BlockPickRequestHandler struct + func (b BlockPickRequestHandler) Handle(p packet.Packet, _ *Session, _ *world.Tx, c Controllable) error + type BookEditHandler struct + func (b BookEditHandler) Handle(p packet.Packet, s *Session, _ *world.Tx, _ Controllable) error + type ClientCacheBlobStatusHandler struct + func (c *ClientCacheBlobStatusHandler) Handle(p packet.Packet, s *Session, _ *world.Tx, _ Controllable) error + type CommandRequestHandler struct + func (h *CommandRequestHandler) Handle(p packet.Packet, _ *Session, _ *world.Tx, c Controllable) error + type Config struct + BlockRegistry world.BlockRegistry + EmoteChatMuted bool + HandleStop func(*world.Tx, Controllable) + JoinMessage chat.Translation + Log *slog.Logger + MaxChunkRadius int + QuitMessage chat.Translation + func (conf Config) New(conn Conn) *Session + type Conn interface + ChunkRadius func() int + ClientCacheEnabled func() bool + ClientData func() login.ClientData + Flush func() error + IdentityData func() login.IdentityData + Latency func() time.Duration + ReadPacket func() (pk packet.Packet, err error) + RemoteAddr func() net.Addr + StartGameContext func(ctx context.Context, data minecraft.GameData) error + WritePacket func(pk packet.Packet) error + type ContainerCloseHandler struct + func (h *ContainerCloseHandler) Handle(p packet.Packet, s *Session, tx *world.Tx, c Controllable) error + type Controllable interface + AbortBreaking func() + Absorption func() float64 + AttackEntity func(e world.Entity) bool + BreakBlock func(pos cube.Pos) + Chat func(msg ...any) + ContinueBreaking func(face cube.Face) + Crawling func() bool + Dead func() bool + Drop func(s item.Stack) (n int) + EditSign func(pos cube.Pos, frontText, backText string) error + Effects func() []effect.Effect + EnchantmentSeed func() int64 + EnderChestInventory func() *inventory.Inventory + ExecuteCommand func(commandLine string) + Exhaust func(points float64) + ExperienceLevel func() int + ExperienceProgress func() float64 + FinishBreaking func() + FlightSpeed func() float64 + Flying func() bool + Food func() int + GameMode func() world.GameMode + Gliding func() bool + Health func() float64 + Jump func() + Locale func() language.Tag + MaxHealth func() float64 + Move func(deltaPos mgl64.Vec3, deltaYaw, deltaPitch float64) + MoveItemsToInventory func() + Name func() string + OpenSign func(pos cube.Pos, frontSide bool) + PickBlock func(pos cube.Pos) + PunchAir func() + ReleaseItem func() + ResetEnchantmentSeed func() + Respawn func() *world.EntityHandle + SetExperienceLevel func(level int) + SetGameMode func(mode world.GameMode) + SetHeldItems func(right, left item.Stack) + SetHeldSlot func(slot int) error + SetSkin func(skin.Skin) + Skin func() skin.Skin + Sleep func(pos cube.Pos) + Sneaking func() bool + Speed func() float64 + Sprinting func() bool + StartBreaking func(pos cube.Pos, face cube.Face) + StartCrawling func() + StartFlying func() + StartGliding func() + StartSneaking func() + StartSprinting func() + StartSwimming func() + StopCrawling func() + StopFlying func() + StopGliding func() + StopSneaking func() + StopSprinting func() + StopSwimming func() + Swimming func() bool + SwingArm func() + TurnLecternPage func(pos cube.Pos, page int) error + UUID func() uuid.UUID + UpdateDiagnostics func(Diagnostics) + UseItem func() + UseItemOnBlock func(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3) + UseItemOnEntity func(e world.Entity) bool + VerticalFlightSpeed func() float64 + Wake func() + XUID func() string + type Diagnostics struct + AverageBeginFrameTime float64 + AverageClientSimTickTime float64 + AverageEndFrameTime float64 + AverageFramesPerSecond float64 + AverageInputTime float64 + AverageRemainderTimePercent float64 + AverageRenderTime float64 + AverageServerSimTickTime float64 + AverageUnaccountedTimePercent float64 + type EmoteHandler struct + LastEmote time.Time + func (h *EmoteHandler) Handle(p packet.Packet, _ *Session, tx *world.Tx, c Controllable) error + type InteractHandler struct + func (h *InteractHandler) Handle(p packet.Packet, s *Session, _ *world.Tx, c Controllable) error + type InventoryTransactionHandler struct + func (h *InventoryTransactionHandler) Handle(p packet.Packet, s *Session, tx *world.Tx, c Controllable) (err error) + type ItemStackRequestHandler struct + func (h *ItemStackRequestHandler) Handle(p packet.Packet, s *Session, tx *world.Tx, c Controllable) error + type LecternUpdateHandler struct + func (LecternUpdateHandler) Handle(p packet.Packet, _ *Session, tx *world.Tx, c Controllable) error + type MobEquipmentHandler struct + func (*MobEquipmentHandler) Handle(p packet.Packet, s *Session, tx *world.Tx, c Controllable) error + type ModalFormResponseHandler struct + func (h *ModalFormResponseHandler) Handle(p packet.Packet, _ *Session, tx *world.Tx, c Controllable) error + type NPCRequestHandler struct + func (h *NPCRequestHandler) Handle(p packet.Packet, s *Session, tx *world.Tx, c Controllable) error + type NetworkEncodeableEntity interface + NetworkEncodeEntity func() string + type OffsetEntity interface + NetworkOffset func() float64 + type PlayerActionHandler struct + func (*PlayerActionHandler) Handle(p packet.Packet, s *Session, _ *world.Tx, c Controllable) error + type PlayerAuthInputHandler struct + func (h PlayerAuthInputHandler) Handle(p packet.Packet, s *Session, tx *world.Tx, c Controllable) error + type PlayerSkinHandler struct + func (PlayerSkinHandler) Handle(p packet.Packet, _ *Session, _ *world.Tx, c Controllable) error + type RequestAbilityHandler struct + func (a RequestAbilityHandler) Handle(p packet.Packet, s *Session, _ *world.Tx, c Controllable) error + type RequestChunkRadiusHandler struct + func (*RequestChunkRadiusHandler) Handle(p packet.Packet, s *Session, tx *world.Tx, _ Controllable) error + type RespawnHandler struct + func (*RespawnHandler) Handle(p packet.Packet, _ *Session, _ *world.Tx, c Controllable) error + type ServerBoundDiagnosticsHandler struct + func (h *ServerBoundDiagnosticsHandler) Handle(p packet.Packet, _ *Session, _ *world.Tx, c Controllable) error + type ServerBoundLoadingScreenHandler struct + func (h *ServerBoundLoadingScreenHandler) Handle(p packet.Packet, s *Session, _ *world.Tx, _ Controllable) error + type Session struct + func (s *Session) AddDebugShape(shape debug.Shape) + func (s *Session) Addr() net.Addr + func (s *Session) ChangingDimension() bool + func (s *Session) ChunkRadius() int32 + func (s *Session) ClearInputLocks() + func (s *Session) ClientData() login.ClientData + func (s *Session) Close(tx *world.Tx, c Controllable) + func (s *Session) CloseConnection() + func (s *Session) CloseDialogue() + func (s *Session) CloseForm() + func (s *Session) Disconnect(message string) + func (s *Session) EnableCoordinates(enable bool) + func (s *Session) EnableInstantRespawn(enable bool) + func (s *Session) HandleInventories(tx *world.Tx, c Controllable, ...) + func (s *Session) HideEntity(e world.Entity) + func (s *Session) HideHudElement(e hud.Element) + func (s *Session) HudElementHidden(e hud.Element) bool + func (s *Session) InputLocked(l input.Lock) bool + func (s *Session) Latency() time.Duration + func (s *Session) LockInput(l input.Lock) + func (s *Session) OpenBlockContainer(pos cube.Pos, tx *world.Tx) + func (s *Session) OpenSign(pos cube.Pos, frontSide bool) + func (s *Session) PlayLevelSoundEvent(soundType string, pos mgl64.Vec3) + func (s *Session) PlaySound(t world.Sound, pos mgl64.Vec3) + func (s *Session) RefreshCommands() + func (s *Session) RefreshCommandsFor(c Controllable) + func (s *Session) RemoveAllDebugShapes() + func (s *Session) RemoveBossBar() + func (s *Session) RemoveDebugShape(shape debug.Shape) + func (s *Session) RemoveScoreboard() + func (s *Session) RemoveViewLayer(entity world.Entity) + func (s *Session) SendAbilities(c Controllable) + func (s *Session) SendActionBarMessage(text string) + func (s *Session) SendAnnouncement(message string) + func (s *Session) SendBossBar(text string, colour uint8, healthPercentage float64) + func (s *Session) SendChargeItemComplete() + func (s *Session) SendCommandOutput(output *cmd.Output, l language.Tag) + func (s *Session) SendDebugShapes(dim world.Dimension) + func (s *Session) SendDialogue(d dialogue.Dialogue, e world.Entity) + func (s *Session) SendEffect(e effect.Effect) + func (s *Session) SendEffectRemoval(e effect.Type) + func (s *Session) SendExperience(level int, progress float64) + func (s *Session) SendFood(food int, saturation, exhaustion float64) + func (s *Session) SendForm(f form.Form) + func (s *Session) SendGameMode(c Controllable) + func (s *Session) SendGameRule(name string, val bool) + func (s *Session) SendGameRuleInt(name string, val int) + func (s *Session) SendHealth(health, max, absorption float64) + func (s *Session) SendHeldSlot(slot int, c Controllable, force bool) + func (s *Session) SendHudUpdates() + func (s *Session) SendInputLocks() + func (s *Session) SendJukeboxPopup(message string) + func (s *Session) SendMessage(message string) + func (s *Session) SendPlayerSpawn(pos mgl64.Vec3) + func (s *Session) SendPopup(message string) + func (s *Session) SendRespawn(pos mgl64.Vec3, c Controllable) + func (s *Session) SendScoreboard(sb *scoreboard.Scoreboard) + func (s *Session) SendSpeed(speed float64) + func (s *Session) SendSubtitle(text string) + func (s *Session) SendTip(message string) + func (s *Session) SendTitle(text string) + func (s *Session) SendToast(title, message string) + func (s *Session) SendTranslation(t chat.Translation, l language.Tag, a []any) + func (s *Session) SetHandle(handle *world.EntityHandle, skin skin.Skin) + func (s *Session) SetProxyAddr(addr net.Addr) + func (s *Session) SetTitleDurations(fadeInDuration, remainDuration, fadeOutDuration time.Duration) + func (s *Session) ShowHudElement(e hud.Element) + func (s *Session) Spawn(c Controllable, tx *world.Tx) + func (s *Session) StartShowingEntity(e world.Entity) + func (s *Session) StopShowingEntity(e world.Entity) + func (s *Session) StopSound(soundName string, stopAll bool) + func (s *Session) Transfer(ip net.IP, port int) + func (s *Session) UnlockInput(l input.Lock) + func (s *Session) VerifyAndSetHeldSlot(slot int, expected item.Stack, c Controllable) error + func (s *Session) VerifySlot(slot int, expected item.Stack) error + func (s *Session) ViewAlwaysShowNameTag(entity world.Entity, alwaysShow bool) + func (s *Session) ViewBlockAction(pos cube.Pos, a world.BlockAction) + func (s *Session) ViewBlockUpdate(pos cube.Pos, b world.Block, layer int) + func (s *Session) ViewBrewingUpdate(prevBrewTime, brewTime time.Duration, ...) + func (s *Session) ViewChunk(pos world.ChunkPos, dim world.Dimension, ...) + func (s *Session) ViewEmote(player world.Entity, emote uuid.UUID) + func (s *Session) ViewEntity(e world.Entity) + func (s *Session) ViewEntityAction(e world.Entity, a world.EntityAction) + func (s *Session) ViewEntityAnimation(e world.Entity, a world.EntityAnimation) + func (s *Session) ViewEntityArmour(e world.Entity) + func (s *Session) ViewEntityDisplacement(e world.Entity, pos mgl64.Vec3, rot cube.Rotation, onGround bool) + func (s *Session) ViewEntityGameMode(e world.Entity) + func (s *Session) ViewEntityItems(e world.Entity) + func (s *Session) ViewEntityMovement(e world.Entity, pos mgl64.Vec3, rot cube.Rotation, onGround bool) + func (s *Session) ViewEntityState(e world.Entity) + func (s *Session) ViewEntityTeleport(e world.Entity, position mgl64.Vec3) + func (s *Session) ViewEntityVelocity(e world.Entity, velocity mgl64.Vec3) + func (s *Session) ViewEntityWake(e world.Entity) + func (s *Session) ViewFurnaceUpdate(...) + func (s *Session) ViewItemCooldown(item world.Item, duration time.Duration) + func (s *Session) ViewLayer() *world.ViewLayer + func (s *Session) ViewLayerEntityChanged(e world.Entity) + func (s *Session) ViewNameTag(entity world.Entity, nameTag string) + func (s *Session) ViewParticle(pos mgl64.Vec3, p world.Particle) + func (s *Session) ViewPublicAlwaysShowNameTag(entity world.Entity) + func (s *Session) ViewPublicNameTag(entity world.Entity) + func (s *Session) ViewPublicScoreTag(entity world.Entity) + func (s *Session) ViewScoreTag(entity world.Entity, scoreTag string) + func (s *Session) ViewSkin(e world.Entity) + func (s *Session) ViewSleepingPlayers(sleeping, max int) + func (s *Session) ViewSlotChange(slot int, newItem item.Stack) + func (s *Session) ViewSound(pos mgl64.Vec3, soundType world.Sound) + func (s *Session) ViewSubChunks(centre world.SubChunkPos, offsets []protocol.SubChunkOffset, tx *world.Tx) + func (s *Session) ViewTime(time int) + func (s *Session) ViewTimeCycle(doDayLightCycle bool) + func (s *Session) ViewVisibility(entity world.Entity, level world.VisibilityLevel) + func (s *Session) ViewWeather(raining, thunder bool) + func (s *Session) ViewWorldSpawn(pos cube.Pos) + func (s *Session) VisibleDebugShapes() []debug.Shape + type SubChunkRequestHandler struct + func (*SubChunkRequestHandler) Handle(p packet.Packet, s *Session, tx *world.Tx, _ Controllable) error + type TextHandler struct + func (TextHandler) Handle(p packet.Packet, s *Session, _ *world.Tx, c Controllable) error