Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Cannot set world spawn to Y>127 or Y<0 on default world #1102

Closed
Closed
Cannot set world spawn to Y>127 or Y<0 on default world#1102
Labels
bugSomething isn't working

Description

How to reproduce:

func main() {
slog.SetLogLoggerLevel(slog.LevelDebug)
chat.Global.Subscribe(chat.StdoutSubscriber{})
conf, err := readConfig(slog.Default())
if err != nil {
panic(err)
}

srv := conf.New()
srv.CloseOnProgramEnd()
srv.World().SetSpawn(cube.Pos{0, 208, 0})
time.Sleep(time.Second*2)
fmt.Printf("Spawn: %v\n", srv.World().Spawn()) // magically changed

srv.Listen()
for p := range srv.Accept() {
_ = p
}
}

Causes

  • WorldProvider and WorldSettings are shared across all three worlds (srv.World(), srv.Nether(), and srv.End()). So, if the spawn position is invalid in any dimension, it will automatically correct itself during a tick.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions