Skip to content

Conversation

@IceTank
Copy link
Contributor

@IceTank IceTank commented Jun 25, 2025

FreeLook Module

Has some extra settings for more advanced use

}

init {
previousPerspective = MinecraftClient.getInstance().options.perspective
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might as well use the mc property in Lambda

object FreeLook : Module(
name = "FreeLook",
description = "Allows you to look around freely while moving",
defaultTags = setOf(com.lambda.module.tag.ModuleTag.RENDER, com.lambda.module.tag.ModuleTag.MOVEMENT)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can import the enum instead of using the full canonical path

@IceTank IceTank requested a review from emyfops June 26, 2025 15:07
Comment on lines 107 to 114

@ModifyArgs(method = "update", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/Camera;setRotation(FF)V"))
private void onUpdateSetRotationArgs(Args args) {
if (FreeLook.INSTANCE.isEnabled()) {
args.set(0, FreeLook.INSTANCE.getCamera().getYawF());
args.set(1, FreeLook.INSTANCE.getCamera().getPitchF());
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a snippet of the modified method ? Check other mixins for an example
This is crucial for mixin updates on new versions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean the original source?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, look at other mixins for an example

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do

@emyfops emyfops self-requested a review June 27, 2025 19:58
Copy link
Collaborator

@emyfops emyfops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm @Avanatiker what do you think

@IceTank
Copy link
Contributor Author

IceTank commented Jul 9, 2025

Btw this merges into 1.21.5. But I think 1.21.4 is main atm? Can probably back port easily.

@emyfops
Copy link
Collaborator

emyfops commented Jul 9, 2025

Btw this merges into 1.21.5. But I think 1.21.4 is main atm? Can probably back port easily.

1.21.5 is main

@Avanatiker Avanatiker force-pushed the feature/freelook-module branch from a91d23d to 04802dc Compare July 24, 2025 19:55
@emyfops emyfops merged commit 51f8501 into 1.21.5 Jul 24, 2025
1 check failed
@IceTank IceTank deleted the feature/freelook-module branch July 28, 2025 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants