Module client

Source

Structs§

Client
The main client component. Contains the underlying network connection and packet buffer.
ClientBundle
The bundle of components needed for clients to function. All components are required unless otherwise stated.
ClientBundleArgs
Arguments for ClientBundle::new.
ClientMarker
Marker Component for client entities. This component should exist even if the client is disconnected.
ClientPlugin
DisconnectClient
A Command to disconnect a Client with a displayed reason.
EntityRemoveBuf
Contains a list of Minecraft entities that need to be despawned. Entity IDs in this list will be despawned all at once at the end of the tick.
FlushPacketsSet
The SystemSet in PostUpdate where clients have their packet buffer flushed. Any system that writes packets to clients should happen before this. Otherwise, the data will arrive one tick late.
Ip
LoadEntityForClientEvent
This event will be emitted when a entity is loaded for a client (e.g when moving into range of the entity).
OldView
OldViewDistance
The ViewDistance at the end of the previous tick. Automatically updated as ViewDistance is changed.
OldViewItem
Automatically generated [WorldQuery] item type for OldView, returned when iterating over query results.
OldVisibleChunkLayer
The value of VisibleChunkLayer from the end of the previous tick.
OldVisibleEntityLayers
The value of VisibleEntityLayers from the end of the previous tick.
Properties
Player properties from the game profile.
PropertyValue
ReceivedPacket
SpawnClientsSet
The SystemSet in PreUpdate where new clients should be spawned. Systems that need to perform initialization work on clients before users get access to it should run after this set.
UnloadEntityForClientEvent
This event will be emitted when a entity is unloaded for a client (e.g when moving out of range of the entity).
UpdateClientsSet
The system set where various facets of the client are updated. Systems that modify layers should run before this.
Username
View
ViewDistance
ViewItem
Automatically generated [WorldQuery] item type for View, returned when iterating over query results.
VisibleChunkLayer
A Component containing a handle to the ChunkLayer a client can see.
VisibleEntityLayers
A Component containing the set of EntityLayers a client can see. All Minecraft entities from all layers in this set are potentially visible to the client.

Traits§

ClientConnection
Represents the bidirectional packet channel between the server and a client in the “play” state.

Functions§

despawn_disconnected_clients
A system for adding Despawned components to disconnected clients. This works by listening for removed Client components.