Major update to implement basic collision

This commit is contained in:
Tom
2020-09-16 20:16:47 -07:00
parent eec9d30795
commit 70bb24a7fb
9 changed files with 501 additions and 54 deletions

View File

@ -2,6 +2,7 @@ package bot
import (
"github.com/Tnze/go-mc/bot/world/entity"
"github.com/Tnze/go-mc/bot/world/entity/player"
"github.com/Tnze/go-mc/chat"
"github.com/google/uuid"
@ -64,6 +65,9 @@ type eventBroker struct {
// things.
GameReady func() error
// PositionChange is called whenever the player position is updated.
PositionChange func(pos player.Pos) error
// ReceivePacket will be called when new packets arrive.
// The default handler will run only if pass == false.
ReceivePacket func(p pk.Packet) (pass bool, err error)