add player package with key client-side player functionality, update protocol codecs, and refactor metadata definitions and slot usage
This commit is contained in:
25
pkg/bot/player.go
Normal file
25
pkg/bot/player.go
Normal file
@ -0,0 +1,25 @@
|
||||
package bot
|
||||
|
||||
import (
|
||||
"git.konjactw.dev/patyhank/minego/pkg/protocol"
|
||||
"github.com/go-gl/mathgl/mgl64"
|
||||
)
|
||||
|
||||
type Player interface {
|
||||
StateID() int32
|
||||
UpdateStateID(id int32)
|
||||
Entity() Entity
|
||||
|
||||
FlyTo(pos mgl64.Vec3) error
|
||||
WalkTo(pos mgl64.Vec3) error
|
||||
LookAt(vec3 mgl64.Vec3) error
|
||||
|
||||
BreakBlock(pos protocol.Position) error
|
||||
PlaceBlock(pos protocol.Position) error
|
||||
PlaceBlockWithArgs(pos protocol.Position, face int32, cursor mgl64.Vec3) error
|
||||
OpenContainer(pos protocol.Position) (Container, error)
|
||||
|
||||
UseItem(hand int8) error
|
||||
|
||||
OpenMenu(command string) (Container, error)
|
||||
}
|
Reference in New Issue
Block a user