Commit 6d5d3ae
Fix dimension type lookup for 1.19-1.20.4 on proxy/modded servers (#3822)
* Fix dimension type lookup for 1.19-1.20.4 on proxy/modded servers
For versions 1.19-1.20.4, the dimension codec lookup used worldName
(the world/level name) instead of the dimension TYPE name. On vanilla
servers these are identical, but on proxy or modded servers they can
differ (e.g. world "lobby" with dimension type "overworld"), causing
the lookup to fail and leaving minY=0, height=256 as incorrect defaults.
Use the correct field for the dimension type: "worldType" from login
packets, "dimension" from respawn packets. Also removes a dead-code
fallback that was guarded by a condition that could never be true.
* Add test for dimension type lookup on proxy/modded servers (1.19-1.20.4)
Verifies that the bot uses worldType (dimension type) instead of
worldName (level name) for the dimension codec lookup, which fixes
issues on proxy/modded servers where these values differ.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add external test for dimension data after spawn and respawn
Verifies that bot.game.dimension, minY, and height are correctly
populated from the dimension codec on initial spawn and after respawn.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Remove respawn sub-test from dimensionData external test
The /kill command used in the respawn test triggers "moved too quickly"
warnings that can cascade into failures in subsequent tests. The
dimension data correctness after spawn is already validated, and the
internal test covers the proxy/modded server lookup scenario.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Simeon Kummer <simeon@hitthecode.de>
Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent dc5c91a commit 6d5d3ae
3 files changed
Lines changed: 73 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
51 | 62 | | |
52 | 63 | | |
53 | 64 | | |
| |||
60 | 71 | | |
61 | 72 | | |
62 | 73 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | 74 | | |
69 | 75 | | |
70 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
490 | 490 | | |
491 | 491 | | |
492 | 492 | | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
493 | 523 | | |
494 | 524 | | |
495 | 525 | | |
| |||
0 commit comments