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 issue: panic: runtime error: index out of range [8] with length 8 #797

Open
RestartFU opened this issue Jun 26, 2023 · 0 comments
Open

Comments

@RestartFU
Copy link
Contributor

RestartFU commented Jun 26, 2023

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/dragonfly@v0.9.8-0.20230619020232-90039d2c33c4/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/dragonfly@v0.9.8-0.20230619020232-90039d2c33c4/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/dragonfly@v0.9.8-0.20230619020232-90039d2c33c4/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/dragonfly@v0.9.8-0.20230619020232-90039d2c33c4/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/dragonfly@v0.9.8-0.20230619020232-90039d2c33c4/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/dragonfly@v0.9.8-0.20230619020232-90039d2c33c4/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/dragonfly@v0.9.8-0.20230619020232-90039d2c33c4/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/dragonfly@v0.9.8-0.20230619020232-90039d2c33c4/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/dragonfly@v0.9.8-0.20230619020232-90039d2c33c4/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/dragonfly@v0.9.8-0.20230619020232-90039d2c33c4/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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant