fixup codes

This commit is contained in:
2025-08-26 12:06:00 +08:00
committed by 蒟蒻
parent 093fdaaecf
commit 9ae126c648
252 changed files with 627 additions and 369 deletions

View File

@ -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

View File

@ -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 代表一個容器

View File

@ -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
}
}