Auto Third Person

Auto Third Person

2M Downloads

[Bug] Player remains in 3rd person if boat breaks

teleheel opened this issue ยท 3 comments

commented

With autoRestore = true, if the boat is broken while the player sits in it (e.g. due to fall damage, cactus, explosions, etc.), the player remains in 3rd person even after the boat is broken. One can change back to 1st person manually.

commented

That's odd. I need to ask which version/loader, since the method of tracking whether you're riding a boat is different across the releases.

commented

Sure, I tested on 1.20.1 with Fabric Loader 0.14.22.

If Fabric API is a dependency, I used version 0.86.1+1.20.1.

commented

Sorry for letting this sit for so long, been busy with Blanketcon and some sickness ๐Ÿ˜”

It looks like the problem was a stray isAlive check in EntityVehicle#equals:

return myEntity != null && myEntity.isAlive() && myEntity == otherEntity;

The way the mod detects mounting/dismounting is kind of sloppy.

I think a far better approach would be to just get the "current" vehicle instead of trying to use mount/dismount events. For now, removing this check seems to fix it.