Skip to content

Commit

Permalink
Fix CameraPresets parse error (#782)
Browse files Browse the repository at this point in the history
* Fix CameraPresets parse error

* Fix requested changes
  • Loading branch information
MrDiamond64 committed Oct 9, 2023
1 parent 16aaf99 commit 4139610
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 35 deletions.
67 changes: 41 additions & 26 deletions data/bedrock/1.20.30/protocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -3989,6 +3989,41 @@
}
]
],
"CameraPresets": [
"container",
[
{
"name": "name",
"type": "string"
},
{
"name": "parent",
"type": "string"
},
{
"name": "position",
"type": "Vec3fopts"
},
{
"name": "rotation",
"type": "Vec2fopts"
},
{
"name": "audio_listener",
"type": [
"option",
"u8"
]
},
{
"name": "player_effects",
"type": [
"option",
"bool"
]
}
]
],
"mcpe_packet": [
"container",
[
Expand Down Expand Up @@ -11044,33 +11079,13 @@
"container",
[
{
"name": "name",
"type": "string"
},
{
"name": "parent",
"type": "string"
},
{
"name": "position",
"type": "Vec3fopts"
},
{
"name": "rotation",
"type": "Vec2fopts"
},
{
"name": "audio_listener",
"type": [
"option",
"u8"
]
},
{
"name": "player_effects",
"name": "presets",
"type": [
"option",
"bool"
"array",
{
"countType": "varint",
"type": "CameraPresets"
}
]
}
]
Expand Down
10 changes: 1 addition & 9 deletions data/bedrock/latest/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3964,15 +3964,7 @@ packet_client_cheat_ability:
packet_camera_presets:
!id: 0xc6
!bound: client
# Name is the name of the preset. Each preset must have their own unique name.
name: string
# Parent is the name of the preset that this preset extends upon. This can be left empty.
parent: string
position: Vec3fopts
rotation: Vec2fopts
## TODO: make this an enum afer adding proper optional support inside pdefyaml
audio_listener?: u8
player_effects?: bool
presets: CameraPresets[]varint

# unlocked_recipes gives the client a list of recipes that have been unlocked, restricting the recipes that appear in
# the recipe book.
Expand Down
11 changes: 11 additions & 0 deletions data/bedrock/latest/types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2115,3 +2115,14 @@ AbilityLayers:
fly_speed: lf32
# WalkSpeed is the default walk speed of the layer.
walk_speed: lf32

CameraPresets:
# Name is the name of the preset. Each preset must have their own unique name.
name: string
# Parent is the name of the preset that this preset extends upon. This can be left empty.
parent: string
position: Vec3fopts
rotation: Vec2fopts
## TODO: make this an enum afer adding proper optional support inside pdefyaml
audio_listener?: u8
player_effects?: bool

0 comments on commit 4139610

Please sign in to comment.