-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
# Conflicts: # minecraft/conn.go
- Loading branch information
Showing
22 changed files
with
127 additions
and
107 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package packet | ||
|
||
import ( | ||
"github.com/go-gl/mathgl/mgl32" | ||
"github.com/sandertv/gophertunnel/minecraft/protocol" | ||
) | ||
|
||
const ( | ||
CameraAimAssistActionSet = iota | ||
CameraAimAssistActionClear | ||
) | ||
|
||
const ( | ||
CameraAimAssistTargetModeAngle = iota | ||
CameraAimAssistTargetModeDistance | ||
) | ||
|
||
// CameraAimAssist is sent by the server to the client to set up aim assist for the client's camera. | ||
type CameraAimAssist struct { | ||
// ViewAngle is the angle that the camera should aim at, if TargetMode is set to | ||
// CameraAimAssistTargetModeAngle. | ||
ViewAngle mgl32.Vec2 | ||
// Distance is the distance that the camera should keep from the target, if TargetMode is set to | ||
// CameraAimAssistTargetModeDistance. | ||
Distance float32 | ||
// TargetMode is the mode that the camera should use to aim at the target. This is one of the constants | ||
// above. | ||
TargetMode byte | ||
// Action is the action that should be performed with the aim assist. This is one of the constants above. | ||
Action byte | ||
} | ||
|
||
// ID ... | ||
func (*CameraAimAssist) ID() uint32 { | ||
return IDCameraAimAssist | ||
} | ||
|
||
func (pk *CameraAimAssist) Marshal(io protocol.IO) { | ||
io.Vec2(&pk.ViewAngle) | ||
io.Float32(&pk.Distance) | ||
io.Uint8(&pk.TargetMode) | ||
io.Uint8(&pk.Action) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package packet | ||
|
||
import ( | ||
"github.com/sandertv/gophertunnel/minecraft/protocol" | ||
) | ||
|
||
// ContainerRegistryCleanup is sent by the server to trigger a client-side cleanup of the dynamic container | ||
// registry. | ||
type ContainerRegistryCleanup struct { | ||
// RemovedContainers is a list of protocol.FullContainerName's that should be removed from the client-side | ||
// container registry. | ||
RemovedContainers []protocol.FullContainerName | ||
} | ||
|
||
// ID ... | ||
func (*ContainerRegistryCleanup) ID() uint32 { | ||
return IDContainerRegistryCleanup | ||
} | ||
|
||
func (pk *ContainerRegistryCleanup) Marshal(io protocol.IO) { | ||
protocol.Slice(io, &pk.RemovedContainers) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.