Skip to content

ServerWorld#uniqueId() returns different id after each server restart #4300

Description

@Aquerr

Affected Product(s)

SpongeForge

Version

spongeforge-1.21.1-52.1.5-12.0.3-universal

Operating System

Windows

Java Version

25

Plugins/Mods

Plugins:
- EagleFactions

Describe the bug

The ServerWorld#uniqueId() seems to return different id after each server restart.
Tested it on debug mode from within IntellIJ.

Same world (overworld):
First server run: 771a516e-80f8-4ee7-a5c9-012120c6812e
Second server run: 0b57ee8b-caff-4096-b038-b931e0d93307

Every restart gives me different world unique id. Same thing on 1.21.10 spongeforge-1.21.10-60.0.1-17.0.0-universal
Same thing on NeoForge: spongeneo-1.21.1-21.1.211-12.0.3-universal

Tested also on 1.16.5 spongeforge-1.16.5-36.2.5-8.2.0-universal and it works fine there. ✅

Code that I tested:

((ServerPlayer)CommandContext.cause().audience()).world().uniqueId()

I have just downloaded Forge + SpongeForge + listed plugin and started the game + hooked myself with remote jvm debug to see the world unique id.

Not sure if I am doing something wrong. I am open to share more information if needed.

Link to logs

Don't have any.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triageThis label is automatically applied to new issues and pull requests to indicate they require triagetype: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions