Skip to content

Fix client height bounds - #116

Merged
RecursivePineapple merged 4 commits into
GTNewHorizons:masterfrom
Jakfut:fix-client-height-bounds
Aug 22, 2026
Merged

Fix client height bounds#116
RecursivePineapple merged 4 commits into
GTNewHorizons:masterfrom
Jakfut:fix-client-height-bounds

Conversation

@Jakfut

@Jakfut Jakfut commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #110 by not treating positions outside the configured world bounds as unloaded terrain, which caused the client to permanently apply the vanilla missing-chunk fall speed clamp.

Also syncs world and generation height bounds through S07PacketRespawn. Previously respawning would cause dimensions to be 0...256 on the client side until relogging

@DarkShadow44

Copy link
Copy Markdown
Collaborator

Huh did we really never handle dimension transitions? Looks good to me.

@RecursivePineapple RecursivePineapple 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.

Looks good for the most part. I have two minor concerns.


@Inject(method = "readPacketData", at = @At("TAIL"))
private void cubicChunks$readHeightInfo(PacketBuffer data, CallbackInfo ci) {
if (data.readableBytes() < 16) return;

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 is fragile, if there's a buffer underrun because of a mixin conflict we should just crash

@Expression("this.clientWorldController.isRemote = true")
@Inject(method = "handleRespawn", at = @At("MIXINEXTRAS:EXPRESSION"))
void initRespawnedClientCubicWorld(S07PacketRespawn packetIn, CallbackInfo ci) {
if (packetIn instanceof ICubicRespawnPacket cubicRespawnPacket) {

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 instanceof should just be a cast, we don't want this silently breaking if someone removes the mixin (or breaks it by accident)

@RecursivePineapple RecursivePineapple added the Merge Into Prerelease PR will be added to -pre releases (via the dev branch). label Aug 19, 2026
@RecursivePineapple
RecursivePineapple merged commit adf37ca into GTNewHorizons:master Aug 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merge Into Prerelease PR will be added to -pre releases (via the dev branch).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slow falling below min height

3 participants