Skip to content

Commit

Permalink
Fix bedrock update_soft_enum packet missing encoding (#758)
Browse files Browse the repository at this point in the history
* Update protocol.json

* Update proto.yml

* apply to all versions with doc

---------

Co-authored-by: extremeheat <[email protected]>
  • Loading branch information
JSbETms and extremeheat committed Aug 23, 2023
1 parent 514787f commit d58b99f
Show file tree
Hide file tree
Showing 46 changed files with 1,126 additions and 23 deletions.
19 changes: 19 additions & 0 deletions data/bedrock/1.16.201/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1834,9 +1834,28 @@ packet_set_local_player_as_initialized:
# StartGame packet.
runtime_entity_id: varint64

# UpdateSoftEnum is sent by the server to update a soft enum, also known as a dynamic enum, previously sent
# in the AvailableCommands packet. It is sent whenever the enum should get new options or when some of its
# options should be removed.
# The UpdateSoftEnum packet will apply for enums that have been set in the AvailableCommands packet with the
# 'Dynamic' field of the CommandEnum set to true.
packet_update_soft_enum:
!id: 0x72
!bound: client
# EnumType is the type of the enum. This type must be identical to the one set in the AvailableCommands
# packet, because the client uses this to recognise which enum to update.
enum_type: string
# Options is a list of options that should be updated. Depending on the ActionType field, either these
# options will be added to the enum, the enum options will be set to these options or all of these
# options will be removed from the enum.
options: string[]varint
# ActionType is the type of the action to execute on the enum. The Options field has a different result,
# depending on what ActionType is used.
action_type: u8 =>
0: add
1: remove
2: update


packet_network_stack_latency:
!id: 0x73
Expand Down
31 changes: 30 additions & 1 deletion data/bedrock/1.16.201/protocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -6409,7 +6409,36 @@
],
"packet_update_soft_enum": [
"container",
[]
[
{
"name": "enum_type",
"type": "string"
},
{
"name": "options",
"type": [
"array",
{
"countType": "varint",
"type": "string"
}
]
},
{
"name": "action_type",
"type": [
"mapper",
{
"type": "u8",
"mappings": {
"0": "add",
"1": "remove",
"2": "update"
}
}
]
}
]
],
"packet_network_stack_latency": [
"container",
Expand Down
19 changes: 19 additions & 0 deletions data/bedrock/1.16.210/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1925,9 +1925,28 @@ packet_set_local_player_as_initialized:
# StartGame packet.
runtime_entity_id: varint64

# UpdateSoftEnum is sent by the server to update a soft enum, also known as a dynamic enum, previously sent
# in the AvailableCommands packet. It is sent whenever the enum should get new options or when some of its
# options should be removed.
# The UpdateSoftEnum packet will apply for enums that have been set in the AvailableCommands packet with the
# 'Dynamic' field of the CommandEnum set to true.
packet_update_soft_enum:
!id: 0x72
!bound: client
# EnumType is the type of the enum. This type must be identical to the one set in the AvailableCommands
# packet, because the client uses this to recognise which enum to update.
enum_type: string
# Options is a list of options that should be updated. Depending on the ActionType field, either these
# options will be added to the enum, the enum options will be set to these options or all of these
# options will be removed from the enum.
options: string[]varint
# ActionType is the type of the action to execute on the enum. The Options field has a different result,
# depending on what ActionType is used.
action_type: u8 =>
0: add
1: remove
2: update


packet_network_stack_latency:
!id: 0x73
Expand Down
31 changes: 30 additions & 1 deletion data/bedrock/1.16.210/protocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -6630,7 +6630,36 @@
],
"packet_update_soft_enum": [
"container",
[]
[
{
"name": "enum_type",
"type": "string"
},
{
"name": "options",
"type": [
"array",
{
"countType": "varint",
"type": "string"
}
]
},
{
"name": "action_type",
"type": [
"mapper",
{
"type": "u8",
"mappings": {
"0": "add",
"1": "remove",
"2": "update"
}
}
]
}
]
],
"packet_network_stack_latency": [
"container",
Expand Down
19 changes: 19 additions & 0 deletions data/bedrock/1.16.220/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2263,9 +2263,28 @@ packet_set_local_player_as_initialized:
# StartGame packet.
runtime_entity_id: varint64

# UpdateSoftEnum is sent by the server to update a soft enum, also known as a dynamic enum, previously sent
# in the AvailableCommands packet. It is sent whenever the enum should get new options or when some of its
# options should be removed.
# The UpdateSoftEnum packet will apply for enums that have been set in the AvailableCommands packet with the
# 'Dynamic' field of the CommandEnum set to true.
packet_update_soft_enum:
!id: 0x72
!bound: client
# EnumType is the type of the enum. This type must be identical to the one set in the AvailableCommands
# packet, because the client uses this to recognise which enum to update.
enum_type: string
# Options is a list of options that should be updated. Depending on the ActionType field, either these
# options will be added to the enum, the enum options will be set to these options or all of these
# options will be removed from the enum.
options: string[]varint
# ActionType is the type of the action to execute on the enum. The Options field has a different result,
# depending on what ActionType is used.
action_type: u8 =>
0: add
1: remove
2: update


# NetworkStackLatency is sent by the server (and the client, on development builds) to measure the latency
# over the entire Minecraft stack, rather than the RakNet latency. It has other usages too, such as the
Expand Down
31 changes: 30 additions & 1 deletion data/bedrock/1.16.220/protocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -7397,7 +7397,36 @@
],
"packet_update_soft_enum": [
"container",
[]
[
{
"name": "enum_type",
"type": "string"
},
{
"name": "options",
"type": [
"array",
{
"countType": "varint",
"type": "string"
}
]
},
{
"name": "action_type",
"type": [
"mapper",
{
"type": "u8",
"mappings": {
"0": "add",
"1": "remove",
"2": "update"
}
}
]
}
]
],
"packet_network_stack_latency": [
"container",
Expand Down
19 changes: 19 additions & 0 deletions data/bedrock/1.17.0/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2265,9 +2265,28 @@ packet_set_local_player_as_initialized:
# StartGame packet.
runtime_entity_id: varint64

# UpdateSoftEnum is sent by the server to update a soft enum, also known as a dynamic enum, previously sent
# in the AvailableCommands packet. It is sent whenever the enum should get new options or when some of its
# options should be removed.
# The UpdateSoftEnum packet will apply for enums that have been set in the AvailableCommands packet with the
# 'Dynamic' field of the CommandEnum set to true.
packet_update_soft_enum:
!id: 0x72
!bound: client
# EnumType is the type of the enum. This type must be identical to the one set in the AvailableCommands
# packet, because the client uses this to recognise which enum to update.
enum_type: string
# Options is a list of options that should be updated. Depending on the ActionType field, either these
# options will be added to the enum, the enum options will be set to these options or all of these
# options will be removed from the enum.
options: string[]varint
# ActionType is the type of the action to execute on the enum. The Options field has a different result,
# depending on what ActionType is used.
action_type: u8 =>
0: add
1: remove
2: update


# NetworkStackLatency is sent by the server (and the client, on development builds) to measure the latency
# over the entire Minecraft stack, rather than the RakNet latency. It has other usages too, such as the
Expand Down
31 changes: 30 additions & 1 deletion data/bedrock/1.17.0/protocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -7476,7 +7476,36 @@
],
"packet_update_soft_enum": [
"container",
[]
[
{
"name": "enum_type",
"type": "string"
},
{
"name": "options",
"type": [
"array",
{
"countType": "varint",
"type": "string"
}
]
},
{
"name": "action_type",
"type": [
"mapper",
{
"type": "u8",
"mappings": {
"0": "add",
"1": "remove",
"2": "update"
}
}
]
}
]
],
"packet_network_stack_latency": [
"container",
Expand Down
19 changes: 19 additions & 0 deletions data/bedrock/1.17.10/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2362,9 +2362,28 @@ packet_set_local_player_as_initialized:
# StartGame packet.
runtime_entity_id: varint64

# UpdateSoftEnum is sent by the server to update a soft enum, also known as a dynamic enum, previously sent
# in the AvailableCommands packet. It is sent whenever the enum should get new options or when some of its
# options should be removed.
# The UpdateSoftEnum packet will apply for enums that have been set in the AvailableCommands packet with the
# 'Dynamic' field of the CommandEnum set to true.
packet_update_soft_enum:
!id: 0x72
!bound: client
# EnumType is the type of the enum. This type must be identical to the one set in the AvailableCommands
# packet, because the client uses this to recognise which enum to update.
enum_type: string
# Options is a list of options that should be updated. Depending on the ActionType field, either these
# options will be added to the enum, the enum options will be set to these options or all of these
# options will be removed from the enum.
options: string[]varint
# ActionType is the type of the action to execute on the enum. The Options field has a different result,
# depending on what ActionType is used.
action_type: u8 =>
0: add
1: remove
2: update


# NetworkStackLatency is sent by the server (and the client, on development builds) to measure the latency
# over the entire Minecraft stack, rather than the RakNet latency. It has other usages too, such as the
Expand Down
31 changes: 30 additions & 1 deletion data/bedrock/1.17.10/protocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -7592,7 +7592,36 @@
],
"packet_update_soft_enum": [
"container",
[]
[
{
"name": "enum_type",
"type": "string"
},
{
"name": "options",
"type": [
"array",
{
"countType": "varint",
"type": "string"
}
]
},
{
"name": "action_type",
"type": [
"mapper",
{
"type": "u8",
"mappings": {
"0": "add",
"1": "remove",
"2": "update"
}
}
]
}
]
],
"packet_network_stack_latency": [
"container",
Expand Down
19 changes: 19 additions & 0 deletions data/bedrock/1.17.30/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2378,9 +2378,28 @@ packet_set_local_player_as_initialized:
# StartGame packet.
runtime_entity_id: varint64

# UpdateSoftEnum is sent by the server to update a soft enum, also known as a dynamic enum, previously sent
# in the AvailableCommands packet. It is sent whenever the enum should get new options or when some of its
# options should be removed.
# The UpdateSoftEnum packet will apply for enums that have been set in the AvailableCommands packet with the
# 'Dynamic' field of the CommandEnum set to true.
packet_update_soft_enum:
!id: 0x72
!bound: client
# EnumType is the type of the enum. This type must be identical to the one set in the AvailableCommands
# packet, because the client uses this to recognise which enum to update.
enum_type: string
# Options is a list of options that should be updated. Depending on the ActionType field, either these
# options will be added to the enum, the enum options will be set to these options or all of these
# options will be removed from the enum.
options: string[]varint
# ActionType is the type of the action to execute on the enum. The Options field has a different result,
# depending on what ActionType is used.
action_type: u8 =>
0: add
1: remove
2: update


# NetworkStackLatency is sent by the server (and the client, on development builds) to measure the latency
# over the entire Minecraft stack, rather than the RakNet latency. It has other usages too, such as the
Expand Down
Loading

0 comments on commit d58b99f

Please sign in to comment.