TheEpicBlock / immersive-cursedness

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Portal atmosphere offsets from the camera in third-person view

EZForever opened this issue · comments

This bug pretty much broke the immersion. Tested on Minecraft 1.16.5 + Fabric Loader 0.11.6 + Fabric API 0.36.0+1.16 + Immersive Cursedness 1.3.2.

2021-07-23_14 23 36

2021-07-23_14 23 54


Diving into the code, it seems that the atmosphere is created based on player entity's eye position, rather than the actual camera position:

FlatStandingRectangle rect2 = rect.expand(i, player.getCameraPosVec(1));

Where net.minecraft.entity.Entity#getCameraPosVec() is defined like (Yarn 1.16.5+build.10-v2):

public final Vec3d getCameraPosVec(float tickDelta) {
    if (tickDelta == 1.0F) {
        return new Vec3d(this.getX(), this.getEyeY(), this.getZ());
    } else {
        // ...
    }
}

However, since net.minecraft.client.render.Camera class is client-only, I doubt if this bug is actually fixable on server side.

The server has no idea whether the client's in f5 or not, yeah

Yeah, I couldn't find any C2S packets telling the server f5 is on. Unless this is changed in a future update there's nothing Immersive Cursedness can do about this