Start implementing boilerplate for manipulating inventory
This commit is contained in:
@ -9,7 +9,9 @@ import (
|
||||
"github.com/Tnze/go-mc/bot/world"
|
||||
"github.com/Tnze/go-mc/bot/world/entity"
|
||||
"github.com/Tnze/go-mc/bot/world/entity/player"
|
||||
"github.com/Tnze/go-mc/data"
|
||||
"github.com/Tnze/go-mc/net"
|
||||
"github.com/Tnze/go-mc/net/packet"
|
||||
pk "github.com/Tnze/go-mc/net/packet"
|
||||
)
|
||||
|
||||
@ -47,6 +49,10 @@ func (c *Client) Close() error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *Client) SendCloseWindow(windowID byte) error {
|
||||
return c.conn.WritePacket(packet.Marshal(data.CloseWindowServerbound, pk.UnsignedByte(windowID)))
|
||||
}
|
||||
|
||||
// NewClient init and return a new Client.
|
||||
//
|
||||
// A new Client has default name "Steve" and zero UUID.
|
||||
|
Reference in New Issue
Block a user