Mekanism

Mekanism

111M Downloads

Flight state may be finicky on servers

Soaryn opened this issue ยท 2 comments

commented

Issue description

Mek 10.3.11 on Forgecraft.

Flight is rather finicky and does not allow landing with the gravitational module (which either means A: isFlying is always set to true, or B: once flying the mayFly is set to false leaving the player unable to disengage flight until they unequip or turn off the module. When on the ground the fov keeps shifting as if I am going in and out of flying and never fully landing.

Do note, that vanilla has a way to send the ability update to client/server depending on where you call it from. For flight abilities, it is recommended to only update the mayFly and isFlying from the server then call player.onUpdateAbilities(); when those values change. Make sure to only call that on the server otherwise the client will try to inform the server of the opposite if no values are set and vice versa.

https://github.com/mekanism/Mekanism/blob/5cc8b149f7046e86d9b0f44537fc6e2152c0d4ce/src/main/java/mekanism/common/base/PlayerState.java#L323C18-L323C42

Steps to reproduce

FC has it for sure and I can definitely provide you with a suit if need be. But this is likely able to be done on a dedicated runServer environment. There IS a chance of some cross mod incompatibility, but it seems odd that others are working where the module is not.

Minecraft version

1.20.1 (Not yet released, manually compiled)

Forge version

Neo 47.1.72

Mekanism version

Current Dev Branch (Manually Compiled)

Other relevant versions

No response

If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)

No response

commented

Did you happen to catch this on video? I can't for the life of me reproduce it (tried in dev, with a regular local server with and without FC mods)

It does look like we can remove that sync packet in favour of onUpdateAbilities though

commented

Tracked down to be caused by iFly