File tree Expand file tree Collapse file tree 2 files changed +32
-2
lines changed
src/main/java/org/spongepowered/api/world Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Original file line number Diff line number Diff line change 2525package org .spongepowered .api .world ;
2626
2727import org .spongepowered .api .ResourceKey ;
28+ import org .spongepowered .api .Sponge ;
2829import org .spongepowered .api .world .server .ServerWorld ;
2930
3031/**
3132 * A listing of the {@link ResourceKey keys} of the default {@link ServerWorld worlds} in Minecraft.
3233 */
3334public final class DefaultWorldKeys {
3435
36+ /**
37+ * @deprecated Use {@link #DEFAULT} instead
38+ */
39+ @ Deprecated
3540 public static final ResourceKey OVERWORLD = ResourceKey .minecraft ("overworld" );
3641
37- public static final ResourceKey THE_NETHER = ResourceKey .minecraft ("the_nether" );
42+ /**
43+ * The default "world" of a running game session. Typically, the Overworld.
44+ * <p>
45+ * Refer to: <a href="https://minecraft.fandom.com/wiki/Overworld">Overworld</a>
46+ */
47+ public static final ResourceKey DEFAULT = Sponge .game ().factoryProvider ().provide (DefaultWorldKeys .Factory .class ).defaultWorld ();
3848
39- public static final ResourceKey THE_END = ResourceKey .minecraft ("the_end" );
49+ /**
50+ * Refer to: <a href="https://minecraft.fandom.com/wiki/The_Nether">The Nether</a>
51+ */
52+ public static final ResourceKey THE_NETHER = Sponge .game ().factoryProvider ().provide (DefaultWorldKeys .Factory .class ).theNether ();
53+
54+ /**
55+ * Refer to: <a href="https://minecraft.fandom.com/wiki/The_End">The End</a>
56+ */
57+ public static final ResourceKey THE_END = Sponge .game ().factoryProvider ().provide (DefaultWorldKeys .Factory .class ).theEnd ();
4058
4159 private DefaultWorldKeys () {
4260 }
61+
62+ public interface Factory {
63+
64+ ResourceKey defaultWorld ();
65+
66+ ResourceKey theNether ();
67+
68+ ResourceKey theEnd ();
69+ }
4370}
Original file line number Diff line number Diff line change @@ -74,7 +74,10 @@ public interface WorldManager {
7474 * <p>It is up to the implementation to define what the default world actually is.</p>
7575 *
7676 * @return The default world
77+ *
78+ * @deprecated Use {@link #world(ResourceKey)} with {@link org.spongepowered.api.world.DefaultWorldKeys#DEFAULT} instead
7779 */
80+ @ Deprecated
7881 ServerWorld defaultWorld ();
7982
8083 /**
You can’t perform that action at this time.
0 commit comments