Crate valence_server
source ·Expand description
valence_server
Defines the “core” of the Valence server that plugins depend on. If a plugin module here is large enough, it may be split off into its own crate to reduce compile times.
The contents of valence_server
are re-exported from the main valence
crate, so end users should not interact with this crate directly.
Re-exports
pub use event_loop::EventLoopPostUpdate;
pub use event_loop::EventLoopPreUpdate;
pub use event_loop::EventLoopUpdate;
pub use layer::ChunkLayer;
pub use layer::EntityLayer;
pub use layer::Layer;
pub use layer::LayerBundle;
pub use valence_protocol::ident;
pub use valence_protocol::math;
pub use valence_protocol::text;
pub use valence_protocol::uuid;
pub use bevy_app as app;
pub use bevy_ecs as ecs;
pub use rand;
pub use valence_entity as entity;
pub use valence_nbt as nbt;
pub use valence_protocol as protocol;
pub use valence_registry as registry;
Modules
- Defines chunk layers and entity layers. Chunk layers contain the chunks and dimension data of a world, while entity layers contain all the Minecraft entities.
- Handles spawning and respawning the client.
Macros
- Creates a new
Ident
at compile time from a string literal. A compile error is raised if the string is not a valid resource identifier.
Structs
- Represents an absolute block position in world space.
- Represents the state of a block. This does not include block entity data such as the text on a sign, the design on a banner, or the content of a spawner.
- The X and Z position of a chunk.
- Represents the set of all chunk positions that a client can see, defined by a center chunk position
pos
and view distancedist
. - A marker
Component
for entities that should be despawned at the end of the tick. - A wrapper around a string type
S
which guarantees the wrapped string is a valid resource identifier. - A stack of items in an inventory.
- Contains URLs to the skin and cape of a player.
- Contains global server state accessible as a
Resource
. - Represents formatted text in Minecraft’s JSON text format.
- The universally unique identifier of an entity. Component wrapper for a
Uuid
.
Enums
- Represents an item from the game
Constants
- Minecraft’s standard ticks per second (TPS).
- The stringified name of the Minecraft version this library currently targets.
- The Minecraft protocol version this library currently targets.
Type Definitions
- Type alias for the compression threshold.