Skip to main content

Module game

Module game 

Source

ModulesΒ§

ability_flags
Flags for player abilities bitfield. These match vanilla Minecraft’s ability flags.
c_add_entity πŸ”’
Packet sent to spawn an entity (including players) for the client.
c_animate πŸ”’
Clientbound animate packet - sent to play an entity animation.
c_block_changed_ack πŸ”’
c_block_destruction πŸ”’
c_block_entity_data πŸ”’
Block entity data packet.
c_block_event πŸ”’
c_block_update πŸ”’
c_bundle_delimiter πŸ”’
Clientbound bundle delimiter packet - marks the start/end of a packet bundle.
c_change_difficulty πŸ”’
c_command_suggestions πŸ”’
c_commands πŸ”’
c_container_close πŸ”’
c_container_set_content πŸ”’
c_container_set_data πŸ”’
c_container_set_slot πŸ”’
c_cooldown πŸ”’
Clientbound item cooldown packet.
c_damage_event πŸ”’
Clientbound damage event packet - tells the client an entity took damage.
c_entity_event πŸ”’
c_entity_position_sync πŸ”’
c_game_event πŸ”’
c_hurt_animation πŸ”’
c_level_event πŸ”’
c_level_particles πŸ”’
c_login πŸ”’
c_move_entity πŸ”’
Packets for entity movement updates.
c_move_vehicle πŸ”’
c_open_screen πŸ”’
c_open_sign_editor πŸ”’
c_player_abilities πŸ”’
c_player_combat_kill πŸ”’
c_player_info_update πŸ”’
c_player_look_at πŸ”’
c_player_position πŸ”’
Clientbound player position packet - sent to teleport a player.
c_remove_entities πŸ”’
Packet sent to remove entities from the client.
c_remove_mob_effect πŸ”’
Clientbound remove mob effect packet.
c_remove_player_info πŸ”’
Packet to remove players from the player list (tab menu).
c_respawn πŸ”’
Clientbound respawn packet - sent to respawn a player or change dimensions.
c_rotate_head πŸ”’
Packet for updating an entity’s head rotation.
c_section_blocks_update πŸ”’
c_set_camera πŸ”’
c_set_cursor_item πŸ”’
c_set_default_spawn_position πŸ”’
Clientbound default spawn position packet.
c_set_entity_data πŸ”’
Clientbound set entity data packet - sent to sync entity metadata.
c_set_entity_link πŸ”’
Clientbound set entity link packet.
c_set_entity_motion πŸ”’
Clientbound set entity motion packet - sent to update entity velocity.
c_set_equipment πŸ”’
Clientbound set equipment packet.
c_set_experience πŸ”’
c_set_health πŸ”’
c_set_held_slot πŸ”’
c_set_passengers πŸ”’
Clientbound set passengers packet.
c_set_player_inventory πŸ”’
Clientbound player inventory slot update packet.
c_set_time πŸ”’
c_sound πŸ”’
c_tab_list πŸ”’
c_take_item_entity πŸ”’
Clientbound take item entity packet - sent when an entity picks up an item.
c_teleport_entity πŸ”’
c_ticking_state πŸ”’
c_ticking_step πŸ”’
c_update_attributes πŸ”’
Clientbound update attributes packet - sent to sync entity attributes with modifiers.
c_update_mob_effect πŸ”’
Clientbound update mob effect packet.
chat πŸ”’
chunk πŸ”’
s_accept_teleportation πŸ”’
Serverbound accept teleportation packet - sent by client to acknowledge a teleport.
s_attack πŸ”’
s_change_difficulty πŸ”’
s_change_game_mode πŸ”’
s_client_command πŸ”’
Serverbound client command packet - sent by the client to perform actions like respawning.
s_client_tick_end πŸ”’
s_command_suggestion πŸ”’
s_container_button_click πŸ”’
s_container_click πŸ”’
s_container_close πŸ”’
s_container_slot_state_changed πŸ”’
s_interact πŸ”’
s_move_player πŸ”’
s_move_vehicle πŸ”’
s_pick_item_from_block πŸ”’
s_player_abilities πŸ”’
s_player_action πŸ”’
s_player_command πŸ”’
s_player_input πŸ”’
s_player_load πŸ”’
s_rename_item πŸ”’
Serverbound packet for renaming the item inside of an anvil’s first slot
s_set_carried_item πŸ”’
s_set_creative_mode_slot πŸ”’
s_set_held_item πŸ”’
Serverbound packet for changing the held item slot.
s_sign_update πŸ”’
s_spectator_action πŸ”’
s_swing πŸ”’
Serverbound swing packet - sent when the player swings their arm.
s_use_item πŸ”’
s_use_item_on πŸ”’
world_border πŸ”’

StructsΒ§

ArgumentSignature
Signature for a single command argument
AttributeModifierData
Represents a single attribute modifier within an attribute snapshot.
AttributeSnapshot
A snapshot of a single attribute’s state, including its base value and active modifiers.
BlockChange
BlockEntityInfo
CAddEntity
Spawns an entity on the client.
CAnimate
Sent to play an animation on an entity.
CBlockChangedAck
CBlockDestruction
CBlockEntityData
Packet sent to update a block entity’s data on the client.
CBlockEvent
Sent to trigger block-specific events on the client.
CBlockUpdate
CBundleDelimiter
Marks the start or end of a packet bundle.
CChangeDifficulty
Clientbound packet that informs the client about the current world difficulty.
CChunkBatchFinished
CChunkBatchStart
CCommandSuggestions
Sent by the server in response to a command suggestion request.
CCommands
CContainerClose
CContainerSetContent
CContainerSetData
CContainerSetSlot
CCooldown
Starts or clears a client-side item cooldown group.
CDamageEvent
Sent when an entity takes damage. Used for hit animations and damage direction indicator.
CDisguisedChat
Clientbound packet for unsigned/disguised chat messages This is sent when the server doesn’t have a signed message
CEntityEvent
Performs an entity event.
CEntityPositionSync
Synchronizes an entity’s position, velocity, and rotation.
CForgetLevelChunk
CGameEvent
CHurtAnimation
CInitializeBorder
CLevelChunkWithLight
CLevelEvent
Sent to trigger level events (sounds, particles, animations) on the client.
CLevelParticles
Sent to create particles on the client.
CLightUpdate
CLogin
CMoveEntityPos
Updates an entity’s position with a delta from its current position.
CMoveEntityPosRot
Updates an entity’s position and rotation.
CMoveEntityRot
Updates an entity’s rotation only.
CMoveVehicle
Clientbound controlled-vehicle position correction packet.
COpenScreen
COpenSignEditor
Clientbound packet sent to open the sign editor GUI.
CPlayerAbilities
Sent by the server to update the player’s abilities. This tells the client whether the player can fly, is invulnerable, etc.
CPlayerChat
CPlayerCombatKill
CPlayerInfoUpdate
CPlayerLookAt
Rotates the receiving player toward a position or tracked entity.
CPlayerPosition
Sent to teleport a player to a new position.
CRemoveEntities
Removes one or more entities from the client.
CRemoveMobEffect
Sent when the client should remove an entity mob effect.
CRemovePlayerInfo
Removes players from the client’s player list.
CRespawn
Respawn a player in any dimension.
CRotateHead
Updates an entity’s head yaw rotation.
CSectionBlocksUpdate
CSetBorderCenter
CSetBorderLerpSize
CSetBorderSize
CSetBorderWarningDelay
CSetBorderWarningDistance
CSetCamera
CSetChunkCacheRadius
CSetChunkCenter
CSetCursorItem
CSetDefaultSpawnPosition
Updates the client’s default world spawn marker.
CSetEntityData
Sent to synchronize entity metadata (health, pose, flags, etc.) with the client.
CSetEntityLink
Updates the leash/link holder for an entity.
CSetEntityMotion
Sent to update an entity’s velocity on the client.
CSetEquipment
Updates one or more equipment slots for an entity.
CSetExperience
CSetHealth
CSetHeldSlot
CSetPassengers
Updates the direct passengers riding a vehicle entity.
CSetPlayerInventory
Updates one logical slot in the receiving player’s inventory.
CSetTime
CSound
Sent to play a sound effect at a specific position.
CSystemChat
CTabList
Packet to set the tab list header and footer. This allows servers to display custom text above and below the player list.
CTakeItemEntity
Sent when an entity picks up an item (item, experience orb, or arrow).
CTeleportEntity
Teleports an entity with optional relative position, rotation, and velocity flags.
CTickingState
Packet sent to clients to inform them of the current tick rate and frozen state. This allows clients to adjust their local tick rate manager for smoother gameplay.
CTickingStep
Packet sent to clients to inform them of the number of frozen ticks to run. This is used when stepping forward while the server is frozen.
CUpdateAttributes
Clientbound packet sent to update entity attributes and their modifiers.
CUpdateMobEffect
Sent when the client should add or update an entity mob effect.
ChatTypeBound
Represents Minecraft’s ChatType.Bound structure Contains a registry holder + sender name + optional target name
ChunkPacketData
CommandNodeInfo
CommonPlayerSpawnInfo
EquipmentSlotItem
One equipment slot update.
HashedPatchMap
A hashed representation of component patches for verification. Maps data component type IDs to their hash values.
Heightmaps
LastSeenMessagesUpdate
Last seen messages update from client
LightUpdatePacketData
MobEffectPacketFlags
PackedEntityDelta
A fixed-point entity movement delta encoded as a protocol i16.
PlayerInfoEntry
PreviousMessage
ProtocolRemoteChatSessionData
Network-serializable chat session data.
RelativeMovement
Relative position/rotation flags.
SAcceptTeleportation
Sent by the client to acknowledge a server-initiated teleport.
SAttack
Serverbound packet sent when a player left-click attacks an entity.
SChangeDifficulty
Serverbound packet sent when the client requests a difficulty change.
SChangeGameMode
SChat
SChatAck
Client -> Server: Acknowledges messages received from the server.
SChatCommand
SChatCommandSigned
Client -> Server: Executes a signed command.
SChatSessionUpdate
Client -> Server: Updates the player’s chat session with their public key.
SChunkBatchReceived
SClientCommand
Sent by the client when it wants to perform an action such as respawning after death.
SClientTickEnd
SCommandSuggestion
Sent by the client when requesting command suggestions (tab completion).
SContainerButtonClick
SContainerClick
Serverbound packet sent when a player clicks in a container.
SContainerClose
SContainerSlotStateChanged
SInteract
Serverbound packet sent when a player right-clicks an entity.
SMovePlayer
Constructed packet by the server to more easily be able to handle movement.
SMovePlayerPos
SMovePlayerPosRot
SMovePlayerRot
SMovePlayerStatusOnly
Status-only movement packet (no position or rotation, just on_ground flag).
SMoveVehicle
Serverbound controlled-vehicle movement packet.
SPickItemFromBlock
Serverbound packet sent when a player uses the pick block key (middle click) on a block.
SPlayerAbilities
Sent by the client when the player starts or stops flying. The server uses this to track the player’s flying state.
SPlayerAction
Serverbound packet sent when a player performs an action like mining a block.
SPlayerCommand
Serverbound packet sent when a player performs a command action.
SPlayerInput
Player input state sent each tick when input changes.
SPlayerLoad
SRenameItem
Sent by the client when the player changes an anvil’s item name.
SSetCarriedItem
SSetCreativeModeSlot
Creative mode slot packet uses the delimited (untrusted) item format where each component value is prefixed with a VarInt byte length.
SSetHeldItem
Sent by the client when the player changes their selected hotbar slot.
SSignUpdate
Serverbound packet sent when a player finishes editing a sign.
SSpectatorAction
SSwing
Sent when the player swings their arm (attacks or interacts).
SUseItem
Serverbound packet sent when a player uses an item (right-click in air).
SUseItemOn
Serverbound packet sent when a player uses an item on a block (right-click on block).
SuggestionEntry
A single command suggestion entry.

EnumsΒ§

AnimateAction
Animation action types.
ArgumentStringTypeBehavior
ArgumentType
AttributeModifierOperation
The operation type for an attribute modifier.
ClickType
The type of click action performed on a container slot.
ClientCommandAction
The action the client wants to perform.
CommandNode
FilterType
GameEventType
HashedStack
A hashed representation of an ItemStack sent from client to server. Used for verification without trusting client data.
HeightmapType
LookAtAnchor
Entity position used as one endpoint of a player look-at operation.
PlayerAction
Action types for the player action packet.
PlayerCommandAction
Action types for the player command packet.
PlayerInfoAction
Actions for the player info update packet. These match the vanilla Java ClientboundPlayerInfoUpdatePacket.Action enum.
SoundSource
Sound source categories (matches vanilla SoundSource enum order).
SuggestionType

ConstantsΒ§

PLAYER_INFO_INIT_ACTIONS
Bitmask combining all actions needed when a player first joins. This matches vanilla’s createPlayerInitializing() method.

FunctionsΒ§

calc_delta
Calculates the delta for entity movement.
to_angle_byte
Converts degrees to a protocol angle byte (0-255 representing 0-360 degrees).
write_lp_vec3
Writes a velocity vector in LpVec3 format.