add player package with key client-side player functionality, update protocol codecs, and refactor metadata definitions and slot usage
This commit is contained in:
23
pkg/bot/inventory.go
Normal file
23
pkg/bot/inventory.go
Normal file
@ -0,0 +1,23 @@
|
||||
package bot
|
||||
|
||||
import (
|
||||
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||
"github.com/Tnze/go-mc/level/item"
|
||||
)
|
||||
|
||||
type Container interface {
|
||||
GetSlot(index int) slot.Slot
|
||||
Slots() []slot.Slot
|
||||
SlotCount() int
|
||||
FindEmpty() int16
|
||||
FindItem(itemID item.ID) int16
|
||||
Click(slot int16, mode int32, button int32) error
|
||||
}
|
||||
|
||||
type InventoryHandler interface {
|
||||
Inventory() Container
|
||||
Container() Container
|
||||
CurrentContainerID() int32
|
||||
Click(container int32, slot int16, mode int32, button int32) error
|
||||
Close()
|
||||
}
|
Reference in New Issue
Block a user