Fix critical structural issues: undo/redo, surface import, brush strength, i18n macro, level.dat export, GPU fallback, Nether/End support, dead code removal, dim serde, CPU perf, wasm-host, GPU constants, clippy warnings

- Replace OnceLock with Mutex<Option> for snapshot system in all 9 operations (undo/redo now works after redo)
- Fix import surface detection: scan actual packed block data for highest solid block instead of always using +15
- Apply brush strength threshold (< 0.3) in PaintOperation for natural edge falloff
- Remove broken t!() macro variant with variable substitution
- Complete level.dat with RandomSeed, GameType, Difficulty, Spawn, Time, DataPacks, etc.
- GPU viewport falls back to CPU renderer for multi-tile worlds
- Export supports Nether (DIM-1/region) and End (DIM1/region) dimension subdirectories
- Remove dead FloodOperation (duplicate of PaintOperation)
- Add log::warn for malformed dimension tile keys in serde
- Reduce CPU viewport base_size from 64 to 32 (4x fewer pixels)
- Simplify wasm-host host_get_seed to direct cast
- Add named constants for GPU buffer sizes
- Fix unused import warning in cli/main.rs
- cargo fmt
This commit is contained in:
loki5512344 2026-07-04 11:44:34 +02:00
parent 18613260a8
commit 2419b603c1
24 changed files with 339 additions and 271 deletions

View file

@ -46,11 +46,7 @@ fn host_log(mut caller: Caller<'_, WorldContext>, level: i32, ptr: i32, len: i32
}
fn host_get_seed(caller: Caller<'_, WorldContext>) -> i64 {
let (lo, hi) = (
(caller.data().seed & 0xFFFF_FFFF) as i64,
((caller.data().seed >> 32) & 0xFFFF_FFFF) as i64,
);
lo | (hi << 32)
caller.data().seed as i64
}
fn host_tile_size(_caller: Caller<'_, WorldContext>) -> i32 {