#[non_exhaustive]pub struct Capabilities {Show 45 fields
pub version: GameVersion,
pub protocol: i32,
pub physics: PhysicsRules,
pub data: DataSet,
pub item_model: ItemModel,
pub combat_1_9: bool,
pub entity_pick_root_vehicle: bool,
pub eye_height: f64,
pub sneak_eye_height: f64,
pub chat_limit: usize,
pub immediate_respawn_rule: bool,
pub seed_planting_prediction: bool,
pub teleport_confirm: bool,
pub window_confirm: bool,
pub configuration_state: bool,
pub sneak_via_player_input: bool,
pub sends_tick_end: bool,
pub player_loaded_gate: bool,
pub chunk_batch_ack: bool,
pub block_sequence: bool,
pub chat_acknowledgements: bool,
pub drop_prediction: bool,
pub client_entity_push: bool,
pub spectator_block_click_swings: bool,
pub spectator_switch_stops_use: bool,
pub attack_knockback_enchantment: bool,
pub use_equip_swings: bool,
pub own_inventory_passes_keys: bool,
pub use_stop: UseStop,
pub creative_instant_dig: bool,
pub invulnerable_eating: InvulnerableEating,
pub living_flags_drive_use: bool,
pub cooldown_reset: CooldownReset,
pub item_cooldowns: ItemCooldownRules,
pub pick_head_yaw: bool,
pub legacy_pick_block: bool,
pub sends_swing: bool,
pub teleport_confirm_pose: bool,
pub dig_change_direction: bool,
pub creative_attack_dig_delay: bool,
pub sends_punch: bool,
pub boss_bars: bool,
pub sign_editor: SignRules,
pub book: BookRules,
pub sleep_levels_pitch: bool,
}Expand description
What a protocol version can do: the facts the client core asks for.
Read one with GameVersion::caps.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.version: GameVersionThe version this row describes.
protocol: i32Protocol number.
physics: PhysicsRulesPhysics rule set.
data: DataSetData tables.
item_model: ItemModelHow item stacks carry extra data.
combat_1_9: bool1.9 combat: attack cooldown, swing sent after the click packet, the off hand.
entity_pick_root_vehicle: boolThe crosshair pick skips entities with the player’s root vehicle (1.9+), not only the vehicle the player sits on (1.8).
eye_height: f64Eye height above the feet while standing.
sneak_eye_height: f64Eye height while sneaking (1.54 in 1.8 – 1.12, the crouching pose’s 1.27 since 1.14).
chat_limit: usizeLongest chat line the server accepts, in UTF-16 units.
immediate_respawn_rule: boolGame event 11 (“immediate respawn” game rule) exists (1.15+).
seed_planting_prediction: boolThe client uses a seed item at once when planting on its soil (the 1.8 SeedItem.use
prediction; later versions wait for the server’s slot update).
teleport_confirm: boolServer teleports carry an id the client confirms (1.9+).
window_confirm: boolWindow clicks are confirmed with transactions (1.8 – 1.16).
configuration_state: boolA configuration state sits between login and play (1.20.2+).
sneak_via_player_input: boolSneaking is sent as player_input key state, not as an entity action (1.21.2+).
sends_tick_end: boolThe client sends tick_end after every tick (1.21.2+).
player_loaded_gate: boolThe player does not tick until the client sends player_loaded (1.21.4+).
chunk_batch_ack: boolChunk batches are acknowledged with the desired chunks per tick (1.20.2+).
block_sequence: boolDig / place / use packets carry a sequence number the server acknowledges (1.19+).
chat_acknowledgements: boolChat packets carry a timestamp, salt and message acknowledgements (1.19.3+).
drop_prediction: boolThe drop key takes the item off the held stack on the client at once and then swings
the main arm when it took one (1.16.5 ClientPlayerEntity.dropSelectedItem and the
key handler; 26.1 LocalPlayer.drop); 1.8.9 / 1.12.2 only send the packet and wait for
the server’s slot update.
client_entity_push: boolThe client itself pushes the player away from other entities in its entity tick
(26.1+; 1.12.2: LivingEntity.tickCramming, other players and boats push the local
player on the client too; 1.16.5: LivingEntity.tickCramming,
OtherClientPlayerEntity.tickMovement and BoatEntity.tick, in the client world’s entity
map order; 1.8.9 leaves it to the server). Judging those pushes needs
each player entity’s tab-list name (team collision rules) and game mode (spectators do
not push), so entity tracking then also keeps a names-only tab list.
spectator_block_click_swings: boolA spectator’s right click on a block (the block packet, then the click ends) swings the
arm: 1.8 – 1.16 interactBlock returns true / SUCCESS for spectators; 26.1 / 26.2
MultiPlayerGameMode.performUseItemOn returns CONSUME, which swings nothing.
spectator_switch_stops_use: boolSwitching to spectator ends an item use at once: 26.1 / 26.2
ServerPlayer.setGameMode(SPECTATOR) calls stopUsingItem and the client’s use ends
with the living flags; 1.8 – 1.16.5 stop nothing (the use runs until release or finish).
attack_knockback_enchantment: boolThe client’s attack reads the held item’s knockback enchantment level
(EnchantmentHelper.getKnockback, 1.8 – 1.16.5): with knockback the attacker slows down
on the client too. 26.1 / 26.2 LivingEntity.getKnockback runs the data-driven
enchantment effects only on a ServerLevel: the client’s knockback is the attribute
alone (a sprint attack at full strength still slows).
use_equip_swings: boolPutting armor on with a right click swings the arm: 1.16.5 ArmorItem.use answers
success(…, isClient) (SUCCESS swings) and 26.x Equippable.swapWithEquipmentSlot
SUCCESS (a client swing); 1.12.2 ArmorItem.use SUCCESS swings nothing, 1.8
interactItem neither.
own_inventory_passes_keys: boolThe player’s own inventory screen passes key presses through to the game while it is
open (1.16.5 InventoryScreen / CreativeInventoryScreen set passEvents: GLFW key
events the screen does not use reach the key bindings, and handleInputEvents runs):
opening it releases every key (KeyBinding.unpressAll), a movement key pressed while
it is open applies, closing it re-reads the held keys. 1.8.9 / 1.12.2 screens take
every keyboard event (handleInput before tickKeyboard), 26.x not verified (off).
use_stop: UseStopWhen a change of the used hand’s stack ends an item use.
creative_instant_dig: boolCreative digging as attackBlock / updateBlockBreakingProgress (26.x
startDestroyBlock / continueDestroyBlock) do it: a start packet and the block broken
at once (not by a sword, 26.x: a tool that cannot destroy blocks in creative), then
every 5 ticks while the button is held; nothing is aborted (oracle: 26.x
held_dig.jsonl.gz). Off: the survival path.
invulnerable_eating: InvulnerableEatingWhat an invulnerable (creative) player may eat (canConsume).
living_flags_drive_use: boolOur living flags from the server drive the client’s item use (1.9+
ClientPlayerEntity.onTrackedDataSet(LIVING_FLAGS)): bit 1 set while not using starts a
use of the stack in the hand of bit 2, bit 1 clear while using ends it (no packet).
cooldown_reset: CooldownResetWhen a held item change resets the 1.9+ attack cooldown.
item_cooldowns: ItemCooldownRulesItem cooldowns: none, per item or per cooldown group.
pick_head_yaw: boolThe key handling’s crosshair pick turns with the player’s head yaw (1.8
LivingEntity.getRotationVector(1.0F): the head yaw the last tick’s tickNewAi set, so
the yaw before this tick’s turn) and this tick’s pitch; the movement packet carries the
new yaw. 1.9+ picks with this tick’s yaw.
legacy_pick_block: boolThe pick block key as 1.8.9 / 1.12.2 / 1.16.5 MinecraftClient.doPick ends (1.8
PlayerInventory.addPickBlock of an item and damage, 1.12 method_13250 / 1.16.5
addPickBlock of a stack) and, in creative mode, a creative_inventory_action for the
selected slot (oracle clicks_creative); 1.12.2 / 1.16.5 also load saved toolbars.
Off: not modelled (refused).
sends_swing: boolThe client sends its arm swings (swing / arm_animation); 26.3 removed the
serverbound swing: an attack sends the payload-less punch instead and a used item
only animates the hand (LocalPlayer.itemUsed).
teleport_confirm_pose: bool26.3 ClientPacketListener.handleMovePlayer: the teleport answer is one
accept_teleportation carrying the resulting position and rotation (no
position-rotation packet after it), and the teleport aborts a dig in progress
(MultiPlayerGameMode.stopDestroyBlock).
dig_change_direction: bool26.3 MultiPlayerGameMode.continueDestroyBlock: while the same block is dug, a hit on
another face sends CHANGE_DESTROY_DIRECTION (player action 1) with the new face; the
later player-action ids are shifted by one.
creative_attack_dig_delay: bool26.3 MultiPlayerGameMode.attack: an attack in creative sets the 5-tick dig delay, so a
held button that reaches a block right after sends only swings until it ran out
(oracle: 26.3 held_dig.jsonl.gz, attack_mob_creative).
sends_punch: boolThe serverbound swing-free punch packet goes out where 1.9+ sends the swing after an
attack or a missed click (26.3 Minecraft.startAttack / LocalPlayer.swing path).
boss_bars: boolThe server can show boss bars (1.9+ boss_bar; crate::hud::Hud::boss_bars).
sign_editor: SignRulesHow the sign editor opens, closes and sends its lines (crate::sign).
book: BookRulesWhat the book screen sends and changes in the held stack (crate::book).
sleep_levels_pitch: bool1.13+ LivingEntity.tick: a sleeping player’s pitch is set to 0 every tick.