fixup codes
This commit is contained in:
@ -25,6 +25,14 @@ type ClientOptions struct {
|
||||
AuthProvider auth.Provider
|
||||
}
|
||||
|
||||
type ConnectOptions struct {
|
||||
FakeHost string
|
||||
type ProxyConfig struct {
|
||||
Type string `json:"type" toml:"type"`
|
||||
Host string `json:"host" toml:"host"`
|
||||
Username string `json:"username" toml:"username"`
|
||||
Password string `json:"password" toml:"password"`
|
||||
}
|
||||
|
||||
type ConnectOptions struct {
|
||||
FakeHost string `json:"fake_host,omitempty" toml:"fake_host,omitempty"`
|
||||
Proxy *ProxyConfig `json:"proxy,omitempty" toml:"proxy,omitempty"`
|
||||
}
|
||||
|
@ -3,12 +3,15 @@ package bot
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.konjactw.dev/falloutBot/go-mc/data/packetid"
|
||||
"git.konjactw.dev/falloutBot/go-mc/net/packet"
|
||||
|
||||
"git.konjactw.dev/patyhank/minego/pkg/protocol/packet/game/client"
|
||||
"github.com/Tnze/go-mc/data/packetid"
|
||||
)
|
||||
|
||||
type PacketHandler interface {
|
||||
AddPacketHandler(id packetid.ClientboundPacketID, handler func(ctx context.Context, p client.ClientboundPacket))
|
||||
AddRawPacketHandler(id packetid.ClientboundPacketID, handler func(ctx context.Context, p packet.Packet))
|
||||
AddGenericPacketHandler(handler func(ctx context.Context, p client.ClientboundPacket))
|
||||
HandlePacket(ctx context.Context, p client.ClientboundPacket)
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
package bot
|
||||
|
||||
import (
|
||||
"git.konjactw.dev/falloutBot/go-mc/level/item"
|
||||
|
||||
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||
"github.com/Tnze/go-mc/level/item"
|
||||
)
|
||||
|
||||
type Container interface {
|
||||
|
@ -1,8 +1,9 @@
|
||||
package bot
|
||||
|
||||
import (
|
||||
"git.konjactw.dev/patyhank/minego/pkg/protocol"
|
||||
"github.com/go-gl/mathgl/mgl64"
|
||||
|
||||
"git.konjactw.dev/patyhank/minego/pkg/protocol"
|
||||
)
|
||||
|
||||
type Player interface {
|
||||
@ -13,6 +14,7 @@ type Player interface {
|
||||
FlyTo(pos mgl64.Vec3) error
|
||||
WalkTo(pos mgl64.Vec3) error
|
||||
LookAt(vec3 mgl64.Vec3) error
|
||||
UpdateLocation()
|
||||
|
||||
BreakBlock(pos protocol.Position) error
|
||||
PlaceBlock(pos protocol.Position) error
|
||||
@ -22,4 +24,7 @@ type Player interface {
|
||||
UseItem(hand int8) error
|
||||
|
||||
OpenMenu(command string) (Container, error)
|
||||
Command(command string) error
|
||||
Chat(message string) error
|
||||
CheckServer()
|
||||
}
|
||||
|
@ -1,13 +1,15 @@
|
||||
package bot
|
||||
|
||||
import (
|
||||
"github.com/go-gl/mathgl/mgl64"
|
||||
"github.com/google/uuid"
|
||||
|
||||
"git.konjactw.dev/falloutBot/go-mc/data/entity"
|
||||
"git.konjactw.dev/falloutBot/go-mc/level/block"
|
||||
|
||||
"git.konjactw.dev/patyhank/minego/pkg/protocol"
|
||||
"git.konjactw.dev/patyhank/minego/pkg/protocol/metadata"
|
||||
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||
"github.com/Tnze/go-mc/data/entity"
|
||||
"github.com/Tnze/go-mc/level/block"
|
||||
"github.com/go-gl/mathgl/mgl64"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type World interface {
|
||||
@ -32,4 +34,7 @@ type Entity interface {
|
||||
|
||||
Metadata() map[uint8]metadata.Metadata
|
||||
Equipment() map[int8]slot.Slot
|
||||
|
||||
SetPosition(pos mgl64.Vec3)
|
||||
SetRotation(rot mgl64.Vec2)
|
||||
}
|
||||
|
Reference in New Issue
Block a user