First commit

This commit is contained in:
Arigadam 2026-10-12 10:23:10 +00:00
commit 9b0fe9b1b7
126 changed files with 31043 additions and 0 deletions

111
cubiomes/__init__.py Normal file
View file

@ -0,0 +1,111 @@
"""cubiomes — Python bindings for the cubiomes Minecraft world-generation library.
Quick-start example::
from cubiomes import Generator, MCVersion, Dimension, BiomeID
g = Generator(MCVersion.MC_1_21)
g.apply_seed(Dimension.DIM_OVERWORLD, 123456789)
biome = g.get_biome_at(0, 63, 0)
print(f"Biome at (0, 63, 0): {BiomeID(biome).name}") # e.g. "plains"
# 256×256 biome map at 1:4 scale
ids = g.gen_biomes(-128, -128, 256, 256, scale=4)
# Locate all villages near the origin
from cubiomes import StructureType, get_structure_pos, is_viable_structure_pos
for reg_x in range(-3, 4):
for reg_z in range(-3, 4):
pos = get_structure_pos(StructureType.Village, MCVersion.MC_1_21,
123456789, reg_x, reg_z)
if pos and is_viable_structure_pos(StructureType.Village, g, *pos):
print(f"Village at {pos}")
"""
from .enums import (
MCVersion,
Dimension,
BiomeID,
StructureType,
LARGE_BIOMES,
NO_BETA_OCEAN,
FORCE_OCEAN_VARIANTS,
BF_APPROX,
BF_FORCED_OCEAN,
)
from ._wrapper import (
# Classes
Generator,
BiomeFilter,
StrongholdIterator,
StructureVariant,
# Structure functions
get_structure_config,
get_structure_pos,
is_viable_structure_pos,
is_viable_feature_biome,
get_variant,
get_mineshafts,
# Stronghold / spawn
iter_strongholds,
init_first_stronghold,
# Biome filter / search
setup_biome_filter,
# Seed / misc utilities
is_slime_chunk,
get_shadow,
move_structure,
chunk_generate_rnd,
get_population_seed,
# Biome property helpers
biome_exists,
is_overworld_biome,
get_dimension,
get_mutated,
get_category,
are_similar,
is_mesa,
is_shallow_ocean,
is_deep_ocean,
is_oceanic,
is_snowy,
)
__version__ = "0.1.0"
__author__ = "cubiomes-python contributors"
__all__ = [
# Enums / constants
"MCVersion", "Dimension", "BiomeID", "StructureType",
"LARGE_BIOMES", "NO_BETA_OCEAN", "FORCE_OCEAN_VARIANTS",
"BF_APPROX", "BF_FORCED_OCEAN",
# Classes
"Generator", "BiomeFilter", "StrongholdIterator", "StructureVariant",
# Functions
"get_structure_config",
"get_structure_pos",
"is_viable_structure_pos",
"is_viable_feature_biome",
"get_variant",
"get_mineshafts",
"iter_strongholds",
"init_first_stronghold",
"setup_biome_filter",
"is_slime_chunk",
"get_shadow",
"move_structure",
"chunk_generate_rnd",
"get_population_seed",
"biome_exists",
"is_overworld_biome",
"get_dimension",
"get_mutated",
"get_category",
"are_similar",
"is_mesa",
"is_shallow_ocean",
"is_deep_ocean",
"is_oceanic",
"is_snowy",
]