Skip to content

Commit

Permalink
protocol/camera.go: Add missing EntityOffset field to CameraInstructi…
Browse files Browse the repository at this point in the history
…onSet
  • Loading branch information
TwistedAsylumMC committed Oct 27, 2024
1 parent 69356c8 commit 8883ef9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions minecraft/protocol/camera.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ type CameraInstructionSet struct {
// 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]
// EntityOffset is an offset from the entity that the camera should be rendered at.
EntityOffset Optional[mgl32.Vec3]
// Default determines whether the camera is a default camera or not.
Default Optional[bool]
}
Expand All @@ -87,6 +89,7 @@ func (x *CameraInstructionSet) Marshal(r IO) {
OptionalFunc(r, &x.Rotation, r.Vec2)
OptionalFunc(r, &x.Facing, r.Vec3)
OptionalFunc(r, &x.ViewOffset, r.Vec2)
OptionalFunc(r, &x.EntityOffset, r.Vec3)
OptionalFunc(r, &x.Default, r.Bool)
}

Expand Down

0 comments on commit 8883ef9

Please sign in to comment.