enjarai / do-a-barrel-roll

Microsoft flight simulator for Minecraft elytras.
https://www.curseforge.com/minecraft/mc-mods/do-a-barrel-roll
GNU General Public License v3.0
93 stars 27 forks source link

Incompatibility with Real Camera #124

Closed Steveplays28 closed 6 months ago

Steveplays28 commented 6 months ago

Describe the issue Using Do a Barrel Roll with Real Camera causes a crash when joining a multiplayer server (server doesn't have the mod, but I doubt that's relevant for this specific crash).

Crash report/logs https://mclo.gs/63Oa1bw

Additional information N/A

enjarai commented 6 months ago

Real Camera is probably doing some cursed as hell shenanigans, cause I have no idea what could be causing this crash. You may have a better time asking their side for compatibility.

While I'd be happy to make required changes if given an explanation of the problem, I'm not going to invest more time into figuring this out myself. Feel free to reopen if you get more information in the future.

Steveplays28 commented 6 months ago

Thanks for getting back! I took a look, it seems like mixin is thinking you want to update the shadow tickDelta field in the actual class (even though this is not explicitly specified using @Shadow) instead of the local tickDelta field you made:

https://github.com/enjarai/do-a-barrel-roll/blob/e8fe7f9eea38755e73adae3141a3dc4faa8ab4e0/common/src/main/java/nl/enjarai/doabarrelroll/mixin/client/roll/PlayerEntityRendererMixin.java#L18

I think renaming the field to doABarrelRoll$tickDelta would fix the issue, haven't tested though.

The actual issue probably stems from the fact that the PlayerEntityRenderer#setupTransforms method is called from somewhere inside Real Camera's code, instead of in MC's code (which I'm guessing is in a constructor somewhere).

enjarai commented 6 months ago

Oh I should definitely fix that mixin yea, I probably made that before I actually knew how to do em properly. I don't quite see how that'd cause issues though, since PlayerEntityRenderer doesnt have a tickDelta field?

enjarai commented 6 months ago

Changing that mixin did in fact fix the issue! I'll push an update soon™, thanks for helping figure this out.

Steveplays28 commented 6 months ago

Awesome, no problem. Thank you as well for trying that.

Oh I should definitely fix that mixin yea, I probably made that before I actually knew how to do em properly. I don't quite see how that'd cause issues though, since PlayerEntityRenderer doesnt have a tickDelta field?

Weird, it probably should since the class is for rendering. Definitely has to do with Real Camera moving the setupTransforms call though.