Skip to content

Commit

Permalink
server/conf.go: Import "unsafe" and finalise block registry before cr…
Browse files Browse the repository at this point in the history
…eating worlds
  • Loading branch information
TwistedAsylumMC committed Sep 2, 2024
1 parent 16d27a7 commit 6af4876
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"os"
"path/filepath"
"slices"
_ "unsafe"
)

// Config contains options for starting a Minecraft server.
Expand Down Expand Up @@ -153,13 +154,13 @@ func (conf Config) New() *Server {
p: make(map[uuid.UUID]*player.Player),
world: &world.World{}, nether: &world.World{}, end: &world.World{},
}
world_finaliseBlockRegistry()
srv.world = srv.createWorld(world.Overworld, &srv.nether, &srv.end)
srv.nether = srv.createWorld(world.Nether, &srv.world, &srv.end)
srv.end = srv.createWorld(world.End, &srv.nether, &srv.world)

srv.registerTargetFunc()
srv.checkNetIsolation()
world_finaliseBlockRegistry()

return srv
}
Expand Down

0 comments on commit 6af4876

Please sign in to comment.