Commit 217e11c
authored
Fixes #793
Problem
NetherPortalBlockMixin applies the dimension coordinate multiplier (8x
for Nether→Overworld, 0.125x for Overworld→Nether) to all three axes (X,
Y, Z) when calculating the portal destination target position. Vanilla
Minecraft only scales X and Z — the Y coordinate is never scaled by the
dimension multiplier.
This causes the portal search target to have a wildly incorrect Y value
(e.g., Y=118 becomes Y=944 when going Nether→Overworld), resulting in
the game selecting the wrong destination portal.
Fix
Remove * multiplier from the Y coordinate in the clampToBounds call
(line 31 of NetherPortalBlockMixin.java).
Tested
Verified fix resolves the issue in both singleplayer and multiplayer.
Portal linking now correctly selects the closest portal by Euclidean
distance, matching vanilla behavior.
1 parent c5e4737 commit 217e11c
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
0 commit comments