df-mc / dragonfly

Minecraft Bedrock Edition server software written in Go
https://discord.gg/U4kFWHhTNR
MIT License
680 stars 140 forks source link

panic when placing banner: runtime error: hash of unhashable type block.Banner #873

Closed RestartFU closed 5 months ago

RestartFU commented 5 months ago

this happens when placing a black banner taken from the creative inventory.


goroutine 93 [running]:
runtime/debug.Stack()
        C:/Program Files/Go/src/runtime/debug/stack.go:24 +0x5e
github.com/bedrock-gophers/inv/inv.RedirectPlayerPackets.func1.1()
        C:/Users/Administrator/go/pkg/mod/github.com/bedrock-gophers/inv@v0.1.1-0.20240522150948-e0ca8baa6cb0/inv/player.go:36 +0x8c
panic({0xd8b660?, 0xc0053d0a70?})
        C:/Program Files/Go/src/runtime/panic.go:770 +0x132
github.com/moyai-network/teams/moyai/user.MageEffectFromItem(...)
        C:/Users/Administrator/Desktop/teams-master/moyai/user/ticker.go:364
github.com/moyai-network/teams/moyai/user.(*Handler).HandleItemUse(0xc00207f208, 0xc000e3b148)
        C:/Users/Administrator/Desktop/teams-master/moyai/user/handler.go:591 +0x910
github.com/df-mc/dragonfly/server/player.(*Player).UseItem(0xc00173d348)
        C:/Users/Administrator/go/pkg/mod/github.com/x!natsuri/dragonfly@v0.0.0-20240522032622-59488bcb04e3/server/player/player.go:1284 +0x2d6
github.com/df-mc/dragonfly/server/session.(*InventoryTransactionHandler).handleUseItemTransaction(0x241d?, 0xc0053ca000, 0xc001740800)
        C:/Users/Administrator/go/pkg/mod/github.com/x!natsuri/dragonfly@v0.0.0-20240522032622-59488bcb04e3/server/session/handler_inventory_transaction.go:162 +0x1a7
github.com/df-mc/dragonfly/server/session.(*InventoryTransactionHandler).Handle(0x1af3620, {0x10ba528?, 0xc0051053b0?}, 0xc001740800)
        C:/Users/Administrator/go/pkg/mod/github.com/x!natsuri/dragonfly@v0.0.0-20240522032622-59488bcb04e3/server/session/handler_inventory_transaction.go:42 +0x470
github.com/df-mc/dragonfly/server/session.(*Session).handlePacket(0xc001740800, {0x10ba528, 0xc0051053b0})
        C:/Users/Administrator/go/pkg/mod/github.com/x!natsuri/dragonfly@v0.0.0-20240522032622-59488bcb04e3/server/session/session.go:426 +0x8d
github.com/bedrock-gophers/inv/inv.RedirectPlayerPackets.func1()
        C:/Users/Administrator/go/pkg/mod/github.com/bedrock-gophers/inv@v0.1.1-0.20240522150948-e0ca8baa6cb0/inv/player.go:54 +0x14b
created by github.com/bedrock-gophers/inv/inv.RedirectPlayerPackets in goroutine 1
        C:/Users/Administrator/go/pkg/mod/github.com/bedrock-gophers/inv@v0.1.1-0.20240522150948-e0ca8baa6cb0/inv/player.go:30 +0x166```