2626
2727import de .bluecolored .bluemap .common .serverinterface .ServerWorld ;
2828import de .bluecolored .bluemap .core .util .Key ;
29- import net .minecraft .resources .ResourceLocation ;
29+ import net .minecraft .resources .Identifier ;
3030import net .minecraft .server .MinecraftServer ;
3131import net .minecraft .server .level .ServerLevel ;
3232import net .minecraft .world .level .storage .LevelResource ;
3333
3434import java .io .IOException ;
3535import java .lang .ref .WeakReference ;
3636import java .nio .file .Path ;
37+ import java .util .Objects ;
3738import java .util .concurrent .CompletableFuture ;
3839import java .util .concurrent .CompletionException ;
3940import java .util .concurrent .ExecutionException ;
@@ -47,11 +48,11 @@ public class ForgeWorld implements ServerWorld {
4748 public ForgeWorld (ServerLevel delegate ) {
4849 this .delegate = new WeakReference <>(delegate );
4950
50- MinecraftServer server = delegate .getServer ();
51- this .worldFolder = delegate . getServer () .getServerDirectory ()
51+ MinecraftServer server = Objects . requireNonNull ( delegate .getServer () );
52+ this .worldFolder = server .getServerDirectory ()
5253 .resolve (server .getWorldPath (LevelResource .ROOT ));
5354
54- ResourceLocation id = delegate .dimension ().location ();
55+ Identifier id = delegate .dimension ().identifier ();
5556 this .dimension = new Key (id .getNamespace (), id .getPath ());
5657 }
5758
0 commit comments