fixup codes
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
package inventory
|
||||
|
||||
import "github.com/Tnze/go-mc/chat"
|
||||
import "git.konjactw.dev/falloutBot/go-mc/chat"
|
||||
|
||||
type ContainerOpenEvent struct {
|
||||
WindowID int32
|
||||
|
@ -3,10 +3,11 @@ package inventory
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.konjactw.dev/falloutBot/go-mc/level/item"
|
||||
|
||||
"git.konjactw.dev/patyhank/minego/pkg/bot"
|
||||
"git.konjactw.dev/patyhank/minego/pkg/protocol/packet/game/server"
|
||||
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||
"github.com/Tnze/go-mc/level/item"
|
||||
)
|
||||
|
||||
// Container 代表一個容器
|
||||
|
@ -80,8 +80,10 @@ func (m *Manager) CurrentContainerID() int32 {
|
||||
func (m *Manager) Close() {
|
||||
if m.currentContainerID != -1 {
|
||||
_ = m.c.WritePacket(context.Background(), &server.ContainerClose{WindowID: m.currentContainerID})
|
||||
m.currentContainerID = -1
|
||||
} else {
|
||||
_ = m.c.WritePacket(context.Background(), &server.ContainerClose{WindowID: 0})
|
||||
m.currentContainerID = -1
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user