Skip to content

Commit

Permalink
Temp fix for deep dark map
Browse files Browse the repository at this point in the history
  • Loading branch information
emortaldev committed Apr 1, 2024
1 parent 74272e7 commit d0b031d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/main/java/dev/emortal/minestom/blocksumo/map/MapManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,17 @@ public final class MapManager {
private static final DimensionType DIMENSION_TYPE = DimensionType.builder(NamespaceID.from("emortalmc:blocksumo"))
.skylightEnabled(true)
.build();
private static final DimensionType FULLBRIGHT_DIMENSION_TYPE = DimensionType.builder(NamespaceID.from("emortalmc:blocksumofb"))
.ambientLight(1f)
.build();

private static final List<String> ENABLED_MAPS = List.of(
"blocksumo",
"castle",
// "end",
"icebs",
"ruinsbs"
// "deepdark"
"ruinsbs",
"deepdark"
);
private static final Path MAPS_PATH = Path.of("maps");

Expand Down Expand Up @@ -128,7 +131,12 @@ public PreLoadedMap(@NotNull PolarLoader chunkLoader, @NotNull MapData mapData)
}

@NotNull LoadedMap load() {
InstanceContainer instance = new InstanceContainer(UUID.randomUUID(), DIMENSION_TYPE, new ChunkCopyingChunkLoader(this.parentInstance), generateDimensionId());
InstanceContainer instance;
if (mapData.name().equals("Deep Dark")) {
instance = new InstanceContainer(UUID.randomUUID(), FULLBRIGHT_DIMENSION_TYPE, new ChunkCopyingChunkLoader(this.parentInstance), generateDimensionId());
} else {
instance = new InstanceContainer(UUID.randomUUID(), DIMENSION_TYPE, new ChunkCopyingChunkLoader(this.parentInstance), generateDimensionId());
}
MinecraftServer.getInstanceManager().registerInstance(instance);

instance.enableAutoChunkLoad(false);
Expand Down

0 comments on commit d0b031d

Please sign in to comment.