Chunky Border (Fabric)

Chunky Border (Fabric)

476k Downloads

World Wrap Teleports Players to Y level -63

SethHartman13 opened this issue ยท 7 comments

commented

Hello,

World Wrap teleports players to Y-level -63, below are the details. I have attached a video to allow you to see what is going on.

Chunky Border Version 1.2.24
Minecraft 1.21.4 Fabric

YouTube Video

commented

Also seeing the same problem, with wrap type both, and radial for sure
Chunky Border 1.2.18
Minecraft 1.21.1, Fabric

commented

Can confirm. Have been seeing this with both and radial as well.

commented

I dug into this a bit more. -129 is a lie and just something that is there because I was at 65 on the Y when I ported. It's actually just wrapping around what MC considers "zero" as far as valid coords go.

The actual relevant call is via the import:
https://github.com/pop4959/Chunky/blob/master/neoforge/src/main/java/org/popcraft/chunky/platform/NeoForgeWorld.java#L140

This reads as "While the player position is above -63 (world.getMinY()) move them down."

This is called over in https://mappings.dev/1.21.8/net/minecraft/world/level/LevelReader.html (was originally getMinBuildHeight but changed some point after 1.21.1 )

So we're iterating down through the height looking for a solid block and failing. I assumed originally because the chunk has yet to load when the call is made, but I'm not too sure.

commented

Can also confirm happening on a 1.21.1 Neoforge server.

It appears that we're actually seeing the code fail to find the height of the land in the chunk we're porting to and defaulting to -129.0 on the Y.

MooseTetrino moved too quickly! 1024.673943258153,-129.0,0.0

commented

I'd have to setup a dev environment for it but if I find the time I'll submit a PR over on Chunky.

commented

Good catch. I have not had the time unfortunately to look into this, but as always PRs for fixes are welcome. It's probably a fairly simple issue as you mentioned.

commented

Feel free to join the Discord if you need any help with that. If not, no problem as I'll probably free up soon to start looking at some of these issues.