diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..aa4a8f5 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,121 @@ +# Changelog + +All notable changes to **active-cubiomes** are documented here. + +Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +--- + +## [0.2.0] — 2026-10-12 + +### Added + +**Advanced search conditions** — `SearchCriteria.conditions` now accepts any +mix of the following new types in addition to the existing `BiomeCondition` +and `StructureCondition`: + +| Class | CLI flag | Description | +|-------|----------|-------------| +| `SpawnCondition` | `--spawn-biome` / `--spawn-max-dist` | Constrain spawn biome and/or distance from origin | +| `StrongholdCondition` | `--stronghold-radius` / `--stronghold-count` | First N strongholds within a block radius | +| `ProximityCondition` | `--proximity A B DIST` | Two structure types within DIST blocks of each other | +| `QuadStructureCondition` | `--quad STRUCT` / `--quad-dist` | Classic quad-farm base: 4 viable instances in a 2×2 region grid | +| `BiomeDensityCondition` | `--biome-density BIOME FRAC` | Minimum biome coverage fraction in an area | +| `SlimeDensityCondition` | `--min-slime-chunks N` | Minimum slime-chunk count in a configurable chunk area | +| `AnyOfBiomes` | `--any-biome NAME...` | OR semantics — at least one of a list of biomes must be present | +| `CustomCondition` | — (Python API only) | Arbitrary `(seed, mc) → bool \| dict` function as a post-filter | + +**`SeedResult` extended:** +- `quad` — quad-structure result dict (`center`, `positions`, `max_r`, `name`) +- `extra` — free-form dict populated by `BiomeDensityCondition`, + `SlimeDensityCondition`, and `CustomCondition` + +**Documentation** added under `docs/`: +- `docs/guide.md` — user guide with code examples +- `docs/api.md` — full API reference +- `docs/search.md` — CLI and Python search API reference + +**`cubiomes/__main__.py`** — enables `python -m cubiomes` as an alias for +`python -m cubiomes.search`. + +**`cubiomes-search` entry point** registered via `pyproject.toml` so the CLI +is available after `pip install active-cubiomes`. + +### Fixed + +- `OverflowError: can't convert negative value to uint64_t` when passing + negative world seeds (e.g. from `--random-seeds`). All public Cython + wrapper functions that accept a seed now use `long long` (int64) as the + parameter type and cast to `uint64_t` internally, matching Minecraft's + `long` seed semantics. Affected functions: `apply_seed`, `check_for_biomes`, + `StrongholdIterator.__cinit__`, `get_structure_pos`, `get_variant`, + `iter_strongholds`, `init_first_stronghold`, `get_mineshafts`, + `is_slime_chunk`, `get_shadow`, `move_structure`, `chunk_generate_rnd`, + `get_population_seed`. + +- `_find_biome` in `search.py` replaced stochastic `locate_biome` (random + walk, ~37 % miss-rate on common biomes at small radii) with deterministic + `get_biome_centers` scan, eliminating false-negative search results. + +- Nether/End structures (`Fortress`, `Bastion`, `End_City`, …) no longer + trigger spurious `isViableStructurePos: bad structure type N or dimension 0` + warnings when an Overworld generator is active — they are skipped based on + the `dim` field of their `StructureConfig`. + +### Changed + +- `setup.py` C source glob now produces **relative** paths (via + `os.path.relpath`) to satisfy setuptools' requirement when building a wheel + from an sdist. +- `pyproject.toml` build-backend corrected to `setuptools.build_meta` + (was `setuptools.backends.legacy:build` which does not exist in + setuptools 84). +- License classifier removed from `classifiers` list (superseded by the + `license = "MIT"` SPDX expression per PEP 639). + +--- + +## [0.1.1] — 2026-10-12 + +### Fixed + +- `OverflowError` on negative seeds passed to `apply_seed` and related + functions (initial partial fix; superseded by the comprehensive fix in + 0.2.0). + +--- + +## [0.1.0] — 2026-10-12 + +### Added + +- **Cython bindings** for [cubiomes](https://github.com/xpple/cubiomes) C + library, compiled into a single shared object (`cubiomes._wrapper`). +- **`Generator`** class — `apply_seed`, `get_biome_at`, `gen_biomes`, + `get_spawn`, `estimate_spawn`, `locate_biome`, `get_biome_centers`, + `check_for_biomes`. +- **`BiomeFilter`** / `setup_biome_filter` — multi-scale biome requirement + filter compatible with `check_for_biomes`. +- **`StrongholdIterator`** — yields accurate stronghold positions with biome + verification via `iter_strongholds`. +- **`StructureVariant`** — structure rotation, bounding box, and flags via + `get_variant`. +- **Structure functions** — `get_structure_config`, `get_structure_pos`, + `is_viable_structure_pos`, `is_viable_feature_biome`, `get_mineshafts`. +- **Biome 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`. +- **Seed utilities** — `is_slime_chunk`, `get_shadow`, `move_structure`, + `chunk_generate_rnd`, `get_population_seed`. +- **`cubiomes.search`** module with `SearchCriteria`, `BiomeCondition`, + `StructureCondition`, `SeedSearch`, `SeedResult` and the + `cubiomes-search` CLI. +- **`MCVersion`**, **`Dimension`**, **`BiomeID`**, **`StructureType`** + `IntEnum` classes covering all versions up to MC 26.3. +- 107 pytest tests covering bindings and search module. +- `pyproject.toml`, `MANIFEST.in`, `README.md`, `LICENSE`. + +[0.2.0]: https://github.com/xpple/cubiomes/compare/v0.1.1...v0.2.0 +[0.1.1]: https://github.com/xpple/cubiomes/compare/v0.1.0...v0.1.1 +[0.1.0]: https://github.com/xpple/cubiomes/releases/tag/v0.1.0 diff --git a/MANIFEST.in b/MANIFEST.in index 526ee8b..26bbc41 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -10,6 +10,7 @@ recursive-include _cubiomes_src *.c *.h # Project files include README.md +include CHANGELOG.md include LICENSE include pyproject.toml diff --git a/active_cubiomes.egg-info/PKG-INFO b/active_cubiomes.egg-info/PKG-INFO deleted file mode 100644 index 40820ea..0000000 --- a/active_cubiomes.egg-info/PKG-INFO +++ /dev/null @@ -1,166 +0,0 @@ -Metadata-Version: 2.4 -Name: active_cubiomes -Version: 0.1.0 -Summary: Python/Cython bindings for cubiomes — fast Minecraft biome and structure generator -License-Expression: MIT -Project-URL: Homepage, https://github.com/xpple/cubiomes -Project-URL: Source, https://github.com/xpple/cubiomes -Project-URL: Tracker, https://github.com/xpple/cubiomes/issues -Keywords: minecraft,cubiomes,biomes,seed,worldgen,speedrun -Classifier: Development Status :: 4 - Beta -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.8 -Classifier: Programming Language :: Python :: 3.9 -Classifier: Programming Language :: Python :: 3.10 -Classifier: Programming Language :: Python :: 3.11 -Classifier: Programming Language :: Python :: 3.12 -Classifier: Programming Language :: Cython -Classifier: Topic :: Games/Entertainment -Classifier: Operating System :: POSIX :: Linux -Classifier: Operating System :: MacOS -Requires-Python: >=3.8 -Description-Content-Type: text/markdown -License-File: LICENSE -Provides-Extra: numpy -Requires-Dist: numpy>=1.20; extra == "numpy" -Provides-Extra: dev -Requires-Dist: pytest>=7; extra == "dev" -Requires-Dist: numpy>=1.20; extra == "dev" -Requires-Dist: cython>=3.0; extra == "dev" -Dynamic: license-file -Dynamic: requires-python - -# active-cubiomes - -Python/Cython bindings for [cubiomes](https://github.com/xpple/cubiomes) — -a fast C library that replicates Minecraft's world-generation algorithms -without running the game. - -``` -pip install active-cubiomes -``` - -> **Import name:** `import cubiomes` (the distribution is `active-cubiomes`) - ---- - -## Quick start - -```python -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) # block coords -print(BiomeID(biome).name) # "river" - -# 256×256 biome map at 1:4 scale -ids = g.gen_biomes(-128, -128, 256, 256) # array.array('i') - -import numpy as np -grid = np.array(ids, dtype=np.int32).reshape(256, 256) -``` - -## Structure finding - -```python -from cubiomes import StructureType, get_structure_pos, is_viable_structure_pos - -seed = 123456789 -mc = MCVersion.MC_1_21 - -for reg_x in range(-3, 4): - for reg_z in range(-3, 4): - pos = get_structure_pos(StructureType.Village, mc, seed, reg_x, reg_z) - if pos and is_viable_structure_pos(StructureType.Village, g, *pos): - print(f"Village at {pos}") -``` - -## Strongholds - -```python -from cubiomes import iter_strongholds - -for i, (x, z) in enumerate(iter_strongholds(g, seed=123456789)): - print(f"Stronghold {i}: ({x}, {z})") - if i >= 4: - break -``` - -## Seed search CLI - -```bash -# Seeds with mushroom fields AND badlands within 4 km -cubiomes-search --mc 1.21 --biome mushroom_fields badlands --biome-radius 4000 --count 5 - -# Quad witch-hut base -cubiomes-search --mc 1.21 --quad Swamp_Hut --quad-dist 128 --count 3 - -# Inspect one seed -cubiomes-search --seed 123456789 --info - -# Village and Monument within 400 blocks of each other, JSON output -cubiomes-search --mc 1.21 --proximity Village Monument 400 --count 10 --format json -``` - -## Seed search Python API - -```python -from cubiomes.search import ( - SearchCriteria, BiomeCondition, StructureCondition, - SpawnCondition, StrongholdCondition, ProximityCondition, - QuadStructureCondition, BiomeDensityCondition, - SlimeDensityCondition, AnyOfBiomes, CustomCondition, - SeedSearch, -) -from cubiomes import MCVersion, BiomeID, StructureType - -criteria = SearchCriteria( - mc=MCVersion.MC_1_21, - biomes=[BiomeCondition(BiomeID.mushroom_fields, radius=2000)], - conditions=[ - SpawnCondition(max_distance=500), - StrongholdCondition(count=1, max_distance=2000), - QuadStructureCondition(StructureType.Swamp_Hut, max_dist=128), - ], -) - -for result in SeedSearch(criteria).run( - seed_range=(0, 100_000_000), - count=5, - workers=4, -): - print(result) -``` - -## All condition types - -| Class | CLI flag | Description | -|-------|----------|-------------| -| `BiomeCondition` | `--biome NAME...` | Biome must exist near origin (AND) | -| `AnyOfBiomes` | `--any-biome NAME...` | At least one biome (OR) | -| `StructureCondition` | `--structure NAME...` | Structure viable near origin | -| `SpawnCondition` | `--spawn-biome / --spawn-max-dist` | Spawn location/biome | -| `StrongholdCondition` | `--stronghold-radius` | First N strongholds in radius | -| `ProximityCondition` | `--proximity A B DIST` | Two structures near each other | -| `QuadStructureCondition` | `--quad STRUCT` | Quad-farm base (2×2 regions) | -| `BiomeDensityCondition` | `--biome-density BIOME FRAC` | Biome coverage fraction | -| `SlimeDensityCondition` | `--min-slime-chunks N` | Minimum slime chunks | -| `CustomCondition` | — (Python only) | Arbitrary `(seed, mc) → bool` function | - -## Building from source - -Requires GCC and Python ≥ 3.8: - -```bash -git clone https://github.com/your-fork/active-cubiomes -cd active-cubiomes -pip install -e ".[dev]" -``` - -## License - -The Python bindings are MIT licensed. -The bundled [cubiomes](https://github.com/xpple/cubiomes) C library -is also MIT licensed. diff --git a/active_cubiomes.egg-info/SOURCES.txt b/active_cubiomes.egg-info/SOURCES.txt deleted file mode 100644 index 122c7aa..0000000 --- a/active_cubiomes.egg-info/SOURCES.txt +++ /dev/null @@ -1,212 +0,0 @@ -LICENSE -MANIFEST.in -README.md -pyproject.toml -setup.py -_cubiomes_src/biomenoise.c -_cubiomes_src/biomenoise.h -_cubiomes_src/biomes.c -_cubiomes_src/biomes.h -_cubiomes_src/carver.c -_cubiomes_src/carver.h -_cubiomes_src/finders.c -_cubiomes_src/finders.h -_cubiomes_src/generator.c -_cubiomes_src/generator.h -_cubiomes_src/layers.c -_cubiomes_src/layers.h -_cubiomes_src/noise.c -_cubiomes_src/noise.h -_cubiomes_src/quadbase.c -_cubiomes_src/quadbase.h -_cubiomes_src/rng.h -_cubiomes_src/terrainnoise.c -_cubiomes_src/terrainnoise.h -_cubiomes_src/tests.c -_cubiomes_src/util.c -_cubiomes_src/util.h -_cubiomes_src/xradv.c -_cubiomes_src/xrms.h -_cubiomes_src/features/abandoned_camp.c -_cubiomes_src/features/abandoned_camp.h -_cubiomes_src/features/end_city.c -_cubiomes_src/features/end_city.h -_cubiomes_src/features/fortress.c -_cubiomes_src/features/fortress.h -_cubiomes_src/features/ore.c -_cubiomes_src/features/ore.h -_cubiomes_src/features/stronghold.c -_cubiomes_src/features/stronghold.h -_cubiomes_src/loot/items.c -_cubiomes_src/loot/items.h -_cubiomes_src/loot/logging.h -_cubiomes_src/loot/loot_functions.c -_cubiomes_src/loot/loot_functions.h -_cubiomes_src/loot/loot_table_context.c -_cubiomes_src/loot/loot_table_context.h -_cubiomes_src/loot/loot_table_parser.c -_cubiomes_src/loot/loot_table_parser.h -_cubiomes_src/loot/loot_tables.c -_cubiomes_src/loot/loot_tables.h -_cubiomes_src/loot/mc_loot.h -_cubiomes_src/loot/cjson/cJSON.c -_cubiomes_src/loot/cjson/cJSON.h -_cubiomes_src/loot/loot_tables/barrels/abandoned_camp_barrel_26_3.c -_cubiomes_src/loot/loot_tables/barrels/abandoned_camp_barrel_26_3.h -_cubiomes_src/loot/loot_tables/chests/abandoned_camp_common_chest_26_3.c -_cubiomes_src/loot/loot_tables/chests/abandoned_camp_common_chest_26_3.h -_cubiomes_src/loot/loot_tables/chests/abandoned_camp_secret_chest_26_3.c -_cubiomes_src/loot/loot_tables/chests/abandoned_camp_secret_chest_26_3.h -_cubiomes_src/loot/loot_tables/chests/bastion_bridge_1_16_1.c -_cubiomes_src/loot/loot_tables/chests/bastion_bridge_1_16_1.h -_cubiomes_src/loot/loot_tables/chests/bastion_bridge_1_16_5.c -_cubiomes_src/loot/loot_tables/chests/bastion_bridge_1_16_5.h -_cubiomes_src/loot/loot_tables/chests/bastion_bridge_1_20.c -_cubiomes_src/loot/loot_tables/chests/bastion_bridge_1_20.h -_cubiomes_src/loot/loot_tables/chests/bastion_other_1_16_1.c -_cubiomes_src/loot/loot_tables/chests/bastion_other_1_16_1.h -_cubiomes_src/loot/loot_tables/chests/bastion_other_1_16_5.c -_cubiomes_src/loot/loot_tables/chests/bastion_other_1_16_5.h -_cubiomes_src/loot/loot_tables/chests/bastion_other_1_20.c -_cubiomes_src/loot/loot_tables/chests/bastion_other_1_20.h -_cubiomes_src/loot/loot_tables/chests/bastion_other_1_21_1.c -_cubiomes_src/loot/loot_tables/chests/bastion_other_1_21_1.h -_cubiomes_src/loot/loot_tables/chests/bastion_other_1_21_9.c -_cubiomes_src/loot/loot_tables/chests/bastion_other_1_21_9.h -_cubiomes_src/loot/loot_tables/chests/buried_treasure_1_13.c -_cubiomes_src/loot/loot_tables/chests/buried_treasure_1_13.h -_cubiomes_src/loot/loot_tables/chests/buried_treasure_1_18.c -_cubiomes_src/loot/loot_tables/chests/buried_treasure_1_18.h -_cubiomes_src/loot/loot_tables/chests/buried_treasure_1_21_11.c -_cubiomes_src/loot/loot_tables/chests/buried_treasure_1_21_11.h -_cubiomes_src/loot/loot_tables/chests/desert_pyramid_1_13.c -_cubiomes_src/loot/loot_tables/chests/desert_pyramid_1_13.h -_cubiomes_src/loot/loot_tables/chests/desert_pyramid_1_20.c -_cubiomes_src/loot/loot_tables/chests/desert_pyramid_1_20.h -_cubiomes_src/loot/loot_tables/chests/desert_pyramid_1_21_11.c -_cubiomes_src/loot/loot_tables/chests/desert_pyramid_1_21_11.h -_cubiomes_src/loot/loot_tables/chests/desert_pyramid_1_21_6.c -_cubiomes_src/loot/loot_tables/chests/desert_pyramid_1_21_6.h -_cubiomes_src/loot/loot_tables/chests/desert_pyramid_1_21_9.c -_cubiomes_src/loot/loot_tables/chests/desert_pyramid_1_21_9.h -_cubiomes_src/loot/loot_tables/chests/end_city_treasure_1_13.c -_cubiomes_src/loot/loot_tables/chests/end_city_treasure_1_13.h -_cubiomes_src/loot/loot_tables/chests/end_city_treasure_1_20.c -_cubiomes_src/loot/loot_tables/chests/end_city_treasure_1_20.h -_cubiomes_src/loot/loot_tables/chests/end_city_treasure_1_21_11.c -_cubiomes_src/loot/loot_tables/chests/end_city_treasure_1_21_11.h -_cubiomes_src/loot/loot_tables/chests/end_city_treasure_1_21_9.c -_cubiomes_src/loot/loot_tables/chests/end_city_treasure_1_21_9.h -_cubiomes_src/loot/loot_tables/chests/igloo_chest_1_13.c -_cubiomes_src/loot/loot_tables/chests/igloo_chest_1_13.h -_cubiomes_src/loot/loot_tables/chests/jungle_temple_1_13.c -_cubiomes_src/loot/loot_tables/chests/jungle_temple_1_13.h -_cubiomes_src/loot/loot_tables/chests/jungle_temple_1_14.c -_cubiomes_src/loot/loot_tables/chests/jungle_temple_1_14.h -_cubiomes_src/loot/loot_tables/chests/jungle_temple_1_20.c -_cubiomes_src/loot/loot_tables/chests/jungle_temple_1_20.h -_cubiomes_src/loot/loot_tables/chests/jungle_temple_1_21_11.c -_cubiomes_src/loot/loot_tables/chests/jungle_temple_1_21_11.h -_cubiomes_src/loot/loot_tables/chests/jungle_temple_1_21_6.c -_cubiomes_src/loot/loot_tables/chests/jungle_temple_1_21_6.h -_cubiomes_src/loot/loot_tables/chests/jungle_temple_1_21_9.c -_cubiomes_src/loot/loot_tables/chests/jungle_temple_1_21_9.h -_cubiomes_src/loot/loot_tables/chests/jungle_temple_dispenser_1_13.c -_cubiomes_src/loot/loot_tables/chests/jungle_temple_dispenser_1_13.h -_cubiomes_src/loot/loot_tables/chests/nether_bridge_1_13.c -_cubiomes_src/loot/loot_tables/chests/nether_bridge_1_13.h -_cubiomes_src/loot/loot_tables/chests/nether_bridge_1_20.c -_cubiomes_src/loot/loot_tables/chests/nether_bridge_1_20.h -_cubiomes_src/loot/loot_tables/chests/nether_bridge_1_21_9.c -_cubiomes_src/loot/loot_tables/chests/nether_bridge_1_21_9.h -_cubiomes_src/loot/loot_tables/chests/pillager_outpost_1_14.c -_cubiomes_src/loot/loot_tables/chests/pillager_outpost_1_14.h -_cubiomes_src/loot/loot_tables/chests/pillager_outpost_1_19_2.c -_cubiomes_src/loot/loot_tables/chests/pillager_outpost_1_19_2.h -_cubiomes_src/loot/loot_tables/chests/pillager_outpost_1_20.c -_cubiomes_src/loot/loot_tables/chests/pillager_outpost_1_20.h -_cubiomes_src/loot/loot_tables/chests/pillager_outpost_1_21_11.c -_cubiomes_src/loot/loot_tables/chests/pillager_outpost_1_21_11.h -_cubiomes_src/loot/loot_tables/chests/ruined_portal_1_16_1.c -_cubiomes_src/loot/loot_tables/chests/ruined_portal_1_16_1.h -_cubiomes_src/loot/loot_tables/chests/ruined_portal_1_21_5.c -_cubiomes_src/loot/loot_tables/chests/ruined_portal_1_21_5.h -_cubiomes_src/loot/loot_tables/chests/shipwreck_map_1_13.c -_cubiomes_src/loot/loot_tables/chests/shipwreck_map_1_13.h -_cubiomes_src/loot/loot_tables/chests/shipwreck_map_1_18.c -_cubiomes_src/loot/loot_tables/chests/shipwreck_map_1_18.h -_cubiomes_src/loot/loot_tables/chests/shipwreck_map_1_20.c -_cubiomes_src/loot/loot_tables/chests/shipwreck_map_1_20.h -_cubiomes_src/loot/loot_tables/chests/shipwreck_map_1_21_11.c -_cubiomes_src/loot/loot_tables/chests/shipwreck_map_1_21_11.h -_cubiomes_src/loot/loot_tables/chests/shipwreck_supply_1_13.c -_cubiomes_src/loot/loot_tables/chests/shipwreck_supply_1_13.h -_cubiomes_src/loot/loot_tables/chests/shipwreck_supply_1_14.c -_cubiomes_src/loot/loot_tables/chests/shipwreck_supply_1_14.h -_cubiomes_src/loot/loot_tables/chests/shipwreck_supply_1_17.c -_cubiomes_src/loot/loot_tables/chests/shipwreck_supply_1_17.h -_cubiomes_src/loot/loot_tables/chests/shipwreck_supply_1_20.c -_cubiomes_src/loot/loot_tables/chests/shipwreck_supply_1_20.h -_cubiomes_src/loot/loot_tables/chests/shipwreck_supply_1_21_11.c -_cubiomes_src/loot/loot_tables/chests/shipwreck_supply_1_21_11.h -_cubiomes_src/loot/loot_tables/chests/shipwreck_treasure_1_13.c -_cubiomes_src/loot/loot_tables/chests/shipwreck_treasure_1_13.h -_cubiomes_src/loot/loot_tables/chests/shipwreck_treasure_1_20.c -_cubiomes_src/loot/loot_tables/chests/shipwreck_treasure_1_20.h -_cubiomes_src/loot/loot_tables/chests/shipwreck_treasure_1_21_11.c -_cubiomes_src/loot/loot_tables/chests/shipwreck_treasure_1_21_11.h -_cubiomes_src/loot/loot_tables/chests/stronghold_corridor_1_13.c -_cubiomes_src/loot/loot_tables/chests/stronghold_corridor_1_13.h -_cubiomes_src/loot/loot_tables/chests/stronghold_corridor_1_18.c -_cubiomes_src/loot/loot_tables/chests/stronghold_corridor_1_18.h -_cubiomes_src/loot/loot_tables/chests/stronghold_corridor_1_20.c -_cubiomes_src/loot/loot_tables/chests/stronghold_corridor_1_20.h -_cubiomes_src/loot/loot_tables/chests/stronghold_corridor_1_21_6.c -_cubiomes_src/loot/loot_tables/chests/stronghold_corridor_1_21_6.h -_cubiomes_src/loot/loot_tables/chests/stronghold_corridor_1_21_9.c -_cubiomes_src/loot/loot_tables/chests/stronghold_corridor_1_21_9.h -_cubiomes_src/loot/loot_tables/chests/stronghold_crossing_1_13.c -_cubiomes_src/loot/loot_tables/chests/stronghold_crossing_1_13.h -_cubiomes_src/loot/loot_tables/chests/stronghold_library_1_13.c -_cubiomes_src/loot/loot_tables/chests/stronghold_library_1_13.h -_cubiomes_src/loot/loot_tables/chests/stronghold_library_1_20.c -_cubiomes_src/loot/loot_tables/chests/stronghold_library_1_20.h -_cubiomes_src/loot/loot_tables/chests/trial_chambers/reward_1_21_1.c -_cubiomes_src/loot/loot_tables/chests/trial_chambers/reward_1_21_1.h -_cubiomes_src/loot/loot_tables/chests/trial_chambers/reward_common_1_21_1.c -_cubiomes_src/loot/loot_tables/chests/trial_chambers/reward_common_1_21_1.h -_cubiomes_src/loot/loot_tables/chests/trial_chambers/reward_ominous_1_21_1.c -_cubiomes_src/loot/loot_tables/chests/trial_chambers/reward_ominous_1_21_1.h -_cubiomes_src/loot/loot_tables/chests/trial_chambers/reward_ominous_common_1_21_1.c -_cubiomes_src/loot/loot_tables/chests/trial_chambers/reward_ominous_common_1_21_1.h -_cubiomes_src/loot/loot_tables/chests/trial_chambers/reward_ominous_rare_1_21_1.c -_cubiomes_src/loot/loot_tables/chests/trial_chambers/reward_ominous_rare_1_21_1.h -_cubiomes_src/loot/loot_tables/chests/trial_chambers/reward_ominous_unique_1_21_1.c -_cubiomes_src/loot/loot_tables/chests/trial_chambers/reward_ominous_unique_1_21_1.h -_cubiomes_src/loot/loot_tables/chests/trial_chambers/reward_rare_1_21_1.c -_cubiomes_src/loot/loot_tables/chests/trial_chambers/reward_rare_1_21_1.h -_cubiomes_src/loot/loot_tables/chests/trial_chambers/reward_unique_1_21_1.c -_cubiomes_src/loot/loot_tables/chests/trial_chambers/reward_unique_1_21_1.h -_cubiomes_src/tables/btree18.h -_cubiomes_src/tables/btree19.h -_cubiomes_src/tables/btree192.h -_cubiomes_src/tables/btree20.h -_cubiomes_src/tables/btree215.h -_cubiomes_src/tables/btree21wd.h -_cubiomes_src/tables/btree262.h -_cubiomes_src/tables/btree263.h -_cubiomes_src/tests/test_biomes.c -_cubiomes_src/tests/test_carvers.c -_cubiomes_src/tests/test_loot.c -_cubiomes_src/tests/test_pieces.c -_cubiomes_src/tests/test_structures.c -_cubiomes_src/tests/testing.h -cubiomes/__init__.py -cubiomes/__main__.py -cubiomes/_cubiomes.pxd -cubiomes/_wrapper.c -cubiomes/_wrapper.pyx -cubiomes/enums.py -cubiomes/search.py -tests/test_cubiomes.py -tests/test_search.py \ No newline at end of file diff --git a/active_cubiomes.egg-info/dependency_links.txt b/active_cubiomes.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/active_cubiomes.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/active_cubiomes.egg-info/entry_points.txt b/active_cubiomes.egg-info/entry_points.txt deleted file mode 100644 index 791829f..0000000 --- a/active_cubiomes.egg-info/entry_points.txt +++ /dev/null @@ -1,2 +0,0 @@ -[console_scripts] -cubiomes-search = cubiomes.search:main diff --git a/active_cubiomes.egg-info/not-zip-safe b/active_cubiomes.egg-info/not-zip-safe deleted file mode 100644 index 8b13789..0000000 --- a/active_cubiomes.egg-info/not-zip-safe +++ /dev/null @@ -1 +0,0 @@ - diff --git a/active_cubiomes.egg-info/requires.txt b/active_cubiomes.egg-info/requires.txt deleted file mode 100644 index 06ab9e5..0000000 --- a/active_cubiomes.egg-info/requires.txt +++ /dev/null @@ -1,8 +0,0 @@ - -[dev] -pytest>=7 -numpy>=1.20 -cython>=3.0 - -[numpy] -numpy>=1.20 diff --git a/active_cubiomes.egg-info/top_level.txt b/active_cubiomes.egg-info/top_level.txt deleted file mode 100644 index 2089167..0000000 --- a/active_cubiomes.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -cubiomes diff --git a/build/lib.linux-aarch64-cpython-312/cubiomes/_wrapper.cpython-312-aarch64-linux-gnu.so b/build/lib.linux-aarch64-cpython-312/cubiomes/_wrapper.cpython-312-aarch64-linux-gnu.so index 08926d3..d10ee12 100755 Binary files a/build/lib.linux-aarch64-cpython-312/cubiomes/_wrapper.cpython-312-aarch64-linux-gnu.so and b/build/lib.linux-aarch64-cpython-312/cubiomes/_wrapper.cpython-312-aarch64-linux-gnu.so differ diff --git a/build/temp.linux-aarch64-cpython-312/cubiomes/_wrapper.o b/build/temp.linux-aarch64-cpython-312/cubiomes/_wrapper.o index f35c754..42676f1 100644 Binary files a/build/temp.linux-aarch64-cpython-312/cubiomes/_wrapper.o and b/build/temp.linux-aarch64-cpython-312/cubiomes/_wrapper.o differ diff --git a/cubiomes/_wrapper.c b/cubiomes/_wrapper.c index 9af7be8..1740dc2 100644 --- a/cubiomes/_wrapper.c +++ b/cubiomes/_wrapper.c @@ -2794,7 +2794,7 @@ static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); static CYTHON_INLINE unsigned int __Pyx_PyLong_As_unsigned_int(PyObject *); /* CIntFromPy.proto */ -static CYTHON_INLINE uint64_t __Pyx_PyLong_As_uint64_t(PyObject *); +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyLong_As_PY_LONG_LONG(PyObject *); /* PyObjectVectorcallKwds.proto (used by PyObjectVectorcallMethodKwds) */ #if CYTHON_VECTORCALL @@ -2840,6 +2840,12 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int32_t(int32_t value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int8_t(int8_t value); +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PY_LONG_LONG(PY_LONG_LONG value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE uint64_t __Pyx_PyLong_As_uint64_t(PyObject *); + /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); @@ -2974,20 +2980,20 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_2mc___get__(struct __py static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_3dim___get__(struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_4seed___get__(struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_5flags___get__(struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_6apply_seed(struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_self, int __pyx_v_dim, uint64_t __pyx_v_seed); /* proto */ +static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_6apply_seed(struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_self, int __pyx_v_dim, PY_LONG_LONG __pyx_v_seed); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_8get_biome_at(struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_self, int __pyx_v_x, int __pyx_v_y, int __pyx_v_z, int __pyx_v_scale); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_10gen_biomes(struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_self, int __pyx_v_x, int __pyx_v_z, int __pyx_v_sx, int __pyx_v_sz, int __pyx_v_scale, int __pyx_v_y, int __pyx_v_sy); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_12get_spawn(struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_14estimate_spawn(struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_16locate_biome(struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_self, int __pyx_v_x, int __pyx_v_y, int __pyx_v_z, int __pyx_v_radius, PyObject *__pyx_v_valid_biomes); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_18get_biome_centers(struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_self, int __pyx_v_x, int __pyx_v_z, int __pyx_v_sx, int __pyx_v_sz, int __pyx_v_match, int __pyx_v_min_size, int __pyx_v_tolerance, int __pyx_v_max_results); /* proto */ -static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_20check_for_biomes(struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_self, int __pyx_v_x, int __pyx_v_z, int __pyx_v_sx, int __pyx_v_sz, int __pyx_v_scale, int __pyx_v_dim, uint64_t __pyx_v_seed, struct __pyx_obj_8cubiomes_8_wrapper_BiomeFilter *__pyx_v_biome_filter, int __pyx_v_y, int __pyx_v_sy); /* proto */ +static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_20check_for_biomes(struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_self, int __pyx_v_x, int __pyx_v_z, int __pyx_v_sx, int __pyx_v_sz, int __pyx_v_scale, int __pyx_v_dim, PY_LONG_LONG __pyx_v_seed, struct __pyx_obj_8cubiomes_8_wrapper_BiomeFilter *__pyx_v_biome_filter, int __pyx_v_y, int __pyx_v_sy); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_8cubiomes_8_wrapper_11BiomeFilter___cinit__(struct __pyx_obj_8cubiomes_8_wrapper_BiomeFilter *__pyx_v_self, int __pyx_v_mc, PyObject *__pyx_v_required, PyObject *__pyx_v_excluded, PyObject *__pyx_v_match_any, unsigned int __pyx_v_flags); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_11BiomeFilter_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8cubiomes_8_wrapper_BiomeFilter *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_11BiomeFilter_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8cubiomes_8_wrapper_BiomeFilter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ -static int __pyx_pf_8cubiomes_8_wrapper_18StrongholdIterator___cinit__(struct __pyx_obj_8cubiomes_8_wrapper_StrongholdIterator *__pyx_v_self, struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_gen, uint64_t __pyx_v_seed48); /* proto */ +static int __pyx_pf_8cubiomes_8_wrapper_18StrongholdIterator___cinit__(struct __pyx_obj_8cubiomes_8_wrapper_StrongholdIterator *__pyx_v_self, struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_gen, PY_LONG_LONG __pyx_v_seed48); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_18StrongholdIterator_2__iter__(struct __pyx_obj_8cubiomes_8_wrapper_StrongholdIterator *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_18StrongholdIterator_4__next__(struct __pyx_obj_8cubiomes_8_wrapper_StrongholdIterator *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_18StrongholdIterator_5index___get__(struct __pyx_obj_8cubiomes_8_wrapper_StrongholdIterator *__pyx_v_self); /* proto */ @@ -3008,19 +3014,19 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_16StructureVariant_4size___get__(s static PyObject *__pyx_pf_8cubiomes_8_wrapper_16StructureVariant_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8cubiomes_8_wrapper_StructureVariant *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_16StructureVariant_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8cubiomes_8_wrapper_StructureVariant *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_get_structure_config(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_struct_type, int __pyx_v_mc); /* proto */ -static PyObject *__pyx_pf_8cubiomes_8_wrapper_2get_structure_pos(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_struct_type, int __pyx_v_mc, uint64_t __pyx_v_seed, int __pyx_v_reg_x, int __pyx_v_reg_z); /* proto */ +static PyObject *__pyx_pf_8cubiomes_8_wrapper_2get_structure_pos(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_struct_type, int __pyx_v_mc, PY_LONG_LONG __pyx_v_seed, int __pyx_v_reg_x, int __pyx_v_reg_z); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_4is_viable_structure_pos(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_struct_type, struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_gen, int __pyx_v_block_x, int __pyx_v_block_z, unsigned int __pyx_v_flags); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_6is_viable_feature_biome(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_mc, int __pyx_v_struct_type, int __pyx_v_biome_id); /* proto */ -static PyObject *__pyx_pf_8cubiomes_8_wrapper_8get_variant(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_struct_type, int __pyx_v_mc, uint64_t __pyx_v_seed, int __pyx_v_block_x, int __pyx_v_block_z, int __pyx_v_biome_id); /* proto */ -static PyObject *__pyx_pf_8cubiomes_8_wrapper_10iter_strongholds(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_gen, uint64_t __pyx_v_seed48); /* proto */ -static PyObject *__pyx_pf_8cubiomes_8_wrapper_12init_first_stronghold(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_mc, uint64_t __pyx_v_seed48); /* proto */ -static PyObject *__pyx_pf_8cubiomes_8_wrapper_14get_mineshafts(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_mc, uint64_t __pyx_v_seed, int __pyx_v_chunk_x, int __pyx_v_chunk_z, int __pyx_v_chunk_w, int __pyx_v_chunk_h, int __pyx_v_max_count); /* proto */ +static PyObject *__pyx_pf_8cubiomes_8_wrapper_8get_variant(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_struct_type, int __pyx_v_mc, PY_LONG_LONG __pyx_v_seed, int __pyx_v_block_x, int __pyx_v_block_z, int __pyx_v_biome_id); /* proto */ +static PyObject *__pyx_pf_8cubiomes_8_wrapper_10iter_strongholds(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_gen, PY_LONG_LONG __pyx_v_seed48); /* proto */ +static PyObject *__pyx_pf_8cubiomes_8_wrapper_12init_first_stronghold(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_mc, PY_LONG_LONG __pyx_v_seed48); /* proto */ +static PyObject *__pyx_pf_8cubiomes_8_wrapper_14get_mineshafts(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_mc, PY_LONG_LONG __pyx_v_seed, int __pyx_v_chunk_x, int __pyx_v_chunk_z, int __pyx_v_chunk_w, int __pyx_v_chunk_h, int __pyx_v_max_count); /* proto */ static struct __pyx_obj_8cubiomes_8_wrapper_BiomeFilter *__pyx_pf_8cubiomes_8_wrapper_16setup_biome_filter(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_mc, PyObject *__pyx_v_required, PyObject *__pyx_v_excluded, PyObject *__pyx_v_match_any, unsigned int __pyx_v_flags); /* proto */ -static PyObject *__pyx_pf_8cubiomes_8_wrapper_18is_slime_chunk(CYTHON_UNUSED PyObject *__pyx_self, uint64_t __pyx_v_seed, int __pyx_v_chunk_x, int __pyx_v_chunk_z); /* proto */ -static PyObject *__pyx_pf_8cubiomes_8_wrapper_20get_shadow(CYTHON_UNUSED PyObject *__pyx_self, uint64_t __pyx_v_seed); /* proto */ -static PyObject *__pyx_pf_8cubiomes_8_wrapper_22move_structure(CYTHON_UNUSED PyObject *__pyx_self, uint64_t __pyx_v_base_seed, int __pyx_v_reg_x, int __pyx_v_reg_z); /* proto */ -static PyObject *__pyx_pf_8cubiomes_8_wrapper_24chunk_generate_rnd(CYTHON_UNUSED PyObject *__pyx_self, uint64_t __pyx_v_world_seed, int __pyx_v_chunk_x, int __pyx_v_chunk_z); /* proto */ -static PyObject *__pyx_pf_8cubiomes_8_wrapper_26get_population_seed(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_mc, uint64_t __pyx_v_world_seed, int __pyx_v_x, int __pyx_v_z); /* proto */ +static PyObject *__pyx_pf_8cubiomes_8_wrapper_18is_slime_chunk(CYTHON_UNUSED PyObject *__pyx_self, PY_LONG_LONG __pyx_v_seed, int __pyx_v_chunk_x, int __pyx_v_chunk_z); /* proto */ +static PyObject *__pyx_pf_8cubiomes_8_wrapper_20get_shadow(CYTHON_UNUSED PyObject *__pyx_self, PY_LONG_LONG __pyx_v_seed); /* proto */ +static PyObject *__pyx_pf_8cubiomes_8_wrapper_22move_structure(CYTHON_UNUSED PyObject *__pyx_self, PY_LONG_LONG __pyx_v_base_seed, int __pyx_v_reg_x, int __pyx_v_reg_z); /* proto */ +static PyObject *__pyx_pf_8cubiomes_8_wrapper_24chunk_generate_rnd(CYTHON_UNUSED PyObject *__pyx_self, PY_LONG_LONG __pyx_v_world_seed, int __pyx_v_chunk_x, int __pyx_v_chunk_z); /* proto */ +static PyObject *__pyx_pf_8cubiomes_8_wrapper_26get_population_seed(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_mc, PY_LONG_LONG __pyx_v_world_seed, int __pyx_v_x, int __pyx_v_z); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_28biome_exists(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_mc, int __pyx_v_biome_id); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_30is_overworld_biome(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_mc, int __pyx_v_biome_id); /* proto */ static PyObject *__pyx_pf_8cubiomes_8_wrapper_32get_dimension(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_biome_id); /* proto */ @@ -3379,21 +3385,21 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati #define __pyx_n_u_z __pyx_string_tab[169] #define __pyx_kp_b_iso88591_Q __pyx_string_tab[170] #define __pyx_kp_b_iso88591_0_at_Z __pyx_string_tab[171] -#define __pyx_kp_b_iso88591_q_L_1 __pyx_string_tab[172] -#define __pyx_kp_b_iso88591_xq_v_F_t1_1_q_1 __pyx_string_tab[173] -#define __pyx_kp_b_iso88591_45_a_9A __pyx_string_tab[174] +#define __pyx_kp_b_iso88591_q_Jl_Q __pyx_string_tab[172] +#define __pyx_kp_b_iso88591_xq_v_F_t_Q_1_q_1 __pyx_string_tab[173] +#define __pyx_kp_b_iso88591_45_az_Ya __pyx_string_tab[174] #define __pyx_kp_b_iso88591_5Q_4s_q_S_1 __pyx_string_tab[175] -#define __pyx_kp_b_iso88591_z_q_A_t3a_F_9IYe1_Rs_2T_ARt4uE __pyx_string_tab[176] +#define __pyx_kp_b_iso88591_z_q_A_t3a_JfIYiy_Q_Rs_2T_ARt4uE __pyx_string_tab[176] #define __pyx_kp_b_iso88591_v_d_1_q_r_r_r_r_r_r __pyx_string_tab[177] -#define __pyx_kp_b_iso88591_AQd_a_Ct3a __pyx_string_tab[178] -#define __pyx_kp_b_iso88591_v_Qm4vWG1A_q_Ct3a __pyx_string_tab[179] +#define __pyx_kp_b_iso88591_AQd_j_Ct3a __pyx_string_tab[178] +#define __pyx_kp_b_iso88591_v_Qm4z_wgQa_q_Ct3a __pyx_string_tab[179] #define __pyx_kp_b_iso88591_Qe1 __pyx_string_tab[180] #define __pyx_kp_b_iso88591_A_j_D_a_a_q_q_a_q_Kq_E_6_A_Qa_1D __pyx_string_tab[181] #define __pyx_kp_b_iso88591_A2C1_a_a_q_q_a_q_z_q_Ba_gV1L_83e __pyx_string_tab[182] -#define __pyx_kp_b_iso88591_A_a_a_q_q_a_q_V3e6_fA __pyx_string_tab[183] +#define __pyx_kp_b_iso88591_A_a_a_q_q_a_q_V3e_V1L_a __pyx_string_tab[183] #define __pyx_kp_b_iso88591_A_A_N_4uAQ_4s __pyx_string_tab[184] #define __pyx_kp_b_iso88591_A_IQd_4s __pyx_string_tab[185] -#define __pyx_kp_b_iso88591_A_AT_e1 __pyx_string_tab[186] +#define __pyx_kp_b_iso88591_A_AT_e_Q __pyx_string_tab[186] #define __pyx_kp_b_iso88591_A_G1_1A_r_D_Jc_A_S_A_Jc_Rr_A_L_S __pyx_string_tab[187] #define __pyx_kp_b_iso88591_Q_4s __pyx_string_tab[188] #define __pyx_kp_b_iso88591_a_4s_1 __pyx_string_tab[189] @@ -3407,8 +3413,8 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati #define __pyx_kp_b_iso88591_a __pyx_string_tab[197] #define __pyx_kp_b_iso88591_0_4s_at1 __pyx_string_tab[198] #define __pyx_kp_b_iso88591_9_4s_Qd_Q __pyx_string_tab[199] -#define __pyx_kp_b_iso88591_q_4s_q_iq __pyx_string_tab[200] -#define __pyx_kp_b_iso88591_1Kwa __pyx_string_tab[201] +#define __pyx_kp_b_iso88591_4s_q __pyx_string_tab[200] +#define __pyx_kp_b_iso88591_A_1Jk __pyx_string_tab[201] #define __pyx_kp_b_iso88591_Fa_4s_q_M __pyx_string_tab[202] #define __pyx_kp_b_iso88591_AT_gS_1 __pyx_string_tab[203] #define __pyx_int_0 __pyx_number_tab[0] @@ -4602,7 +4608,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_5flags___get__(struct _ /* "cubiomes/_wrapper.pyx":91 * # core methods * - * def apply_seed(self, int dim, uint64_t seed): # <<<<<<<<<<<<<< + * def apply_seed(self, int dim, long long seed): # <<<<<<<<<<<<<< * """Bind a world seed and dimension to the generator. * */ @@ -4625,7 +4631,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { int __pyx_v_dim; - uint64_t __pyx_v_seed; + PY_LONG_LONG __pyx_v_seed; #if !CYTHON_VECTORCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif @@ -4676,7 +4682,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 91, __pyx_L3_error) } __pyx_v_dim = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_dim == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 91, __pyx_L3_error) - __pyx_v_seed = __Pyx_PyLong_As_uint64_t(values[1]); if (unlikely((__pyx_v_seed == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 91, __pyx_L3_error) + __pyx_v_seed = __Pyx_PyLong_As_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v_seed == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 91, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; @@ -4703,7 +4709,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_6apply_seed(struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_self, int __pyx_v_dim, uint64_t __pyx_v_seed) { +static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_6apply_seed(struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_self, int __pyx_v_dim, PY_LONG_LONG __pyx_v_seed) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("apply_seed", 0); @@ -4711,16 +4717,16 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_6apply_seed(struct __py /* "cubiomes/_wrapper.pyx":103 * seed (int): 64-bit world seed. * """ - * cb.applySeed(self._g, dim, seed) # <<<<<<<<<<<<<< + * cb.applySeed(self._g, dim, seed) # <<<<<<<<<<<<<< * * def get_biome_at(self, int x, int y, int z, int scale=4) -> int: */ - applySeed(__pyx_v_self->_g, __pyx_v_dim, __pyx_v_seed); + applySeed(__pyx_v_self->_g, __pyx_v_dim, ((uint64_t)__pyx_v_seed)); /* "cubiomes/_wrapper.pyx":91 * # core methods * - * def apply_seed(self, int dim, uint64_t seed): # <<<<<<<<<<<<<< + * def apply_seed(self, int dim, long long seed): # <<<<<<<<<<<<<< * """Bind a world seed and dimension to the generator. * */ @@ -4733,7 +4739,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_6apply_seed(struct __py } /* "cubiomes/_wrapper.pyx":105 - * cb.applySeed(self._g, dim, seed) + * cb.applySeed(self._g, dim, seed) * * def get_biome_at(self, int x, int y, int z, int scale=4) -> int: # <<<<<<<<<<<<<< * """Get the biome ID at a single position. @@ -4894,7 +4900,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_8get_biome_at(struct __ goto __pyx_L0; /* "cubiomes/_wrapper.pyx":105 - * cb.applySeed(self._g, dim, seed) + * cb.applySeed(self._g, dim, seed) * * def get_biome_at(self, int x, int y, int z, int scale=4) -> int: # <<<<<<<<<<<<<< * """Get the biome ID at a single position. @@ -6552,7 +6558,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_18get_biome_centers(str * return result * * def check_for_biomes(self, int x, int z, int sx, int sz, # <<<<<<<<<<<<<< - * int scale, int dim, uint64_t seed, + * int scale, int dim, long long seed, * BiomeFilter biome_filter, */ @@ -6579,7 +6585,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds int __pyx_v_sz; int __pyx_v_scale; int __pyx_v_dim; - uint64_t __pyx_v_seed; + PY_LONG_LONG __pyx_v_seed; struct __pyx_obj_8cubiomes_8_wrapper_BiomeFilter *__pyx_v_biome_filter = 0; int __pyx_v_y; int __pyx_v_sy; @@ -6693,7 +6699,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_sz = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_sz == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L3_error) __pyx_v_scale = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_scale == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L3_error) __pyx_v_dim = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_dim == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L3_error) - __pyx_v_seed = __Pyx_PyLong_As_uint64_t(values[6]); if (unlikely((__pyx_v_seed == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L3_error) + __pyx_v_seed = __Pyx_PyLong_As_PY_LONG_LONG(values[6]); if (unlikely((__pyx_v_seed == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L3_error) __pyx_v_biome_filter = ((struct __pyx_obj_8cubiomes_8_wrapper_BiomeFilter *)values[7]); if (values[8]) { __pyx_v_y = __Pyx_PyLong_As_int(values[8]); if (unlikely((__pyx_v_y == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 279, __pyx_L3_error) @@ -6748,7 +6754,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_20check_for_biomes(struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_self, int __pyx_v_x, int __pyx_v_z, int __pyx_v_sx, int __pyx_v_sz, int __pyx_v_scale, int __pyx_v_dim, uint64_t __pyx_v_seed, struct __pyx_obj_8cubiomes_8_wrapper_BiomeFilter *__pyx_v_biome_filter, int __pyx_v_y, int __pyx_v_sy) { +static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_20check_for_biomes(struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_self, int __pyx_v_x, int __pyx_v_z, int __pyx_v_sx, int __pyx_v_sz, int __pyx_v_scale, int __pyx_v_dim, PY_LONG_LONG __pyx_v_seed, struct __pyx_obj_8cubiomes_8_wrapper_BiomeFilter *__pyx_v_biome_filter, int __pyx_v_y, int __pyx_v_sy) { Range __pyx_v_r; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -6817,7 +6823,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_20check_for_biomes(stru * r.y = y * r.sy = sy # <<<<<<<<<<<<<< * return cb.checkForBiomes( - * self._g, NULL, r, dim, seed, &biome_filter._bf, NULL) + * self._g, NULL, r, dim, seed, &biome_filter._bf, NULL) */ __pyx_v_r.sy = __pyx_v_sy; @@ -6825,10 +6831,10 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_20check_for_biomes(stru * r.y = y * r.sy = sy * return cb.checkForBiomes( # <<<<<<<<<<<<<< - * self._g, NULL, r, dim, seed, &biome_filter._bf, NULL) + * self._g, NULL, r, dim, seed, &biome_filter._bf, NULL) * */ - __pyx_t_1 = __Pyx_PyLong_From_int(checkForBiomes(__pyx_v_self->_g, NULL, __pyx_v_r, __pyx_v_dim, __pyx_v_seed, (&__pyx_v_biome_filter->_bf), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(checkForBiomes(__pyx_v_self->_g, NULL, __pyx_v_r, __pyx_v_dim, ((uint64_t)__pyx_v_seed), (&__pyx_v_biome_filter->_bf), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); { PyObject *__pyx_temp; @@ -6845,7 +6851,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_9Generator_20check_for_biomes(stru * return result * * def check_for_biomes(self, int x, int z, int sx, int sz, # <<<<<<<<<<<<<< - * int scale, int dim, uint64_t seed, + * int scale, int dim, long long seed, * BiomeFilter biome_filter, */ @@ -8006,9 +8012,9 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_11BiomeFilter_4__setstate_cython__ /* "cubiomes/_wrapper.pyx":387 * cdef bint _has_more * - * def __cinit__(self, Generator gen, uint64_t seed48): # <<<<<<<<<<<<<< + * def __cinit__(self, Generator gen, long long seed48): # <<<<<<<<<<<<<< * self._gen = gen - * cb.initFirstStronghold(&self._sh, gen.mc, seed48) + * cb.initFirstStronghold(&self._sh, gen.mc, seed48) */ /* Python wrapper */ @@ -8027,7 +8033,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_gen = 0; - uint64_t __pyx_v_seed48; + PY_LONG_LONG __pyx_v_seed48; #if !CYTHON_VECTORCALL_TPNEW CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif @@ -8078,7 +8084,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 387, __pyx_L3_error) } __pyx_v_gen = ((struct __pyx_obj_8cubiomes_8_wrapper_Generator *)values[0]); - __pyx_v_seed48 = __Pyx_PyLong_As_uint64_t(values[1]); if (unlikely((__pyx_v_seed48 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 387, __pyx_L3_error) + __pyx_v_seed48 = __Pyx_PyLong_As_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v_seed48 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 387, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; @@ -8114,7 +8120,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static int __pyx_pf_8cubiomes_8_wrapper_18StrongholdIterator___cinit__(struct __pyx_obj_8cubiomes_8_wrapper_StrongholdIterator *__pyx_v_self, struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_gen, uint64_t __pyx_v_seed48) { +static int __pyx_pf_8cubiomes_8_wrapper_18StrongholdIterator___cinit__(struct __pyx_obj_8cubiomes_8_wrapper_StrongholdIterator *__pyx_v_self, struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_gen, PY_LONG_LONG __pyx_v_seed48) { int __pyx_v_remaining; int __pyx_r; __Pyx_RefNannyDeclarations @@ -8129,9 +8135,9 @@ static int __pyx_pf_8cubiomes_8_wrapper_18StrongholdIterator___cinit__(struct __ /* "cubiomes/_wrapper.pyx":388 * - * def __cinit__(self, Generator gen, uint64_t seed48): + * def __cinit__(self, Generator gen, long long seed48): * self._gen = gen # <<<<<<<<<<<<<< - * cb.initFirstStronghold(&self._sh, gen.mc, seed48) + * cb.initFirstStronghold(&self._sh, gen.mc, seed48) * cdef int remaining = cb.nextStronghold( */ __Pyx_INCREF((PyObject *)__pyx_v_gen); @@ -8141,9 +8147,9 @@ static int __pyx_pf_8cubiomes_8_wrapper_18StrongholdIterator___cinit__(struct __ __pyx_v_self->_gen = __pyx_v_gen; /* "cubiomes/_wrapper.pyx":389 - * def __cinit__(self, Generator gen, uint64_t seed48): + * def __cinit__(self, Generator gen, long long seed48): * self._gen = gen - * cb.initFirstStronghold(&self._sh, gen.mc, seed48) # <<<<<<<<<<<<<< + * cb.initFirstStronghold(&self._sh, gen.mc, seed48) # <<<<<<<<<<<<<< * cdef int remaining = cb.nextStronghold( * &self._sh, gen._g if gen is not None else NULL) */ @@ -8151,11 +8157,11 @@ static int __pyx_pf_8cubiomes_8_wrapper_18StrongholdIterator___cinit__(struct __ __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - (void)(initFirstStronghold((&__pyx_v_self->_sh), __pyx_t_2, __pyx_v_seed48)); + (void)(initFirstStronghold((&__pyx_v_self->_sh), __pyx_t_2, ((uint64_t)__pyx_v_seed48))); /* "cubiomes/_wrapper.pyx":391 - * cb.initFirstStronghold(&self._sh, gen.mc, seed48) + * cb.initFirstStronghold(&self._sh, gen.mc, seed48) * cdef int remaining = cb.nextStronghold( * &self._sh, gen._g if gen is not None else NULL) # <<<<<<<<<<<<<< * self._has_current = True @@ -8173,7 +8179,7 @@ static int __pyx_pf_8cubiomes_8_wrapper_18StrongholdIterator___cinit__(struct __ /* "cubiomes/_wrapper.pyx":390 * self._gen = gen - * cb.initFirstStronghold(&self._sh, gen.mc, seed48) + * cb.initFirstStronghold(&self._sh, gen.mc, seed48) * cdef int remaining = cb.nextStronghold( # <<<<<<<<<<<<<< * &self._sh, gen._g if gen is not None else NULL) * self._has_current = True @@ -8202,9 +8208,9 @@ static int __pyx_pf_8cubiomes_8_wrapper_18StrongholdIterator___cinit__(struct __ /* "cubiomes/_wrapper.pyx":387 * cdef bint _has_more * - * def __cinit__(self, Generator gen, uint64_t seed48): # <<<<<<<<<<<<<< + * def __cinit__(self, Generator gen, long long seed48): # <<<<<<<<<<<<<< * self._gen = gen - * cb.initFirstStronghold(&self._sh, gen.mc, seed48) + * cb.initFirstStronghold(&self._sh, gen.mc, seed48) */ /* function exit code */ @@ -10207,7 +10213,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_get_structure_config(CYTHON_UNUSED /* "cubiomes/_wrapper.pyx":515 * * - * def get_structure_pos(int struct_type, int mc, uint64_t seed, # <<<<<<<<<<<<<< + * def get_structure_pos(int struct_type, int mc, long long seed, # <<<<<<<<<<<<<< * int reg_x, int reg_z): * """Find the block position of a structure attempt in a region. */ @@ -10231,7 +10237,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds ) { int __pyx_v_struct_type; int __pyx_v_mc; - uint64_t __pyx_v_seed; + PY_LONG_LONG __pyx_v_seed; int __pyx_v_reg_x; int __pyx_v_reg_z; #if !CYTHON_VECTORCALL @@ -10303,7 +10309,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } __pyx_v_struct_type = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_struct_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 515, __pyx_L3_error) __pyx_v_mc = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_mc == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 515, __pyx_L3_error) - __pyx_v_seed = __Pyx_PyLong_As_uint64_t(values[2]); if (unlikely((__pyx_v_seed == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 515, __pyx_L3_error) + __pyx_v_seed = __Pyx_PyLong_As_PY_LONG_LONG(values[2]); if (unlikely((__pyx_v_seed == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 515, __pyx_L3_error) __pyx_v_reg_x = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_reg_x == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 516, __pyx_L3_error) __pyx_v_reg_z = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_reg_z == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 516, __pyx_L3_error) } @@ -10335,7 +10341,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_8cubiomes_8_wrapper_2get_structure_pos(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_struct_type, int __pyx_v_mc, uint64_t __pyx_v_seed, int __pyx_v_reg_x, int __pyx_v_reg_z) { +static PyObject *__pyx_pf_8cubiomes_8_wrapper_2get_structure_pos(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_struct_type, int __pyx_v_mc, PY_LONG_LONG __pyx_v_seed, int __pyx_v_reg_x, int __pyx_v_reg_z) { Pos __pyx_v_pos; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -10351,18 +10357,18 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_2get_structure_pos(CYTHON_UNUSED P /* "cubiomes/_wrapper.pyx":535 * """ * cdef cb.Pos pos - * if not cb.getStructurePos(struct_type, mc, seed, reg_x, reg_z, &pos): # <<<<<<<<<<<<<< + * if not cb.getStructurePos(struct_type, mc, seed, reg_x, reg_z, &pos): # <<<<<<<<<<<<<< * return None * return (pos.x, pos.z) */ - __pyx_t_1 = (!(getStructurePos(__pyx_v_struct_type, __pyx_v_mc, __pyx_v_seed, __pyx_v_reg_x, __pyx_v_reg_z, (&__pyx_v_pos)) != 0)); + __pyx_t_1 = (!(getStructurePos(__pyx_v_struct_type, __pyx_v_mc, ((uint64_t)__pyx_v_seed), __pyx_v_reg_x, __pyx_v_reg_z, (&__pyx_v_pos)) != 0)); if (__pyx_t_1) { /* "cubiomes/_wrapper.pyx":536 * cdef cb.Pos pos - * if not cb.getStructurePos(struct_type, mc, seed, reg_x, reg_z, &pos): + * if not cb.getStructurePos(struct_type, mc, seed, reg_x, reg_z, &pos): * return None # <<<<<<<<<<<<<< * return (pos.x, pos.z) * @@ -10380,14 +10386,14 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_2get_structure_pos(CYTHON_UNUSED P /* "cubiomes/_wrapper.pyx":535 * """ * cdef cb.Pos pos - * if not cb.getStructurePos(struct_type, mc, seed, reg_x, reg_z, &pos): # <<<<<<<<<<<<<< + * if not cb.getStructurePos(struct_type, mc, seed, reg_x, reg_z, &pos): # <<<<<<<<<<<<<< * return None * return (pos.x, pos.z) */ } /* "cubiomes/_wrapper.pyx":537 - * if not cb.getStructurePos(struct_type, mc, seed, reg_x, reg_z, &pos): + * if not cb.getStructurePos(struct_type, mc, seed, reg_x, reg_z, &pos): * return None * return (pos.x, pos.z) # <<<<<<<<<<<<<< * @@ -10419,7 +10425,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_2get_structure_pos(CYTHON_UNUSED P /* "cubiomes/_wrapper.pyx":515 * * - * def get_structure_pos(int struct_type, int mc, uint64_t seed, # <<<<<<<<<<<<<< + * def get_structure_pos(int struct_type, int mc, long long seed, # <<<<<<<<<<<<<< * int reg_x, int reg_z): * """Find the block position of a structure attempt in a region. */ @@ -10799,7 +10805,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_6is_viable_feature_biome(CYTHON_UN /* "cubiomes/_wrapper.pyx":576 * * - * def get_variant(int struct_type, int mc, uint64_t seed, # <<<<<<<<<<<<<< + * def get_variant(int struct_type, int mc, long long seed, # <<<<<<<<<<<<<< * int block_x, int block_z, int biome_id=-1): * """Retrieve variant information (rotation, size, flags) for a structure. */ @@ -10823,7 +10829,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds ) { int __pyx_v_struct_type; int __pyx_v_mc; - uint64_t __pyx_v_seed; + PY_LONG_LONG __pyx_v_seed; int __pyx_v_block_x; int __pyx_v_block_z; int __pyx_v_biome_id; @@ -10907,7 +10913,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } __pyx_v_struct_type = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_struct_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 576, __pyx_L3_error) __pyx_v_mc = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_mc == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 576, __pyx_L3_error) - __pyx_v_seed = __Pyx_PyLong_As_uint64_t(values[2]); if (unlikely((__pyx_v_seed == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 576, __pyx_L3_error) + __pyx_v_seed = __Pyx_PyLong_As_PY_LONG_LONG(values[2]); if (unlikely((__pyx_v_seed == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 576, __pyx_L3_error) __pyx_v_block_x = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_block_x == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 577, __pyx_L3_error) __pyx_v_block_z = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_block_z == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 577, __pyx_L3_error) if (values[5]) { @@ -10945,7 +10951,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_8cubiomes_8_wrapper_8get_variant(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_struct_type, int __pyx_v_mc, uint64_t __pyx_v_seed, int __pyx_v_block_x, int __pyx_v_block_z, int __pyx_v_biome_id) { +static PyObject *__pyx_pf_8cubiomes_8_wrapper_8get_variant(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_struct_type, int __pyx_v_mc, PY_LONG_LONG __pyx_v_seed, int __pyx_v_block_x, int __pyx_v_block_z, int __pyx_v_biome_id) { struct __pyx_obj_8cubiomes_8_wrapper_StructureVariant *__pyx_v_sv = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -10960,7 +10966,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_8get_variant(CYTHON_UNUSED PyObjec * StructureVariant | None * """ * cdef StructureVariant sv = StructureVariant.__new__(StructureVariant) # <<<<<<<<<<<<<< - * if not cb.getVariant(&sv._sv, struct_type, mc, seed, + * if not cb.getVariant(&sv._sv, struct_type, mc, seed, * block_x, block_z, biome_id): */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_8cubiomes_8_wrapper_StructureVariant(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_8cubiomes_8_wrapper_StructureVariant), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 592, __pyx_L1_error) @@ -10971,17 +10977,17 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_8get_variant(CYTHON_UNUSED PyObjec /* "cubiomes/_wrapper.pyx":593 * """ * cdef StructureVariant sv = StructureVariant.__new__(StructureVariant) - * if not cb.getVariant(&sv._sv, struct_type, mc, seed, # <<<<<<<<<<<<<< + * if not cb.getVariant(&sv._sv, struct_type, mc, seed, # <<<<<<<<<<<<<< * block_x, block_z, biome_id): * return None */ - __pyx_t_2 = (!(getVariant((&__pyx_v_sv->_sv), __pyx_v_struct_type, __pyx_v_mc, __pyx_v_seed, __pyx_v_block_x, __pyx_v_block_z, __pyx_v_biome_id) != 0)); + __pyx_t_2 = (!(getVariant((&__pyx_v_sv->_sv), __pyx_v_struct_type, __pyx_v_mc, ((uint64_t)__pyx_v_seed), __pyx_v_block_x, __pyx_v_block_z, __pyx_v_biome_id) != 0)); if (__pyx_t_2) { /* "cubiomes/_wrapper.pyx":595 - * if not cb.getVariant(&sv._sv, struct_type, mc, seed, + * if not cb.getVariant(&sv._sv, struct_type, mc, seed, * block_x, block_z, biome_id): * return None # <<<<<<<<<<<<<< * return sv @@ -11000,7 +11006,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_8get_variant(CYTHON_UNUSED PyObjec /* "cubiomes/_wrapper.pyx":593 * """ * cdef StructureVariant sv = StructureVariant.__new__(StructureVariant) - * if not cb.getVariant(&sv._sv, struct_type, mc, seed, # <<<<<<<<<<<<<< + * if not cb.getVariant(&sv._sv, struct_type, mc, seed, # <<<<<<<<<<<<<< * block_x, block_z, biome_id): * return None */ @@ -11027,7 +11033,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_8get_variant(CYTHON_UNUSED PyObjec /* "cubiomes/_wrapper.pyx":576 * * - * def get_variant(int struct_type, int mc, uint64_t seed, # <<<<<<<<<<<<<< + * def get_variant(int struct_type, int mc, long long seed, # <<<<<<<<<<<<<< * int block_x, int block_z, int biome_id=-1): * """Retrieve variant information (rotation, size, flags) for a structure. */ @@ -11047,7 +11053,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_8get_variant(CYTHON_UNUSED PyObjec /* "cubiomes/_wrapper.pyx":599 * * - * def iter_strongholds(Generator gen, uint64_t seed48): # <<<<<<<<<<<<<< + * def iter_strongholds(Generator gen, long long seed48): # <<<<<<<<<<<<<< * """Return an iterator that yields stronghold positions in order. * */ @@ -11070,7 +11076,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_gen = 0; - uint64_t __pyx_v_seed48; + PY_LONG_LONG __pyx_v_seed48; #if !CYTHON_VECTORCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif @@ -11121,7 +11127,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 599, __pyx_L3_error) } __pyx_v_gen = ((struct __pyx_obj_8cubiomes_8_wrapper_Generator *)values[0]); - __pyx_v_seed48 = __Pyx_PyLong_As_uint64_t(values[1]); if (unlikely((__pyx_v_seed48 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 599, __pyx_L3_error) + __pyx_v_seed48 = __Pyx_PyLong_As_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v_seed48 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 599, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; @@ -11157,7 +11163,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_8cubiomes_8_wrapper_10iter_strongholds(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_gen, uint64_t __pyx_v_seed48) { +static PyObject *__pyx_pf_8cubiomes_8_wrapper_10iter_strongholds(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8cubiomes_8_wrapper_Generator *__pyx_v_gen, PY_LONG_LONG __pyx_v_seed48) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -11177,7 +11183,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_10iter_strongholds(CYTHON_UNUSED P * */ __pyx_t_2 = NULL; - __pyx_t_3 = __Pyx_PyLong_From_uint64_t(__pyx_v_seed48); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 620, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_seed48); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 1; { @@ -11202,7 +11208,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_10iter_strongholds(CYTHON_UNUSED P /* "cubiomes/_wrapper.pyx":599 * * - * def iter_strongholds(Generator gen, uint64_t seed48): # <<<<<<<<<<<<<< + * def iter_strongholds(Generator gen, long long seed48): # <<<<<<<<<<<<<< * """Return an iterator that yields stronghold positions in order. * */ @@ -11223,7 +11229,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_10iter_strongholds(CYTHON_UNUSED P /* "cubiomes/_wrapper.pyx":623 * * - * def init_first_stronghold(int mc, uint64_t seed48): # <<<<<<<<<<<<<< + * def init_first_stronghold(int mc, long long seed48): # <<<<<<<<<<<<<< * """Return the approximate position of the first stronghold (no biome check). * */ @@ -11246,7 +11252,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { int __pyx_v_mc; - uint64_t __pyx_v_seed48; + PY_LONG_LONG __pyx_v_seed48; #if !CYTHON_VECTORCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif @@ -11297,7 +11303,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 623, __pyx_L3_error) } __pyx_v_mc = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_mc == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 623, __pyx_L3_error) - __pyx_v_seed48 = __Pyx_PyLong_As_uint64_t(values[1]); if (unlikely((__pyx_v_seed48 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 623, __pyx_L3_error) + __pyx_v_seed48 = __Pyx_PyLong_As_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v_seed48 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 623, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; @@ -11324,7 +11330,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_8cubiomes_8_wrapper_12init_first_stronghold(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_mc, uint64_t __pyx_v_seed48) { +static PyObject *__pyx_pf_8cubiomes_8_wrapper_12init_first_stronghold(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_mc, PY_LONG_LONG __pyx_v_seed48) { StrongholdIter __pyx_v_sh; Pos __pyx_v_pos; PyObject *__pyx_r = NULL; @@ -11340,15 +11346,15 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_12init_first_stronghold(CYTHON_UNU /* "cubiomes/_wrapper.pyx":637 * """ * cdef cb.StrongholdIter sh - * cdef cb.Pos pos = cb.initFirstStronghold(&sh, mc, seed48) # <<<<<<<<<<<<<< + * cdef cb.Pos pos = cb.initFirstStronghold(&sh, mc, seed48) # <<<<<<<<<<<<<< * return (pos.x, pos.z) * */ - __pyx_v_pos = initFirstStronghold((&__pyx_v_sh), __pyx_v_mc, __pyx_v_seed48); + __pyx_v_pos = initFirstStronghold((&__pyx_v_sh), __pyx_v_mc, ((uint64_t)__pyx_v_seed48)); /* "cubiomes/_wrapper.pyx":638 * cdef cb.StrongholdIter sh - * cdef cb.Pos pos = cb.initFirstStronghold(&sh, mc, seed48) + * cdef cb.Pos pos = cb.initFirstStronghold(&sh, mc, seed48) * return (pos.x, pos.z) # <<<<<<<<<<<<<< * * @@ -11379,7 +11385,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_12init_first_stronghold(CYTHON_UNU /* "cubiomes/_wrapper.pyx":623 * * - * def init_first_stronghold(int mc, uint64_t seed48): # <<<<<<<<<<<<<< + * def init_first_stronghold(int mc, long long seed48): # <<<<<<<<<<<<<< * """Return the approximate position of the first stronghold (no biome check). * */ @@ -11402,7 +11408,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_12init_first_stronghold(CYTHON_UNU /* "cubiomes/_wrapper.pyx":641 * * - * def get_mineshafts(int mc, uint64_t seed, # <<<<<<<<<<<<<< + * def get_mineshafts(int mc, long long seed, # <<<<<<<<<<<<<< * int chunk_x, int chunk_z, * int chunk_w, int chunk_h, */ @@ -11425,7 +11431,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { int __pyx_v_mc; - uint64_t __pyx_v_seed; + PY_LONG_LONG __pyx_v_seed; int __pyx_v_chunk_x; int __pyx_v_chunk_z; int __pyx_v_chunk_w; @@ -11516,7 +11522,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } } __pyx_v_mc = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_mc == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L3_error) - __pyx_v_seed = __Pyx_PyLong_As_uint64_t(values[1]); if (unlikely((__pyx_v_seed == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L3_error) + __pyx_v_seed = __Pyx_PyLong_As_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v_seed == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L3_error) __pyx_v_chunk_x = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_chunk_x == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 642, __pyx_L3_error) __pyx_v_chunk_z = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_chunk_z == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 642, __pyx_L3_error) __pyx_v_chunk_w = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_chunk_w == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 643, __pyx_L3_error) @@ -11557,7 +11563,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_8cubiomes_8_wrapper_14get_mineshafts(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_mc, uint64_t __pyx_v_seed, int __pyx_v_chunk_x, int __pyx_v_chunk_z, int __pyx_v_chunk_w, int __pyx_v_chunk_h, int __pyx_v_max_count) { +static PyObject *__pyx_pf_8cubiomes_8_wrapper_14get_mineshafts(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_mc, PY_LONG_LONG __pyx_v_seed, int __pyx_v_chunk_x, int __pyx_v_chunk_z, int __pyx_v_chunk_w, int __pyx_v_chunk_h, int __pyx_v_max_count) { Pos *__pyx_v_out; int __pyx_v_n; PyObject *__pyx_v_result = NULL; @@ -11603,7 +11609,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_14get_mineshafts(CYTHON_UNUSED PyO * if out is NULL: * raise MemoryError() # <<<<<<<<<<<<<< * cdef int n = cb.getMineshafts( - * mc, seed, chunk_x, chunk_z, chunk_w, chunk_h, out, max_count) + * mc, seed, chunk_x, chunk_z, chunk_w, chunk_h, out, max_count) */ PyErr_NoMemory(); __PYX_ERR(0, 659, __pyx_L1_error) @@ -11620,14 +11626,14 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_14get_mineshafts(CYTHON_UNUSED PyO * if out is NULL: * raise MemoryError() * cdef int n = cb.getMineshafts( # <<<<<<<<<<<<<< - * mc, seed, chunk_x, chunk_z, chunk_w, chunk_h, out, max_count) + * mc, seed, chunk_x, chunk_z, chunk_w, chunk_h, out, max_count) * result = [(out[i].x, out[i].z) for i in range(n)] */ - __pyx_v_n = getMineshafts(__pyx_v_mc, __pyx_v_seed, __pyx_v_chunk_x, __pyx_v_chunk_z, __pyx_v_chunk_w, __pyx_v_chunk_h, __pyx_v_out, __pyx_v_max_count); + __pyx_v_n = getMineshafts(__pyx_v_mc, ((uint64_t)__pyx_v_seed), __pyx_v_chunk_x, __pyx_v_chunk_z, __pyx_v_chunk_w, __pyx_v_chunk_h, __pyx_v_out, __pyx_v_max_count); /* "cubiomes/_wrapper.pyx":662 * cdef int n = cb.getMineshafts( - * mc, seed, chunk_x, chunk_z, chunk_w, chunk_h, out, max_count) + * mc, seed, chunk_x, chunk_z, chunk_w, chunk_h, out, max_count) * result = [(out[i].x, out[i].z) for i in range(n)] # <<<<<<<<<<<<<< * free(out) * return result @@ -11663,7 +11669,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_14get_mineshafts(CYTHON_UNUSED PyO __pyx_t_2 = 0; /* "cubiomes/_wrapper.pyx":663 - * mc, seed, chunk_x, chunk_z, chunk_w, chunk_h, out, max_count) + * mc, seed, chunk_x, chunk_z, chunk_w, chunk_h, out, max_count) * result = [(out[i].x, out[i].z) for i in range(n)] * free(out) # <<<<<<<<<<<<<< * return result @@ -11692,7 +11698,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_14get_mineshafts(CYTHON_UNUSED PyO /* "cubiomes/_wrapper.pyx":641 * * - * def get_mineshafts(int mc, uint64_t seed, # <<<<<<<<<<<<<< + * def get_mineshafts(int mc, long long seed, # <<<<<<<<<<<<<< * int chunk_x, int chunk_z, * int chunk_w, int chunk_h, */ @@ -11991,7 +11997,7 @@ static struct __pyx_obj_8cubiomes_8_wrapper_BiomeFilter *__pyx_pf_8cubiomes_8_wr /* "cubiomes/_wrapper.pyx":689 * * - * def is_slime_chunk(uint64_t seed, int chunk_x, int chunk_z) -> bool: # <<<<<<<<<<<<<< + * def is_slime_chunk(long long seed, int chunk_x, int chunk_z) -> bool: # <<<<<<<<<<<<<< * """Return True if the given chunk spawns slimes at any light level. * */ @@ -12013,7 +12019,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { - uint64_t __pyx_v_seed; + PY_LONG_LONG __pyx_v_seed; int __pyx_v_chunk_x; int __pyx_v_chunk_z; #if !CYTHON_VECTORCALL @@ -12071,7 +12077,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 689, __pyx_L3_error) } - __pyx_v_seed = __Pyx_PyLong_As_uint64_t(values[0]); if (unlikely((__pyx_v_seed == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 689, __pyx_L3_error) + __pyx_v_seed = __Pyx_PyLong_As_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_seed == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 689, __pyx_L3_error) __pyx_v_chunk_x = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_chunk_x == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 689, __pyx_L3_error) __pyx_v_chunk_z = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_chunk_z == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 689, __pyx_L3_error) } @@ -12101,7 +12107,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_8cubiomes_8_wrapper_18is_slime_chunk(CYTHON_UNUSED PyObject *__pyx_self, uint64_t __pyx_v_seed, int __pyx_v_chunk_x, int __pyx_v_chunk_z) { +static PyObject *__pyx_pf_8cubiomes_8_wrapper_18is_slime_chunk(CYTHON_UNUSED PyObject *__pyx_self, PY_LONG_LONG __pyx_v_seed, int __pyx_v_chunk_x, int __pyx_v_chunk_z) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -12113,11 +12119,11 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_18is_slime_chunk(CYTHON_UNUSED PyO /* "cubiomes/_wrapper.pyx":699 * bool * """ - * return bool(cb.isSlimeChunk(seed, chunk_x, chunk_z)) # <<<<<<<<<<<<<< + * return bool(cb.isSlimeChunk(seed, chunk_x, chunk_z)) # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(isSlimeChunk(__pyx_v_seed, __pyx_v_chunk_x, __pyx_v_chunk_z) != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(isSlimeChunk(((uint64_t)__pyx_v_seed), __pyx_v_chunk_x, __pyx_v_chunk_z) != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); { PyObject *__pyx_temp; @@ -12133,7 +12139,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_18is_slime_chunk(CYTHON_UNUSED PyO /* "cubiomes/_wrapper.pyx":689 * * - * def is_slime_chunk(uint64_t seed, int chunk_x, int chunk_z) -> bool: # <<<<<<<<<<<<<< + * def is_slime_chunk(long long seed, int chunk_x, int chunk_z) -> bool: # <<<<<<<<<<<<<< * """Return True if the given chunk spawns slimes at any light level. * */ @@ -12152,7 +12158,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_18is_slime_chunk(CYTHON_UNUSED PyO /* "cubiomes/_wrapper.pyx":702 * * - * def get_shadow(uint64_t seed) -> int: # <<<<<<<<<<<<<< + * def get_shadow(long long seed) -> int: # <<<<<<<<<<<<<< * """Compute the shadow seed for a given world seed. * */ @@ -12174,7 +12180,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { - uint64_t __pyx_v_seed; + PY_LONG_LONG __pyx_v_seed; #if !CYTHON_VECTORCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif @@ -12218,7 +12224,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 702, __pyx_L3_error) } - __pyx_v_seed = __Pyx_PyLong_As_uint64_t(values[0]); if (unlikely((__pyx_v_seed == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 702, __pyx_L3_error) + __pyx_v_seed = __Pyx_PyLong_As_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_seed == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 702, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; @@ -12244,7 +12250,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_8cubiomes_8_wrapper_20get_shadow(CYTHON_UNUSED PyObject *__pyx_self, uint64_t __pyx_v_seed) { +static PyObject *__pyx_pf_8cubiomes_8_wrapper_20get_shadow(CYTHON_UNUSED PyObject *__pyx_self, PY_LONG_LONG __pyx_v_seed) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -12256,11 +12262,11 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_20get_shadow(CYTHON_UNUSED PyObjec /* "cubiomes/_wrapper.pyx":713 * int: Shadow seed. * """ - * return cb.getShadow(seed) # <<<<<<<<<<<<<< + * return cb.getShadow(seed) # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyLong_From_uint64_t(getShadow(__pyx_v_seed)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 713, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_uint64_t(getShadow(((uint64_t)__pyx_v_seed))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 713, __pyx_L1_error) { @@ -12277,7 +12283,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_20get_shadow(CYTHON_UNUSED PyObjec /* "cubiomes/_wrapper.pyx":702 * * - * def get_shadow(uint64_t seed) -> int: # <<<<<<<<<<<<<< + * def get_shadow(long long seed) -> int: # <<<<<<<<<<<<<< * """Compute the shadow seed for a given world seed. * */ @@ -12296,7 +12302,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_20get_shadow(CYTHON_UNUSED PyObjec /* "cubiomes/_wrapper.pyx":716 * * - * def move_structure(uint64_t base_seed, int reg_x, int reg_z) -> int: # <<<<<<<<<<<<<< + * def move_structure(long long base_seed, int reg_x, int reg_z) -> int: # <<<<<<<<<<<<<< * """Translate a base seed so that structures shift by ``(reg_x, reg_z)`` regions. * */ @@ -12318,7 +12324,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { - uint64_t __pyx_v_base_seed; + PY_LONG_LONG __pyx_v_base_seed; int __pyx_v_reg_x; int __pyx_v_reg_z; #if !CYTHON_VECTORCALL @@ -12376,7 +12382,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 716, __pyx_L3_error) } - __pyx_v_base_seed = __Pyx_PyLong_As_uint64_t(values[0]); if (unlikely((__pyx_v_base_seed == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 716, __pyx_L3_error) + __pyx_v_base_seed = __Pyx_PyLong_As_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_base_seed == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 716, __pyx_L3_error) __pyx_v_reg_x = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_reg_x == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 716, __pyx_L3_error) __pyx_v_reg_z = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_reg_z == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 716, __pyx_L3_error) } @@ -12406,7 +12412,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_8cubiomes_8_wrapper_22move_structure(CYTHON_UNUSED PyObject *__pyx_self, uint64_t __pyx_v_base_seed, int __pyx_v_reg_x, int __pyx_v_reg_z) { +static PyObject *__pyx_pf_8cubiomes_8_wrapper_22move_structure(CYTHON_UNUSED PyObject *__pyx_self, PY_LONG_LONG __pyx_v_base_seed, int __pyx_v_reg_x, int __pyx_v_reg_z) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -12418,11 +12424,11 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_22move_structure(CYTHON_UNUSED PyO /* "cubiomes/_wrapper.pyx":728 * int: Translated seed (lower 48 bits). * """ - * return cb.moveStructure(base_seed, reg_x, reg_z) # <<<<<<<<<<<<<< + * return cb.moveStructure(base_seed, reg_x, reg_z) # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyLong_From_uint64_t(moveStructure(__pyx_v_base_seed, __pyx_v_reg_x, __pyx_v_reg_z)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_uint64_t(moveStructure(((uint64_t)__pyx_v_base_seed), __pyx_v_reg_x, __pyx_v_reg_z)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 728, __pyx_L1_error) { @@ -12439,7 +12445,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_22move_structure(CYTHON_UNUSED PyO /* "cubiomes/_wrapper.pyx":716 * * - * def move_structure(uint64_t base_seed, int reg_x, int reg_z) -> int: # <<<<<<<<<<<<<< + * def move_structure(long long base_seed, int reg_x, int reg_z) -> int: # <<<<<<<<<<<<<< * """Translate a base seed so that structures shift by ``(reg_x, reg_z)`` regions. * */ @@ -12458,7 +12464,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_22move_structure(CYTHON_UNUSED PyO /* "cubiomes/_wrapper.pyx":731 * * - * def chunk_generate_rnd(uint64_t world_seed, # <<<<<<<<<<<<<< + * def chunk_generate_rnd(long long world_seed, # <<<<<<<<<<<<<< * int chunk_x, int chunk_z) -> int: * """Compute the chunk-generation random seed used for caves/structures. */ @@ -12480,7 +12486,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { - uint64_t __pyx_v_world_seed; + PY_LONG_LONG __pyx_v_world_seed; int __pyx_v_chunk_x; int __pyx_v_chunk_z; #if !CYTHON_VECTORCALL @@ -12538,7 +12544,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 731, __pyx_L3_error) } - __pyx_v_world_seed = __Pyx_PyLong_As_uint64_t(values[0]); if (unlikely((__pyx_v_world_seed == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 731, __pyx_L3_error) + __pyx_v_world_seed = __Pyx_PyLong_As_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_world_seed == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 731, __pyx_L3_error) __pyx_v_chunk_x = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_chunk_x == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 732, __pyx_L3_error) __pyx_v_chunk_z = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_chunk_z == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 732, __pyx_L3_error) } @@ -12568,7 +12574,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_8cubiomes_8_wrapper_24chunk_generate_rnd(CYTHON_UNUSED PyObject *__pyx_self, uint64_t __pyx_v_world_seed, int __pyx_v_chunk_x, int __pyx_v_chunk_z) { +static PyObject *__pyx_pf_8cubiomes_8_wrapper_24chunk_generate_rnd(CYTHON_UNUSED PyObject *__pyx_self, PY_LONG_LONG __pyx_v_world_seed, int __pyx_v_chunk_x, int __pyx_v_chunk_z) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -12580,11 +12586,11 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_24chunk_generate_rnd(CYTHON_UNUSED /* "cubiomes/_wrapper.pyx":742 * int: 64-bit random seed. * """ - * return cb.chunkGenerateRnd(world_seed, chunk_x, chunk_z) # <<<<<<<<<<<<<< + * return cb.chunkGenerateRnd(world_seed, chunk_x, chunk_z) # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyLong_From_uint64_t(chunkGenerateRnd(__pyx_v_world_seed, __pyx_v_chunk_x, __pyx_v_chunk_z)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_uint64_t(chunkGenerateRnd(((uint64_t)__pyx_v_world_seed), __pyx_v_chunk_x, __pyx_v_chunk_z)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 742, __pyx_L1_error) { @@ -12601,7 +12607,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_24chunk_generate_rnd(CYTHON_UNUSED /* "cubiomes/_wrapper.pyx":731 * * - * def chunk_generate_rnd(uint64_t world_seed, # <<<<<<<<<<<<<< + * def chunk_generate_rnd(long long world_seed, # <<<<<<<<<<<<<< * int chunk_x, int chunk_z) -> int: * """Compute the chunk-generation random seed used for caves/structures. */ @@ -12620,7 +12626,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_24chunk_generate_rnd(CYTHON_UNUSED /* "cubiomes/_wrapper.pyx":745 * * - * def get_population_seed(int mc, uint64_t world_seed, # <<<<<<<<<<<<<< + * def get_population_seed(int mc, long long world_seed, # <<<<<<<<<<<<<< * int x, int z) -> int: * """Return the population seed for a given chunk (block) position. */ @@ -12643,7 +12649,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { int __pyx_v_mc; - uint64_t __pyx_v_world_seed; + PY_LONG_LONG __pyx_v_world_seed; int __pyx_v_x; int __pyx_v_z; #if !CYTHON_VECTORCALL @@ -12708,7 +12714,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 745, __pyx_L3_error) } __pyx_v_mc = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_mc == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 745, __pyx_L3_error) - __pyx_v_world_seed = __Pyx_PyLong_As_uint64_t(values[1]); if (unlikely((__pyx_v_world_seed == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 745, __pyx_L3_error) + __pyx_v_world_seed = __Pyx_PyLong_As_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v_world_seed == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 745, __pyx_L3_error) __pyx_v_x = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_x == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 746, __pyx_L3_error) __pyx_v_z = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_z == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 746, __pyx_L3_error) } @@ -12739,7 +12745,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_8cubiomes_8_wrapper_26get_population_seed(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_mc, uint64_t __pyx_v_world_seed, int __pyx_v_x, int __pyx_v_z) { +static PyObject *__pyx_pf_8cubiomes_8_wrapper_26get_population_seed(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_mc, PY_LONG_LONG __pyx_v_world_seed, int __pyx_v_x, int __pyx_v_z) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -12751,11 +12757,11 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_26get_population_seed(CYTHON_UNUSE /* "cubiomes/_wrapper.pyx":757 * int: 64-bit population seed. * """ - * return cb.getPopulationSeed(mc, world_seed, x, z) # <<<<<<<<<<<<<< + * return cb.getPopulationSeed(mc, world_seed, x, z) # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyLong_From_uint64_t(getPopulationSeed(__pyx_v_mc, __pyx_v_world_seed, __pyx_v_x, __pyx_v_z)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_uint64_t(getPopulationSeed(__pyx_v_mc, ((uint64_t)__pyx_v_world_seed), __pyx_v_x, __pyx_v_z)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 757, __pyx_L1_error) { @@ -12772,7 +12778,7 @@ static PyObject *__pyx_pf_8cubiomes_8_wrapper_26get_population_seed(CYTHON_UNUSE /* "cubiomes/_wrapper.pyx":745 * * - * def get_population_seed(int mc, uint64_t world_seed, # <<<<<<<<<<<<<< + * def get_population_seed(int mc, long long world_seed, # <<<<<<<<<<<<<< * int x, int z) -> int: * """Return the population seed for a given chunk (block) position. */ @@ -15825,7 +15831,7 @@ __Pyx_RefNannySetupContext("PyInit__wrapper", 0); /*--- Execution code ---*/ /* "cubiomes/_wrapper.pyx":18 - * from libc.stdint cimport uint64_t, uint32_t, int16_t, uint8_t + * from libc.stdint cimport uint64_t, int64_t, uint32_t, int16_t, uint8_t * from cpython.array cimport array, clone * import array as _array_module # <<<<<<<<<<<<<< * @@ -15868,7 +15874,7 @@ __Pyx_RefNannySetupContext("PyInit__wrapper", 0); /* "cubiomes/_wrapper.pyx":91 * # core methods * - * def apply_seed(self, int dim, uint64_t seed): # <<<<<<<<<<<<<< + * def apply_seed(self, int dim, long long seed): # <<<<<<<<<<<<<< * """Bind a world seed and dimension to the generator. * */ @@ -15881,7 +15887,7 @@ __Pyx_RefNannySetupContext("PyInit__wrapper", 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cubiomes/_wrapper.pyx":105 - * cb.applySeed(self._g, dim, seed) + * cb.applySeed(self._g, dim, seed) * * def get_biome_at(self, int x, int y, int z, int scale=4) -> int: # <<<<<<<<<<<<<< * """Get the biome ID at a single position. @@ -15982,7 +15988,7 @@ __Pyx_RefNannySetupContext("PyInit__wrapper", 0); * return result * * def check_for_biomes(self, int x, int z, int sx, int sz, # <<<<<<<<<<<<<< - * int scale, int dim, uint64_t seed, + * int scale, int dim, long long seed, * BiomeFilter biome_filter, */ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8cubiomes_8_wrapper_9Generator_21check_for_biomes, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Generator_check_for_biomes, NULL, __pyx_mstate_global->__pyx_n_u_cubiomes__wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 276, __pyx_L1_error) @@ -16120,7 +16126,7 @@ __Pyx_RefNannySetupContext("PyInit__wrapper", 0); /* "cubiomes/_wrapper.pyx":515 * * - * def get_structure_pos(int struct_type, int mc, uint64_t seed, # <<<<<<<<<<<<<< + * def get_structure_pos(int struct_type, int mc, long long seed, # <<<<<<<<<<<<<< * int reg_x, int reg_z): * """Find the block position of a structure attempt in a region. */ @@ -16192,7 +16198,7 @@ __Pyx_RefNannySetupContext("PyInit__wrapper", 0); /* "cubiomes/_wrapper.pyx":577 * - * def get_variant(int struct_type, int mc, uint64_t seed, + * def get_variant(int struct_type, int mc, long long seed, * int block_x, int block_z, int biome_id=-1): # <<<<<<<<<<<<<< * """Retrieve variant information (rotation, size, flags) for a structure. * @@ -16203,7 +16209,7 @@ __Pyx_RefNannySetupContext("PyInit__wrapper", 0); /* "cubiomes/_wrapper.pyx":576 * * - * def get_variant(int struct_type, int mc, uint64_t seed, # <<<<<<<<<<<<<< + * def get_variant(int struct_type, int mc, long long seed, # <<<<<<<<<<<<<< * int block_x, int block_z, int biome_id=-1): * """Retrieve variant information (rotation, size, flags) for a structure. */ @@ -16226,7 +16232,7 @@ __Pyx_RefNannySetupContext("PyInit__wrapper", 0); /* "cubiomes/_wrapper.pyx":599 * * - * def iter_strongholds(Generator gen, uint64_t seed48): # <<<<<<<<<<<<<< + * def iter_strongholds(Generator gen, long long seed48): # <<<<<<<<<<<<<< * """Return an iterator that yields stronghold positions in order. * */ @@ -16241,7 +16247,7 @@ __Pyx_RefNannySetupContext("PyInit__wrapper", 0); /* "cubiomes/_wrapper.pyx":623 * * - * def init_first_stronghold(int mc, uint64_t seed48): # <<<<<<<<<<<<<< + * def init_first_stronghold(int mc, long long seed48): # <<<<<<<<<<<<<< * """Return the approximate position of the first stronghold (no biome check). * */ @@ -16266,7 +16272,7 @@ __Pyx_RefNannySetupContext("PyInit__wrapper", 0); /* "cubiomes/_wrapper.pyx":641 * * - * def get_mineshafts(int mc, uint64_t seed, # <<<<<<<<<<<<<< + * def get_mineshafts(int mc, long long seed, # <<<<<<<<<<<<<< * int chunk_x, int chunk_z, * int chunk_w, int chunk_h, */ @@ -16327,7 +16333,7 @@ __Pyx_RefNannySetupContext("PyInit__wrapper", 0); /* "cubiomes/_wrapper.pyx":689 * * - * def is_slime_chunk(uint64_t seed, int chunk_x, int chunk_z) -> bool: # <<<<<<<<<<<<<< + * def is_slime_chunk(long long seed, int chunk_x, int chunk_z) -> bool: # <<<<<<<<<<<<<< * """Return True if the given chunk spawns slimes at any light level. * */ @@ -16347,7 +16353,7 @@ __Pyx_RefNannySetupContext("PyInit__wrapper", 0); /* "cubiomes/_wrapper.pyx":702 * * - * def get_shadow(uint64_t seed) -> int: # <<<<<<<<<<<<<< + * def get_shadow(long long seed) -> int: # <<<<<<<<<<<<<< * """Compute the shadow seed for a given world seed. * */ @@ -16367,7 +16373,7 @@ __Pyx_RefNannySetupContext("PyInit__wrapper", 0); /* "cubiomes/_wrapper.pyx":716 * * - * def move_structure(uint64_t base_seed, int reg_x, int reg_z) -> int: # <<<<<<<<<<<<<< + * def move_structure(long long base_seed, int reg_x, int reg_z) -> int: # <<<<<<<<<<<<<< * """Translate a base seed so that structures shift by ``(reg_x, reg_z)`` regions. * */ @@ -16387,7 +16393,7 @@ __Pyx_RefNannySetupContext("PyInit__wrapper", 0); /* "cubiomes/_wrapper.pyx":731 * * - * def chunk_generate_rnd(uint64_t world_seed, # <<<<<<<<<<<<<< + * def chunk_generate_rnd(long long world_seed, # <<<<<<<<<<<<<< * int chunk_x, int chunk_z) -> int: * """Compute the chunk-generation random seed used for caves/structures. */ @@ -16407,7 +16413,7 @@ __Pyx_RefNannySetupContext("PyInit__wrapper", 0); /* "cubiomes/_wrapper.pyx":745 * * - * def get_population_seed(int mc, uint64_t world_seed, # <<<<<<<<<<<<<< + * def get_population_seed(int mc, long long world_seed, # <<<<<<<<<<<<<< * int x, int z) -> int: * """Return the population seed for a given chunk (block) position. */ @@ -16720,7 +16726,7 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "cubiomes/_wrapper.pyx":105 - * cb.applySeed(self._g, dim, seed) + * cb.applySeed(self._g, dim, seed) * * def get_biome_at(self, int x, int y, int z, int scale=4) -> int: # <<<<<<<<<<<<<< * """Get the biome ID at a single position. @@ -16765,7 +16771,7 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { * return result * * def check_for_biomes(self, int x, int z, int sx, int sz, # <<<<<<<<<<<<<< - * int scale, int dim, uint64_t seed, + * int scale, int dim, long long seed, * BiomeFilter biome_filter, */ { @@ -16812,30 +16818,30 @@ static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); { const struct { const unsigned int length: 8; } str_length_index[] = {{15},{1},{6},{6},{11},{7},{7},{1},{28},{30},{13},{179},{96},{23},{8},{21},{7},{6},{2},{23},{9},{50},{11},{29},{31},{9},{27},{29},{20},{26},{24},{20},{22},{27},{19},{22},{18},{36},{38},{16},{34},{36},{20},{12},{8},{12},{8},{10},{8},{11},{12},{10},{17},{13},{12},{12},{19},{8},{13},{13},{10},{11},{5},{18},{1},{9},{3},{12},{12},{8},{9},{9},{7},{7},{4},{5},{16},{18},{7},{11},{7},{7},{7},{18},{17},{3},{9},{14},{8},{5},{3},{10},{12},{17},{12},{13},{14},{11},{19},{10},{9},{20},{17},{11},{1},{21},{3},{13},{7},{10},{18},{16},{14},{8},{23},{23},{5},{16},{12},{5},{9},{9},{11},{2},{8},{14},{1},{3},{6},{3},{3},{7},{1},{6},{6},{5},{5},{11},{8},{6},{3},{6},{3},{4},{2},{5},{4},{6},{4},{10},{18},{2},{7},{4},{11},{2},{2},{2},{2},{9},{5},{7},{7},{12},{7},{6},{10},{1},{1},{1}}; - const struct { const unsigned int length: 8; } bytes_length_index[] = {{9},{35},{23},{57},{21},{34},{103},{72},{31},{44},{16},{207},{205},{88},{35},{26},{17},{129},{18},{18},{18},{16},{18},{14},{18},{16},{20},{16},{20},{22},{24},{20},{25},{28}}; + const struct { const unsigned int length: 8; } bytes_length_index[] = {{9},{35},{25},{59},{23},{34},{105},{72},{33},{46},{16},{207},{205},{90},{35},{26},{19},{129},{18},{18},{18},{18},{18},{14},{18},{16},{20},{16},{20},{22},{26},{22},{25},{28}}; #ifndef CYTHON_COMPRESS_STRINGS #define CYTHON_COMPRESS_STRINGS 90 #endif - #if (CYTHON_COMPRESS_STRINGS) == 1 /* compression: zlib (1972 bytes) */ -static const char cstring[] = "x\332\235U\315s\023G\026\227\0269\221\301N\220\2151\006\203G$\005\2661f\005\202\205l\261\211\3700\305.Ka`I%\273\311Tk\246%u<\037Rw\217,y\367\340\343\034\347\330\3079\366q\216:\372O\320q\216\376\023\374\047\344\365\214$\313\226\267*\211K\356\327\363\336\353\367\371\353\327\253\234b\254\325(\252\333\330\341kk\033\232I\354\247\033Z\323e\260R\227#N\\\007\266\014cS\021\262\207\237~\273\205\210\205M\215\273\032\262,\327@\034k\257\260\203)\342.=CV%\256\2155\003\031\r !\004$\3754\324\256\215\351\256K-3M\0148\020\n\274R\273\243#\314\"*aUd\365\345\270\273]\2400\016ar\3525\214\222p\206\207\007\354\023q\022\216m\265\320\261\320\330\370@\2006\030\215d\201;\325\265Q\0072\366\034\2566\0243\230\312\3146\240\230\272zim\010\370\330\274\003\320l&O\027\324\024\\\301O\257z5\300\257I<\006@&\274Kq]\357\250e\017\226\244\346`F\275:\360\224\231\251}\212\325\317\243\016u\352\014\201?\203\031\310\302\2529\352\277\374X=`p\273\006\217\004\354\274\246>\216z\326\000\243\312\263\262\235F\247\047/n\233uX\227\355q\327\002\3209\006\34601\300\237\0079t\333\310\"P\366\001I\300\226\356m \360&\246mQ\001t\272{\373\3318w\336\277\023l\303f\361\312\360\367\347({t#35\343\3775@\001\027\337\204?\312\377\366\212\240\262\266~t93\365E\177vE\264\302\\\370&:\027\225\200\275~G\251k\375\225{\262\023\265z`\363\363\375\266\377o\221\025\005qSl\205w%\217J\361\322\315pM\226\342\374\227~+\316]\360\325\301\362\303\243K\211\275\033\002\211\377\311\047Qe?{\270\3740\332>\322\224\373\262\317\372s\267\303\226\234\215>\200\325\325R\264\244\3028\372,si\341\350jf\352J\260\027^\006\361\371\350fTQN\271\377\300Gq~:\316\315\007\177\013\013q~\306\337\n\326\304\223\360\265\374!\302\275R\234\233\365\337\373,(\006\367\203\217b^T\304{\301\303r\350\311\227Q!*\306\271\274\237\365\013\203\350\224\207\374~\273?\253\205\331\360\2724\243b4\214~*\316/\006T\024~\003\001;\313\231\251\245\376\225\rY\221\333`\345\353\010\305\271\031\377\271\317\203\007\001\002\361\352\300\315u\261-lY\226\355\350\373\336\253\203\322Ae\340l\\w\035\312\322\277\2404qX\332\257\304\327o\205\277@\263^d""3\323\347\375\245\240\010\271\373\013I\t\206\3442\2308&\307\314\303\374\262\370\007\324.\247R\217\363\027\374G\301|P\211g\346\202;`\035\035\346\227\304\325\260\024\276\220S\362{(.(\224U\341\342\231\213A6((\275\r\201\372+\217{\331^\3410\177M<\n\347\303ga]n\307pr^<\023\215\260*\263\312\313\313\260\020\336I\215|\341#\277\035\374K\254\207\257\344\243hN\325s\306\257\370\333I\246\220\316\375\347\007%\205\246\233\177 \235\025\261\047/\313V4\323{\326\003\356\rQ\017?\311\222|\323\373S\257\250\302\177\014%\304\342\001\304e\310\302(\215\001\231=\314/\366\027\001j\361\314B\360\203@J0\025|\020\237\203\321k*\362B0\027\374E\024\305}\3611\\\224Y9\007\215\342\321\303\336To[y\033d1\236\014\240T[\227\005h\357\357\315Ey[\t\263i\014\237 d\034>\222\005\271\021\325z\025\260{13}]@H\313\342\255,B\030^T\211\300\351\305\340\\P\016\230(\016U^\207\333\241)\213\047%W2\027\026\202\n\200\177!E\020\200s\272\010\276\362\232Zf\374WAI\371=\027\224\024\030\276\364)\240\342\205\310\306\027\227\305\337\241p\363\262\022\027\026\24009\210`\300\273$\337K\032\025T\253!\252\253\242\250B{#\263\303\032\236K\212Nd\027\240\262\320C\275\326XD\375\014`\3710\227\202\3536\214\013\340\300,\030rV\241\342\245~\006b\033r\326\341\316n\3673\305\260\220L\"\377\307\240%\262\375\314Wai\250\001\260\024\255\001g\326\377)\265p+\034\331\274\007p\004/k\262\240\344jH]R\026\327eq\334\002\017K\003\336\254\377\037\210\353k\000{\006\346\342\204\316\023\200\377\200\247.\216\tP\007k\337\366Zj\262%#,\270\013\303\3623(\000D\365\335A\026Z\000q\377,Jp\375v%X\335:@*\227\261q\227\223\377\354\025\372\271oz\267\016\324 \236\236\013\256A\332\037\303\005\270_\037\324\314\375\025V\337\223\337"; - PyObject *data = __Pyx_DecompressString(cstring, 1972, 1); + #if (CYTHON_COMPRESS_STRINGS) == 1 /* compression: zlib (1995 bytes) */ +static const char cstring[] = "x\332\235UKw\023\311\025\226\202<#\033{\006\331\330\306`p\3133\007l\003&\002C\0109$c\036\346@\010\007\001!\207\311\243O\251\273$\025\356\207TU-K\316\306\313^\366\262\226\275\254e/{\251\345,\265\324\322?\301?anuK\262\374\3109I|\344\252\352[\267\356\343\273_\335Z\343\024c\255JQ\315\306\016__\277\243\231\304~zGk\270\014F\352r\304\211\353\300\222al\252\211\354\343\247\177\332A\304\302\246\306]\rY\226k \216\265W\330\301\024q\227\236\263W!\256\2155\003\031u\270\036X\355W=\307Psmx\024\376lD\222\263\266kzV\"q\220\235\314\300P}\240\326\364\2205\024\017\231w&\306\221\000\267\325\007\30472\305\306\034\236\0237\207B\303\204(E\235a \204\351\206K]\017\332\002>f\r\242@\006b\023\013\321D\033\261\216c\020ws\244\312*\025\304p\242[!fZz\334&\214\263t]MX\236\256\207\373\304,\r\027\367+""\300\201]\275\235N\373\025\327\265\222\366w\232\243F\335sv\001\307\2049X\247\216\231J\352\351D\221S\303\351r/\235\332\351\264o@\023\002G\320\253(2p\005\031\273\303\326\2609l\r\320\310\261\343\331\211\345\2237\000\267\r\3133\261Y\265P\215\201\363\343{0\316\3763\234W\002E\354\232K;j\2358`\3200\325\207\255@\253\243*O\324lO\225\306T\313\206\333\360\254\264\257*4\223\353RG\246\2737\2728\311bHL\250\226S%\265\2232x\215\224\240\225\222\226$]\251J(Kt\006\027\205\300\006\323M\214\033\272k`\344\300\007$\204`J?\r\265ja\272\347R\313L\023\003\t\204\002\257\324\336\350\010\263\210JX\201\254\276\034w\257\0033\264C\350\234z\025\243$\234\341\341\201\370D\234\204c[\rt,46\336\020\240\014F=\031\340Nul\324\206\214=\207\253\005\305\014\2722\263\r\000SW/\255\r\001\037\233w\200\232\215\344\351\002L\301\025\374\364\212W\005\376\232\304c@d\302;\024\327\364\266\032\366aH0\0073\352\325\201\247\314L\355S\254~\036u\250Sc\010\374\031\314@\026V\305Q\377[\217\325\003\006\267k\360H\300\312k\350\343\254gu0\252<+\333itz\362\342\266X\233u\330>w- \235c`\016\035\003\374y\220C\247\205,\002\260\017\246\204l\351\332\206\t\336\304\264,*\200vg\377 \333\317M\371\267\2032,\026\257\014\177\277\215\262G72\023\323\376\037\002\024p\361$\374Y\376;.\202\312\372\306\321Bf\342\273\336\314\212h\206\271\360\215\264\342\037buv\343\266:\240\365V\356\311v\324\214\301\352\267\007-\377\357\"+\nbU\354\204w%\217\236\304\345\376\322j\270.K\375\374\367~\263\237\273\350\227\340\350\326\303\243\313\211\315\033\002\211}\271\034}\211\321A\366p\371aT>\322T\020[>\353\315\336\n\233r&\372\010\226\327J\321\222\n\346\350\233\314\345\371\243\253\231\211+\301~\270\000\333S\321j\264\255\034s\377\201\217\372\371\311~n.\370cX\350\347\247\3757AU\274\016\277H\022u\272\023\335r?7\343\177\360YP\014\356\007\237\304\234\330\026\037\004\017\267BO\276\214\nQ\261\237\313\373Y\2770\210P\371\310\037\264z3Z\230\r\257K3*F\303\014&\372\371\305\200\212\302\1771\201\235\345\314\304R\357\312\035\271-\313`\345\307\350k\027p\232\366\237\373\370\"\220\332\230\010>\212o\301\3505\025y!\230\r~\047\212\342\276\370\024.\312\254\234\205R\361\350a<\021\227\225\267A\026\343\311\000W\265\rY\200\002\377\257\271(o+a6\215\3413\204\214\303\047\362sT\212\336v\277\351\"\260|)3y]@P\313\342\235,B ^\264\035\201\333K\301\205`+`\2428Ty\035\226CS\026O\356\\\311\\\234\017\266\341\n\314\047v\313 Z\316L\026\301_^S\303\264\377*()\337\027\202\222\"\304\367>\005f\274\020\331\376\245e\361\006\300\233\223\333\375\302<\200\223\203\030\006\262\313\362\203\244QA\225\033\342\272*\212*\270\2672;\304\361B\002<\221\035\240\313|\214\342\346XL\275\014\360\3710\227\022\354\0264\017\220@_\030J\326\000\365R/\003\261\r%\033pw\313\275\314jXL:\223\377s\320\024S!\234\372!,\ru\200\234\2429\220\314\370\377Lm\334\014GV\357\001)\341\304\272,\250}\325\264.+\233\033\2628n\201\207\245\201l\306\377\007D\366#P>\003\235\362\214\316\357\341\022\014d\352\372\230@x\260\366S7\253\372\\\322\316\202\273\320>\247\344\315h2.\3642\333\335\002\024\002b\377\227(\001\200\273\321b\234\355ev\272He4\326\376r\362/\240\236{\022\337\354\252\366<9\033\\\203\344?\205\363p\323>F\027\242\322\257\255I\236`"; + PyObject *data = __Pyx_DecompressString(cstring, 1995, 1); #define __Pyx_DecompressString_LZSS_UNUSED if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) const char* const bytes = __Pyx_PyBytes_AsString(data); #if !CYTHON_ASSUME_SAFE_MACROS if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } #endif - #elif (CYTHON_COMPRESS_STRINGS) > 0 && (CYTHON_COMPRESS_STRINGS) <= 90 /* compression: lzss (2603 bytes) */ -static const char cstring[] = "\377(tree fr\377agment))\377, dim=, \367pos\003\000rota\357tion\016\000see\375d\003\001ize=?F\377ailed to\377 allocat\377e Genera\367tor\t\020biom\177e cache\036\006\277(mc=No6\000t\377hat Cyth\377on is de\367libF\001ely \377stricter\375 \"\000n PEP-\377484 and \377rejects \377subclass\377es of bu\377iltin ty\377pes. If \277you ne\246\003p\374%\000%\tthen s\373et[\000e \047an\365n\347\004_<\000ing\047\272\210 rb\000ive\346\001F\377alse.Pic\343kl\032\000j\001\233\000uct\317 mem\256\000\207\001ch\373 a\220\000elf._\377sv must \377be expli\367cit\316\000requ\367est\271 with\377 @auto_p\376P\001e(True)\367StrQ\000ureV\177ariant(\267\"\337=add_\234\000ec\375u\307\"s/_wra\377pper.pyx\377disablee\375n\002\001gcgenB\356\355!s f\241C(cosde\331 \033\003dno\342 \377fault __\377reduce__\367 du\341\002non-\336\362 vial\033\000ci_nit__J\002F\330 +er\000\010.5\006c\271B\033\n4\032\000\327 s\274`e_\027\005\232f\320\243f1\017\017\t\047\027.\371\000ly\361_\220\204\001B\007\333`ck_f\307or_\236#\\\007\357 im\377ate_spawqnt\007\247 \033\016get:\003\347_at\036\t\016\005cen\017ters\r\013I\014\215\205\003\201\003\376\316@onghold\003It\233\205\003\000\017\270/\017\022\300.\235m\360\255mC\022\322j\223Q__Py\375x\001\000Dict_N\377extRef__\374\230\205\004\250`__func\217____\251 \334C\n\000m\367ain\020\001modu]l!\002nam)\002pK\000\036 \004qual\017\005\362e\265n\026\214\204\006exa\001s\216@C\005\312f\374{\000\316n__test~\225\000array_\202\004\377is_corouotine\254gar\212`\277imilar)\002a\177syncio.\"\006\277sbbase\335bb\373id\274\210\002_exis\213ts\006\003f\211\205\002\022\003\030\005i\373d1\t\0052bloc\367k_x\001\003zboo\371l\372\210\002\224\204\rchunk|\305 \267\211\002e_rnd\014\003}h\023\003range\036\003uw%\003x,\003zcl\315\000\375_\360 traceb\327ack\223\207\005.\223\207\005di\237menum\307\211\002\364\204\013e\377xcludedf\177lagsgen\376\204\007\340\362\204\t\200\205\007\355\204\004\227\205\001\350\212\001gor\271y\243\205\001\\\002sio\241\000t\373_m\335 shaft\324N\000\013\000u\366\206\001d\311""\205\001po\207pul\301\213\002\253\206\002\334\205\001%\000d\203ow\005\002\215\206\001\016\002\360\210\005\253@n\267fig\006\013poQ\002v\272\216\211\003i\221\210\002fir\353@s\273tr\330\205\004int\351@d\377eep_ocea=n\366@mesa\375@\t\003\375c\006\001verwor\343ld\235\207\003\231`\260\000llo-w*\006sl\263 _\222B\032\001onowy\277`vi\335\211\001?_featu\267`\313\214\002\372\r\007s\263\006posit[em\001\001r_\221\007s\205\207\t\337match\000\002_a\377nymax_co\367unt\005\001resu\337ltsmc\312 _s\377izemove_\336V\006nout\300\214\001es\366\321 po\003\000s_bu\377frradius\377rarityre\327g_x\001\001z\007\000ioynB\002\362\213\001iredZ\003\367ret\000\000urnr\357ngsam\000csc\347ale\335\216\001\341\216\00148s\377elfsetde~\240\213\002setup_\352\204\t\203sh\231\000v\001\237\001\377\214\003\257\215\001e\377svsxsysz\377toleranc\357etot]\000rue\177_syvali\364 \350\000\004\233\214\002\r\003m\027\000ues\374\221C\342\217\001xyz\200\001\330\277\004\n\210+\220Q\006\000\027\363\030\330\000\000\002\0010\260\001\360\377\036\000\005\014\210;\220a\377\220t\230:\240Z\250{\373\270!)\000)*\360\026\000\377\005\016\320\r\037\230q\240\177\004\240L\260\003\2601@\000\373*++\001 \320\037/\250\357x\260q\270Q\000\007\200v\377\210[\230\001\230\021\230\"\377\230F\240-\250t\2601\377\330\031\"\240)\2501\330\377\010\017\210q\330\004\013\210\3365\00145\360\024K\002\036\230\377a\230|\2509\260A\200\377\001\340\0345\260Q\360 \376{\0014\210s\320\022\047\240\337q\250\r\260SS\000(1\373\260\031\203\001\360\006\000\024\025\377\360\032\000\005\030\220z\240\375\026\034\000\n\260\"\260A\330\377\004\007\200t\2103\210a\377\330\010\t\330\004\023\220>\377\240\021\330\010\014\210F\220\377)\2309\240I\250Y\260\377e\2701\330\004\r\210R\377\210s\220!\2202\220T\377\230\023\230A\230R\230t\377\2404\240u\250E\260\021\377\260!\330\004\010\210\001\210\371\021\227\004^\001\010\200v\320\r\377 \240\001\240\035\250d\260\373!\260\266\005\005\330\010\027\220\307r\230\021\000\004\000\013\016\013\200\001\377\360\034\000\005\031\320\030,\357\250A\250QC""\000$\260a\377\330\004\014\210C\210t\220w3\220a\034\000(\000\005b\002\377\035\230Q\230m\2504\250\377v\260W\270G\3001\300iA\244$ \t*\223@\320\013&\001\377e\2401\200A\330\035&\373\240j\252@D\001\000\t\no\210\031\220!\371\000\210\025\376\0026\000\004\210\026\353 \010\t\000\004\n\010_\340\010\034\230K\330 \004\367\001\377\330\010\013\2106\220\023\220\277A\330\014\022\220+\205\000a\377\340\010\031\230\032\2401\240\037D\250\005\250W\332 \036\000\213@~^\000\014\020\220\001\220\021$\001\377,\230a\320\0378\270\001\377\270\021\340\010\033\2306\240\377\023\240B\240g\250Q\330\3767\000\023\230B\230h\240b\373\250\001b\001E\240\021\240+\376?\003\016\210a\210v\220U\377\230*\240G\2506\260\022>\314!\014\210A\210Q\220b\314\000_2C\3001\330\313`\"\234\2000\377\037\230z\250\026\250q\260\357\014\270B\270\201`\036\230g\377\240V\2501\250L\270\002\335\270\224 \013\2108\354 e\230\2153\225\000c\250\275\000\300\004\307\004\r\337\340\010\027\320\027\350`\330\014\277\025\220Y\230a\330\344\000\005\257\220S\230\007R\000\033\373\001\021\377\220\022\2207\230!\2302\377\230T\240\027\250\001\250\022\376\246@t\2605\270\005\270Q\370j\001\277\004\301\t\360\006\000 *\357\250\021\360(\352\201.\330\010\021\257\220\037\240\001~\003V\260\000e\377\2406\250\021\250,\260f\377\270A\200A\360\020\000\t\373\035\230\232`\034\230N\250!\336\255`u\260A\260\363 \020\220\177\003\2204\220s\230!\033\005?I\240Q\240d\250\220`\016\t\377\030\000\013\025\220A\220T\367\230\025\230\275b\360\034\000\t\355!i\000\010 \001\001\014\210G\273\2201\370\001\003\2201\211a\017\373\210r\223`D\230\001\330\020\377\034\230J\240c\250\023\250/A\330\021\025\226 \004\177\000\r\004\277\024\250R\250r\260\202`\034\336\222\001\032\230!\330\330`L\250\356\271\004S\230\003\360\"i\250y\376\250`\025\270a\270q\330\010\376\243\006\320\000\035\230Q\340\004\373\013\210\331a\047\230\021\230!_\320\000\036\230a\n\005(\357 \2771\320\000 \240\001\034\005*\377\230A\230Q\320\000!\240\375\021\205\210\002\210Z\220q\230\001\337\320\000#\2401>\005,\230wa\230q\013\004\r\210]<""\003{&\240K\006/\240\021\240c\000\277)\250\021\340\004\r\240\210\002\024nN\001*\250!6\tt\240u\000\376\017\002\r\210\\\230\021\230$\177\230a\320\0000\260\001\023\016\3479\270\021\270\005\265\205\001d\240+]\250\235\000?\270q\326\210\001\014\323\002\377-\230q\240\006\240i\250\376\223\000@\300\001\360\030\000\005\377\016\210^\2301\230K\240;w\250S\000F\300a\322\211\001\047\002\376\351\210\003\004\250M\270\021\320\004\367:\270&,\000\036\000\t\022\357\220\033\230A\366`\025\240g\003\250S\360\211\001"; - PyObject *data = __Pyx_DecompressString_LZSS(cstring, 2603, 3661); + #elif (CYTHON_COMPRESS_STRINGS) > 0 && (CYTHON_COMPRESS_STRINGS) <= 90 /* compression: lzss (2627 bytes) */ +static const char cstring[] = "\377(tree fr\377agment))\377, dim=, \367pos\003\000rota\357tion\016\000see\375d\003\001ize=?F\377ailed to\377 allocat\377e Genera\367tor\t\020biom\177e cache\036\006\277(mc=No6\000t\377hat Cyth\377on is de\367libF\001ely \377stricter\375 \"\000n PEP-\377484 and \377rejects \377subclass\377es of bu\377iltin ty\377pes. If \277you ne\246\003p\374%\000%\tthen s\373et[\000e \047an\365n\347\004_<\000ing\047\272\210 rb\000ive\346\001F\377alse.Pic\343kl\032\000j\001\233\000uct\317 mem\256\000\207\001ch\373 a\220\000elf._\377sv must \377be expli\367cit\316\000requ\367est\271 with\377 @auto_p\376P\001e(True)\367StrQ\000ureV\177ariant(\267\"\337=add_\234\000ec\375u\307\"s/_wra\377pper.pyx\377disablee\375n\002\001gcgenB\356\355!s f\241C(cosde\331 \033\003dno\342 \377fault __\377reduce__\367 du\341\002non-\336\362 vial\033\000ci_nit__J\002F\330 +er\000\010.5\006c\271B\033\n4\032\000\327 s\274`e_\027\005\232f\320\243f1\017\017\t\047\027.\371\000ly\361_\220\204\001B\007\333`ck_f\307or_\236#\\\007\357 im\377ate_spawqnt\007\247 \033\016get:\003\347_at\036\t\016\005cen\017ters\r\013I\014\215\205\003\201\003\376\316@onghold\003It\233\205\003\000\017\270/\017\022\300.\235m\360\255mC\022\322j\223Q__Py\375x\001\000Dict_N\377extRef__\374\230\205\004\250`__func\217____\251 \334C\n\000m\367ain\020\001modu]l!\002nam)\002pK\000\036 \004qual\017\005\362e\265n\026\214\204\006exa\001s\216@C\005\312f\374{\000\316n__test~\225\000array_\202\004\377is_corouotine\254gar\212`\277imilar)\002a\177syncio.\"\006\277sbbase\335bb\373id\274\210\002_exis\213ts\006\003f\211\205\002\022\003\030\005i\373d1\t\0052bloc\367k_x\001\003zboo\371l\372\210\002\224\204\rchunk|\305 \267\211\002e_rnd\014\003}h\023\003range\036\003uw%\003x,\003zcl\315\000\375_\360 traceb\327ack\223\207\005.\223\207\005di\237menum\307\211\002\364\204\013e\377xcludedf\177lagsgen\376\204\007\340\362\204\t\200\205\007\355\204\004\227\205\001\350\212\001gor\271y\243\205\001\\\002sio\241\000t\373_m\335 shaft\324N\000\013\000u\366\206\001d\311""\205\001po\207pul\301\213\002\253\206\002\334\205\001%\000d\203ow\005\002\215\206\001\016\002\360\210\005\253@n\267fig\006\013poQ\002v\272\216\211\003i\221\210\002fir\353@s\273tr\330\205\004int\351@d\377eep_ocea=n\366@mesa\375@\t\003\375c\006\001verwor\343ld\235\207\003\231`\260\000llo-w*\006sl\263 _\222B\032\001onowy\277`vi\335\211\001?_featu\267`\313\214\002\372\r\007s\263\006posit[em\001\001r_\221\007s\205\207\t\337match\000\002_a\377nymax_co\367unt\005\001resu\337ltsmc\312 _s\377izemove_\336V\006nout\300\214\001es\366\321 po\003\000s_bu\377frradius\377rarityre\327g_x\001\001z\007\000ioynB\002\362\213\001iredZ\003\367ret\000\000urnr\357ngsam\000csc\347ale\335\216\001\341\216\00148s\377elfsetde~\240\213\002setup_\352\204\t\203sh\231\000v\001\237\001\377\214\003\257\215\001e\377svsxsysz\377toleranc\357etot]\000rue\177_syvali\364 \350\000\004\233\214\002\r\003m\027\000ues\374\221C\342\217\001xyz\200\001\330\277\004\n\210+\220Q\006\000\027\363\030\330\000\000\002\0010\260\001\360\377\036\000\005\014\210;\220a\377\220t\230:\240Z\250{\373\270!)\000)*\360\026\000\377\005\016\320\r\037\230q\240\377\004\240J\250l\270#\270\3668\001*+-\001 \320\037/\337\250x\260q\270S\000\007\200\377v\210[\230\001\230\021\230\377\"\230F\240-\250t\260\377:\270Q\330\031\"\240)\377\2501\330\010\017\210q\330\357\004\013\2101}\00045\360\375\024O\002\036\230a\230z\250\377\034\260Y\270a\200\001\340\277\0345\260Q\360 \201\0014\377\210s\320\022\047\240q\250\367\r\260SW\000(1\260\031\376\211\001\360\006\000\024\025\360\032\177\000\005\030\220z\240\026\034\000\377\n\260\"\260A\330\004\007\377\200t\2103\210a\330\010\377\t\330\004\023\220>\240\021\377\330\010\014\210J\220f\230\377I\240Y\250i\260y\300\377\005\300Q\330\004\r\210R\377\210s\220!\2202\220T\377\230\023\230A\230R\230t\377\2404\240u\250E\260\021\377\260!\330\004\010\210\001\210\371\021\233\004`\001\010\200v\320\r\377 \240\001\240\035\250d\260\373!\260\272\005\005\330\010\027\220\307r\230\021\000\004\000\013\016\013\200\001\377\360\034\000\005""\031\320\030,\357\250A\250QC\000$\260j\375\300\373 \014\210C\210t\220{3\220\361\000\360(\000\005d\002\377\035\230Q\230m\2504\250\377z\270\026\270w\300g\310\247Q\310a\254$\"\t*\237@\320\375\013(\001e\2401\200A\330\357\035&\240j\266@D\001\000\277\t\n\210\031\220!\377\000\210\331\025\204\"\000\004\210\026\363 \010\t|\000\004\n\010\340\010\034\230K\336 \375\004\373\001\330\010\013\2106\220\377\023\220A\330\014\022\220+\376\207\000a\340\010\031\230\032\240\1771\240D\250\005\250W\340 \370\036\000\221@^\000\014\020\220\001\220\375\021$\001,\230a\320\0378\377\270\001\270\021\340\010\033\230\3776\240\023\240B\240g\250\373Q\3307\000\023\230B\230h\357\240b\250\001b\001E\240\021\373\240+?\003\016\210a\210v\377\220U\230*\240G\2506\373\260\022\320!\014\210A\210Q|\230b\314\0002C\3001\330\325`\365\"\234\2000\037\306`\026\250q\260\357\014\270B\270\207`\036\230g\377\240V\2501\250L\270\002\335\270\224 \013\2108\356 e\230\2153\225\000c\250\275\000\300\004\307\004\r\337\340\010\027\320\027\356`\330\014\277\025\220Y\230a\330\344\000\005\377\220S\230\007\230z\250\033\376\373\001\021\220\022\2207\230!\377\2302\230T\240\027\250\001\373\250\022\250@t\2605\270\005\343\270Qj\001\277\004\301\t\360\006\000\317 *\250\021\336@\353\201-\330\010_\021\220\037\240\001~\003V\260\000\377e\240:\250V\2601\260\377L\300\006\300a\200A\360\177\020\000\t\035\230A\330\277@\367N\250!\261`u\260A\260\376\365 \020\220\003\2204\220s\373\230!\033\005I\240Q\240d\371\250\222`\016\t\030\000\013\025\220\277A\220T\230\025\230T\001Q\336M\000\034\000\t!m\000\010 \276\001\001\014\210G\2201\374\001\003\273\2201\215a\017\210r\227`D\377\230\001\330\020\034\230J\240\377c\250\023\250A\330\021\025\362\232 \004\201\000\r\004\024\250R\250\353r\260\206`\034\224\001\032\230!v\231\001L\250\275\004S\230\003\364\"\367i\250y\254`\025\270a\270\367q\330\010\245\006\320\000\035\230\337Q\340\004\013\210\335a\047\230\377\021\230!\320\000\036\230a\372\n\005(\363 1\320\000 \240\375\001\034\005*\230A\230Q\320\357\000\"\240!\225\210\002\210Z\220""\357q\230\n\2403\000#\2401\376@\005,\230a\230q\320\000n\r\002\r\210]>\003&\240M\006\367/\240\021.\001)\250\021\340\353\004\r\260\210\002\024P\001*\250!\3466\tt\240w\000\017\002\r\210\\\377\230\021\230$\230a\320\000w0\260\001\023\0169\270\021\272\005\336\273\205\001d\240+\250\237\000@\300\365\001\344\210\001\014\325\002-\230q\240\377\n\250&\260\t\270\021\320\377\000A\300\021\360\030\000\005\337\016\210^\2301\322 k\260\377\027\270\001\320\000F\300a\270\350\211\001+\002\371\210\003\004\250M,\000\004\367:\270&H\000\036\000\t\022\377\220\033\230A\230T\240\025\377\240g\250S\260\003\2601"; + PyObject *data = __Pyx_DecompressString_LZSS(cstring, 2627, 3683); #define __Pyx_DecompressString_UNUSED if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) const char* const bytes = __Pyx_PyBytes_AsString(data); #if !CYTHON_ASSUME_SAFE_MACROS if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } #endif - #else /* compression: none (3661 bytes) */ -static const char bytes[] = "(tree fragment)), dim=, pos=, rotation=, seed=, size=?Failed to allocate GeneratorFailed to allocate biome cacheGenerator(mc=Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the \047annotation_typing\047 directive to False.Pickling of struct members such as self._sv must be explicitly requested with @auto_pickle(True)StructureVariant(biome=add_notecubiomes/_wrapper.pyxdisableenablegcgenBiomes failed (code isenabledno default __reduce__ due to non-trivial __cinit__BiomeFilterBiomeFilter.__reduce_cython__BiomeFilter.__setstate_cython__GeneratorGenerator.__reduce_cython__Generator.__setstate_cython__Generator.apply_seedGenerator.check_for_biomesGenerator.estimate_spawnGenerator.gen_biomesGenerator.get_biome_atGenerator.get_biome_centersGenerator.get_spawnGenerator.locate_biomeStrongholdIteratorStrongholdIterator.__reduce_cython__StrongholdIterator.__setstate_cython__StructureVariantStructureVariant.__reduce_cython__StructureVariant.__setstate_cython____Pyx_PyDict_NextRef__annotate____func____getstate____main____module____name____pyx_state__qualname____reduce____reduce_cython____reduce_ex____set_name____setstate____setstate_cython____test___array_module_is_coroutineapply_seedare_similararrayasyncio.coroutinesbbase_seedbidbiome_existsbiome_filterbiome_idbiome_id1biome_id2block_xblock_zboolcachecheck_for_biomeschunk_generate_rndchunk_hchunk_rangechunk_wchunk_xchunk_zcline_in_tracebackcubiomes._wrapperdimenumerateestimate_spawnexcludedflagsgengen_biomesget_biome_atget_biome_centersget_categoryget_dimensionget_mineshaftsget_mutatedget_population_seedget_shadowget_spawnget_structure_configget_structure_posget_variantiinit_first_strongholdintis_deep_oceanis_mesais_oceanicis_overworld_biomeis_shallow_oceanis_slime_chunkis_snowyis_viable_feature_biomeis_viable_structure_positemsiter_strongholdslocate_biomematchmatch_anymax_countmax_resultsmcmin_sizemove_structurenoutpassespoppospos_bufrradius""rarityreg_xreg_zregion_sizerequiredresultretreturnrngsaltscscaleseedseed48selfsetdefaultsetup_biome_filtershsiz_bufsizestruct_typesvsxsysztolerancetotaltrue_syvalid_bvalid_biomesvalid_mvaluesworld_seedxyz\200\001\330\004\n\210+\220Q\200\001\330\027\030\330\027\030\330\027\030\330\0270\260\001\360\036\000\005\014\210;\220a\220t\230:\240Z\250{\270!\200\001\330)*\360\026\000\005\016\320\r\037\230q\240\004\240L\260\003\2601\200\001\330*+\360\036\000\005 \320\037/\250x\260q\270\001\330\004\007\200v\210[\230\001\230\021\230\"\230F\240-\250t\2601\330\031\"\240)\2501\330\010\017\210q\330\004\013\2101\200\001\33045\360\024\000\005\016\320\r\036\230a\230|\2509\260A\200\001\340\0345\260Q\360 \000\005\014\2104\210s\320\022\047\240q\250\r\260S\270\001\330(1\260\031\270!\200\001\360\006\000\024\025\360\032\000\005\030\220z\240\026\240q\250\n\260\"\260A\330\004\007\200t\2103\210a\330\010\t\330\004\023\220>\240\021\330\010\014\210F\220)\2309\240I\250Y\260e\2701\330\004\r\210R\210s\220!\2202\220T\230\023\230A\230R\230t\2404\240u\250E\260\021\260!\330\004\010\210\001\210\021\330\004\013\2101\200\001\360\032\000\005\010\200v\320\r \240\001\240\035\250d\260!\2601\330\010\017\210q\330\004\005\330\010\027\220r\230\021\330\010\027\220r\230\021\330\010\027\220r\230\021\330\010\027\220r\230\021\330\010\027\220r\230\021\330\010\027\220r\230\021\200\001\360\034\000\005\031\320\030,\250A\250Q\250d\260$\260a\330\004\014\210C\210t\2203\220a\200\001\360(\000\005\010\200v\320\r\035\230Q\230m\2504\250v\260W\270G\3001\300A\330\010\017\210q\330\004\014\210C\210t\2203\220a\200\001\360*\000\005\014\320\013\035\230Q\230e\2401\200A\330\035&\240j\260\001\360D\001\000\t\n\210\031\220!\330\010\t\210\025\210a\330\010\t\210\025\210a\330\010\t\210\026\210q\330\010\t\210\026\210q\330\010\t\210\025\210a\330\010\t\210\026\210q\340\010\034\230K\240q\250\004\250E\260\021\330\010\013\2106\220\023\220A\330\014\022\220+\230Q\230a\340\010\031\230\032\2401\240D\250\005\250W\260A\330\010\013\2104\210s\220!\330\014\020""\220\001\220\021\330\014\022\220,\230a\320\0378\270\001\270\021\340\010\033\2306\240\023\240B\240g\250Q\330\010\031\230\023\230B\230h\240b\250\001\340\010\034\230E\240\021\240+\250W\260A\330\010\016\210a\210v\220U\230*\240G\2506\260\022\2601\330\010\014\210A\210Q\330\010\017\210q\200A\3302C\3001\330*+\360\"\000\t\n\210\031\220!\330\010\t\210\025\210a\330\010\t\210\025\210a\330\010\t\210\026\210q\330\010\t\210\026\210q\330\010\t\210\025\210a\330\010\t\210\026\210q\340\010\037\230z\250\026\250q\260\014\270B\270a\330\010\036\230g\240V\2501\250L\270\002\270!\330\010\013\2108\2203\220e\2303\230h\240c\250\021\330\014\020\220\001\220\021\330\014\020\220\001\220\021\330\014\r\340\010\027\320\027\047\240q\330\014\025\220Y\230a\330\014\020\220\005\220S\230\007\230z\250\033\260A\330\010\021\220\022\2207\230!\2302\230T\240\027\250\001\250\022\2504\250t\2605\270\005\270Q\270a\330\010\014\210A\210Q\330\010\014\210A\210Q\330\010\017\210q\200A\360\006\000 *\250\021\360(\000\t\n\210\031\220!\330\010\t\210\025\210a\330\010\t\210\025\210a\330\010\t\210\026\210q\330\010\t\210\026\210q\330\010\t\210\025\210a\330\010\t\210\026\210q\330\010\021\220\037\240\001\330\014\020\220\005\220V\2303\230e\2406\250\021\250,\260f\270A\200A\360\020\000\t\035\230A\330\010\034\230N\250!\2504\250u\260A\260Q\330\010\020\220\003\2204\220s\230!\200A\360\020\000\t\035\230I\240Q\240d\250!\330\010\020\220\003\2204\220s\230!\200A\360\030\000\013\025\220A\220T\230\025\230e\2401\200A\360\034\000\t!\240\001\330\010 \240\001\330\010\014\210G\2201\330\014\020\220\003\2201\220A\330\014\017\210r\220\023\220D\230\001\330\020\034\230J\240c\250\023\250A\330\021\025\220S\230\004\230A\330\020\034\230J\240c\250\024\250R\250r\260\021\340\010\034\230A\330\010\032\230!\330\010\034\230L\250\001\330\014\020\220\005\220S\230\003\2303\230h\240i\250y\270\001\270\025\270a\270q\330\010\020\220\003\2204\220s\230!\320\000\035\230Q\340\004\013\2104\210s\220\047\230\021\230!\320\000\036\230a\340\004\013\2104\210s\220(\230!\2301\320\000 ""\240\001\340\004\013\2104\210s\220*\230A\230Q\320\000!\240\021\360\026\000\005\016\210Z\220q\230\001\320\000#\2401\340\004\013\2104\210s\220,\230a\230q\320\000#\2401\340\004\r\210]\230!\2301\320\000&\240a\340\004\013\2104\210s\220/\240\021\240!\320\000)\250\021\340\004\r\210[\230\001\230\024\230Q\320\000*\250!\340\004\013\2104\210s\220,\230a\230t\2401\320\000*\250!\340\004\r\210\\\230\021\230$\230a\320\0000\260\001\340\004\013\2104\210s\220,\230a\230t\2401\320\0009\270\021\340\004\013\2104\210s\220+\230Q\230d\240+\250Q\320\000?\270q\360\024\000\005\014\2104\210s\220-\230q\240\006\240i\250q\320\000@\300\001\360\030\000\005\016\210^\2301\230K\240w\250a\320\000F\300a\360\026\000\005\014\2104\210s\320\022\047\240q\250\004\250M\270\021\320\004:\270&\300\001\360\036\000\t\022\220\033\230A\230T\240\025\240g\250S\260\003\2601"; + #else /* compression: none (3683 bytes) */ +static const char bytes[] = "(tree fragment)), dim=, pos=, rotation=, seed=, size=?Failed to allocate GeneratorFailed to allocate biome cacheGenerator(mc=Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the \047annotation_typing\047 directive to False.Pickling of struct members such as self._sv must be explicitly requested with @auto_pickle(True)StructureVariant(biome=add_notecubiomes/_wrapper.pyxdisableenablegcgenBiomes failed (code isenabledno default __reduce__ due to non-trivial __cinit__BiomeFilterBiomeFilter.__reduce_cython__BiomeFilter.__setstate_cython__GeneratorGenerator.__reduce_cython__Generator.__setstate_cython__Generator.apply_seedGenerator.check_for_biomesGenerator.estimate_spawnGenerator.gen_biomesGenerator.get_biome_atGenerator.get_biome_centersGenerator.get_spawnGenerator.locate_biomeStrongholdIteratorStrongholdIterator.__reduce_cython__StrongholdIterator.__setstate_cython__StructureVariantStructureVariant.__reduce_cython__StructureVariant.__setstate_cython____Pyx_PyDict_NextRef__annotate____func____getstate____main____module____name____pyx_state__qualname____reduce____reduce_cython____reduce_ex____set_name____setstate____setstate_cython____test___array_module_is_coroutineapply_seedare_similararrayasyncio.coroutinesbbase_seedbidbiome_existsbiome_filterbiome_idbiome_id1biome_id2block_xblock_zboolcachecheck_for_biomeschunk_generate_rndchunk_hchunk_rangechunk_wchunk_xchunk_zcline_in_tracebackcubiomes._wrapperdimenumerateestimate_spawnexcludedflagsgengen_biomesget_biome_atget_biome_centersget_categoryget_dimensionget_mineshaftsget_mutatedget_population_seedget_shadowget_spawnget_structure_configget_structure_posget_variantiinit_first_strongholdintis_deep_oceanis_mesais_oceanicis_overworld_biomeis_shallow_oceanis_slime_chunkis_snowyis_viable_feature_biomeis_viable_structure_positemsiter_strongholdslocate_biomematchmatch_anymax_countmax_resultsmcmin_sizemove_structurenoutpassespoppospos_bufrradius""rarityreg_xreg_zregion_sizerequiredresultretreturnrngsaltscscaleseedseed48selfsetdefaultsetup_biome_filtershsiz_bufsizestruct_typesvsxsysztolerancetotaltrue_syvalid_bvalid_biomesvalid_mvaluesworld_seedxyz\200\001\330\004\n\210+\220Q\200\001\330\027\030\330\027\030\330\027\030\330\0270\260\001\360\036\000\005\014\210;\220a\220t\230:\240Z\250{\270!\200\001\330)*\360\026\000\005\016\320\r\037\230q\240\004\240J\250l\270#\270Q\200\001\330*+\360\036\000\005 \320\037/\250x\260q\270\001\330\004\007\200v\210[\230\001\230\021\230\"\230F\240-\250t\260:\270Q\330\031\"\240)\2501\330\010\017\210q\330\004\013\2101\200\001\33045\360\024\000\005\016\320\r\036\230a\230z\250\034\260Y\270a\200\001\340\0345\260Q\360 \000\005\014\2104\210s\320\022\047\240q\250\r\260S\270\001\330(1\260\031\270!\200\001\360\006\000\024\025\360\032\000\005\030\220z\240\026\240q\250\n\260\"\260A\330\004\007\200t\2103\210a\330\010\t\330\004\023\220>\240\021\330\010\014\210J\220f\230I\240Y\250i\260y\300\005\300Q\330\004\r\210R\210s\220!\2202\220T\230\023\230A\230R\230t\2404\240u\250E\260\021\260!\330\004\010\210\001\210\021\330\004\013\2101\200\001\360\032\000\005\010\200v\320\r \240\001\240\035\250d\260!\2601\330\010\017\210q\330\004\005\330\010\027\220r\230\021\330\010\027\220r\230\021\330\010\027\220r\230\021\330\010\027\220r\230\021\330\010\027\220r\230\021\330\010\027\220r\230\021\200\001\360\034\000\005\031\320\030,\250A\250Q\250d\260$\260j\300\001\330\004\014\210C\210t\2203\220a\200\001\360(\000\005\010\200v\320\r\035\230Q\230m\2504\250z\270\026\270w\300g\310Q\310a\330\010\017\210q\330\004\014\210C\210t\2203\220a\200\001\360*\000\005\014\320\013\035\230Q\230e\2401\200A\330\035&\240j\260\001\360D\001\000\t\n\210\031\220!\330\010\t\210\025\210a\330\010\t\210\025\210a\330\010\t\210\026\210q\330\010\t\210\026\210q\330\010\t\210\025\210a\330\010\t\210\026\210q\340\010\034\230K\240q\250\004\250E\260\021\330\010\013\2106\220\023\220A\330\014\022\220+\230Q\230a\340\010\031\230\032\2401\240D\250\005\250W\260A""\330\010\013\2104\210s\220!\330\014\020\220\001\220\021\330\014\022\220,\230a\320\0378\270\001\270\021\340\010\033\2306\240\023\240B\240g\250Q\330\010\031\230\023\230B\230h\240b\250\001\340\010\034\230E\240\021\240+\250W\260A\330\010\016\210a\210v\220U\230*\240G\2506\260\022\2601\330\010\014\210A\210Q\330\010\017\210q\200A\3302C\3001\330*+\360\"\000\t\n\210\031\220!\330\010\t\210\025\210a\330\010\t\210\025\210a\330\010\t\210\026\210q\330\010\t\210\026\210q\330\010\t\210\025\210a\330\010\t\210\026\210q\340\010\037\230z\250\026\250q\260\014\270B\270a\330\010\036\230g\240V\2501\250L\270\002\270!\330\010\013\2108\2203\220e\2303\230h\240c\250\021\330\014\020\220\001\220\021\330\014\020\220\001\220\021\330\014\r\340\010\027\320\027\047\240q\330\014\025\220Y\230a\330\014\020\220\005\220S\230\007\230z\250\033\260A\330\010\021\220\022\2207\230!\2302\230T\240\027\250\001\250\022\2504\250t\2605\270\005\270Q\270a\330\010\014\210A\210Q\330\010\014\210A\210Q\330\010\017\210q\200A\360\006\000 *\250\021\360(\000\t\n\210\031\220!\330\010\t\210\025\210a\330\010\t\210\025\210a\330\010\t\210\026\210q\330\010\t\210\026\210q\330\010\t\210\025\210a\330\010\t\210\026\210q\330\010\021\220\037\240\001\330\014\020\220\005\220V\2303\230e\240:\250V\2601\260L\300\006\300a\200A\360\020\000\t\035\230A\330\010\034\230N\250!\2504\250u\260A\260Q\330\010\020\220\003\2204\220s\230!\200A\360\020\000\t\035\230I\240Q\240d\250!\330\010\020\220\003\2204\220s\230!\200A\360\030\000\013\025\220A\220T\230\025\230e\240:\250Q\200A\360\034\000\t!\240\001\330\010 \240\001\330\010\014\210G\2201\330\014\020\220\003\2201\220A\330\014\017\210r\220\023\220D\230\001\330\020\034\230J\240c\250\023\250A\330\021\025\220S\230\004\230A\330\020\034\230J\240c\250\024\250R\250r\260\021\340\010\034\230A\330\010\032\230!\330\010\034\230L\250\001\330\014\020\220\005\220S\230\003\2303\230h\240i\250y\270\001\270\025\270a\270q\330\010\020\220\003\2204\220s\230!\320\000\035\230Q\340\004\013\2104\210s\220\047\230\021\230!\320\000\036""\230a\340\004\013\2104\210s\220(\230!\2301\320\000 \240\001\340\004\013\2104\210s\220*\230A\230Q\320\000\"\240!\360\026\000\005\016\210Z\220q\230\n\240!\320\000#\2401\340\004\013\2104\210s\220,\230a\230q\320\000#\2401\340\004\r\210]\230!\2301\320\000&\240a\340\004\013\2104\210s\220/\240\021\240!\320\000)\250\021\340\004\r\210[\230\001\230\024\230Q\320\000*\250!\340\004\013\2104\210s\220,\230a\230t\2401\320\000*\250!\340\004\r\210\\\230\021\230$\230a\320\0000\260\001\340\004\013\2104\210s\220,\230a\230t\2401\320\0009\270\021\340\004\013\2104\210s\220+\230Q\230d\240+\250Q\320\000@\300\001\360\024\000\005\014\2104\210s\220-\230q\240\n\250&\260\t\270\021\320\000A\300\021\360\030\000\005\016\210^\2301\230J\240k\260\027\270\001\320\000F\300a\360\026\000\005\014\2104\210s\320\022\047\240q\250\004\250M\270\021\320\004:\270&\300\001\360\036\000\t\022\220\033\230A\230T\240\025\240g\250S\260\003\2601"; PyObject *data = NULL; #define __Pyx_DecompressString_UNUSED #define __Pyx_DecompressString_LZSS_UNUSED @@ -16961,7 +16967,7 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 91}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_dim_2, __pyx_mstate->__pyx_n_u_seed_2}; - __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cubiomes__wrapper_pyx, __pyx_mstate->__pyx_n_u_apply_seed, __pyx_mstate->__pyx_kp_b_iso88591_A_AT_e1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cubiomes__wrapper_pyx, __pyx_mstate->__pyx_n_u_apply_seed, __pyx_mstate->__pyx_kp_b_iso88591_A_AT_e_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 105}; @@ -16996,7 +17002,7 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { { const __Pyx_PyCode_New_function_description descr = {11, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 276}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_z, __pyx_mstate->__pyx_n_u_sx, __pyx_mstate->__pyx_n_u_sz, __pyx_mstate->__pyx_n_u_scale, __pyx_mstate->__pyx_n_u_dim_2, __pyx_mstate->__pyx_n_u_seed_2, __pyx_mstate->__pyx_n_u_biome_filter, __pyx_mstate->__pyx_n_u_y, __pyx_mstate->__pyx_n_u_sy, __pyx_mstate->__pyx_n_u_r}; - __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cubiomes__wrapper_pyx, __pyx_mstate->__pyx_n_u_check_for_biomes, __pyx_mstate->__pyx_kp_b_iso88591_A_a_a_q_q_a_q_V3e6_fA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cubiomes__wrapper_pyx, __pyx_mstate->__pyx_n_u_check_for_biomes, __pyx_mstate->__pyx_kp_b_iso88591_A_a_a_q_q_a_q_V3e_V1L_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; @@ -17046,7 +17052,7 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 515}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_struct_type, __pyx_mstate->__pyx_n_u_mc, __pyx_mstate->__pyx_n_u_seed_2, __pyx_mstate->__pyx_n_u_reg_x, __pyx_mstate->__pyx_n_u_reg_z, __pyx_mstate->__pyx_n_u_pos_2}; - __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cubiomes__wrapper_pyx, __pyx_mstate->__pyx_n_u_get_structure_pos, __pyx_mstate->__pyx_kp_b_iso88591_v_Qm4vWG1A_q_Ct3a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cubiomes__wrapper_pyx, __pyx_mstate->__pyx_n_u_get_structure_pos, __pyx_mstate->__pyx_kp_b_iso88591_v_Qm4z_wgQa_q_Ct3a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 540}; @@ -17061,7 +17067,7 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { { const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 576}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_struct_type, __pyx_mstate->__pyx_n_u_mc, __pyx_mstate->__pyx_n_u_seed_2, __pyx_mstate->__pyx_n_u_block_x, __pyx_mstate->__pyx_n_u_block_z, __pyx_mstate->__pyx_n_u_biome_id, __pyx_mstate->__pyx_n_u_sv}; - __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cubiomes__wrapper_pyx, __pyx_mstate->__pyx_n_u_get_variant, __pyx_mstate->__pyx_kp_b_iso88591_xq_v_F_t1_1_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cubiomes__wrapper_pyx, __pyx_mstate->__pyx_n_u_get_variant, __pyx_mstate->__pyx_kp_b_iso88591_xq_v_F_t_Q_1_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 599}; @@ -17071,12 +17077,12 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 623}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_mc, __pyx_mstate->__pyx_n_u_seed48, __pyx_mstate->__pyx_n_u_sh, __pyx_mstate->__pyx_n_u_pos_2}; - __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cubiomes__wrapper_pyx, __pyx_mstate->__pyx_n_u_init_first_stronghold, __pyx_mstate->__pyx_kp_b_iso88591_AQd_a_Ct3a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cubiomes__wrapper_pyx, __pyx_mstate->__pyx_n_u_init_first_stronghold, __pyx_mstate->__pyx_kp_b_iso88591_AQd_j_Ct3a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 641}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_mc, __pyx_mstate->__pyx_n_u_seed_2, __pyx_mstate->__pyx_n_u_chunk_x, __pyx_mstate->__pyx_n_u_chunk_z, __pyx_mstate->__pyx_n_u_chunk_w, __pyx_mstate->__pyx_n_u_chunk_h, __pyx_mstate->__pyx_n_u_max_count, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_i}; - __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cubiomes__wrapper_pyx, __pyx_mstate->__pyx_n_u_get_mineshafts, __pyx_mstate->__pyx_kp_b_iso88591_z_q_A_t3a_F_9IYe1_Rs_2T_ARt4uE, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cubiomes__wrapper_pyx, __pyx_mstate->__pyx_n_u_get_mineshafts, __pyx_mstate->__pyx_kp_b_iso88591_z_q_A_t3a_JfIYiy_Q_Rs_2T_ARt4uE, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 667}; @@ -17086,7 +17092,7 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 689}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_seed_2, __pyx_mstate->__pyx_n_u_chunk_x, __pyx_mstate->__pyx_n_u_chunk_z}; - __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cubiomes__wrapper_pyx, __pyx_mstate->__pyx_n_u_is_slime_chunk, __pyx_mstate->__pyx_kp_b_iso88591_q_4s_q_iq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cubiomes__wrapper_pyx, __pyx_mstate->__pyx_n_u_is_slime_chunk, __pyx_mstate->__pyx_kp_b_iso88591_4s_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 702}; @@ -17096,17 +17102,17 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 716}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_base_seed, __pyx_mstate->__pyx_n_u_reg_x, __pyx_mstate->__pyx_n_u_reg_z}; - __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cubiomes__wrapper_pyx, __pyx_mstate->__pyx_n_u_move_structure, __pyx_mstate->__pyx_kp_b_iso88591_1Kwa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cubiomes__wrapper_pyx, __pyx_mstate->__pyx_n_u_move_structure, __pyx_mstate->__pyx_kp_b_iso88591_A_1Jk, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 731}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_world_seed, __pyx_mstate->__pyx_n_u_chunk_x, __pyx_mstate->__pyx_n_u_chunk_z}; - __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cubiomes__wrapper_pyx, __pyx_mstate->__pyx_n_u_chunk_generate_rnd, __pyx_mstate->__pyx_kp_b_iso88591_45_a_9A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cubiomes__wrapper_pyx, __pyx_mstate->__pyx_n_u_chunk_generate_rnd, __pyx_mstate->__pyx_kp_b_iso88591_45_az_Ya, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 745}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_mc, __pyx_mstate->__pyx_n_u_world_seed, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_z}; - __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cubiomes__wrapper_pyx, __pyx_mstate->__pyx_n_u_get_population_seed, __pyx_mstate->__pyx_kp_b_iso88591_q_L_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cubiomes__wrapper_pyx, __pyx_mstate->__pyx_n_u_get_population_seed, __pyx_mstate->__pyx_kp_b_iso88591_q_Jl_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 762}; @@ -23130,44 +23136,44 @@ static CYTHON_INLINE unsigned int __Pyx_PyLong_As_unsigned_int(PyObject *x) { } /* CIntFromPy */ -static uint64_t __Pyx_LargePyLong___Pyx_PyLong_As_uint64_t(PyObject *x); -static uint64_t __Pyx_raise_neg_overflow___Pyx_PyLong_As_uint64_t(void) { - const char* type_name = "uint64_t"; +static PY_LONG_LONG __Pyx_LargePyLong___Pyx_PyLong_As_PY_LONG_LONG(PyObject *x); +static PY_LONG_LONG __Pyx_raise_neg_overflow___Pyx_PyLong_As_PY_LONG_LONG(void) { + const char* type_name = "PY_LONG_LONG"; PyErr_Format(PyExc_OverflowError, "can't convert negative value to %.200s", type_name); - return (uint64_t) -1; + return (PY_LONG_LONG) -1; } -static uint64_t __Pyx_raise_overflow___Pyx_PyLong_As_uint64_t(void) { - const char* type_name = "uint64_t"; +static PY_LONG_LONG __Pyx_raise_overflow___Pyx_PyLong_As_PY_LONG_LONG(void) { + const char* type_name = "PY_LONG_LONG"; PyErr_Format(PyExc_OverflowError, "value too large to convert to %.200s", type_name); - return (uint64_t) -1; + return (PY_LONG_LONG) -1; } -static CYTHON_INLINE uint64_t __Pyx_PyULong___Pyx_PyLong_As_uint64_t(PyObject *x) { +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyULong___Pyx_PyLong_As_PY_LONG_LONG(PyObject *x) { const int is_unsigned = 1; #if CYTHON_USE_PYLONG_INTERNALS { const digit* digits = __Pyx_PyLong_Digits(x); const Py_ssize_t size = __Pyx_PyLong_DigitCount(x); - if (size == 2 && (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT)) { + if (size == 2 && (8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(uint64_t) >= 2 * PyLong_SHIFT)) { - return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(PY_LONG_LONG) >= 2 * PyLong_SHIFT)) { + return (PY_LONG_LONG) (((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])); } } else - if (size == 3 && (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT)) { + if (size == 3 && (8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(uint64_t) >= 3 * PyLong_SHIFT)) { - return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(PY_LONG_LONG) >= 3 * PyLong_SHIFT)) { + return (PY_LONG_LONG) (((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])); } } else - if (size == 4 && (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT)) { + if (size == 4 && (8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(uint64_t) >= 4 * PyLong_SHIFT)) { - return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(PY_LONG_LONG) >= 4 * PyLong_SHIFT)) { + return (PY_LONG_LONG) (((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])); } } else {} @@ -23180,107 +23186,107 @@ static CYTHON_INLINE uint64_t __Pyx_PyULong___Pyx_PyLong_As_uint64_t(PyObject *x { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) - return (uint64_t) -1; + return (PY_LONG_LONG) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif - if ((sizeof(uint64_t) <= sizeof(unsigned long))) { - __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned long, PyLong_AsUnsignedLong(x)) - } else if ((sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + if ((sizeof(PY_LONG_LONG) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } - return __Pyx_LargePyLong___Pyx_PyLong_As_uint64_t(x); + return __Pyx_LargePyLong___Pyx_PyLong_As_PY_LONG_LONG(x); raise_neg_overflow: - return __Pyx_raise_neg_overflow___Pyx_PyLong_As_uint64_t(); + return __Pyx_raise_neg_overflow___Pyx_PyLong_As_PY_LONG_LONG(); raise_overflow: - return __Pyx_raise_overflow___Pyx_PyLong_As_uint64_t(); + return __Pyx_raise_overflow___Pyx_PyLong_As_PY_LONG_LONG(); } -static CYTHON_INLINE uint64_t __Pyx_PySLong___Pyx_PyLong_As_uint64_t(PyObject *x) { +static CYTHON_INLINE PY_LONG_LONG __Pyx_PySLong___Pyx_PyLong_As_PY_LONG_LONG(PyObject *x) { const int is_unsigned = 0; #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsNeg(x)) { const Py_ssize_t size = __Pyx_PyLong_DigitCount(x); const digit* digits = __Pyx_PyLong_Digits(x); - if (size == 2 && (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT)) { + if (size == 2 && (8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { long ival = - (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - __PYX_VERIFY_RETURN_INT(uint64_t, long, ival) - } else if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) { - return (uint64_t) (((uint64_t) -1) * (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, ival) + } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT)) { + return (PY_LONG_LONG) (((PY_LONG_LONG) -1) * (((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); } } else - if (size == 3 && (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT)) { + if (size == 3 && (8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { long ival = - (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - __PYX_VERIFY_RETURN_INT(uint64_t, long, ival) - } else if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) { - return (uint64_t) (((uint64_t) -1) * (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, ival) + } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT)) { + return (PY_LONG_LONG) (((PY_LONG_LONG) -1) * (((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); } } else - if (size == 4 && (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT)) { + if (size == 4 && (8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) { long ival = - (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - __PYX_VERIFY_RETURN_INT(uint64_t, long, ival) - } else if ((8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT)) { - return (uint64_t) (((uint64_t) -1) * (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, ival) + } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT)) { + return (PY_LONG_LONG) (((PY_LONG_LONG) -1) * (((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); } } else {} } else { const Py_ssize_t size = __Pyx_PyLong_DigitCount(x); const digit* digits = __Pyx_PyLong_Digits(x); - if (size == 2 && (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT)) { + if (size == 2 && (8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) { - return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT)) { + return (PY_LONG_LONG) (((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])); } } else - if (size == 3 && (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT)) { + if (size == 3 && (8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) { - return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT)) { + return (PY_LONG_LONG) (((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])); } } else - if (size == 4 && (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT)) { + if (size == 4 && (8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT)) { - return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT)) { + return (PY_LONG_LONG) (((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])); } } else {} } #endif #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 - if ((sizeof(uint64_t) <= sizeof(int)) && (sizeof(int) < sizeof(long))) { - __PYX_VERIFY_RETURN_INT_EXC(uint64_t, int, PyLong_AsInt(x)) + if ((sizeof(PY_LONG_LONG) <= sizeof(int)) && (sizeof(int) < sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, int, PyLong_AsInt(x)) } else #endif - if ((sizeof(uint64_t) <= sizeof(long))) { - __PYX_VERIFY_RETURN_INT_EXC(uint64_t, long, PyLong_AsLong(x)) - } else if ((sizeof(uint64_t) <= sizeof(PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(uint64_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + if ((sizeof(PY_LONG_LONG) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, long, PyLong_AsLong(x)) + } else if ((sizeof(PY_LONG_LONG) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, PY_LONG_LONG, PyLong_AsLongLong(x)) } - return __Pyx_LargePyLong___Pyx_PyLong_As_uint64_t(x); + return __Pyx_LargePyLong___Pyx_PyLong_As_PY_LONG_LONG(x); raise_neg_overflow: - return __Pyx_raise_neg_overflow___Pyx_PyLong_As_uint64_t(); + return __Pyx_raise_neg_overflow___Pyx_PyLong_As_PY_LONG_LONG(); raise_overflow: - return __Pyx_raise_overflow___Pyx_PyLong_As_uint64_t(); + return __Pyx_raise_overflow___Pyx_PyLong_As_PY_LONG_LONG(); } -static uint64_t __Pyx_LargePyLong___Pyx_PyLong_As_uint64_t(PyObject *x) { +static PY_LONG_LONG __Pyx_LargePyLong___Pyx_PyLong_As_PY_LONG_LONG(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif - const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0; + const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = (PY_LONG_LONG) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; - uint64_t val; + PY_LONG_LONG val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( @@ -23307,35 +23313,35 @@ static uint64_t __Pyx_LargePyLong___Pyx_PyLong_As_uint64_t(PyObject *x) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); - if (unlikely(!v)) return (uint64_t) -1; + if (unlikely(!v)) return (PY_LONG_LONG) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); - return (uint64_t) -1; + return (PY_LONG_LONG) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to uint64_t"); - return (uint64_t) -1; + "can't convert negative value to PY_LONG_LONG"); + return (PY_LONG_LONG) -1; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) - return (uint64_t) -1; + return (PY_LONG_LONG) -1; } else { stepval = v; } v = NULL; - val = (uint64_t) 0; + val = (PY_LONG_LONG) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; - for (bits = 0; bits < (int) sizeof(uint64_t) * 8 - chunk_size; bits += chunk_size) { + for (bits = 0; bits < (int) sizeof(PY_LONG_LONG) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); @@ -23343,7 +23349,7 @@ static uint64_t __Pyx_LargePyLong___Pyx_PyLong_As_uint64_t(PyObject *x) { idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; - val |= ((uint64_t) idigit) << bits; + val |= ((PY_LONG_LONG) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; @@ -23353,13 +23359,13 @@ static uint64_t __Pyx_LargePyLong___Pyx_PyLong_As_uint64_t(PyObject *x) { { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; - remaining_bits = ((int) sizeof(uint64_t) * 8) - bits - (is_unsigned ? 0 : 1); + remaining_bits = ((int) sizeof(PY_LONG_LONG) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; - val |= ((uint64_t) idigit) << bits; + val |= ((PY_LONG_LONG) idigit) << bits; } if (!is_unsigned) { - if (unlikely(val & (((uint64_t) 1) << (sizeof(uint64_t) * 8 - 1)))) + if (unlikely(val & (((PY_LONG_LONG) 1) << (sizeof(PY_LONG_LONG) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; @@ -23371,17 +23377,17 @@ done: Py_XDECREF(stepval); #endif if (unlikely(ret)) - return (uint64_t) -1; + return (PY_LONG_LONG) -1; return val; raise_overflow: - return __Pyx_raise_overflow___Pyx_PyLong_As_uint64_t(); + return __Pyx_raise_overflow___Pyx_PyLong_As_PY_LONG_LONG(); } -static CYTHON_INLINE uint64_t __Pyx_PyLong___Pyx_PyLong_As_uint64_t(PyObject *x) { +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyLong___Pyx_PyLong_As_PY_LONG_LONG(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif - const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0; + const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = (PY_LONG_LONG) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif @@ -23391,42 +23397,42 @@ static CYTHON_INLINE uint64_t __Pyx_PyLong___Pyx_PyLong_As_uint64_t(PyObject *x) if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(uint64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else #endif { - return __Pyx_PyULong___Pyx_PyLong_As_uint64_t(x); + return __Pyx_PyULong___Pyx_PyLong_As_PY_LONG_LONG(x); } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(uint64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else #endif { - return __Pyx_PySLong___Pyx_PyLong_As_uint64_t(x); + return __Pyx_PySLong___Pyx_PyLong_As_PY_LONG_LONG(x); } } #if CYTHON_USE_PYLONG_INTERNALS raise_neg_overflow: - return __Pyx_raise_neg_overflow___Pyx_PyLong_As_uint64_t(); + return __Pyx_raise_neg_overflow___Pyx_PyLong_As_PY_LONG_LONG(); raise_overflow: - return __Pyx_raise_overflow___Pyx_PyLong_As_uint64_t(); + return __Pyx_raise_overflow___Pyx_PyLong_As_PY_LONG_LONG(); #endif } -static uint64_t __Pyx_NonPyLong___Pyx_PyLong_As_uint64_t(PyObject *x) { - uint64_t val; +static PY_LONG_LONG __Pyx_NonPyLong___Pyx_PyLong_As_PY_LONG_LONG(PyObject *x) { + PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Long(x); - if (!tmp) return (uint64_t) -1; - val = __Pyx_PyLong_As_uint64_t(tmp); + if (!tmp) return (PY_LONG_LONG) -1; + val = __Pyx_PyLong_As_PY_LONG_LONG(tmp); Py_DECREF(tmp); return val; } -static CYTHON_INLINE uint64_t __Pyx_PyLong_As_uint64_t(PyObject *x) { +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyLong_As_PY_LONG_LONG(PyObject *x) { if (likely(PyLong_Check(x))) { - return __Pyx_PyLong___Pyx_PyLong_As_uint64_t(x); + return __Pyx_PyLong___Pyx_PyLong_As_PY_LONG_LONG(x); } else { - return __Pyx_NonPyLong___Pyx_PyLong_As_uint64_t(x); + return __Pyx_NonPyLong___Pyx_PyLong_As_PY_LONG_LONG(x); } } @@ -24189,6 +24195,386 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int8_t(int8_t value) { } } +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PY_LONG_LONG(PY_LONG_LONG value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = (PY_LONG_LONG) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(PY_LONG_LONG) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(PY_LONG_LONG) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(PY_LONG_LONG), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL, *from_bytes_str = NULL;; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(PY_LONG_LONG)); + if (!py_bytes) goto limited_bad; + from_bytes_str = PyUnicode_FromStringAndSize("from_bytes", 10); + if (!from_bytes_str) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[] = { (PyObject*)&PyLong_Type, py_bytes, order_str, Py_True }; + if (!is_unsigned) { + PyObject *signed_str = PyUnicode_FromStringAndSize("signed", 6); + if (!signed_str) goto limited_bad; +#if CYTHON_VECTORCALL + kwds = PyTuple_Pack(1, signed_str); +#else + { + PyObject *keys[] = {signed_str}; + PyObject *values[] = {Py_True}; + kwds = __Pyx_MakeKwargDict(keys, values, 1); + } +#endif + Py_DECREF(signed_str); + if (unlikely(!kwds)) goto limited_bad; + } + result = __Pyx_Object_VectorcallMethodKwds(from_bytes_str, args, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes_str); + return result; +#endif + } +} + +/* CIntFromPy */ +static uint64_t __Pyx_LargePyLong___Pyx_PyLong_As_uint64_t(PyObject *x); +static uint64_t __Pyx_raise_neg_overflow___Pyx_PyLong_As_uint64_t(void) { + const char* type_name = "uint64_t"; + PyErr_Format(PyExc_OverflowError, + "can't convert negative value to %.200s", type_name); + return (uint64_t) -1; +} +static uint64_t __Pyx_raise_overflow___Pyx_PyLong_As_uint64_t(void) { + const char* type_name = "uint64_t"; + PyErr_Format(PyExc_OverflowError, + "value too large to convert to %.200s", type_name); + return (uint64_t) -1; +} +static CYTHON_INLINE uint64_t __Pyx_PyULong___Pyx_PyLong_As_uint64_t(PyObject *x) { + const int is_unsigned = 1; +#if CYTHON_USE_PYLONG_INTERNALS + { + const digit* digits = __Pyx_PyLong_Digits(x); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(x); + if (size == 2 && (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) >= 2 * PyLong_SHIFT)) { + return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); + } + } else + if (size == 3 && (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) >= 3 * PyLong_SHIFT)) { + return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); + } + } else + if (size == 4 && (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) >= 4 * PyLong_SHIFT)) { + return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); + } + } else + {} + } +#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (uint64_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(uint64_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + return __Pyx_LargePyLong___Pyx_PyLong_As_uint64_t(x); +raise_neg_overflow: + return __Pyx_raise_neg_overflow___Pyx_PyLong_As_uint64_t(); +raise_overflow: + return __Pyx_raise_overflow___Pyx_PyLong_As_uint64_t(); +} +static CYTHON_INLINE uint64_t __Pyx_PySLong___Pyx_PyLong_As_uint64_t(PyObject *x) { + const int is_unsigned = 0; +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsNeg(x)) { + const Py_ssize_t size = __Pyx_PyLong_DigitCount(x); + const digit* digits = __Pyx_PyLong_Digits(x); + if (size == 2 && (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + long ival = - (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + __PYX_VERIFY_RETURN_INT(uint64_t, long, ival) + } else if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) { + return (uint64_t) (((uint64_t) -1) * (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); + } + } else + if (size == 3 && (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + long ival = - (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + __PYX_VERIFY_RETURN_INT(uint64_t, long, ival) + } else if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) { + return (uint64_t) (((uint64_t) -1) * (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); + } + } else + if (size == 4 && (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) { + long ival = - (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + __PYX_VERIFY_RETURN_INT(uint64_t, long, ival) + } else if ((8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT)) { + return (uint64_t) (((uint64_t) -1) * (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); + } + } else + {} + } else { + const Py_ssize_t size = __Pyx_PyLong_DigitCount(x); + const digit* digits = __Pyx_PyLong_Digits(x); + if (size == 2 && (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) { + return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); + } + } else + if (size == 3 && (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) { + return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); + } + } else + if (size == 4 && (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT)) { + return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); + } + } else + {} + } +#endif + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + if ((sizeof(uint64_t) <= sizeof(int)) && (sizeof(int) < sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(uint64_t, int, PyLong_AsInt(x)) + } else + #endif + if ((sizeof(uint64_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(uint64_t, long, PyLong_AsLong(x)) + } else if ((sizeof(uint64_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(uint64_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + return __Pyx_LargePyLong___Pyx_PyLong_As_uint64_t(x); +raise_neg_overflow: + return __Pyx_raise_neg_overflow___Pyx_PyLong_As_uint64_t(); +raise_overflow: + return __Pyx_raise_overflow___Pyx_PyLong_As_uint64_t(); +} +static uint64_t __Pyx_LargePyLong___Pyx_PyLong_As_uint64_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + uint64_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); + if ((0)) goto raise_overflow; +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (uint64_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (uint64_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to uint64_t"); + return (uint64_t) -1; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (uint64_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (uint64_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(uint64_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((uint64_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(uint64_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((uint64_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((uint64_t) 1) << (sizeof(uint64_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; +done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (uint64_t) -1; + return val; +raise_overflow: + return __Pyx_raise_overflow___Pyx_PyLong_As_uint64_t(); +} +static CYTHON_INLINE uint64_t __Pyx_PyLong___Pyx_PyLong_As_uint64_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + #if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(uint64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else + #endif + { + return __Pyx_PyULong___Pyx_PyLong_As_uint64_t(x); + } + } else { + #if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(uint64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else + #endif + { + return __Pyx_PySLong___Pyx_PyLong_As_uint64_t(x); + } + } +#if CYTHON_USE_PYLONG_INTERNALS +raise_neg_overflow: + return __Pyx_raise_neg_overflow___Pyx_PyLong_As_uint64_t(); +raise_overflow: + return __Pyx_raise_overflow___Pyx_PyLong_As_uint64_t(); +#endif +} +static uint64_t __Pyx_NonPyLong___Pyx_PyLong_As_uint64_t(PyObject *x) { + uint64_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (uint64_t) -1; + val = __Pyx_PyLong_As_uint64_t(tmp); + Py_DECREF(tmp); + return val; +} +static CYTHON_INLINE uint64_t __Pyx_PyLong_As_uint64_t(PyObject *x) { + if (likely(PyLong_Check(x))) { + return __Pyx_PyLong___Pyx_PyLong_As_uint64_t(x); + } else { + return __Pyx_NonPyLong___Pyx_PyLong_As_uint64_t(x); + } +} + /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC diff --git a/cubiomes/_wrapper.cpython-312-aarch64-linux-gnu.so b/cubiomes/_wrapper.cpython-312-aarch64-linux-gnu.so index 08926d3..d10ee12 100755 Binary files a/cubiomes/_wrapper.cpython-312-aarch64-linux-gnu.so and b/cubiomes/_wrapper.cpython-312-aarch64-linux-gnu.so differ diff --git a/cubiomes/_wrapper.pyx b/cubiomes/_wrapper.pyx index 2892037..7dbf474 100644 --- a/cubiomes/_wrapper.pyx +++ b/cubiomes/_wrapper.pyx @@ -13,7 +13,7 @@ cimport _cubiomes as cb from libc.stdlib cimport malloc, free from libc.string cimport memcpy -from libc.stdint cimport uint64_t, uint32_t, int16_t, uint8_t +from libc.stdint cimport uint64_t, int64_t, uint32_t, int16_t, uint8_t from cpython.array cimport array, clone import array as _array_module @@ -88,7 +88,7 @@ cdef class Generator: # ── core methods ────────────────────────────────────────────────────────── - def apply_seed(self, int dim, uint64_t seed): + def apply_seed(self, int dim, long long seed): """Bind a world seed and dimension to the generator. Must be called before any biome generation. @@ -100,7 +100,7 @@ cdef class Generator: * ``DIM_END = +1`` seed (int): 64-bit world seed. """ - cb.applySeed(self._g, dim, seed) + cb.applySeed(self._g, dim, seed) def get_biome_at(self, int x, int y, int z, int scale=4) -> int: """Get the biome ID at a single position. @@ -274,7 +274,7 @@ cdef class Generator: return result def check_for_biomes(self, int x, int z, int sx, int sz, - int scale, int dim, uint64_t seed, + int scale, int dim, long long seed, BiomeFilter biome_filter, int y=0, int sy=1): """Test whether a region satisfies a biome filter. @@ -304,7 +304,7 @@ cdef class Generator: r.y = y r.sy = sy return cb.checkForBiomes( - self._g, NULL, r, dim, seed, &biome_filter._bf, NULL) + self._g, NULL, r, dim, seed, &biome_filter._bf, NULL) # ─── BiomeFilter ───────────────────────────────────────────────────────────── @@ -384,9 +384,9 @@ cdef class StrongholdIterator: cdef bint _has_current cdef bint _has_more - def __cinit__(self, Generator gen, uint64_t seed48): + def __cinit__(self, Generator gen, long long seed48): self._gen = gen - cb.initFirstStronghold(&self._sh, gen.mc, seed48) + cb.initFirstStronghold(&self._sh, gen.mc, seed48) cdef int remaining = cb.nextStronghold( &self._sh, gen._g if gen is not None else NULL) self._has_current = True @@ -512,7 +512,7 @@ def get_structure_config(int struct_type, int mc): } -def get_structure_pos(int struct_type, int mc, uint64_t seed, +def get_structure_pos(int struct_type, int mc, long long seed, int reg_x, int reg_z): """Find the block position of a structure attempt in a region. @@ -532,7 +532,7 @@ def get_structure_pos(int struct_type, int mc, uint64_t seed, if no valid attempt exists in this region. """ cdef cb.Pos pos - if not cb.getStructurePos(struct_type, mc, seed, reg_x, reg_z, &pos): + if not cb.getStructurePos(struct_type, mc, seed, reg_x, reg_z, &pos): return None return (pos.x, pos.z) @@ -573,7 +573,7 @@ def is_viable_feature_biome(int mc, int struct_type, int biome_id) -> bool: return bool(cb.isViableFeatureBiome(mc, struct_type, biome_id)) -def get_variant(int struct_type, int mc, uint64_t seed, +def get_variant(int struct_type, int mc, long long seed, int block_x, int block_z, int biome_id=-1): """Retrieve variant information (rotation, size, flags) for a structure. @@ -590,13 +590,13 @@ def get_variant(int struct_type, int mc, uint64_t seed, StructureVariant | None """ cdef StructureVariant sv = StructureVariant.__new__(StructureVariant) - if not cb.getVariant(&sv._sv, struct_type, mc, seed, + if not cb.getVariant(&sv._sv, struct_type, mc, seed, block_x, block_z, biome_id): return None return sv -def iter_strongholds(Generator gen, uint64_t seed48): +def iter_strongholds(Generator gen, long long seed48): """Return an iterator that yields stronghold positions in order. Each value is an accurate ``(x, z)`` block coordinate pair obtained @@ -620,7 +620,7 @@ def iter_strongholds(Generator gen, uint64_t seed48): return StrongholdIterator(gen, seed48) -def init_first_stronghold(int mc, uint64_t seed48): +def init_first_stronghold(int mc, long long seed48): """Return the approximate position of the first stronghold (no biome check). This is faster than :func:`iter_strongholds` but accurate only to ±112 @@ -634,11 +634,11 @@ def init_first_stronghold(int mc, uint64_t seed48): tuple[int, int]: Approximate ``(x, z)`` block coordinates. """ cdef cb.StrongholdIter sh - cdef cb.Pos pos = cb.initFirstStronghold(&sh, mc, seed48) + cdef cb.Pos pos = cb.initFirstStronghold(&sh, mc, seed48) return (pos.x, pos.z) -def get_mineshafts(int mc, uint64_t seed, +def get_mineshafts(int mc, long long seed, int chunk_x, int chunk_z, int chunk_w, int chunk_h, int max_count=1024): @@ -658,7 +658,7 @@ def get_mineshafts(int mc, uint64_t seed, if out is NULL: raise MemoryError() cdef int n = cb.getMineshafts( - mc, seed, chunk_x, chunk_z, chunk_w, chunk_h, out, max_count) + mc, seed, chunk_x, chunk_z, chunk_w, chunk_h, out, max_count) result = [(out[i].x, out[i].z) for i in range(n)] free(out) return result @@ -686,7 +686,7 @@ def setup_biome_filter(int mc, return BiomeFilter(mc, required, excluded, match_any, flags) -def is_slime_chunk(uint64_t seed, int chunk_x, int chunk_z) -> bool: +def is_slime_chunk(long long seed, int chunk_x, int chunk_z) -> bool: """Return True if the given chunk spawns slimes at any light level. Args: @@ -696,10 +696,10 @@ def is_slime_chunk(uint64_t seed, int chunk_x, int chunk_z) -> bool: Returns: bool """ - return bool(cb.isSlimeChunk(seed, chunk_x, chunk_z)) + return bool(cb.isSlimeChunk(seed, chunk_x, chunk_z)) -def get_shadow(uint64_t seed) -> int: +def get_shadow(long long seed) -> int: """Compute the shadow seed for a given world seed. The shadow seed produces mirrored structure positions. @@ -710,10 +710,10 @@ def get_shadow(uint64_t seed) -> int: Returns: int: Shadow seed. """ - return cb.getShadow(seed) + return cb.getShadow(seed) -def move_structure(uint64_t base_seed, int reg_x, int reg_z) -> int: +def move_structure(long long base_seed, int reg_x, int reg_z) -> int: """Translate a base seed so that structures shift by ``(reg_x, reg_z)`` regions. Useful for finding quad-witch-hut or quad-monument base seeds. @@ -725,10 +725,10 @@ def move_structure(uint64_t base_seed, int reg_x, int reg_z) -> int: Returns: int: Translated seed (lower 48 bits). """ - return cb.moveStructure(base_seed, reg_x, reg_z) + return cb.moveStructure(base_seed, reg_x, reg_z) -def chunk_generate_rnd(uint64_t world_seed, +def chunk_generate_rnd(long long world_seed, int chunk_x, int chunk_z) -> int: """Compute the chunk-generation random seed used for caves/structures. @@ -739,10 +739,10 @@ def chunk_generate_rnd(uint64_t world_seed, Returns: int: 64-bit random seed. """ - return cb.chunkGenerateRnd(world_seed, chunk_x, chunk_z) + return cb.chunkGenerateRnd(world_seed, chunk_x, chunk_z) -def get_population_seed(int mc, uint64_t world_seed, +def get_population_seed(int mc, long long world_seed, int x, int z) -> int: """Return the population seed for a given chunk (block) position. @@ -754,7 +754,7 @@ def get_population_seed(int mc, uint64_t world_seed, Returns: int: 64-bit population seed. """ - return cb.getPopulationSeed(mc, world_seed, x, z) + return cb.getPopulationSeed(mc, world_seed, x, z) # ─── Biome property helpers ─────────────────────────────────────────────────── diff --git a/dist/active_cubiomes-0.1.0-cp312-cp312-linux_aarch64.whl b/dist/active_cubiomes-0.1.0-cp312-cp312-linux_aarch64.whl deleted file mode 100644 index d9e5e68..0000000 Binary files a/dist/active_cubiomes-0.1.0-cp312-cp312-linux_aarch64.whl and /dev/null differ diff --git a/dist/active_cubiomes-0.1.0.tar.gz b/dist/active_cubiomes-0.1.0.tar.gz deleted file mode 100644 index a17c1da..0000000 Binary files a/dist/active_cubiomes-0.1.0.tar.gz and /dev/null differ diff --git a/pyproject.toml b/pyproject.toml index 665d38c..3529585 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "active_cubiomes" -version = "0.1.0" +version = "0.2.0" description = "Python/Cython bindings for cubiomes — fast Minecraft biome and structure generator" readme = "README.md" requires-python = ">=3.8" diff --git a/setup.py b/setup.py index 805fdbd..4f05182 100644 --- a/setup.py +++ b/setup.py @@ -65,7 +65,7 @@ ext = Extension( setup( name="active_cubiomes", - version="0.1.0", + version="0.2.0", description=( "Python/Cython bindings for cubiomes — " "fast Minecraft biome and structure generator"