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.
| property | type | description |
|---|---|---|
| name | String | simple packet class name |
C0A (animation)
java
new C0A();C0B (entity action)
java
new C0B(String action, int horsePower);| property | type | description |
|---|---|---|
| action | String | entity action name |
| horsepower | int | horse jump power |
C0D (close window)
java
new C0D(int windowId);| property | type |
|---|---|
| windowId | int |
C0E (click window)
java
new C0E(int windowId, int slot, int button, int mode, ItemStack itemStack);| property | type | description |
|---|---|---|
| windowId | int | window id |
| slot | int | inventory slot |
| button | int | mouse button |
| mode | int | click mode |
| action | short | transaction id |
| itemStack | ItemStack | clicked stack |
C0F (confirm transaction)
java
new C0F(int windowId, short uid);| property | type |
|---|---|
| windowId | int |
| uid | short |
C01 (chat message)
java
new C01(String message);| property | type |
|---|---|
| message | String |
C02 (use entity)
java
new C02(Entity entity, String action, Vec3 hitVec);| property | type | description |
|---|---|---|
| entity | Entity | target entity |
| action | String | ATTACK / INTERACT / INTERACT_AT |
| hitVec | Vec3 | hit 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)| property | type | description |
|---|---|---|
| position | Vec3 | player position |
| yaw | float | yaw angle |
| pitch | float | pitch angle |
| ground | boolean | on ground flag |
| moving | boolean | whether position is included |
| rotating | boolean | whether rotation is included |
C07 (player digging)
java
new C07(Vec3 position, String status, String facing);| property | type |
|---|---|
| position | Vec3 |
| status | String |
| facing | String |
C08 (block placement)
java
new C08(ItemStack itemStack);
new C08(ItemStack itemStack, Vec3 position, int direction, Vec3 offset);| property | type | description |
|---|---|---|
| itemStack | ItemStack | held item |
| position | Vec3 | block position |
| direction | int | placed block face |
| offset | Vec3 | hit offset |
C09 (held item change)
java
new C09(int slot);| property | type |
|---|---|
| slot | int |
C10 (creative inventory action)
java
new C10(int slot, ItemStack itemStack);| property | type |
|---|---|
| slot | int |
| itemStack | ItemStack |
C13 (player abilities)
java
new C13(boolean invulnerable, boolean flying, boolean allowFlying, boolean creativeMode, float flySpeed, float walkSpeed);| property | type |
|---|---|
| invulnerable | boolean |
| flying | boolean |
| allowFlying | boolean |
| creativeMode | boolean |
| flySpeed | float |
| walkSpeed | float |
C16 (client status)
java
new C16(String status);| property | type |
|---|---|
| status | String |
SPacket
Base wrapper for inbound packets.
| property | type | description |
|---|---|---|
| name | String | simple packet class name |
S06 (update health)
| property | type |
|---|---|
| health | float |
| saturation | float |
| food | int |
S08 (player position and look)
| property | type |
|---|---|
| position | Vec3 |
| yaw | float |
| pitch | float |
S09 (held item change)
| property | type |
|---|---|
| slot | int |
S12 (entity velocity)
| property | type |
|---|---|
| entityId | int |
| motion | Vec3 |
S23 (block change)
| property | type |
|---|---|
| position | Vec3 |
| block | Block |
S27 (explosion)
| property | type |
|---|---|
| strength | float |
| position | Vec3 |
| motion | Vec3 |
S29 (sound effect)
| property | type |
|---|---|
| sound | String |
| position | Vec3 |
| volume | float |
| pitch | float |
S2A (particles)
| property | type |
|---|---|
| type | String |
| position | Vec3 |
| offset | Vec3 |
| speed | float |
| count | int |
| args | int[] |
S3E (teams)
| property | type |
|---|---|
| name | String |
| displayName | String |
| prefix | String |
| suffix | String |
| nametagVisibility | String |
| playerList | Collection<String> |
| action | int |
| friendlyFlags | int |
| color | int |