Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pc1.21.3 protocol: fix slot itemId name and player_info bitfield #963

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 21 additions & 51 deletions data/pc/1.21.3/protocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,7 @@
"container",
[
{
"name": "item",
"name": "itemId",
"type": "varint"
},
{
Expand Down Expand Up @@ -6066,49 +6066,19 @@
{
"name": "action",
"type": [
"bitfield",
[
{
"name": "unused",
"size": 1,
"signed": false
},
{
"name": "update_priority",
"size": 1,
"signed": false
},
{
"name": "update_display_name",
"size": 1,
"signed": false
},
{
"name": "update_latency",
"size": 1,
"signed": false
},
{
"name": "update_listed",
"size": 1,
"signed": false
},
{
"name": "update_game_mode",
"size": 1,
"signed": false
},
{
"name": "initialize_chat",
"size": 1,
"signed": false
},
{
"name": "add_player",
"size": 1,
"signed": false
}
]
"bitflags",
{
"type": "u8",
"flags": [
"add_player",
"initialize_chat",
"update_game_mode",
"update_listed",
"update_latency",
"update_display_name",
"update_priority"
]
}
]
},
{
Expand All @@ -6131,7 +6101,7 @@
{
"compareTo": "../action/add_player",
"fields": {
"1": "game_profile"
"true": "game_profile"
},
"default": "void"
}
Expand All @@ -6144,7 +6114,7 @@
{
"compareTo": "../action/initialize_chat",
"fields": {
"1": "chat_session"
"true": "chat_session"
},
"default": "void"
}
Expand All @@ -6157,7 +6127,7 @@
{
"compareTo": "../action/update_game_mode",
"fields": {
"1": "varint"
"true": "varint"
},
"default": "void"
}
Expand All @@ -6170,7 +6140,7 @@
{
"compareTo": "../action/update_listed",
"fields": {
"1": "varint"
"true": "varint"
},
"default": "void"
}
Expand All @@ -6183,7 +6153,7 @@
{
"compareTo": "../action/update_latency",
"fields": {
"1": "varint"
"true": "varint"
},
"default": "void"
}
Expand All @@ -6196,7 +6166,7 @@
{
"compareTo": "../action/update_display_name",
"fields": {
"1": [
"true": [
"option",
"anonymousNbt"
]
Expand All @@ -6212,7 +6182,7 @@
{
"compareTo": "../action/update_priority",
"fields": {
"1": "varint"
"true": "varint"
},
"default": "void"
}
Expand Down
39 changes: 20 additions & 19 deletions data/pc/latest/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@
_: itemCount ?
if 0: void
default:
item: varint
itemId: varint
# https://wiki.vg/Slot_Data#Structured_components
addedComponentCount: varint
removedComponentCount: varint
Expand Down Expand Up @@ -2099,39 +2099,40 @@
players: UUID[]varint
# MC: ClientboundPlayerInfoUpdatePacket
packet_player_info:
# action is a bitfield of the above
action: ["bitfield", [
{ "name": "unused", "size": 1, "signed": false },
{ "name": "update_priority", "size": 1, "signed": false },
{ "name": "update_display_name", "size": 1, "signed": false },
{ "name": "update_latency", "size": 1, "signed": false },
{ "name": "update_listed", "size": 1, "signed": false },
{ "name": "update_game_mode", "size": 1, "signed": false },
{ "name": "initialize_chat", "size": 1, "signed": false },
{ "name": "add_player", "size": 1, "signed": false }
]]
action: ["bitflags", {
"type": "u8",
"flags": [
"add_player",
"initialize_chat",
"update_game_mode",
"update_listed",
"update_latency",
"update_display_name",
"update_priority"
]
}]
data: []varint
uuid: UUID
player: ../action/add_player ?
if 1: game_profile
if true: game_profile
default: void
chatSession: ../action/initialize_chat ?
if 1: chat_session
if true: chat_session
default: void
gamemode: ../action/update_game_mode ?
if 1: varint
if true: varint
default: void
listed: ../action/update_listed ?
if 1: varint
if true: varint
default: void
latency: ../action/update_latency ?
if 1: varint
if true: varint
default: void
displayName: ../action/update_display_name ?
if 1: ["option", "anonymousNbt"]
if true: ["option", "anonymousNbt"]
default: void
listPriority: ../action/update_priority ?
if 1: varint
if true: varint
default: void

# MC: ClientboundPlayerLookAtPacket
Expand Down
Loading