-
-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
64177de
commit d16b15a
Showing
14 changed files
with
128 additions
and
4 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -19,6 +19,7 @@ const ( | |
AbilityMuted | ||
AbilityWorldBuilder | ||
AbilityNoClip | ||
AbilityPrivilegedBuilder | ||
AbilityCount | ||
) | ||
|
||
|
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,27 @@ | ||
package packet | ||
|
||
import ( | ||
"github.com/sandertv/gophertunnel/minecraft/nbt" | ||
"github.com/sandertv/gophertunnel/minecraft/protocol" | ||
) | ||
|
||
// CameraInstruction gives a custom camera specific instructions to operate. | ||
type CameraInstruction struct { | ||
// Data is a compound tag of the instructions to sent. The structure of this tag is currently unknown. | ||
Data map[string]any | ||
} | ||
|
||
// ID ... | ||
func (*CameraInstruction) ID() uint32 { | ||
return IDCameraInstruction | ||
} | ||
|
||
// Marshal ... | ||
func (pk *CameraInstruction) Marshal(w *protocol.Writer) { | ||
w.NBT(&pk.Data, nbt.NetworkLittleEndian) | ||
} | ||
|
||
// Unmarshal ... | ||
func (pk *CameraInstruction) Unmarshal(r *protocol.Reader) { | ||
r.NBT(&pk.Data, nbt.NetworkLittleEndian) | ||
} |
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,27 @@ | ||
package packet | ||
|
||
import ( | ||
"github.com/sandertv/gophertunnel/minecraft/nbt" | ||
"github.com/sandertv/gophertunnel/minecraft/protocol" | ||
) | ||
|
||
// CameraPresets gives the client a list of custom camera presets. | ||
type CameraPresets struct { | ||
// Data is a compound tag of the presets being set. The structure of this tag is currently unknown. | ||
Data map[string]any | ||
} | ||
|
||
// ID ... | ||
func (*CameraPresets) ID() uint32 { | ||
return IDCameraPresets | ||
} | ||
|
||
// Marshal ... | ||
func (pk *CameraPresets) Marshal(w *protocol.Writer) { | ||
w.NBT(&pk.Data, nbt.NetworkLittleEndian) | ||
} | ||
|
||
// Unmarshal ... | ||
func (pk *CameraPresets) Unmarshal(r *protocol.Reader) { | ||
r.NBT(&pk.Data, nbt.NetworkLittleEndian) | ||
} |
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,31 @@ | ||
package packet | ||
|
||
import ( | ||
"github.com/sandertv/gophertunnel/minecraft/protocol" | ||
) | ||
|
||
// UnlockedRecipes gives the client a list of recipes that have been unlocked, restricting the recipes that appear in | ||
// the recipe book. | ||
type UnlockedRecipes struct { | ||
// NewUnlocks determines if new recipes have been unlocked since the packet was last sent. | ||
NewUnlocks bool | ||
// Recipes is a list of recipe names that have been unlocked. | ||
Recipes []string | ||
} | ||
|
||
// ID ... | ||
func (*UnlockedRecipes) ID() uint32 { | ||
return IDUnlockedRecipes | ||
} | ||
|
||
// Marshal ... | ||
func (pk *UnlockedRecipes) Marshal(w *protocol.Writer) { | ||
w.Bool(&pk.NewUnlocks) | ||
protocol.FuncSlice(w, &pk.Recipes, w.String) | ||
} | ||
|
||
// Unmarshal ... | ||
func (pk *UnlockedRecipes) Unmarshal(r *protocol.Reader) { | ||
r.Bool(&pk.NewUnlocks) | ||
protocol.FuncSlice(r, &pk.Recipes, r.String) | ||
} |
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