Skip to content

Commit

Permalink
protocol/camera.go: Add missing ViewOffset field to CameraInstructionSet
Browse files Browse the repository at this point in the history
  • Loading branch information
TwistedAsylumMC committed Aug 15, 2024
1 parent 9a93ed3 commit 10de298
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions minecraft/protocol/camera.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ type CameraInstructionSet struct {
Rotation Optional[mgl32.Vec2]
// Facing is a vector that the camera will always face towards during the duration of the instruction.
Facing Optional[mgl32.Vec3]
// ViewOffset is an offset based on a pivot point to the player, causing the camera to be shifted in a
// certain direction.
ViewOffset Optional[mgl32.Vec2]
// Default determines whether the camera is a default camera or not.
Default Optional[bool]
}
Expand All @@ -83,6 +86,7 @@ func (x *CameraInstructionSet) Marshal(r IO) {
OptionalFunc(r, &x.Position, r.Vec3)
OptionalFunc(r, &x.Rotation, r.Vec2)
OptionalFunc(r, &x.Facing, r.Vec3)
OptionalFunc(r, &x.ViewOffset, r.Vec2)
OptionalFunc(r, &x.Default, r.Bool)
}

Expand Down

0 comments on commit 10de298

Please sign in to comment.