fix: patch mineflayer dimension type lookup for proxy/modded servers#535
fix: patch mineflayer dimension type lookup for proxy/modded servers#535arraytad wants to merge 1 commit intozardoy:nextfrom
Conversation
Backport upstream PrismarineJS/mineflayer fix. The game plugin used packet.worldName (world name) for the dimension registry lookup, but the registry stores dimension types (overworld, the_nether, the_end). On vanilla servers these are the same, but on proxy/modded servers the world name can differ (e.g. "bskyblock_world"), causing the lookup to fail and minY/height to default to 0/256 instead of -64/384. This shifted all chunk geometry up by 64 blocks, making terrain invisible. Fix uses packet.worldType (login) or packet.dimension (respawn) — the actual dimension type — for the lookup instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe changes introduce a new pnpm patch for mineflayer that modifies dimension assignment logic in the game plugin, updating it to prefer Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thanks! Forgot to take care of it yesterday, will resolve it within a few hours |
no rush! I'm also not confident this is really the best solution, since it turns out it was fixed in upstream mineflayer, maybe the better solution is to update, but that's a big undertaking, and you might have forked it due to other issues... |
Summary
Root cause
In Minecraft 1.19+, login/respawn packets have two separate fields:
On vanilla servers these are the same value, but on proxy/modded servers they differ. The fork's mineflayer used the world name for the registry lookup, which failed for custom world names, causing chunk data to be parsed with wrong world height parameters.
Summary by CodeRabbit
Release Notes
Chores
Bug Fixes