First commit
This commit is contained in:
commit
9b0fe9b1b7
126 changed files with 31043 additions and 0 deletions
228
cubiomes/enums.py
Normal file
228
cubiomes/enums.py
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
"""Integer enumerations mirroring the cubiomes C enums.
|
||||
|
||||
All values are directly usable wherever the C API expects ``int`` constants.
|
||||
"""
|
||||
|
||||
from enum import IntEnum
|
||||
|
||||
|
||||
class MCVersion(IntEnum):
|
||||
"""Minecraft version constants.
|
||||
|
||||
``MC_NEWEST`` always points to the latest supported version.
|
||||
Aliases like ``MC_1_21`` refer to the latest patch of that major release.
|
||||
"""
|
||||
MC_UNDEF = 0
|
||||
MC_B1_7 = 1
|
||||
MC_B1_8 = 2
|
||||
MC_1_0_0 = 3; MC_1_0 = 3
|
||||
MC_1_1_0 = 4; MC_1_1 = 4
|
||||
MC_1_2_5 = 5; MC_1_2 = 5
|
||||
MC_1_3_2 = 6; MC_1_3 = 6
|
||||
MC_1_4_7 = 7; MC_1_4 = 7
|
||||
MC_1_5_2 = 8; MC_1_5 = 8
|
||||
MC_1_6_4 = 9; MC_1_6 = 9
|
||||
MC_1_7_10 = 10; MC_1_7 = 10
|
||||
MC_1_8_9 = 11; MC_1_8 = 11
|
||||
MC_1_9_4 = 12; MC_1_9 = 12
|
||||
MC_1_10_2 = 13; MC_1_10 = 13
|
||||
MC_1_11_2 = 14; MC_1_11 = 14
|
||||
MC_1_12_2 = 15; MC_1_12 = 15
|
||||
MC_1_13_2 = 16; MC_1_13 = 16
|
||||
MC_1_14_4 = 17; MC_1_14 = 17
|
||||
MC_1_15_2 = 18; MC_1_15 = 18
|
||||
MC_1_16_1 = 19
|
||||
MC_1_16_5 = 20; MC_1_16 = 20
|
||||
MC_1_17_1 = 21; MC_1_17 = 21
|
||||
MC_1_18_2 = 22; MC_1_18 = 22
|
||||
MC_1_19_2 = 23
|
||||
MC_1_19_4 = 24; MC_1_19 = 24
|
||||
MC_1_20_6 = 25; MC_1_20 = 25
|
||||
MC_1_21_1 = 26
|
||||
MC_1_21_3 = 27
|
||||
MC_1_21_4 = 28; MC_1_21_WD = 28
|
||||
MC_1_21_5 = 29
|
||||
MC_1_21_6 = 30
|
||||
MC_1_21_9 = 31
|
||||
MC_1_21_11 = 32; MC_1_21 = 32
|
||||
MC_26_1 = 33
|
||||
MC_26_2 = 34
|
||||
MC_26_3 = 35; MC_NEWEST = 35
|
||||
|
||||
|
||||
class Dimension(IntEnum):
|
||||
"""Dimension identifiers."""
|
||||
DIM_NETHER = -1
|
||||
DIM_OVERWORLD = 0
|
||||
DIM_END = 1
|
||||
DIM_UNDEF = 1000
|
||||
|
||||
|
||||
class BiomeID(IntEnum):
|
||||
"""All biome IDs across all supported MC versions.
|
||||
|
||||
Modern names (e.g. ``windswept_hills``) and legacy aliases
|
||||
(e.g. ``extremeHills``) are both provided.
|
||||
"""
|
||||
NONE = -1
|
||||
|
||||
# ── Base biomes ──────────────────────────────────────────────────────────
|
||||
ocean = 0
|
||||
plains = 1
|
||||
desert = 2
|
||||
mountains = 3; extremeHills = 3
|
||||
forest = 4
|
||||
taiga = 5
|
||||
swamp = 6; swampland = 6
|
||||
river = 7
|
||||
nether_wastes = 8; hell = 8
|
||||
the_end = 9; sky = 9
|
||||
frozen_ocean = 10; frozenOcean = 10
|
||||
frozen_river = 11; frozenRiver = 11
|
||||
snowy_tundra = 12; icePlains = 12
|
||||
snowy_mountains = 13; iceMountains = 13
|
||||
mushroom_fields = 14; mushroomIsland = 14
|
||||
mushroom_field_shore = 15; mushroomIslandShore = 15
|
||||
beach = 16
|
||||
desert_hills = 17; desertHills = 17
|
||||
wooded_hills = 18; forestHills = 18
|
||||
taiga_hills = 19; taigaHills = 19
|
||||
mountain_edge = 20; extremeHillsEdge = 20
|
||||
jungle = 21
|
||||
jungle_hills = 22; jungleHills = 22
|
||||
jungle_edge = 23; jungleEdge = 23
|
||||
deep_ocean = 24; deepOcean = 24
|
||||
stone_shore = 25; stoneBeach = 25
|
||||
snowy_beach = 26; coldBeach = 26
|
||||
birch_forest = 27; birchForest = 27
|
||||
birch_forest_hills = 28; birchForestHills = 28
|
||||
dark_forest = 29; roofedForest = 29
|
||||
snowy_taiga = 30; coldTaiga = 30
|
||||
snowy_taiga_hills = 31; coldTaigaHills = 31
|
||||
giant_tree_taiga = 32; megaTaiga = 32
|
||||
giant_tree_taiga_hills = 33; megaTaigaHills = 33
|
||||
wooded_mountains = 34; extremeHillsPlus = 34
|
||||
savanna = 35
|
||||
savanna_plateau = 36; savannaPlateau = 36
|
||||
badlands = 37; mesa = 37
|
||||
wooded_badlands_plateau = 38; mesaPlateau_F = 38
|
||||
badlands_plateau = 39; mesaPlateau = 39
|
||||
small_end_islands = 40
|
||||
end_midlands = 41
|
||||
end_highlands = 42
|
||||
end_barrens = 43
|
||||
warm_ocean = 44; warmOcean = 44
|
||||
lukewarm_ocean = 45; lukewarmOcean = 45
|
||||
cold_ocean = 46; coldOcean = 46
|
||||
deep_warm_ocean = 47; warmDeepOcean = 47
|
||||
deep_lukewarm_ocean = 48; lukewarmDeepOcean = 48
|
||||
deep_cold_ocean = 49; coldDeepOcean = 49
|
||||
deep_frozen_ocean = 50; frozenDeepOcean = 50
|
||||
|
||||
# ── Beta biomes ──────────────────────────────────────────────────────────
|
||||
seasonal_forest = 51
|
||||
rainforest = 52
|
||||
shrubland = 53
|
||||
|
||||
the_void = 127
|
||||
|
||||
# ── Mutated variants ─────────────────────────────────────────────────────
|
||||
sunflower_plains = 129
|
||||
desert_lakes = 130
|
||||
gravelly_mountains = 131
|
||||
flower_forest = 132
|
||||
taiga_mountains = 133
|
||||
swamp_hills = 134
|
||||
ice_spikes = 140
|
||||
modified_jungle = 149
|
||||
modified_jungle_edge = 151
|
||||
tall_birch_forest = 155
|
||||
tall_birch_hills = 156
|
||||
dark_forest_hills = 157
|
||||
snowy_taiga_mountains = 158
|
||||
giant_spruce_taiga = 160
|
||||
giant_spruce_taiga_hills = 161
|
||||
modified_gravelly_mountains = 162
|
||||
shattered_savanna = 163
|
||||
shattered_savanna_plateau = 164
|
||||
eroded_badlands = 165
|
||||
modified_wooded_badlands_plateau = 166
|
||||
modified_badlands_plateau = 167
|
||||
|
||||
# ── 1.14 ─────────────────────────────────────────────────────────────────
|
||||
bamboo_jungle = 168
|
||||
bamboo_jungle_hills = 169
|
||||
|
||||
# ── 1.16 Nether ──────────────────────────────────────────────────────────
|
||||
soul_sand_valley = 170
|
||||
crimson_forest = 171
|
||||
warped_forest = 172
|
||||
basalt_deltas = 173
|
||||
|
||||
# ── 1.17 caves ───────────────────────────────────────────────────────────
|
||||
dripstone_caves = 174
|
||||
lush_caves = 175
|
||||
|
||||
# ── 1.18 ─────────────────────────────────────────────────────────────────
|
||||
meadow = 177
|
||||
grove = 178
|
||||
snowy_slopes = 179
|
||||
jagged_peaks = 180
|
||||
frozen_peaks = 181
|
||||
stony_peaks = 182
|
||||
|
||||
# ── 1.19 ─────────────────────────────────────────────────────────────────
|
||||
deep_dark = 183
|
||||
mangrove_swamp = 184
|
||||
|
||||
# ── 1.20 ─────────────────────────────────────────────────────────────────
|
||||
cherry_grove = 185
|
||||
|
||||
# ── 1.21 Winter Drop ─────────────────────────────────────────────────────
|
||||
pale_garden = 186
|
||||
|
||||
# ── 26.x ─────────────────────────────────────────────────────────────────
|
||||
sulfur_caves = 187
|
||||
dappled_forest = 188
|
||||
|
||||
|
||||
class StructureType(IntEnum):
|
||||
"""Structure type constants passed to structure-finding functions."""
|
||||
Feature = 0 # temple generation attempts pre-1.13
|
||||
Desert_Pyramid = 1
|
||||
Jungle_Temple = 2; Jungle_Pyramid = 2
|
||||
Swamp_Hut = 3
|
||||
Igloo = 4
|
||||
Village = 5
|
||||
Ocean_Ruin = 6
|
||||
Shipwreck = 7
|
||||
Monument = 8
|
||||
Mansion = 9
|
||||
Outpost = 10
|
||||
Ruined_Portal = 11
|
||||
Ruined_Portal_N = 12
|
||||
Ancient_City = 13
|
||||
Treasure = 14
|
||||
Mineshaft = 15
|
||||
Desert_Well = 16
|
||||
Geode = 17
|
||||
Fortress = 18
|
||||
Bastion = 19
|
||||
Nether_Fossil = 20
|
||||
End_City = 21
|
||||
End_Gateway = 22
|
||||
End_Island = 23
|
||||
Trail_Ruins = 24
|
||||
Trial_Chambers = 25
|
||||
Abandoned_Camp = 26
|
||||
Stronghold = 27
|
||||
|
||||
|
||||
# Generator flags
|
||||
LARGE_BIOMES = 0x1
|
||||
NO_BETA_OCEAN = 0x2
|
||||
FORCE_OCEAN_VARIANTS = 0x4
|
||||
|
||||
# BiomeFilter flags
|
||||
BF_APPROX = 0x01
|
||||
BF_FORCED_OCEAN = FORCE_OCEAN_VARIANTS
|
||||
Loading…
Add table
Add a link
Reference in a new issue