pub enum Response {
Show 16 variants
Broadcast(BroadcastMessage),
SendBlockAck {
sequence: i32,
},
SendSystemChat {
content: NbtCompound,
action_bar: bool,
},
SendPosition {
teleport_id: i32,
position: Position,
rotation: Rotation,
},
StreamChunks(ChunkPosition),
SendGameStateChange {
reason: u8,
value: f32,
},
PersistChunk(ChunkPosition),
SpawnDroppedItem {
position: BlockPosition,
item_id: i32,
count: i32,
},
OpenChest(BlockPosition),
OpenCraftingTable {
position: BlockPosition,
},
OpenContainer(Container),
BroadcastBlockAction {
position: BlockPosition,
action_id: u8,
action_param: u8,
block_id: i32,
},
NotifyContainerViewers {
position: BlockPosition,
slot_index: i16,
item: Slot,
},
DestroyBlockEntity {
position: BlockPosition,
},
UnlockRecipe {
recipe_id: RecipeId,
reason: UnlockReason,
},
LockRecipe {
recipe_id: RecipeId,
},
}Expand description
A deferred operation queued by a sync event handler.
Variants§
Broadcast(BroadcastMessage)
Broadcast a message to all connected players.
SendBlockAck
Send a block action acknowledgement.
SendSystemChat
Send a system chat message.
Fields
content: NbtCompoundThe formatted text component as NBT.
SendPosition
Teleport the current player.
Fields
StreamChunks(ChunkPosition)
Stream chunks around a chunk position.
SendGameStateChange
Send a game state change.
PersistChunk(ChunkPosition)
Schedule a chunk for asynchronous persistence.
SpawnDroppedItem
Spawn a dropped item entity in the world.
Fields
position: BlockPositionBlock position where the item spawns.
OpenChest(BlockPosition)
Open a chest container at the given position.
OpenCraftingTable
Open a crafting table window for the current player.
Sends an OpenScreen packet with the 3x3 crafting grid type and attaches a CraftingGrid component to the player entity.
Fields
position: BlockPositionBlock position of the crafting table.
OpenContainer(Container)
Open a custom container window for the current player.
Accepts a Container template
value built via Container::builder().
BroadcastBlockAction
Broadcast a BlockAction packet to all connected players.
Used by container/door/note-block plugins for state-change
animations (chest lid open/close, door open/close, etc.). The
meaning of action_id and action_param depends on the
block_id registry value.
Fields
position: BlockPositionWorld position of the block.
NotifyContainerViewers
Send a SetContainerSlot to every player viewing the same
block-backed container, excluding the current player.
Used by ContainerPlugin to keep co-viewers’ open chests in
sync when a slot is mutated by the source player. The server
resolves which players are co-viewers by scanning the
OpenContainer components.
Fields
position: BlockPositionWorld position of the block-backed container.
DestroyBlockEntity
Remove a block entity at the given position and dispatch
BlockEntityDestroyedEvent with its last state.
Used by ContainerPlugin on chest break to drive the destroy
→ drop-items chain through the event pipeline. No-op if no
block entity exists at the position.
Fields
position: BlockPositionWorld position of the block entity to remove.
UnlockRecipe
Unlock a recipe for the current player.
The server inserts the recipe id into the player’s
KnownRecipes component, sends a Recipe Book Add S2C packet,
and dispatches RecipeUnlockedEvent at Post. No-op if the
recipe is already unlocked.
Fields
reason: UnlockReasonWhy the unlock happened — surfaced on RecipeUnlockedEvent.
LockRecipe
Lock a recipe for the current player.
The server removes the recipe from the player’s KnownRecipes,
sends a Recipe Book Remove S2C packet, and dispatches
RecipeLockedEvent at Post. No-op if the recipe is not
currently unlocked.