Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ public record LegacyWorldSize(ResourceLocation id, Component name, Consumer<Appl
public static final ListMap<ResourceLocation, LegacyWorldSize> map = new ListMap<>();
public static final Codec<LegacyWorldSize> CODEC = map.createCodec(ResourceLocation.CODEC);

public static final LegacyWorldSize CUSTOM = register(new LegacyWorldSize(LegacyWorldSizes.createModLocation("custom"), LWSComponents.optionName("worldSizes.infinity"), ctx -> {}));

public static final LegacyWorldSize CLASSIC = register(new LegacyWorldSize(LegacyWorldSizes.createModLocation("classic"), LWSComponents.optionName("worldSizes.classic"), ctx -> {
LWSWorldOptions.legacyLevelLimits.set(Map.of(Level.OVERWORLD, new LegacyLevelLimit(List.of(new LegacyChunkBounds(new ChunkPos(-27, -27), new ChunkPos(27, 27))), true, getChunkContent(ctx), Optional.of(ctx.registry().getOrThrow(Biomes.PLAINS)), false), Level.NETHER, new LegacyLevelLimit(List.of(new LegacyChunkBounds(new ChunkPos(-9, -9), new ChunkPos(9, 9))), false, FakeLevelChunk.ContentType.NONE, Optional.empty(), true), Level.END, new LegacyLevelLimit(List.of(new LegacyChunkBounds(new ChunkPos(-6, -6), new ChunkPos(6, 6))), false, FakeLevelChunk.ContentType.NONE, Optional.empty(), false)));
LWSWorldOptions.maxEndGateways.set(1);
Expand Down Expand Up @@ -60,6 +58,8 @@ public record LegacyWorldSize(ResourceLocation id, Component name, Consumer<Appl
LWSWorldOptions.legacyEndSpikes.set(true);
}));

public static final LegacyWorldSize CUSTOM = register(new LegacyWorldSize(LegacyWorldSizes.createModLocation("custom"), LWSComponents.optionName("worldSizes.infinity"), ctx -> {}));

public static FakeLevelChunk.ContentType getChunkContent(ApplyContext ctx) {
return isOverworldFlat(ctx.registry()) ? FakeLevelChunk.ContentType.FLAT : FakeLevelChunk.ContentType.OCEAN;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"legacy_world_sizes.options.legacyWorldSize.description": "Select a world size to vary the amount of the world that you can explore.",
"legacy_world_sizes.options.legacyBiomeScale": "Biome Scale",
"legacy_world_sizes.options.legacyBiomeScale.description": "Select a Biome scale to change the amount of world space each Biome will take up. Larger scale usually means fewer, but larger, Biomes.",
"legacy_world_sizes.options.worldSizes.infinity": "Infinity",
"legacy_world_sizes.options.worldSizes.infinity": "Infinite",
"legacy_world_sizes.options.biomeScales.small": "Small",
"legacy_world_sizes.options.biomeScales.medium": "Medium",
"legacy_world_sizes.options.biomeScales.large": "Large",
Expand Down