Skip to content

Map Minecraft 26.1+ dimension paths to legacy DIM types#109

Open
derek-keeler wants to merge 6 commits into
GregoryAM-SP:mainfrom
derek-keeler:dek/handle-mc-26.1
Open

Map Minecraft 26.1+ dimension paths to legacy DIM types#109
derek-keeler wants to merge 6 commits into
GregoryAM-SP:mainfrom
derek-keeler:dek/handle-mc-26.1

Conversation

@derek-keeler

Copy link
Copy Markdown
Contributor

Minecraft 26.1 moved region files from /region/ to /dimensions/minecraft/overworld/region/ (and similarly for nether and end). This adds a mapping so RegionSet correctly identifies the new paths as DIM0, DIM-1, and DIM1.

Fix cross-platform test mocking for resolve_world_path tests

@derek-keeler

Copy link
Copy Markdown
Contributor Author

Fixes #106

@derek-keeler

Copy link
Copy Markdown
Contributor Author

Also seems to fix #107

@derek-keeler

Copy link
Copy Markdown
Contributor Author

@Gregory-AM @greatmastermario any chance we can get this merged? I have other incoming fixes that rely on this...

@stwalkerster stwalkerster left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks mostly good to me (though I've not tested it), with one request to swap how we handle backwards compatibility.

Comment thread overviewer_core/world.py
os.path.normpath("dimensions/minecraft/the_nether"): "DIM-1",
os.path.normpath("dimensions/minecraft/the_end"): "DIM1",
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it's worth us not trying to squeeze the new dimension locations into the old code, but rather take this opportunity to move the other way and just update to the new dimension locations with a backwards compat layer which transcribes old to new.

From what I can tell, self.type is only used in log messages (which I don't care about) and a little bit of logic in genPOI.py (L308, L41) to turn this into the namespaced name, so I don't think this'll be a huge change and kills a bit of tech debt instead of adding to it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Understood - I'll work this out this weekend. Thanks for the feedback, I agree with you.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Apologies for the massive delay. Life got lifin'

Swapped namespaces to start from 26.0+ perspective.

Tested that it works with:

  Ubuntu 22.04 (stock - Python 3.12) / Windows 11 render results

  ┌──────────────┬────────────┬────────────────────────┬──────────────────────────┬───────┬─────────┐
  │    World     │ MC version │         Layout         │        Dimensions        │ Tiles │ Result  │
  ├──────────────┼────────────┼────────────────────────┼──────────────────────────┼───────┼─────────┤
  │ Derek-Single │ 1.21.11    │ legacy (region, DIM*)  │ overworld                │ 2244  │ ✅ 100% │
  ├──────────────┼────────────┼────────────────────────┼──────────────────────────┼───────┼─────────┤
  │ Tester       │ 26.1       │ dimensions/minecraft/* │ overworld + nether + end │ 7120  │ ✅ 100% │
  ├──────────────┼────────────┼────────────────────────┼──────────────────────────┼───────┼─────────┤
  │ GiveEr26_2   │ 26.2       │ dimensions/minecraft/* │ overworld + nether + end │ 7074  │ ✅ 100% │
  └──────────────┴────────────┴────────────────────────┴──────────────────────────┴───────┴─────────┘

derek-keeler and others added 4 commits April 9, 2026 10:16
Minecraft 26.1 moved region files from <world>/region/ to <world>/dimensions/minecraft/overworld/region/ (and similarly for nether and end). This adds a mapping so RegionSet correctly identifies the new paths as DIM0, DIM-1, and DIM1.

Fix cross-platform test mocking for resolve_world_path tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use the canonical names from MC 26.1+ instead of old style DIM naming

- Fix numpy issue with uin64/-ve integers
@derek-keeler

Copy link
Copy Markdown
Contributor Author

Seems that Windows is not affected, but there is some issue with upgrading numpy to whatever version ships with the various current LTS Ubuntu versions. I'm working through that right now. If the change is worthwhile I'll push it here as well, but from what I can see it's easy to work around the problems with numpy anyways.

…h Windows.

- numpy: remove setup's use of errors for declaration-after-statement

  - Not required for 1.x, and must be left out for 2.x

  - also, relax hard requirement on numpy 1.24 to support Ubuntu 26

- Pillow v9-12 must be supported between Ubuntu versions (26.04 needs 12 support)

  - Imaging* functions renamed to ov_* - Pillow 12 declares these in its header

  - added support in composite.c/overviewer.c across Pillow versions (OV_MODE_IS macro, IMAGENING_MODE_* enum)

Coauthored by Claude
@derek-keeler

Copy link
Copy Markdown
Contributor Author

Ah yeah, setup.py enforces -Werror-declaration-after-statement which would break numpy 2.x and isn't strictly necessary for numpy 1.x. Removed that, relaxed the dependencies to support numpy 2.x in Ubuntu 26, and made some compatibility updates for Pillow versions that ship with the Ubuntu versions 22, 24, and 26.

Tested across all three Ubuntu versions, with their shipped versions of Python, and on Windows 11 with Python 3.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