Skip to content

Conversation

@louis-e
Copy link
Owner

@louis-e louis-e commented Jan 1, 2026

No description provided.

@louis-e louis-e requested a review from Copilot January 1, 2026 16:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses two distinct issues in the world editor: handling out-of-bounds Y coordinates and ensuring the region directory exists before creating region files.

Key Changes:

  • Clamps Y coordinates to Minecraft's valid range (-64 to 319) in block accessor/mutator methods to prevent TryFromIntError panics
  • Adds directory existence check and creation logic for the region directory before writing region files

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
src/world_editor/common.rs Added MIN_Y/MAX_Y constants and clamping logic to get_block, set_block, and set_block_with_properties methods; replaced try_into().unwrap() with as casts
src/world_editor/java.rs Added logic to ensure the region directory exists before creating region files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

github-actions bot commented Jan 1, 2026

⏱️ Benchmark run finished in 0m 34s
🧠 Peak memory usage: 865 MB

📈 Compared against baseline: 30s
🧮 Delta: 4s
🔢 Commit: c055f09

🟢 Generation time is unchanged.

📅 Last benchmark: 2026-01-01 16:46:15 UTC

You can retrigger the benchmark by commenting retrigger-benchmark.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@louis-e louis-e merged commit 54a7a4f into main Jan 1, 2026
2 checks passed
@louis-e louis-e deleted the world-editor-crash-robustness branch January 1, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants