Commit Graph

1428 Commits

Author SHA1 Message Date
louis-e
1e87ff53ca Address code review 2026-02-10 20:26:13 +01:00
louis-e
6c67610bd0 Address code review 2026-02-10 20:02:35 +01:00
louis-e
cd7e3363e7 Add fence around cemetery 2026-02-10 19:32:48 +01:00
louis-e
614da8da7c Address code review feedback 2026-02-10 19:20:52 +01:00
louis-e
7d907208d1 Remove artifact 2026-02-09 23:17:29 +01:00
louis-e
f9c009c173 Add pyramids 2026-02-09 23:13:53 +01:00
louis-e
dfe799bac0 Fix cargo fmt 2026-02-09 22:56:33 +01:00
louis-e
57a44500f4 Fix building part handling for type=building vs type=multipolygon relations
- Restrict Part role parsing to type=building relations only; multipolygon
  relations now always render their Outer members normally (osm_parser.rs)
- Suppress outline ways only for type=building relations with actual Part
  members, not for multipolygon building relations (data_processing.rs)
- Match the same type=building guard in generate_building_from_relation
  so multipolygon outlines are no longer incorrectly skipped (buildings.rs)
- Normalize polygon winding order in flood fill to fix undefined
  geo::Contains results that caused empty building interiors (floodfill.rs)
2026-02-09 22:54:45 +01:00
louis-e
8514a07fca Properly parse building parts 2026-02-09 21:25:46 +01:00
Louis Erbkamm
ea9f11d427 Merge pull request #747 from louis-e/memory-optimization-blockstorage-floodfill
perf: reduce peak RAM via BlockStorage enum, flood fill bitmap, and ground generation optimization
2026-02-09 20:11:01 +01:00
louis-e
882b18410e fix: clear stale properties in SectionToModify::set_block
set_block now removes any leftover per-index properties, matching
the behaviour of set_block_with_properties and preventing stale
NBT data from leaking into serialization or blocking compaction.
2026-02-09 19:50:05 +01:00
louis-e
0c083b3b82 fix: remove dead fill_blocks_absolute and unused compacted counter
- Delete fill_blocks_absolute (zero call sites, was lint-suppressed)
- Simplify compact_sections by removing the dead counter
2026-02-09 19:43:32 +01:00
louis-e
674591945f fix: gate Uniform fast path on empty properties, remove eprintln, reword doc comment
- to_section() Uniform fast path now gated on self.properties.is_empty()
  so per-index properties are never silently dropped
- Remove compact_sections() eprintln! that polluted stderr in normal operation
- Reword set_block_if_absent_absolute doc to clarify it checks the
  in-memory overlay, not the on-disk world
2026-02-09 19:34:21 +01:00
louis-e
c5e5239062 fix: correct doc comment and clear stale properties in fast paths
- Change 'three cases' to 'two cases' in BlockStorage doc comment
  (only Uniform and Full variants exist)
- Clear stale properties via properties.remove(&idx) in
  set_block_if_absent() and fill_column() after writing a block,
  so leftover NBT metadata from a previous block does not persist
2026-02-09 19:23:34 +01:00
louis-e
e22a1b4f73 refactor: use MIN_Y/MAX_Y constants instead of hardcoded -64/319 in set_block_if_absent and fill_column 2026-02-09 19:10:41 +01:00
louis-e
67a14a7f4b perf: reduce peak RAM via BlockStorage enum, flood fill bitmap, and ground generation optimization
- Replace inline [Block; 4096] section arrays with BlockStorage enum:
  Uniform(Block) for homogeneous sections (1 byte vs 4 KiB),
  Full(Vec<Block>) for mixed sections (heap-allocated, small inline footprint).
  Saves ~200-500 MB for typical worlds.

- Call compact_sections() before save to collapse Full sections that
  became uniform (e.g. all-STONE from --fillground) back to Uniform.

- Replace HashSet<(i32,i32)> in flood fill with FloodBitmap (1 bit per coord).
  ~400x memory reduction: e.g. 48 MB -> 122 KB for 1000x1000 polygon.

- Add set_block_if_absent() to avoid double HashMap traversal in
  ground generation (get_block + set_block -> single pass).

- Add fill_column() for efficient underground fill: resolves region/chunk
  once per column instead of per Y-level (~6x fewer HashMap lookups).

- Wire optimized methods into ground generation loop in data_processing.rs.
2026-02-09 18:58:35 +01:00
Louis Erbkamm
230d233737 Merge pull request #689 from MysaaJava/main
Fixed nix flake
2026-02-09 16:30:33 +01:00
Louis Erbkamm
b975ea19d7 Merge pull request #746 from louis-e/security-updates-dependabot
chore: merge all dependency upgrades and fix critical security vulnerability
2026-02-09 15:25:52 +01:00
louis-e
e4939dc4bb fix: resolve rand 0.9 deprecation warnings
- Replace deprecated gen::<T>() calls with random::<T>() in deterministic_rng tests
- Suppress dead_code warnings for bedrock-only fields with conditional compilation
- Note: bedrockrs dependencies currently pull jsonwebtoken 9.3.1 transitively
  - This will be resolved when bedrockrs updates their jsonwebtoken dependency
  - Direct dependency on jsonwebtoken 10.3.0 is in place for non-bedrock code paths
2026-02-09 15:06:52 +01:00
louis-e
11d624e734 fix: resolve rand 0.9 deprecation warnings and fix jsonwebtoken CVE
- Replace deprecated gen::<T>() calls with random::<T>() in deterministic_rng tests
- Disable bedrock feature by default to prevent transitive jsonwebtoken 9.3.1 dependency
- This ensures jsonwebtoken CVE-2026-25537 fix is complete (no version downgrade via bedrock deps)
- Users can still enable bedrock feature with: cargo build --release --features bedrock
2026-02-09 14:43:49 +01:00
louis-e
d1d3bf22c5 chore: upgrade dependencies and fix CVE-2026-25537
- Upgrade jsonwebtoken from 9.3.1 to 10.3.0 (fixes CVE-2026-25537 Type Confusion vulnerability allowing authorization bypass)
- Upgrade rand from 0.8.5 to 0.9.1 with updated API calls
- Upgrade rand_chacha to 0.9 for compatibility with rand 0.9
- Upgrade clap to 4.5.53
- Upgrade windows to 0.62.0
- Update all rand API usages: gen() -> random(), gen_range() -> random_range(), gen_bool() -> random_bool()
- Update trait imports to use IndexedRandom and SliceRandom as needed
- Enable std and std_rng features for rand
2026-02-09 14:31:39 +01:00
Louis Erbkamm
489e571a42 Merge pull request #745 from louis-e/security-updates-dependabot
security: Update time to 0.3.47 and reqwest to 0.13.2 (Dependabot fixes)
2026-02-09 14:05:18 +01:00
louis-e
67e22a574a security: Update time to 0.3.47 and reqwest to 0.13.2
- Update time from 0.3.37 to 0.3.47
  - Fixes stack exhaustion DoS vulnerability in RFC 2822 parsing (CVE-2026-XXXX)
  - Adds recursion depth tracking to prevent unbounded recursion

- Update reqwest from 0.12.15 to 0.13.2
  - Switch TLS backend from native-tls to rustls with aws-lc crypto provider
  - Improves TLS security and platform compatibility
  - Add 'query' feature to maintain URL query parameter functionality

- Update related dependencies:
  - time-core 0.1.2 -> 0.1.8
  - time-macros 0.2.19 -> 0.2.27
  - deranged 0.3.11 -> 0.5.5
  - num-conv 0.1.0 -> 0.2.0
  - hyper 1.5.2 -> 1.8.1
  - hyper-util 0.1.10 -> 0.1.19
  - rustls 0.23.20 -> 0.23.36

Resolves Dependabot PRs #743 and #733
Tested: cargo check and cargo check --release pass successfully
2026-02-09 14:03:31 +01:00
Louis Erbkamm
c094db8464 Merge pull request #744 from louis-e/logic-changes-and-fixes
Logic changes and fixes
2026-02-09 12:41:40 +01:00
louis-e
9be9104c8d Address code review feedback 2026-02-09 12:38:10 +01:00
louis-e
8c0f0cc366 Address code review feedback 2026-02-09 11:55:53 +01:00
louis-e
403469dcb5 Address code review feedback 2026-02-09 11:44:40 +01:00
louis-e
e0674823fd Address code review feedback 2026-02-09 00:19:23 +01:00
louis-e
438328ec28 Address code review feedback 2026-02-08 23:09:23 +01:00
louis-e
d2a8f09487 Refactor world saving logic 2026-02-08 22:59:16 +01:00
louis-e
318ab1e26c Add floodfill limit 2026-02-08 21:56:12 +01:00
Louis Erbkamm
6adb8d050e Merge pull request #742 from louis-e/buildings-improvement
Buildings improvement
2026-02-08 19:43:17 +01:00
louis-e
0cc32e70b9 Fix minor details 2026-02-08 19:43:04 +01:00
louis-e
ed07de68a6 Fix balcony chair facing direction 2026-02-08 19:35:48 +01:00
louis-e
0fda04f2be Address code review feedback 2026-02-08 18:29:22 +01:00
louis-e
8598a1847b Address code review feedback 2026-02-08 18:19:03 +01:00
Louis Erbkamm
2422786607 Merge pull request #738 from louis-e/dependabot/cargo/cargo-f6ecf5c85a
Bump bytes from 1.9.0 to 1.11.1 in the cargo group across 1 directory
2026-02-08 18:17:32 +01:00
louis-e
4e2d886077 Address code review feedback 2026-02-08 17:22:53 +01:00
louis-e
4299863410 Address code review feedback 2026-02-08 16:57:54 +01:00
louis-e
b316f95030 Add balconies 2026-02-08 16:37:18 +01:00
louis-e
7cc53434a7 Window sills and shutters 2026-02-08 15:20:56 +01:00
louis-e
6bd17c937d Add more building structs and flat roof variety 2026-02-07 20:42:16 +01:00
louis-e
cf198f9e93 Add more tree variations 2026-02-07 17:20:17 +01:00
louis-e
bedf2b763a Address code review feedback 2026-02-07 15:50:43 +01:00
louis-e
02823134df Fix cargo fmt and clippy 2026-02-07 14:18:32 +01:00
louis-e
36e1c04e6f Add more predefined building structs 2026-02-07 14:11:02 +01:00
louis-e
333ed52e28 Add place tag handling 2026-02-07 01:02:11 +01:00
louis-e
e9c8f203a7 Don't use oak planks for building material 2026-02-07 00:56:57 +01:00
louis-e
87069665fe Improve coverage of roof generation 2026-02-07 00:40:29 +01:00
louis-e
5bfb8606e2 Initial changes for improving buildings 2026-02-06 23:12:01 +01:00