|
1 | | -from beet import Context, DataPack |
2 | | -from beet.contrib.worldgen import * # type: ignore |
3 | 1 | import os |
4 | 2 |
|
| 3 | +from beet import Context, DataPack |
| 4 | +from beet.contrib.worldgen import * # type: ignore |
| 5 | + |
5 | 6 | all_worldgen = [ |
6 | | - Dimension, |
7 | | - DimensionType, |
8 | | - WorldgenBiome, |
9 | | - WorldgenConfiguredCarver, |
10 | | - WorldgenConfiguredFeature, |
11 | | - WorldgenDensityFunction, |
12 | | - WorldgenNoise, |
13 | | - WorldgenNoiseSettings, |
14 | | - WorldgenPlacedFeature, |
15 | | - WorldgenProcessorList, |
16 | | - WorldgenStructure, |
17 | | - WorldgenStructureSet, |
18 | | - WorldgenConfiguredSurfaceBuilder, |
19 | | - WorldgenTemplatePool, |
20 | | - WorldgenWorldPreset, |
21 | | - WorldgenFlatLevelGeneratorPreset, |
22 | | - WorldgenBiomeTag, |
23 | | - WorldgenStructureSetTag, |
24 | | - WorldgenStructureTag, |
25 | | - WorldgenConfiguredCarverTag, |
26 | | - WorldgenPlacedFeatureTag, |
| 7 | + Dimension, |
| 8 | + DimensionType, |
| 9 | + WorldgenBiome, |
| 10 | + WorldgenConfiguredCarver, |
| 11 | + WorldgenConfiguredFeature, |
| 12 | + WorldgenDensityFunction, |
| 13 | + WorldgenNoise, |
| 14 | + WorldgenNoiseSettings, |
| 15 | + WorldgenPlacedFeature, |
| 16 | + WorldgenProcessorList, |
| 17 | + WorldgenStructure, |
| 18 | + WorldgenStructureSet, |
| 19 | + WorldgenConfiguredSurfaceBuilder, |
| 20 | + WorldgenTemplatePool, |
| 21 | + WorldgenWorldPreset, |
| 22 | + WorldgenFlatLevelGeneratorPreset, |
| 23 | + WorldgenBiomeTag, |
| 24 | + WorldgenStructureSetTag, |
| 25 | + WorldgenStructureTag, |
| 26 | + WorldgenConfiguredCarverTag, |
| 27 | + WorldgenPlacedFeatureTag, |
27 | 28 | ] |
28 | 29 |
|
| 30 | + |
29 | 31 | def standard_skyblock(ctx: Context): |
30 | | - island_path = "" |
31 | | - generation_path = "" |
32 | | - extra_path = "" |
33 | | - for filename in os.listdir("build"): |
34 | | - f = os.path.join("build", filename) |
35 | | - # checking if it is a file |
36 | | - if "skyvoid_island_standard_v" in f: |
37 | | - island_path = f |
38 | | - elif "skyvoid_worldgen_v" in f: |
39 | | - generation_path = f |
40 | | - elif "skyvoid_sand_island_v" in f: |
41 | | - extra_path = f |
| 32 | + island_path = "" |
| 33 | + generation_path = "" |
| 34 | + extra_path = "" |
| 35 | + for filename in os.listdir("build"): |
| 36 | + f = os.path.join("build", filename) |
| 37 | + # checking if it is a file |
| 38 | + if "skyvoid_island_standard_v" in f: |
| 39 | + island_path = f |
| 40 | + elif "skyvoid_worldgen_v" in f: |
| 41 | + generation_path = f |
| 42 | + elif "skyvoid_sand_island_v" in f: |
| 43 | + extra_path = f |
| 44 | + |
| 45 | + island = DataPack(path=island_path, extend_namespace=all_worldgen) |
| 46 | + generation = DataPack(path=generation_path, extend_namespace=all_worldgen) |
| 47 | + extra = DataPack(path=extra_path, extend_namespace=all_worldgen) |
42 | 48 |
|
43 | | - island = DataPack(path=island_path,extend_namespace=all_worldgen) |
44 | | - generation = DataPack(path=generation_path,extend_namespace=all_worldgen) |
45 | | - extra = DataPack(path=extra_path,extend_namespace=all_worldgen) |
| 49 | + ctx.data.merge(generation) |
| 50 | + ctx.data.merge(extra) |
| 51 | + ctx.data.merge(island) |
46 | 52 |
|
47 | | - ctx.data.merge(generation) |
48 | | - ctx.data.merge(extra) |
49 | | - ctx.data.merge(island) |
50 | 53 |
|
51 | 54 | def vanilla_oneblock(ctx: Context): |
52 | | - island_path = "" |
53 | | - generation_path = "" |
54 | | - extra_path = "" |
55 | | - for filename in os.listdir("build"): |
56 | | - f = os.path.join("build", filename) |
57 | | - # checking if it is a file |
58 | | - if "skyvoid_island_oneblock_v" in f: |
59 | | - island_path = f |
60 | | - elif "skyvoid_worldgen_single_lava_v" in f: |
61 | | - generation_path = f |
62 | | - elif "skyvoid_vanilla_oneblock_starter_v" in f: |
63 | | - extra_path = f |
| 55 | + island_path = "" |
| 56 | + generation_path = "" |
| 57 | + extra_path = "" |
| 58 | + for filename in os.listdir("build"): |
| 59 | + f = os.path.join("build", filename) |
| 60 | + # checking if it is a file |
| 61 | + if "skyvoid_island_oneblock_v" in f: |
| 62 | + island_path = f |
| 63 | + elif "skyvoid_worldgen_single_lava_v" in f: |
| 64 | + generation_path = f |
| 65 | + elif "skyvoid_vanilla_oneblock_starter_v" in f: |
| 66 | + extra_path = f |
64 | 67 |
|
65 | | - island = DataPack(path=island_path,extend_namespace=all_worldgen) |
66 | | - generation = DataPack(path=generation_path,extend_namespace=all_worldgen) |
67 | | - extra = DataPack(path=extra_path,extend_namespace=all_worldgen) |
| 68 | + island = DataPack(path=island_path, extend_namespace=all_worldgen) |
| 69 | + generation = DataPack(path=generation_path, extend_namespace=all_worldgen) |
| 70 | + extra = DataPack(path=extra_path, extend_namespace=all_worldgen) |
68 | 71 |
|
69 | | - ctx.data.merge(generation) |
70 | | - ctx.data.merge(extra) |
71 | | - ctx.data.merge(island) |
| 72 | + ctx.data.merge(generation) |
| 73 | + ctx.data.merge(extra) |
| 74 | + ctx.data.merge(island) |
72 | 75 |
|
73 | 76 |
|
74 | 77 | def skyblock_dirt(ctx: Context): |
75 | | - island_path = "" |
76 | | - generation_path = "" |
77 | | - for filename in os.listdir("build"): |
78 | | - f = os.path.join("build", filename) |
79 | | - # checking if it is a file |
80 | | - if "skyvoid_island_only_dirt_v" in f: |
81 | | - island_path = f |
82 | | - elif "skyvoid_worldgen_normal_end_v" in f: |
83 | | - generation_path = f |
| 78 | + island_path = "" |
| 79 | + generation_path = "" |
| 80 | + for filename in os.listdir("build"): |
| 81 | + f = os.path.join("build", filename) |
| 82 | + # checking if it is a file |
| 83 | + if "skyvoid_island_only_dirt_v" in f: |
| 84 | + island_path = f |
| 85 | + elif "skyvoid_worldgen_normal_end_v" in f: |
| 86 | + generation_path = f |
84 | 87 |
|
85 | | - island = DataPack(path=island_path,extend_namespace=all_worldgen) |
86 | | - generation = DataPack(path=generation_path,extend_namespace=all_worldgen) |
| 88 | + island = DataPack(path=island_path, extend_namespace=all_worldgen) |
| 89 | + generation = DataPack(path=generation_path, extend_namespace=all_worldgen) |
87 | 90 |
|
88 | | - ctx.data.merge(generation) |
89 | | - ctx.data.merge(island) |
| 91 | + ctx.data.merge(generation) |
| 92 | + ctx.data.merge(island) |
0 commit comments