Documentation ¶
Index ¶
- Constants
- func NewPlayerInfoAction(actions ...int) pk.FixedBitSet
- type Client
- func (c *Client) AddHandler(id packetid.ServerboundPacketID, handler PacketHandler)
- func (c *Client) GetPlayer() *world.Player
- func (c *Client) SendAddPlayer(p *world.Player)
- func (c *Client) SendDisconnect(reason chat.Message)
- func (c *Client) SendForgetLevelChunk(pos level.ChunkPos)
- func (c *Client) SendKeepAlive(id int64)
- func (c *Client) SendLevelChunkWithLight(pos level.ChunkPos, chunk *level.Chunk)
- func (c *Client) SendLogin(w *world.World, p *world.Player)
- func (c *Client) SendMoveEntitiesPos(eid int32, delta [3]int16, onGround bool)
- func (c *Client) SendMoveEntitiesPosAndRot(eid int32, delta [3]int16, rot [2]int8, onGround bool)
- func (c *Client) SendMoveEntitiesRot(eid int32, rot [2]int8, onGround bool)
- func (c *Client) SendPacket(id packetid.ClientboundPacketID, fields ...pk.FieldEncoder)
- func (c *Client) SendPlayerChat(sender uuid.UUID, index int32, ...)
- func (c *Client) SendPlayerInfoRemove(players []*world.Player)
- func (c *Client) SendPlayerInfoUpdate(actions pk.FixedBitSet, players []*world.Player)
- func (c *Client) SendPlayerPosition(pos [3]float64, rot [2]float32) (teleportID int32)
- func (c *Client) SendRemoveEntities(entityIDs []int32)
- func (c *Client) SendRotateHead(eid int32, yaw int8)
- func (c *Client) SendServerData(motd *chat.Message, favIcon string, enforceSecureProfile bool)
- func (c *Client) SendSetChunkCacheCenter(chunkPos [2]int32)
- func (c *Client) SendSetDefaultSpawnPosition(xyz [3]int32, angle float32)
- func (c *Client) SendSystemChat(msg chat.Message, overlay bool)
- func (c *Client) SendTeleportEntity(eid int32, pos [3]float64, rot [2]int8, onGround bool)
- func (c *Client) Start()
- func (c *Client) ViewAddPlayer(p *world.Player)
- func (c *Client) ViewChunkLoad(pos level.ChunkPos, chunk *level.Chunk)
- func (c *Client) ViewChunkUnload(pos level.ChunkPos)
- func (c *Client) ViewMoveEntityPos(id int32, delta [3]int16, onGround bool)
- func (c *Client) ViewMoveEntityPosAndRot(id int32, delta [3]int16, rot [2]int8, onGround bool)
- func (c *Client) ViewMoveEntityRot(id int32, rot [2]int8, onGround bool)
- func (c *Client) ViewRemoveEntities(entityIDs []int32)
- func (c *Client) ViewRotateHead(id int32, yaw int8)
- func (c *Client) ViewTeleportEntity(id int32, pos [3]float64, rot [2]int8, onGround bool)
- type PacketHandler
Constants ¶
View Source
const ( PlayerInfoAddPlayer = iota PlayerInfoInitializeChat PlayerInfoUpdateGameMode PlayerInfoUpdateListed PlayerInfoUpdateLatency PlayerInfoUpdateDisplayName // PlayerInfoEnumGuard is the number of the enums PlayerInfoEnumGuard )
Actions of [SendPlayerInfoUpdate]
Variables ¶
This section is empty.
Functions ¶
func NewPlayerInfoAction ¶
func NewPlayerInfoAction(actions ...int) pk.FixedBitSet
Types ¶
type Client ¶
type Client struct { // pointer to the Player.Input *world.Inputs // contains filtered or unexported fields }
func (*Client) AddHandler ¶
func (c *Client) AddHandler(id packetid.ServerboundPacketID, handler PacketHandler)
func (*Client) SendAddPlayer ¶
func (*Client) SendDisconnect ¶
SendDisconnect send ClientboundDisconnect packet to client. Once the packet is sent, the connection will be closed.
func (*Client) SendForgetLevelChunk ¶
func (*Client) SendKeepAlive ¶
func (*Client) SendLevelChunkWithLight ¶
func (*Client) SendMoveEntitiesPos ¶
func (*Client) SendMoveEntitiesPosAndRot ¶
func (*Client) SendMoveEntitiesRot ¶
func (*Client) SendPacket ¶
func (c *Client) SendPacket(id packetid.ClientboundPacketID, fields ...pk.FieldEncoder)
func (*Client) SendPlayerChat ¶
func (*Client) SendPlayerInfoRemove ¶
func (*Client) SendPlayerInfoUpdate ¶
func (c *Client) SendPlayerInfoUpdate(actions pk.FixedBitSet, players []*world.Player)
func (*Client) SendPlayerPosition ¶
func (*Client) SendRemoveEntities ¶
func (*Client) SendRotateHead ¶
func (*Client) SendServerData ¶
func (*Client) SendSetChunkCacheCenter ¶
func (*Client) SendSetDefaultSpawnPosition ¶
func (*Client) SendTeleportEntity ¶
func (*Client) ViewAddPlayer ¶
func (*Client) ViewChunkLoad ¶
func (*Client) ViewChunkUnload ¶
func (*Client) ViewMoveEntityPos ¶
func (*Client) ViewMoveEntityPosAndRot ¶
func (*Client) ViewMoveEntityRot ¶
func (*Client) ViewRemoveEntities ¶
func (*Client) ViewRotateHead ¶
Click to show internal directories.
Click to hide internal directories.