dragonfly icon indicating copy to clipboard operation
dragonfly copied to clipboard

world issue: panic: runtime error: index out of range [8] with length 8

Open RestartFU opened this issue 2 years ago • 0 comments

panic: runtime error: index out of range [8] with length 8

goroutine 1 [running]:
github.com/df-mc/dragonfly/server/world/chunk.(*Chunk).SubChunk(...)
        C:/Users/Administrator/go/pkg/mod/github.com/df-mc/[email protected]/server/world/chunk/chunk.go:176
github.com/df-mc/dragonfly/server/world/chunk.(*lightArea).sub(...)
        C:/Users/Administrator/go/pkg/mod/github.com/df-mc/[email protected]/server/world/chunk/light_area.go:220
github.com/df-mc/dragonfly/server/world/chunk.(*lightArea).setLight(0xffffffffffffffcf?, {0xffffffffffffffc0, 0x80, 0xffffffffffffffb0}, {0x165a820?, 0x2059ee8?}, 0x1?)
        C:/Users/Administrator/go/pkg/mod/github.com/df-mc/[email protected]/server/world/chunk/light_area.go:61 +0xe7
github.com/df-mc/dragonfly/server/world/chunk.(*lightArea).insertSkyLightNodes.func1(0xc0030d2000?, 0x90?, 0xc000a43490?, 0x80, 0x7f, 0x0)
        C:/Users/Administrator/go/pkg/mod/github.com/df-mc/[email protected]/server/world/chunk/light.go:37 +0xac
github.com/df-mc/dragonfly/server/world/chunk.(*lightArea).iterHeightmap(0xc000a435a8, 0xc000a434e0)
        C:/Users/Administrator/go/pkg/mod/github.com/df-mc/[email protected]/server/world/chunk/light_area.go:148 +0x1a8
github.com/df-mc/dragonfly/server/world/chunk.(*lightArea).insertSkyLightNodes(0xc0016fc680?, 0xd0?)
        C:/Users/Administrator/go/pkg/mod/github.com/df-mc/[email protected]/server/world/chunk/light.go:33 +0x45
github.com/df-mc/dragonfly/server/world/chunk.(*lightArea).Fill(0xfffffffbfffffffc?)
        C:/Users/Administrator/go/pkg/mod/github.com/df-mc/[email protected]/server/world/chunk/light_area.go:34 +0x85
github.com/df-mc/dragonfly/server/world.(*World).chunk(0xc00022ac40, {0xfffffffc, 0xfffffffb})
        C:/Users/Administrator/go/pkg/mod/github.com/df-mc/[email protected]/server/world/world.go:1180 +0x1d8
github.com/df-mc/dragonfly/server/world.(*World).AddEntity(0xc00022ac40, {0x1661dc0, 0xc0009b2840})
        C:/Users/Administrator/go/pkg/mod/github.com/df-mc/[email protected]/server/world/world.go:684 +0x1a5

main.accept(0xc0009b2840)
        C:/Users/Administrator/Desktop/projects/moyai/teams/main.go:81 +0x36
github.com/df-mc/dragonfly/server.(*Server).Accept(0xc000f50600, 0x14b7338)
        C:/Users/Administrator/go/pkg/mod/github.com/df-mc/[email protected]/server/server.go:106 +0x84
main.main()
        C:/Users/Administrator/Desktop/projects/moyai/teams/main.go:75 +0x6db
exit status 2

How did you initialize your world?:

wdb, err := mcdb.Open("assets/nether")
if err != nil {
	panic(err)
}
nether = (world.Config{Provider: wdb, Entities: entity.DefaultRegistry, Dim: world.Nether}).New()

main.go:81:

80: func accept(p *player.Player) {
81:   nether.AddEntity(p)
82:   p.Teleport(mgl64.Vec3{0, 100, 0})

The world:

nether.zip

RestartFU avatar Jun 26 '23 22:06 RestartFU