Skip to content

Packets

WARNING

Packets must be cast to their specific type to access their properties.

Example: C03 c03 = (C03) packet;

CPacket

Base wrapper for outbound packets.

propertytypedescription
nameStringsimple packet class name

C0A (animation)

java
new C0A();

C0B (entity action)

java
new C0B(String action, int horsePower);
propertytypedescription
actionStringentity action name
horsepowerinthorse jump power

C0D (close window)

java
new C0D(int windowId);
propertytype
windowIdint

C0E (click window)

java
new C0E(int windowId, int slot, int button, int mode, ItemStack itemStack);
propertytypedescription
windowIdintwindow id
slotintinventory slot
buttonintmouse button
modeintclick mode
actionshorttransaction id
itemStackItemStackclicked stack

C0F (confirm transaction)

java
new C0F(int windowId, short uid);
propertytype
windowIdint
uidshort

C01 (chat message)

java
new C01(String message);
propertytype
messageString

C02 (use entity)

java
new C02(Entity entity, String action, Vec3 hitVec);
propertytypedescription
entityEntitytarget entity
actionStringATTACK / INTERACT / INTERACT_AT
hitVecVec3hit vector (may be null)

C03 (player)

java
new C03(boolean onGround); // (onGround only)
new C03(Vec3 position, boolean onGround); // C04 (pos)
new C03(float yaw, float pitch, boolean onGround); // C05 (look)
new C03(Vec3 position, float yaw, float pitch, boolean onGround); // C06 (pos + look)
propertytypedescription
positionVec3player position
yawfloatyaw angle
pitchfloatpitch angle
groundbooleanon ground flag
movingbooleanwhether position is included
rotatingbooleanwhether rotation is included

C07 (player digging)

java
new C07(Vec3 position, String status, String facing);
propertytype
positionVec3
statusString
facingString

C08 (block placement)

java
new C08(ItemStack itemStack);
new C08(ItemStack itemStack, Vec3 position, int direction, Vec3 offset);
propertytypedescription
itemStackItemStackheld item
positionVec3block position
directionintplaced block face
offsetVec3hit offset

C09 (held item change)

java
new C09(int slot);
propertytype
slotint

C10 (creative inventory action)

java
new C10(int slot, ItemStack itemStack);
propertytype
slotint
itemStackItemStack

C13 (player abilities)

java
new C13(boolean invulnerable, boolean flying, boolean allowFlying, boolean creativeMode, float flySpeed, float walkSpeed);
propertytype
invulnerableboolean
flyingboolean
allowFlyingboolean
creativeModeboolean
flySpeedfloat
walkSpeedfloat

C16 (client status)

java
new C16(String status);
propertytype
statusString

SPacket

Base wrapper for inbound packets.

propertytypedescription
nameStringsimple packet class name

S06 (update health)

propertytype
healthfloat
saturationfloat
foodint

S08 (player position and look)

propertytype
positionVec3
yawfloat
pitchfloat

S09 (held item change)

propertytype
slotint

S12 (entity velocity)

propertytype
entityIdint
motionVec3

S23 (block change)

propertytype
positionVec3
blockBlock

S27 (explosion)

propertytype
strengthfloat
positionVec3
motionVec3

S29 (sound effect)

propertytype
soundString
positionVec3
volumefloat
pitchfloat

S2A (particles)

propertytype
typeString
positionVec3
offsetVec3
speedfloat
countint
argsint[]

S3E (teams)

propertytype
nameString
displayNameString
prefixString
suffixString
nametagVisibilityString
playerListCollection<String>
actionint
friendlyFlagsint
colorint