Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

world.BlockRuntimeID panics when placing down Furnace #833

Closed
ethaniccc opened this issue Dec 17, 2023 · 0 comments · Fixed by #840
Closed

world.BlockRuntimeID panics when placing down Furnace #833

ethaniccc opened this issue Dec 17, 2023 · 0 comments · Fixed by #840
Labels
bug Something isn't working
Milestone

Comments

@ethaniccc
Copy link

ethaniccc commented Dec 17, 2023

INFO[0000] Server running on [::]:4444.                 
coEthaniccc has joined the game
DEBU[0129] unhandled packet *packet.SetPlayerInventoryOptions{LeftInventoryTab:10 RightInventoryTab:4 Filtering:false InventoryLayout:6 CraftingLayout:0} from xxx:53436 
panic: cannot find block by non-0 hash of block block.Furnace{solid:block.solid{}, bassDrum:block.bassDrum{}, smelter:(*block.smelter)(0xc00148a540), Facing:0, Lit:false} [recovered]
        panic: cannot find block by non-0 hash of block block.Furnace{solid:block.solid{}, bassDrum:block.bassDrum{}, smelter:(*block.smelter)(0xc00148a540), Facing:0, Lit:false}

goroutine 56 [running]:
github.com/df-mc/dragonfly/server/session.(*Session).handlePackets.func1()
        /root/dragonfly/server/session/session.go:303 +0x69
panic({0x966420?, 0xc000461df0?})
        /snap/go/10455/src/runtime/panic.go:914 +0x21f
github.com/df-mc/dragonfly/server/world.BlockRuntimeID({0xb62a10, 0xc0010814a0})
        /root/dragonfly/server/world/block.go:136 +0xd4
github.com/df-mc/dragonfly/server/session.stackFromItem({0x1873, {0xb58560, 0xc0010814a0}, 0x1, {0x0, 0x0}, {0x0, 0x0, 0x0}, 0x0, ...})
        /root/dragonfly/server/session/player.go:710 +0x1e7
github.com/df-mc/dragonfly/server/session.instanceFromItem({0x1873, {0xb58560, 0xc0010814a0}, 0x1, {0x0, 0x0}, {0x0, 0x0, 0x0}, 0x0, ...})
        /root/dragonfly/server/session/player.go:754 +0xbd
github.com/df-mc/dragonfly/server/session.(*Session).ViewEntity(0xc001112800, {0xb668c8, 0xc000722120})
        /root/dragonfly/server/session/world.go:128 +0x3e5
github.com/df-mc/dragonfly/server/world.showEntity({0xb668c8, 0xc000722120}, {0xb6d848, 0xc001112800})
        /root/dragonfly/server/world/world.go:1157 +0x37
github.com/df-mc/dragonfly/server/world.(*World).AddEntity(0xc0000c8540, {0xb668c8, 0xc000722120})
        /root/dragonfly/server/world/world.go:691 +0x348
github.com/df-mc/dragonfly/server/player.(*Player).Drop(0xc00077a000, {0x1872, {0xb58560, 0xc0010803f0}, 0x1, {0x0, 0x0}, {0x0, 0x0, 0x0}, ...})
        /root/dragonfly/server/player/player.go:2167 +0x399
github.com/df-mc/dragonfly/server/session.(*InventoryTransactionHandler).handleNormalTransaction(0xc00200fc40?, 0xc001112800?, 0xc001112800)
        /root/dragonfly/server/session/handler_inventory_transaction.go:106 +0x89b
github.com/df-mc/dragonfly/server/session.(*InventoryTransactionHandler).Handle(0x989800?, {0xb5e068?, 0xc00226f720}, 0xc001112800)
        /root/dragonfly/server/session/handler_inventory_transaction.go:24 +0x97
github.com/df-mc/dragonfly/server/session.(*Session).handlePacket(0xc001112800, {0xb5e068, 0xc00226f720})
        /root/dragonfly/server/session/session.go:432 +0x8d
github.com/df-mc/dragonfly/server/session.(*Session).handlePackets(0xc001112800)
        /root/dragonfly/server/session/session.go:312 +0xdc
created by github.com/df-mc/dragonfly/server/session.(*Session).Start in goroutine 1
        /root/dragonfly/server/session/session.go:217 +0xa5
exit status 2

DF Commit: 21eb18f

Erkam246 added a commit to Erkam246/dragonfly that referenced this issue Dec 24, 2023
- Fixes df-mc#833

This happend because a furnace(or other blocks) cannot face for  an example down or up but cube.Face default is down so an error occured so we are using cube.Direction now for the Facing.
@Sandertv Sandertv added the bug Something isn't working label Apr 1, 2024
@Sandertv Sandertv added this to the v0.10.0 milestone Apr 1, 2024
Sandertv pushed a commit that referenced this issue Apr 1, 2024
- Fixes #833

This happend because a furnace(or other blocks) cannot face for  an example down or up but cube.Face default is down so an error occured so we are using cube.Direction now for the Facing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants